/* =========================================
   1. BASE STYLES (Mobile First / Desktop Default)
   ========================================= */

/* The Floating Header */
.nav-island {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1080px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 10px 20px;
    z-index: 1000; /* Stays on top of everything */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.nav-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* Logo */
.logo { 
    font-size: 1.3rem; 
    font-weight: 800; 
    text-decoration: none; 
    color: var(--text-main); 
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
}
.logo span { color: #fd9712; }

/* Desktop Navigation Links */
.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 30px; 
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a { 
    text-decoration: none; 
    color: var(--text-main); 
    font-weight: 500; 
    font-size: 0.95rem; 
    transition: color 0.2s;
}

.nav-links a:hover { color: #0871ab; }

/* Right Side Area (Theme Toggle + Button + Hamburger) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Subscribe Button */
.nav-btn {
    background: #fd9712;
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    white-space: nowrap;
}
.nav-btn:hover { background: #e88b0f; }

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    transition: all 0.3s ease;
}
.theme-toggle:hover { background: rgba(0, 0, 0, 0.1); }

/* Icons visibility logic */
.icon-moon { display: none; }
.icon-sun { display: block; }

/* Dark Mode Overrides */
body.dark-mode .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: #ffcc00;
}
body.dark-mode .icon-sun { display: none; }
body.dark-mode .icon-moon { display: block; }


/* =========================================
   2. DROPDOWN STYLES
   ========================================= */
.dropdown {
    position: relative;
    display: block; /* Ensure it takes space */
}

.dropdown .fa-chevron-down {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s;
}

.dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-card);
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 10px 0;
    border: 1px solid var(--border-color);
    z-index: 1001;
    flex-direction: column;
    margin-top: 10px;
}

/* Show on hover */
.dropdown:hover .dropdown-content {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.dropdown-content a {
    padding: 12px 20px;
    color: var(--text-main);
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--brand-orange);
}

/* =========================================
   3. MOBILE STYLES (The Fix)
   ========================================= */

/* Default State: Hamburger and Mobile Menu are HIDDEN on Desktop */
.hamburger { display: none; }
.mobile-menu { display: none; }

/* Triggers when screen is smaller than 768px (Tablets/Phones) */
@media (max-width: 768px) {

    /* 1. Hide Desktop Elements */
    .nav-links { display: none; }   /* Hides the ul list */
    .desktop-only { display: none; } /* Hides the Subscribe button */

    /* 2. Show Hamburger Icon */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background-color: var(--text-main);
        border-radius: 2px;
        transition: 0.3s;
    }

    /* 3. The Full Screen Mobile Menu Overlay */
    .mobile-menu {
        display: none; /* Hidden until JS adds .active */
        position: fixed;
        top: 0; 
        left: 0;
        width: 100%;
        height: 100vh; /* Full screen */
        background-color: var(--bg-main);
        z-index: 999; /* Below the nav-island (1000) so you can still click the close button */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 80px; /* Push links down so they don't hide behind the header */
    }

    /* This class is added by JS when you click hamburger */
    .mobile-menu.active {
        display: flex;
    }

    /* Mobile Links Styling */
    .mobile-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .mobile-links a {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-main);
        text-decoration: none;
    }

    .mobile-cta {
        background: #fd9712;
        color: white !important;
        padding: 15px 30px;
        border-radius: 50px;
        font-size: 1.2rem !important;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}