/* Navbar improvements and responsive fixes */
/*
 * IMPORTANT: Mobile navigation uses mobile-menu-particles.js
 * This file handles DESKTOP layout only (>768px)
 * Mobile menu (.nav-menu) is HIDDEN on screens ≤768px
 */

/* Better spacing for nav container - ensure flex layout */
.nav-container {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 1rem 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1.5rem !important;
}

/* Optimize nav-menu spacing - ensure horizontal layout (DESKTOP ONLY) */
.nav-menu {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    gap: 2rem !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    flex: 1 !important;
    justify-content: center !important;
}

/* Fix vertical alignment of menu items */
.nav-menu li {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-link {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.5rem 0 !important;
}

/* Ensure nav-logo stays compact and in flex */
.nav-logo {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
    cursor: pointer;
    transition: var(--transition-base);
    flex-shrink: 0 !important;
}

/* Ensure nav-actions stays compact and in flex */
.nav-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.5rem !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
}

/* Better logo text sizing */
.logo-text {
    font-family: var(--font-display);
    font-size: 1.35rem !important;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap !important;
}

/* Better button sizing */
.btn-calculate-nav {
    padding: 0.65rem 1.5rem !important;
    background: var(--gradient-primary);
    color: var(--white) !important;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem !important;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 4px 15px rgba(30, 41, 59, 0.3);
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* Medium screens (tablets) */
@media (max-width: 992px) {
    .nav-container {
        padding: 1rem 1.5rem !important;
    }

    .nav-menu {
        gap: 1.5rem !important;
    }

    .nav-link {
        font-size: 0.9rem !important;
    }

    .logo-text {
        font-size: 1.2rem !important;
    }

    .logo-icon {
        width: 36px !important;
        height: 36px !important;
    }
}

/* Small tablets and large phones */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem !important;
    }

    /* CRITICAL: Hide desktop menu completely on mobile */
    .nav-menu {
        display: none !important;
    }

    /* Hide calculate button on mobile - it's in the menu */
    .btn-calculate-nav {
        display: none !important;
    }

    .logo-text {
        font-size: 1.1rem !important;
    }

    .logo-icon {
        width: 32px !important;
        height: 32px !important;
    }

    /* Show burger menu */
    .nav-burger {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 40px !important;
        height: 40px !important;
        gap: 4px !important;
        cursor: pointer;
        padding: 8px;
    }

    /* Style burger lines */
    .nav-burger span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--dark, #0f172a);
        transition: all 0.3s ease;
    }

    /* Ensure nav-actions only shows burger */
    .nav-actions {
        gap: 0 !important;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 0.75rem !important;
    }

    .logo-text {
        font-size: 1rem !important;
    }

    .logo-icon {
        width: 28px !important;
        height: 28px !important;
    }

    .nav-burger span {
        width: 22px !important;
    }
}

/* Ensure smooth transitions */
.navbar,
.nav-container,
.nav-logo,
.nav-menu,
.nav-actions,
.btn-calculate-nav {
    transition: all 0.3s ease;
}
