/* --- Menu Overlay --- */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    /* Background Image - Wood Texture */
    background-image: url('../img/Menu_section.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
    overflow: hidden;
}

/* Dark Overlay for Readability */
#menu-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    /* Subtle dark overlay */
    z-index: -1;
    /* Wait, checking z-index stacking. 
       If this psuedo is on #menu-overlay, it will be ABOVE the background-image (which is on the element itself)
       but BELOW the content if z-index is correct. 
       Actually, standard stacking context: background image is bottom. 
       Pseudo element with z-index -1 will go BEHIND the element's background!
       So we need z-index 0 or 1, and content needs higher z-index.
       OR, use linear-gradient on the background-image directly.
       OR, just set z-index: 0 on overlay, and z-index: 1 on grid.
    */
    z-index: 0;
}

/* Open State */
body.menu-open #menu-overlay {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* Grid Layout */
.menu-grid {
    display: flex;
    flex-direction: row !important;
    /* Force Row on Desktop */
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Columns */
.menu-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    height: 100%;
}

.menu-col:last-child {
    border-right: none;
}

/* --- Cards --- */
.menu-card {
    position: relative;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: background-color 0.3s ease;
    /* Ensure default background if not overridden */
    background-color: transparent;
    color: #556B2F;
    padding: 40px;
}

.menu-card:last-child {
    border-bottom: none;
}

/* Overview Card (Transparent) - Force Override */
.menu-card.card-overview {
    background-color: transparent !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Column 1 Proportions (Overview vs About) */
.col-left .card-overview {
    flex: 0 0 35%;
}

.col-left .card-about {
    flex: 1;
}

/* Column 2 Proportions (Pallets vs Packaging) */
.col-center .card-pallets {
    flex: 0 0 65%;
}

.col-center .card-packaging {
    flex: 1;
}

/* Column 3 Proportions (Cases vs Contact) */
.col-right .card-cases {
    flex: 0 0 65%;
}

.col-right .card-contact {
    flex: 1;
}

/* --- Content Styling --- */
.card-content {
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    background: #FFFDF5;
}

.card-content.centered {
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Typography */
.menu-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    color: #fff;
    /* Ensure white */
}

.col-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #556B2F;
    margin-bottom: 2rem;
    text-transform: capitalize;
}

/* Link Lists */
.menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-links li {
    margin-bottom: 1rem;
}

.menu-links a {
    text-decoration: none;
    color: #7A8B58;
    font-family: 'Mukta', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    transition: color 0.2s;
    display: block;
}

.menu-links a:hover {
    color: #556B2F;
}

/* "Click to know more" */
.click-more {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: 'Mukta', sans-serif;
    font-size: 0.75rem;
    color: #556B2F;
    opacity: 0.6;
    text-transform: lowercase;
    pointer-events: none;
}

/* --- Close Button --- */
.menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
    margin-top: 1rem;
    transition: transform 0.3s ease;
}

.menu-close:hover {
    transform: scale(1.1);
}

.close-circle {
    width: 60px;
    height: 60px;
    border: 1px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.close-circle span {
    font-size: 2rem;
    color: #fff;
    line-height: 1;
    font-weight: 300;
}

/* Responsive: Tablet & Mobile */
@media (max-width: 1024px) {
    #menu-overlay {
        overflow-y: auto;
    }

    .menu-grid {
        flex-direction: column !important;
        /* Stack vertically */
        height: auto;
    }

    .menu-col {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        height: auto;
    }

    .menu-card {
        min-height: 300px;
        flex: auto !important;
        /* Reset flex proportions */
    }

    .card-overview {
        min-height: 400px;
    }
}