
/* =====================================================
   MAHFOOZ ACADEMY
   PREMIUM GALLERY
   DIRECT IMAGE DRAG + SWIPE
===================================================== */


/* =====================================================
   MAIN SECTION
===================================================== */

.academy-gallery {

    width: 100%;

    padding: 75px 20px 65px;

    background: #ffffff;

    overflow: hidden;

    box-sizing: border-box;

}

.gallery-container {

    width: 100%;

    max-width: 1180px;

    margin: auto;

}


/* =====================================================
   SECTION TITLE
===================================================== */

.gallery-title {

    text-align: center;

    margin-bottom: 35px;

}

.gallery-title span {

    display: block;

    margin-bottom: 8px;

    color: #8b1e32;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 2.5px;

}

.gallery-title h2 {

    margin: 0;

    color: #242424;

    font-size: 38px;

    line-height: 1.2;

    font-weight: 800;

}

.gallery-title h2 strong {

    color: #8b1e32;

}

.gallery-title p {

    margin: 12px 0 0;

    color: #777777;

    font-size: 14px;

    font-weight: 400;

}


/* =====================================================
   CAROUSEL
===================================================== */

.gallery-carousel {

    position: relative;

    width: 100%;

    min-width: 0;

}


/* =====================================================
   SCROLL WINDOW
===================================================== */

.gallery-window {

    width: 100%;

    overflow-x: auto;

    overflow-y: hidden;

    cursor: grab;

    scrollbar-width: none;

    -ms-overflow-style: none;

    -webkit-overflow-scrolling: touch;

    /*
       Vertical page scrolling allowed.
       Horizontal swipe handled by JS.
    */

    touch-action: pan-y pinch-zoom;

    user-select: none;

    -webkit-user-select: none;

    overscroll-behavior-x: contain;

    scroll-behavior: smooth;

    scroll-snap-type: x proximity;

    border-radius: 16px;

}

.gallery-window::-webkit-scrollbar {

    display: none;

}

.gallery-window.is-dragging {

    cursor: grabbing;

    scroll-behavior: auto;

    scroll-snap-type: none;

}


/* =====================================================
   TRACK
===================================================== */

.gallery-track {

    display: flex;

    width: max-content;

    gap: 14px;

    padding: 0 2px;

    box-sizing: border-box;

}


/* =====================================================
   SLIDES
===================================================== */

.gallery-slide {

    flex: 0 0 360px;

    width: 360px;

    min-width: 0;

    box-sizing: border-box;

    scroll-snap-align: start;

}


/* =====================================================
   PREMIUM CARD
===================================================== */

.gallery-card {

    position: relative;

    width: 100%;

    height: 265px;

    overflow: hidden;

    border-radius: 16px;

    background: #eeeeee;

    cursor: grab;

    user-select: none;

    -webkit-user-select: none;

    box-shadow:

        0 10px 30px rgba(52, 10, 20, 0.10);

    transform: translateZ(0);

    transition:

        box-shadow 0.35s ease,

        transform 0.35s ease;

}

.gallery-card:hover {

    box-shadow:

        0 18px 38px rgba(52, 10, 20, 0.16);

}


/* =====================================================
   IMAGE
===================================================== */

.gallery-card img {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

    pointer-events: none;

    user-select: none;

    -webkit-user-drag: none;

    -webkit-user-select: none;

    transition:

        transform 0.8s cubic-bezier(

            0.22,

            1,

            0.36,

            1

        );

}

.gallery-card:hover img {

    transform: scale(1.07);

}


/* =====================================================
   IMAGE OVERLAY
===================================================== */

.gallery-overlay {

    position: absolute;

    inset: 0;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    padding: 20px;

    pointer-events: none;

    background:

        linear-gradient(

            to top,

            rgba(42, 5, 16, 0.94) 0%,

            rgba(42, 5, 16, 0.68) 30%,

            rgba(42, 5, 16, 0.12) 70%,

            rgba(42, 5, 16, 0) 100%

        );

}


/* =====================================================
   CARD INFORMATION
===================================================== */

.gallery-info {

    min-width: 0;

    padding-right: 10px;

}

.gallery-info span {

    display: block;

    margin-bottom: 6px;

    color: #e9c46a;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 1.5px;

    text-transform: uppercase;

}

.gallery-info h3 {

    margin: 0;

    color: #ffffff;

    font-size: 18px;

    line-height: 1.3;

    font-weight: 750;

}


/* =====================================================
   IMAGE ICON
===================================================== */

.gallery-image-icon {

    flex-shrink: 0;

    width: 40px;

    height: 40px;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.4);

    border-radius: 50%;

    background: #8b1e32;

    color: #ffffff;

    font-size: 13px;

    box-shadow:

        0 5px 18px rgba(0, 0, 0, 0.2);

}


/* =====================================================
   PREMIUM DOTS
===================================================== */

.gallery-dots {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    min-height: 5px;

    margin-top: 24px;

}

.gallery-dot {

    width: 30px;

    height: 5px;

    padding: 0;

    border: none;

    border-radius: 20px;

    background: #c9c1c2;

    cursor: pointer;

    transition:

        width 0.4s ease,

        background 0.4s ease,

        transform 0.3s ease;

}

.gallery-dot:hover {

    transform: scaleY(1.5);

}

.gallery-dot.active {

    width: 59px;

    background: #e9bd35;

}


/* =====================================================
   SWIPE HINT
===================================================== */

.gallery-swipe-hint {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    margin-top: 23px;

    color: #888888;

    font-size: 13px;

    pointer-events: none;

}

.gallery-swipe-hint i {

    color: #8b1e32;

    font-size: 17px;

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

    .academy-gallery {

        padding: 60px 18px;

    }

    .gallery-title h2 {

        font-size: 33px;

    }

    .gallery-slide {

        flex: 0 0 calc(

            (100vw - 50px) / 2

        );

        width: calc(

            (100vw - 50px) / 2

        );

    }

    .gallery-card {

        height: 235px;

    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

    .academy-gallery {

        padding: 48px 12px 42px;

    }

    .gallery-title {

        margin-bottom: 24px;

    }

    .gallery-title span {

        font-size: 9px;

        letter-spacing: 1.8px;

    }

    .gallery-title h2 {

        font-size: 28px;

    }

    .gallery-title p {

        margin-top: 8px;

        font-size: 12px;

    }

    .gallery-window {

        border-radius: 13px;

    }

    .gallery-track {

        gap: 12px;

    }

    .gallery-slide {

        flex: 0 0 calc(100vw - 24px);

        width: calc(100vw - 24px);

    }

    .gallery-card {

        height: 225px;

        border-radius: 13px;

    }

    .gallery-overlay {

        padding: 17px;

    }

    .gallery-info h3 {

        font-size: 17px;

    }

    .gallery-info span {

        font-size: 8px;

    }

    .gallery-image-icon {

        width: 35px;

        height: 35px;

        font-size: 11px;

    }

    .gallery-dots {

        gap: 8px;

        margin-top: 18px;

    }

    .gallery-dot {

        width: 25px;

        height: 4px;

    }

    .gallery-dot.active {

        width: 48px;

        height: 4px;

    }

    .gallery-swipe-hint {

        margin-top: 18px;

        font-size: 11px;

    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 380px) {

    .academy-gallery {

        padding-left: 10px;

        padding-right: 10px;

    }

    .gallery-title h2 {

        font-size: 25px;

    }

    .gallery-card {

        height: 205px;

    }

}


/* =====================================================
   REDUCED MOTION
===================================================== */

@media (prefers-reduced-motion: reduce) {

    .gallery-track,

    .gallery-card img,

    .gallery-dot {

        transition: none !important;

    }

    .gallery-window {

        scroll-behavior: auto;

    }

}

/* =====================================================
   MAHFOOZ ACADEMY
   FULL SCREEN DESKTOP GALLERY
===================================================== */

/* FULL WIDTH SECTION */

.academy-gallery {
    width: 100%;
    max-width: 100%;

    padding: 80px 35px 65px;

    box-sizing: border-box;
}


/* FULL SCREEN CONTAINER */

.gallery-container {
    width: 100%;
    max-width: 100%;

    margin: 0 auto;
}


/* DESKTOP CAROUSEL */

.gallery-carousel {
    width: 100%;
    max-width: 100%;
}


/* FULL WIDTH WINDOW */

.gallery-window {
    width: 100%;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    border-radius: 18px;

    cursor: grab;

    scrollbar-width: none;

    touch-action: pan-y pinch-zoom;

    scroll-behavior: smooth;
}

.gallery-window::-webkit-scrollbar {
    display: none;
}


/* TRACK */

.gallery-track {
    display: flex;

    width: max-content;

    gap: 20px;

    padding: 0 2px;
}


/* DESKTOP CARDS - 4 CARDS FULL WIDTH */

.gallery-slide {

    flex: 0 0 calc(
        (100vw - 130px) / 4
    );

    width: calc(
        (100vw - 130px) / 4
    );

    min-width: 0;

    scroll-snap-align: start;
}


/* PREMIUM CARD */

.gallery-card {

    width: 100%;

    height: 310px;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:

        0 12px 35px
        rgba(52, 10, 20, 0.12);

    transition:

        transform 0.35s ease,

        box-shadow 0.35s ease;
}

.gallery-card:hover {

    transform: translateY(-5px);

    box-shadow:

        0 18px 42px
        rgba(52, 10, 20, 0.20);
}


/* IMAGE */

.gallery-card img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    pointer-events: none;

    user-select: none;

    -webkit-user-drag: none;

}


/* OVERLAY */

.gallery-overlay {

    padding: 24px;

}


/* TITLE */

.gallery-info h3 {

    font-size: 20px;

}


/* =====================================================
   LARGE DESKTOP
===================================================== */

@media (min-width: 1600px) {

    .academy-gallery {

        padding-left: 55px;
        padding-right: 55px;

    }

    .gallery-track {

        gap: 24px;

    }

    .gallery-slide {

        flex-basis: calc(
            (100vw - 220px) / 4
        );

        width: calc(
            (100vw - 220px) / 4
        );

    }

    .gallery-card {

        height: 350px;

    }

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1100px) {

    .academy-gallery {

        padding-left: 25px;
        padding-right: 25px;

    }

    .gallery-slide {

        flex: 0 0 calc(
            (100vw - 85px) / 3
        );

        width: calc(
            (100vw - 85px) / 3
        );

    }

    .gallery-card {

        height: 270px;

    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

    .academy-gallery {

        padding: 48px 12px 42px;

    }

    .gallery-track {

        gap: 12px;

    }

    .gallery-slide {

        flex: 0 0 calc(100vw - 24px);

        width: calc(100vw - 24px);

    }

    .gallery-card {

        height: 225px;

        border-radius: 13px;

    }

}