/* ========== MEAL PREP — SECTION 4: PHOTO GALLERY ========== */

.mp-gallery-section {
    background: #0d0a04;
    padding: 24px 48px;
    /* Reduced vertical padding */
    position: relative;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
}

.mp-gallery-inner {
    max-width: 1400px;
    /* Increased from 1200px */
    margin: 0 auto;
    width: 100%;
    height: 90vh;
    /* Allow some breathing room */
    display: flex;
    flex-direction: column;
}

/* Header Styling */
.mp-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2vh;
    /* Further reduced from 3vh */
    gap: 40px;
}

.mp-gallery-title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(1.8rem, 3.8vh, 42px);
    /* Slightly smaller fluid size */
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
    max-width: 860px;
}

/* CTA Button Styling */
.mp-gallery-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* Thinner border */
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 100px;
    padding: 10px 10px 10px 28px;
    transition: border-color 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    min-width: 280px;
    height: 64px;
    /* Slightly tighter height */
    justify-content: space-between;
}

.mp-gallery-cta:hover {
    border-color: #e0b973;
    transform: translateY(-2px);
}

.mp-gallery-cta-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    /* Removed background to use the image directly */
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-gallery-cta-icon img {
    width: 100%;
    /* Fill the container if the image is the icon */
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Gallery Grid Styling */
.mp-gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Restored gap for visibility */
    width: 100%;
    flex: 1;
    /* Take up remaining space */
}

.mp-gallery-row-1,
.mp-gallery-row-2 {
    display: flex;
    gap: 15px;
    width: 100%;
}

.mp-gallery-item {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.mp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.mp-gallery-item:hover img {
    transform: scale(1.05);
}

/* Specific item widths/heights for row 1 */
.mp-gallery-pic-1 {
    flex: 0 0 calc(35.5% - 7.5px);
    height: 35vh;
    /* Reduced back to fit 100vh */
}

.mp-gallery-pic-2 {
    flex: 1;
    height: 35vh;
}

/* Specific item widths/heights for row 2 */
.mp-gallery-pic-3 {
    flex: 0 0 calc(49.8% - 7.5px);
    height: 38vh;
    /* Reduced back to fit 100vh */
}

.mp-gallery-pic-4 {
    flex: 1;
    height: 38vh;
}



/* Mobile Navigation Arrows (Carousel) */
.mp-gallery-mobile-nav {
    display: none;
    /* Hidden on desktop */
}

/* ---- Mobile Responsiveness ---- */
@media (max-width: 1023px) {
    .mp-gallery-section {
        height: auto;
        padding: 60px 24px;
        display: block;
    }

    .mp-gallery-inner {
        height: auto;
    }

    .mp-gallery-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        margin-bottom: 40px;
    }

    .mp-gallery-title {
        font-size: 32px;
        max-width: 100%;
    }

    .mp-gallery-cta {
        min-width: 100%;
    }

    /* Carousel Implementation */
    .mp-gallery-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mp-gallery-row-1,
    .mp-gallery-row-2 {
        display: contents;
        /* Flatten rows on mobile */
    }

    .mp-gallery-item {
        display: none;
        /* Hide all items by default on mobile */
        width: 100%;
    }

    .mp-gallery-item.active {
        display: block;
        /* Show active item */
        animation: fadeIn 0.4s ease;
    }

    .mp-gallery-pic-1,
    .mp-gallery-pic-2,
    .mp-gallery-pic-3,
    .mp-gallery-pic-4 {
        height: 350px;
        flex: unset;
    }

    /* Mobile Nav Buttons */
    .mp-gallery-mobile-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
        /* Matched Section 2 */
        margin-top: 30px;
    }

    .mp-gallery-nav-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.25s ease;
    }

    .mp-gallery-nav-btn:hover {
        transform: scale(1.08);
        /* Matched Section 2 */
    }

    .mp-gallery-nav-btn img {
        width: 42px;
        /* Matched Section 2 */
        height: 42px;
        display: block;
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .mp-gallery-title {
        font-size: 28px;
    }

    .mp-gallery-pic-1,
    .mp-gallery-pic-2,
    .mp-gallery-pic-3,
    .mp-gallery-pic-4 {
        height: 300px;
    }
}