/* Base Styles */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --accent: #4895ef;
    --dark: #1f2937;
    --light: #f8f9fa;
    --gray: #6b7280;
    --light-gray: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Ad Spaces (hidden in UI) */
.ad-space-left,
.ad-space-right {
    position: absolute;
    width: 160px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.ad-space-left {
    left: 0;
}

.ad-space-right {
    right: 0;
}

/* Header */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.logo-icon::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid white;
    border-radius: 5px;
    transform: rotate(45deg);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text .tech {
    color: var(--primary);
}

/* Navigation */
.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    font-weight: 500;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a i {
    font-size: 0.9rem;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Grid Hero Section */
.grid-hero {
    padding: 150px 0 80px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.grid-item {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--light-gray);
    position: relative;
    overflow: hidden;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.grid-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    color: white;
    position: relative;
    z-index: 1;
}

.grid-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.grid-item p {
    font-size: 0.9rem;
    color: var(--gray);
    position: relative;
    z-index: 1;
}

.tool-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 0;
}

.grid-item:hover .tool-hover-effect {
    opacity: 0.1;
}

/* Unique Hover Effects for Each Tool */
.pdf-tool .tool-hover-effect {
    background: linear-gradient(135deg, #FF5F6D, #FFC371);
}
.pdf-tool .grid-icon {
    background: linear-gradient(135deg, #FF5F6D, #FFC371);
}

.code-tool .tool-hover-effect {
    background: linear-gradient(135deg, #4776E6, #8E54E9);
}
.code-tool .grid-icon {
    background: linear-gradient(135deg, #4776E6, #8E54E9);
}

.image-tool .tool-hover-effect {
    background: linear-gradient(135deg, #F46B45, #EEA849);
}
.image-tool .grid-icon {
    background: linear-gradient(135deg, #F46B45, #EEA849);
}

.security-tool .tool-hover-effect {
    background: linear-gradient(135deg, #11998E, #38EF7D);
}
.security-tool .grid-icon {
    background: linear-gradient(135deg, #11998E, #38EF7D);
}

.qr-tool .tool-hover-effect {
    background: linear-gradient(135deg, #8E2DE2, #4A00E0);
}
.qr-tool .grid-icon {
    background: linear-gradient(135deg, #8E2DE2, #4A00E0);
}

.color-tool .tool-hover-effect {
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
}
.color-tool .grid-icon {
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
}

.unit-tool .tool-hover-effect {
    background: linear-gradient(135deg, #4ECDC4, #556270);
}
.unit-tool .grid-icon {
    background: linear-gradient(135deg, #4ECDC4, #556270);
}

.html-tool .tool-hover-effect {
    background: linear-gradient(135deg, #E44D26, #F16529);
}
.html-tool .grid-icon {
    background: linear-gradient(135deg, #E44D26, #F16529);
}

.text-tool .tool-hover-effect {
    background: linear-gradient(135deg, #614385, #516395);
}
.text-tool .grid-icon {
    background: linear-gradient(135deg, #614385, #516395);
}

.calc-tool .tool-hover-effect {
    background: linear-gradient(135deg, #1D976C, #93F9B9);
}
.calc-tool .grid-icon {
    background: linear-gradient(135deg, #1D976C, #93F9B9);
}

.date-tool .tool-hover-effect {
    background: linear-gradient(135deg, #3A7BD5, #00D2FF);
}
.date-tool .grid-icon {
    background: linear-gradient(135deg, #3A7BD5, #00D2FF);
}

.data-tool .tool-hover-effect {
    background: linear-gradient(135deg, #FF5E62, #FF9966);
}
.data-tool .grid-icon {
    background: linear-gradient(135deg, #FF5E62, #FF9966);
}

.json-tool .tool-hover-effect {
    background: linear-gradient(135deg, #7B4397, #DC2430);
}
.json-tool .grid-icon {
    background: linear-gradient(135deg, #7B4397, #DC2430);
}

.gen-tool .tool-hover-effect {
    background: linear-gradient(135deg, #1FA2FF, #12D8FA, #A6FFCB);
}
.gen-tool .grid-icon {
    background: linear-gradient(135deg, #1FA2FF, #12D8FA, #A6FFCB);
}

.api-tool .tool-hover-effect {
    background: linear-gradient(135deg, #FF512F, #DD2476);
}
.api-tool .grid-icon {
    background: linear-gradient(135deg, #FF512F, #DD2476);
}

.cmd-tool .tool-hover-effect {
    background: linear-gradient(135deg, #1A2980, #26D0CE);
}
.cmd-tool .grid-icon {
    background: linear-gradient(135deg, #1A2980, #26D0CE);
}

.ip-tool .tool-hover-effect {
    background: linear-gradient(135deg, #403B4A, #E7E9BB);
}
.ip-tool .grid-icon {
    background: linear-gradient(135deg, #403B4A, #E7E9BB);
}

.sec-tool .tool-hover-effect {
    background: linear-gradient(135deg, #16222A, #3A6073);
}
.sec-tool .grid-icon {
    background: linear-gradient(135deg, #16222A, #3A6073);
}

.cloud-tool .tool-hover-effect {
    background: linear-gradient(135deg, #1CD8D2, #93EDC7);
}
.cloud-tool .grid-icon {
    background: linear-gradient(135deg, #1CD8D2, #93EDC7);
}

.ai-tool .tool-hover-effect {
    background: linear-gradient(135deg, #C33764, #1D2671);
}
.ai-tool .grid-icon {
    background: linear-gradient(135deg, #C33764, #1D2671);
}

/* Responsive */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .grid-hero {
        padding: 120px 0 60px;
    }
}

@media (max-width: 576px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .grid-item {
        padding: 20px;
    }

    .grid-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}