/* --- Root Variables --- */
:root {
    --nav-height: 80px;
    --nav-height-mobile: 70px;
}

/* --- Global Nav Container --- */
nav {
    background-color: var(--base);
    height: var(--nav-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

/* --- Logo Section --- */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
    order: 1;
    /* Always Far Left */
}

.logo img {
    height: 55px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

/* --- Navigation Links (Desktop) --- */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    order: 2;
}

.nav-links li a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--yellow);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--yellow);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

/* --- Social Icons (Desktop & Mobile Base) --- */
.social-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    list-style: none;
    padding: 0;
    margin: 0;
    order: 3;
}

.social-nav img {
    height: 30px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* --- Burger & Toggle (Logic) --- */
#menu-toggle {
    display: none;
}

.burger-icon {
    display: none;
    /* Hidden on Desktop */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.burger-icon span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- MOBILE STYLES (768px and below) --- */
@media (max-width: 768px) {
    nav {
        height: var(--nav-height-mobile);
        padding: 0 1.5rem;
    }

    .logo img {
        height: 40px;
    }

    /* 1. Push Socials to the Right */
    .social-nav {
        order: 2;
        /* Middle position */
        margin-left: auto;
        /* Shoves everything after Logo to the right edge */
        gap: 0.8rem;
    }

    .social-nav img {
        height: 30px;
    }

    /* 2. Place Burger to the right of Icons */
    .burger-icon {
        display: flex;
        order: 3;
        /* Far Right position */
        margin-left: 1rem;
        /* Space between icons and burger */
    }

    /* 3. The Slide-out Overlay Menu */
    .nav-links {
        position: fixed;
        top: var(--nav-height-mobile);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height-mobile));
        background-color: var(--base);
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 1000;
    }

    #menu-toggle:checked~.nav-links {
        right: 0;
    }

    /* Burger Animation to 'X' */
    #menu-toggle:checked+.burger-icon span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    #menu-toggle:checked+.burger-icon span:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle:checked+.burger-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    body {
        padding-top: var(--nav-height-mobile);
    }
}

/* Desktop Body Padding */
body {
    padding-top: var(--nav-height);
}