.navlist {
    background-color: black;
    list-style-type: none;
    margin: 0;
    padding: 0;
    padding-top: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.navlist li {
    flex: 1;
    text-align: center;
    min-width: auto;
    font-family: "Michroma", sans-serif;
}

ul li a {
    display: block;
    color: white;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.3s ease;
}

ul li a:hover {
    color: grey;
}

ul li img {
    width: 200px;
    height: auto;
    border-radius: 8px;
}
.sticky{
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.home-button{
    display: block;
    color: white;
    padding: 14px 16px;
    font-size: 45px;
}

.home-button:hover {
    color: grey;
}
.home-button:visited { 
    text-decoration: none; 
}

.home-button:focus { 
    text-decoration: none; 
}

.home-button:active { 
    text-decoration: none; 
}


/* --- RESPONSIVE MENU STYLES --- */

/* Hide the checkbox logic globally */
.side-menu {
    display: none;
}

/* Hide mobile elements by default on Desktop */
.hamb, .mobile-logo {
    display: none;
}

/* Desktop Logo specific styling */
.desktop-logo img {
    width: 200px;
    height: auto;
}

/* --- MOBILE VIEW (Max-width 768px) --- */
@media (max-width: 768px) {

    /* 1. Mobile Logo Positioning */
    .mobile-logo {
        display: block;
        position: absolute;
        top: 15px;
        left: 20px;
        z-index: 1001; /* Above the menu background */
    }
    
    .mobile-logo img {
        width: 150px; /* Slightly smaller for mobile */
        height: auto;
    }

    /* Hide the desktop logo inside the list to avoid duplicates */
    .desktop-logo {
        display: none !important;
    }

    /* 2. Hamburger Icon Styling */
    .hamb {
        display: block;
        cursor: pointer;
        position: fixed; /* Keeps it visible when scrolling */
        top: 25px;
        right: 20px;
        z-index: 1002; /* Topmost layer */
        padding: 10px;
        background: rgba(0,0,0,0.5); /* Slight backing for contrast */
        border-radius: 5px;
    }

    .hamb-line {
        display: block;
        background: white;
        height: 3px;
        width: 30px;
        position: relative;
        border-radius: 2px;
        transition: background 0.2s ease-out;
    }

    /* Create top and bottom lines using pseudo-elements */
    .hamb-line::before,
    .hamb-line::after {
        content: '';
        display: block;
        background: white;
        height: 100%;
        width: 100%;
        position: absolute;
        border-radius: 2px;
        transition: all 0.2s ease-out;
    }

    .hamb-line::before { top: -10px; }
    .hamb-line::after { top: 10px; }

    /* 3. The Menu Drawer (Hidden by default) */
    .navlist {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Full screen height */
        background-color: rgba(0, 0, 0, 0.95); /* Deep black, slight transparency */
        flex-direction: column; /* Stack items vertically */
        align-items: center;
        justify-content: center;
        transform: translateY(-100%); /* Hide upwards */
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* "Futuristic" snap effect */
        z-index: 1000;
        padding-top: 0; /* Override existing padding */
    }

    /* 4. Menu Link Styling for Mobile */
    .navlist li {
        flex: 0; /* Stop stretching */
        margin: 20px 0;
        width: 100%;
    }

    .navlist li a {
        font-size: 2rem; /* Larger text for tapping */
        border-bottom: 1px solid #333; /* Subtle divider */
        width: 80%;
        margin: 0 auto;
    }

    /* 5. OPEN STATE - When checkbox is checked */
    
    /* Slide the menu down */
    .side-menu:checked ~ .sticky .navlist {
        transform: translateY(0);
    }

    /* Animate Hamburger into an 'X' */
    .side-menu:checked ~ .hamb .hamb-line {
        background: transparent; /* Hide middle line */
    }

    .side-menu:checked ~ .hamb .hamb-line::before {
        transform: rotate(-45deg);
        top: 0;
    }

    .side-menu:checked ~ .hamb .hamb-line::after {
        transform: rotate(45deg);
        top: 0;
    }
}