:root {
    --bg: #0b1529;
    --bgSoft: #1f3050;
    --text: #dee4eb;
    --textSoft: #cbd2d9;
}

/* body { */
/*     background-color: var(--bg); */
/*     color: var(--text); */
/*     margin: 0; */
/* } */

.container {
    max-width: 1536px;
    margin: auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100px;
    border-bottom: 2px gold solid;
    position: sticky;
    top: 0px;
    background-color: var(--bg);
    z-index: 99;
}

.logo {
    font-size: 2.4rem;
    font-weight: bold;
    /* z-index requires a position property other than static */
    position: relative; 
    z-index: 1000;
}

.logo svg {
    width: 70px;
    height: 70px;
}

.mobileMenu {
    display: none; /* Hidden by default on larger screens */
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1000;
}

.mobileMenu svg {
    transition: transform 0.3s ease-in-out;
    height: 30px;
    width: 30px;
}

.mobileMenu.active svg {
    transform: rotate(90deg);
}

.links {
    font-size: 1.6rem;
    display: flex;
    gap: 20px;
    align-items: center;
}

.searchBtn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bgSoft);
    color: var(--textSoft);
    padding: 8px 16px;
    border-radius: 12px;
    transition: background-color 0.3s;
}

.searchBtn:hover {
    background-color: #2c426a;
}

.toggle {
    position: relative;
    height: 20px;
    width: 40px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background-color: var(--bgSoft);
    border: 0.5px solid var(--textSoft);
    padding: 0px 5px;
    border-radius: 40px;
}

.toggle svg {
    height: 100%;
    width: 100%;
    /* fill: gold; */
    stroke: red;
    color: green;
}

.knob {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    position: absolute;
    left: 0;
    background-color: var(--textSoft);
    border: 1px solid var(--bgSoft);
}

.light .knob{
    left: unset;
    right: 0;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .navbar {
        /* Allows items to wrap to a new line */
        flex-wrap: wrap;
        background-color: var(--bg);
        z-index: 99;
    }
    
    /* New wrapper for the top row to ensure logo and icon are aligned */
    .navbar-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 100px; /* Maintain consistent height */
    }

    .logo {
        font-size: 2.0rem;
    }

    .logo svg {
        width: 45px;
        height: 45px;
    }

    .mobileMenu {
        display: block; /* Show the hamburger icon */
    }

    .links {
        /* Take up full width to force it to the next line */
        width: 100%;
        /* Stack links vertically */
        flex-direction: column;
        align-items: center;
        gap: 20px;
        
        /* --- This is the key for the push-down animation --- */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
        padding-top: 0;
        padding-bottom: 0;
    }

    .links.open {
        /* Expand to the height you specified */
        max-height: 340px;
        /* Add some padding for better spacing when open */
        padding-top: 20px;
        padding-bottom: 20px;
    }

    /* Styles for links inside the mobile dropdown */
    .links a {
        width: 80%;
        text-align: center;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--bgSoft);
    }

    .links .searchBtn {
        border: none;
        width: 80%;
        justify-content: center;
        padding: 16px;
        font-size: 1.5rem;
    }
}
