/* ========================================
   Menu Page Styles - IMT Coffee
   Refactored: Seamless Infinite Carousel
   ======================================== */

/* ========================================
   Menu Section Styles
   ======================================== */
.menu-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background Image */
.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -100;
}

/* Menu Container */
.menu-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Slider Container Styles
   ======================================== */
.menu-slider-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;

}

.menu-slider {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Slider Wrapper */
.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    overflow: hidden;
}

/* Slider Track */
.slider-track {
    display: flex;
    width: 100%;
    will-change: transform;
}

/* ========================================
   Slide Base Styles
   All slides have fixed width (20% for 5 items)
   We use CSS to control visibility and scaling
   ======================================== */
.slide {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Each slide is 20% - this is for max 5 items */
    width: 20%;
    padding: 15px;
    box-sizing: border-box;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

/* Slide Image */
.slide img {
    width: 100%;
    max-width: 280px;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Clone slides - hidden from screen readers */
.slide.clone {
    pointer-events: none;
}

/* ========================================
   Slide Position Classes
   These classes determine visual emphasis
   ======================================== */

/* Active Center (the main highlighted slide) */
.slide.active-center {
    opacity: 1;
    transform: scale(1.15);
}

.slide.active-center img {
    max-width: 380px;
    max-height: 340px;
    filter: drop-shadow(0 15px 40px rgba(36, 36, 36, 0.2));
}

/* Adjacent slides (next to center) */
.slide.adjacent-slide {
    opacity: 0.8;
    transform: scale(0.9);
}

.slide.adjacent-slide img {
    max-width: 260px;
    max-height: 230px;
}

/* Outer slides (far edges) */
.slide.outer-slide {
    opacity: 0.5;
    transform: scale(0.75);
}

.slide.outer-slide img {
    max-width: 220px;
    max-height: 190px;
}

/* Hidden slides (outside visible area) */
.slide.hidden-slide {
    opacity: 0;
    visibility: hidden;
}

/* ========================================
   Large Desktop (lg): 5 items per view
   Active item is the 3rd (center) item
   ======================================== */
@media (min-width: 1024px) {
    .slider-wrapper {
        max-width: 1100px;
    }

    /* All slides visible, width is 20% */
    .slide {
        width: 20%;
    }
}

/* ========================================
   Medium Desktop (md): 3 items per view
   Active item is the 2nd (center) item
   ======================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .slider-wrapper {
        max-width: 900px;
    }

    /* All slides still 20% width, but we'll hide extras */
    .slide {
        width: 20%;
    }

    /* On medium screens, outer slides are more hidden */
    .slide.outer-slide {
        opacity: 0.3;
        transform: scale(0.65);
    }

    .slide.outer-slide img {
        max-width: 180px;
        max-height: 160px;
    }

    .slide.adjacent-slide {
        opacity: 0.7;
        transform: scale(0.85);
    }

    .slide.adjacent-slide img {
        max-width: 250px;
        max-height: 220px;
    }

    .slide.active-center {
        opacity: 1;
        transform: scale(1.15);
    }

    .slide.active-center img {
        max-width: 380px;
        max-height: 330px;
        filter: drop-shadow(0 15px 40px rgba(245, 158, 11, 0.2));
    }
}

/* ========================================
   Small Mobile (sm): 1 item per view
   The single visible item is the active item
   ======================================== */
@media (max-width: 767px) {
    .menu-container {
        padding: 0 20px;
    }

    .slider-wrapper {
        max-width: 100%;
    }

    /* On mobile, show only 1 slide at a time */
    .slide {
        width: 100%;
        padding: 15px;
    }

    /* All slides are equal on mobile */
    .slide.active-center,
    .slide.adjacent-slide,
    .slide.outer-slide {
        opacity: 1;
        transform: scale(1);
    }

    .slide.active-center {
        transform: scale(1.08);
    }

    .slide.active-center img,
    .slide img {
        max-width: 280px;
        max-height: 250px;
    }

    /* Hide pagination dots on very small screens if needed */
    .slider-dots {
        gap: 8px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }
}

/* ========================================
   Arrow Navigation
   ======================================== */
.slider-arrow {
    width: 50px;
    height: 50px;
    background: var(--bg-light-soft);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.slider-arrow:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.slider-arrow svg {
    width: 24px;
    height: 24px;
    fill: var(--text-dark);
    transition: fill 0.3s ease;
}

.slider-arrow:hover svg {
    fill: var(--text-light);
}

.slider-arrow.prev {
    margin-right: 20px;
}

.slider-arrow.next {
    margin-left: 20px;
}

/* Slider Controls - Container for arrows and pagination */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    width: 100%;
}

/* Dot Pagination */
.slider-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 1px;
    min-width: 60px;
}

.slider-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-light-muted);
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: var(--accent-soft);
    transform: scale(1.2);
}

.dot.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.2);
}

/* ========================================
   Subtitle Styles
   ======================================== */
.menu-subtitle {
    margin-top: 40px;
    text-align: center;
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 1;
    transition: opacity 0.3s ease;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

/* ========================================
   Food Description Styles
   ======================================== */
.food-description {
    margin-top: 30px;
    text-align: center;
    padding: 0 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.food-name {
    color: var(--accent-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.food-text {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Mobile Adjustments for Controls
   ======================================== */
@media (max-width: 600px) {
    .slider-arrow {
        width: 40px;
        height: 40px;
    }

    .slider-arrow svg {
        width: 20px;
        height: 20px;
    }

    .slider-arrow.prev {
        margin-right: 10px;
    }

    .slider-arrow.next {
        margin-left: 10px;
    }

    .slider-controls {
        margin-top: 20px;
    }

    .page-number {
        font-size: 14px;
        min-width: 50px;
    }

    .food-name {
        font-size: 22px;
    }

    .food-text {
        font-size: 14px;
    }
}