:root {
    /* Colors */
    --base-navyblue: #0f172a;
    --accent-red: #dc2626;
    --text-blue: #334155;
    --clr-white: #ffffff;
    --clr-charcoal: #333333;
    --clr-highlight-bg: #4f5f7f; 
}


/* Hiding Desktop Navigation Elements on Small Screens */
.desktop-nav {
    display: none;
}

/* Mobile Header */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px;
    /* --- STICKY/FIXED HEADER PROPERTIES --- */
    position: fixed; 
    top: 0; 
    z-index: 2000;
    background: var(--clr-white);
    width: 100%;
    /* Added transition for smooth hide/show */
    transition: transform 0.3s ease, box-shadow 0.2s ease;
}

/* Open and Close Icons */
.menu-icon {
    width: 33px;
    height: 33px;
    position: relative;
    cursor: pointer;
}

.icon {
    position: absolute;
    font-size: 24px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.hamburger-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.close-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.mobile-header.active .hamburger-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.mobile-header.active .close-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--clr-white);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.45s ease, opacity 0.35s ease;
    border-bottom: 1px solid #ddd;
    z-index: 200;
    display: flex; 
    flex-direction: column;
    gap: 0;
    padding: 0 0 5px 0;
}

.mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
}

.nav-top {
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    position:relative;
    z-index: 210;
    flex-shrink: 0;
}

.nav-links {
    height: fit-content;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: first baseline; 
    align-items: center;
    list-style: none;
    padding: 30px 0 0 0; 
    margin: 0;
    opacity: 0;
    transition: opacity 0.35s ease 0.15s, transform 0.35s ease 0.15s;
    text-align: center;
    border: none;
}

.mobile-nav.open .nav-links {
    opacity: 1;
    transform: translateY(0);
}

.link-styling a {
    font-size: 14px;
    color: var(--text-blue);
    text-decoration: none;
    letter-spacing: 2px;
    height: 100%;
    width: 100%;
    display: block; 
    font-family: "Lato", Arial, Helvetica, sans-serif;
    align-content: center;
    padding: 25px;
    white-space: nowrap;
    
}
.nav-links a:active {
    background-color: var(--clr-highlight-bg); 
    color: var(--clr-white);
    transform: scale(0.98); 
}

.mobile-header .logo img,
#mobile-nav .logo img {
    width: clamp(
        200px, 
        calc(200px + 30 * ((100vw - 393px) / 973)), 
        250px 
    );
}

/* --- SCROLL-ACTIVATED EFFECTS --- */

.mobile-header.hide {
    transform: translateY(-100%);
}

.mobile-header.scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); 
}

/* --- SPACER FOR FIXED HEADER OFFSET --- */
.header-spacer {
    height: 70px; 
}

@media (min-width: 800px) {

    .header-spacer {
        /* Setting the spacer height for desktop view */
        height: 80px; 
    }

    .not-on-desktop {
        display: none;
    }
    
    .mobile-header {
        height: fit-content;
    }
    .desktop-nav {
        display: flex;
        align-items: center;
    }
    /* Desktop Dropdown Menu */
    .desktop-nav .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;

        background: #ffffff;
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: 6px;

        min-width: 220px;

        display: none;
        flex-direction: column;

        padding: 0px 0;
        box-shadow: 0 8px 28px rgba(0,0,0,0.08);

        animation: dropdownFade 0.25s ease;
        z-index: 999;
        
        text-align: start;
    }

    .desktop-nav .dropdown {
        position: relative;
    }

    /* Dropdown links */
    .desktop-nav .dropdown-menu a {
        padding: 12px 18px;
        font-size: 13px;
        font-family: "Lato", sans-serif;

        letter-spacing: 1.5px;

        color: var(--text-blue);
        text-decoration: none;
        display: block;

        transition: background 0.25s ease, padding-left 0.25s ease;
    }

    /* Dropdown Animation */
    @keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
    }
    
    .desktop-nav .dropdown-menu a:hover {
        background: var(--clr-highlight-bg);
        color: var(--clr-white);
        padding-left: 22px;
    }

    /* Show menu on hover */
    .desktop-nav .dropdown:hover .dropdown-menu {
    display: flex;
    }

    .link-styling a {
        padding: 20px;
        position: relative;
        color: var(--text-blue);
    }
    
    .header .mobile-header {
        height: 50px;
    }

    /* The underline effect (doesn't affect layout) */
    .link-styling .home::after,
    .link-styling .about-us::after,
    .link-styling .contact::after,
    .link-styling .pricing::after,
    .link-styling .services::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: var(--base-navyblue);
        pointer-events: none; 
        transition: width 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
    }

    /* The hover color + underline reveal */
    .link-styling .home:hover,
    .link-styling .about-us:hover,
    .link-styling .contact:hover,
    .link-styling .pricing:hover,
    .link-styling .services:hover {
        color: var(--base-navyblue);
    }

    .link-styling .home:hover::after,
    .link-styling .about-us:hover::after,
    .link-styling .contact:hover::after,
    .link-styling .pricing:hover::after,
    .link-styling .services:hover::after {
        width: 100%;
    }
    
    .link-styling {
        text-align: center; 
        position: relative; 
    }
    
}