.gallery-section {
    padding: 80px 0;
    background: #fff;
    width: 100%;
    overflow-x: hidden;
    --gallery-slide-height-desktop: 70vh;
    --gallery-slide-height-mobile: 30vh;
}

.gallery-section .include-container h2 {
    padding-bottom: 40px;
}

.gallery-viewport {
    width: 100%;
    /*overflow-x: hidden;*/
    overflow: hidden;
    position: relative;
}

.gallery-swiper {
    width: 100%;
    /*overflow: visible;*/
    padding-bottom: 0;
}

.gallery-swiper .swiper-slide {
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    width: auto;
    display: flex;
    flex-direction: column;
}

.gallery-slide__media {
    display: block;
    width: var(--gallery-slide-image-width, auto);
}

.gallery-swiper .swiper-slide img,
.gallery-swiper .swiper-slide video {
    width: auto;
    height: var(--gallery-slide-height-desktop);
    max-width: none;
    max-height: var(--gallery-slide-height-desktop);
    object-fit: contain;
    display: block;
    border-radius: 2px;
}

.gallery-swiper .swiper-slide video {
    background: #000;
    pointer-events: none;
}

.gallery-slide__media {
    position: relative;
}

.gallery-slide__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    transform: translate(-50%, -50%);
    pointer-events: none;
    backdrop-filter: blur(5px);
}

.gallery-slide__play::after {
    content: "";
    position: absolute;
    left: 26px;
    top: 20px;
    border-left: 17px solid #fff;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

.gallery-slide__text {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: var(--gallery-slide-image-width, 88vw);
    box-sizing: border-box;
    padding-top: 14px;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.08em;
    color: #211650;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.gallery-footer {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 20px 80px 20px 0;
}

.gallery-credit {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #211650;
    text-transform: uppercase;
}

.gallery-credit.is-transitioning {
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.gallery-dot-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.gallery-dot-wrap .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    padding: 0;
    border: 1px solid #211650;
    background: transparent;
    opacity: 1;
    margin: 0 !important;
}

.gallery-dot-wrap .swiper-pagination-bullet-active {
    background: #211650 !important;
}

.gallery-nav {
    gap: 16px;
    align-items: center;
    position: absolute;
    top: 46%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 4444;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    width: 100%;
    padding: 0 40px;
    justify-content: space-between;
    margin: auto;
}

.gallery-nav button {
    background: #ffffff70 !important;
    border-radius: 0;
    padding: 10px;

    backdrop-filter: blur(10px);

}

/* Only the arrow buttons capture the pointer - the full-width strip
       stays click-through so slides remain draggable between the arrows. */
.gallery-viewport:hover .gallery-nav {
    opacity: 1;
}

.gallery-viewport:hover .gallery-nav .gallery-btn {
    pointer-events: auto;
}

.gallery-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.gallery-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gallery-btn svg {
    fill: none;
    stroke-width: 1.5;
}

.gallery-btn:hover svg {
    stroke: #c94080;
}

.gallery-btn:disabled:hover svg {
    stroke: #211650;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.90);
    backdrop-filter: blur(25px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    box-sizing: border-box;
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox__panel {
    color: #fff;
    position: relative;
    width: min(100%, 1200px);
    max-height: calc(100vh - 48px);
    height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.gallery-lightbox__panel_content {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__close {
    position: fixed;
    top: 10px;
    right: 12px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox__image,
.gallery-lightbox__video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 220px);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.gallery-lightbox__video {
    width: min(100%, 1100px);
    background: #000;
}

.gallery-lightbox__meta {
    width: min(100%, var(--gallery-lightbox-image-width, 800px));
    max-height: 126px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    margin-top: 22px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
    overflow-y: auto;
    scrollbar-width: thin;
    display: block;
    overscroll-behavior: contain;
    overflow-x: hidden;
    box-sizing: border-box;
}

.gallery-lightbox__meta-inner {
    padding: 0 20px;
    box-sizing: border-box;
}

.gallery-lightbox__controls {
    width: min(100%, var(--gallery-lightbox-image-width, 800px));
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.gallery-lightbox__progress-wrap {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.gallery-lightbox__progress-wrap span {
    position: absolute;
    inset: 0;
    width: 0;
    background: #fff;
    transition: width 0.35s ease;
}

.gallery-lightbox__arrow {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 6px 10px;
}

.hidden-sm {
    display: none;
}

.event-detail-term-auditions section#gallery-section {
    padding-bottom: 0px;
}

@media (max-width: 768px) {
    .gallery-swiper {
        padding-right: 0;
        padding-bottom: 0;
    }

    .gallery-swiper .swiper-slide {
        width: 100%;
        align-items: center;
    }

    .gallery-slide__media {
        /*         width: 90vw;
        max-width: 90vw; */
    }

    .gallery-swiper .swiper-slide img,
    .gallery-swiper .swiper-slide video {
        width: 100%;
        height: var(--gallery-slide-height-mobile);
        max-height: var(--gallery-slide-height-mobile);
        object-fit: cover;
    }

    .gallery-slide__text {
        width: 100%;
        max-width: 90vw;
        padding-top: 10px;
        line-height: 16.8px;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .gallery-section .include-container {
        padding: 0;
    }

    .gallery-section .include-container h2 {
        padding: 0 20px 20px 0px !important;
    }

    .gallery-lightbox__panel {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        align-items: flex-end;
        max-height: 100%;
    }

    .gallery-lightbox__panel_content {
        flex: 1 1 auto;
        justify-content: center;
    }

    .gallery-lightbox__image,
    .gallery-lightbox__video {
        max-height: calc(100vh - 190px);
    }

    .gallery-lightbox__meta {
        max-height: 124px;
        margin-top: 16px;
    }

    .gallery-lightbox__meta-inner {
        padding-right: 20px;
    }

    .gallery-lightbox__close {
        position: relative;
        text-align: right;
        padding: 0;
        top: 0;
        right: 0;
    }

    .gallery-credit {
        text-align: center;

        padding: 0 20px;
        margin: auto;
    }

    .gallery-lightbox {
        padding: 0 10px;
    }

    .hidden-xs {
        display: none;
    }

    .hidden-sm {
        display: block;
    }

    .hidden-sm.gallery-dot-wrap {
        display: flex;
        width: 90%;
        margin: auto;
        flex-wrap: wrap;
        margin-top: 20px;

    }

    .gallery-section {
        padding: 40px 0 40px 0;
    }

    .gallery-footer {
        padding-top: 10px;
        padding-right: 0;
    }

    .event-detail-term-auditions section#gallery-section {
        padding-bottom: 0px;
    }
}

/* Active-slide-only captions (Elementor widget toggle): every slide keeps
       its caption in flow (so autoHeight stays stable) but only the active
       slide's caption is visible; it fades in as the slide becomes active. */
.gallery-section--active-caption .gallery-slide__text {
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.gallery-section--active-caption .swiper-slide-active .gallery-slide__text {
    opacity: 1;
    pointer-events: auto;
}

/* Custom (fixed cards-per-view) mode is emitted per-instance, scoped to the
       section ID, in the separate <style> block below - so each device can be
       auto or custom independently. */

.gallery-dot-wrap .swiper-pagination-bullet {
    cursor: pointer;
}