.page-template-simple-flex .sf-gallery-group {
    margin-bottom: 60px;
}

.page-template-simple-flex .sf-gallery-group.is-hidden {
    display: none;
}

.page-template-simple-flex .sf-gallery-title {
    margin-bottom: 16px;
}

/* Fixed aspect ratio slides */
.page-template-simple-flex .sf-gallery-slide {
    aspect-ratio: 260 / 200;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-template-simple-flex .sf-gallery-slide img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
    cursor: pointer;
}

.page-template-simple-flex .sf-gallery-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0;
}

/* Video facade fills the slide */
.page-template-simple-flex .sf-video-facade {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: #0e4252;
}

.page-template-simple-flex .sf-video-facade img,
.page-template-simple-flex .sf-video-facade .sf-video-facade-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-template-simple-flex .sf-video-facade .sf-video-facade-bg {
    background: #142832;
}

.page-template-simple-flex .sf-video-facade .sf-embed-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    transition: transform 0.2s ease;
    z-index: 2;
}

.page-template-simple-flex .sf-video-facade .sf-embed-play svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.page-template-simple-flex .sf-video-facade:hover .sf-embed-play {
    transform: translate(-50%, -50%) scale(1.12);
}

/* Gallery toggle button */
.page-template-simple-flex .sf-gallery-toggle-wrap {
    text-align: center;
    margin-top: 40px;
}

.page-template-simple-flex .sf-gallery-toggle {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    background: #0e4252;
    color: #ffffff;
    cursor: pointer;
    font-size: 22px;
    font-weight: 600;
}

.page-template-simple-flex .sf-swiper-outer {
    position: relative;
}

.page-template-simple-flex .sf-gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}

.page-template-simple-flex .module-gallery .swiper-pagination-bullet {
    background: #0e4252 !important;
    opacity: 1;
    width: 22px !important;
    height: 22px !important;
}

.page-template-simple-flex .module-gallery .swiper-pagination-bullet:hover,
.page-template-simple-flex .module-gallery .swiper-pagination-bullet-active {
    background: #249095 !important;
}

.page-template-simple-flex .module-gallery .swiper-button-prev,
.page-template-simple-flex .module-gallery .swiper-button-next {
    color: #0e4252;
    display: none;
}

/* Lightbox */
.sf-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.sf-lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.sf-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.sf-lightbox-video-wrap {
    width: 90vw;
    max-width: 1100px;
}

.sf-lightbox-video-wrap video {
    width: 100%;
    max-height: 85vh;
    display: block;
    border-radius: 4px;
    background: #000;
}

.sf-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: none;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s ease;
}

.sf-lightbox-close:hover {
    transform: scale(1.1);
}

.sf-lightbox-prev,
.sf-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: none;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease;
}

.sf-lightbox-prev {
    left: 20px;
}

.sf-lightbox-next {
    right: 20px;
}

.sf-lightbox-prev:hover,
.sf-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-50%) scale(1.08);
}

/* Gallery accordion title row */
.page-template-simple-flex .sf-gallery-title--accordion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.page-template-simple-flex .sf-gallery-accordion-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    border: 2px solid #0e4252;
    border-radius: 999px;
    padding: 6px 18px;
    background: transparent;
    color: #0e4252;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.page-template-simple-flex .sf-gallery-accordion-btn:hover,
.page-template-simple-flex .sf-gallery-group.is-accordion-open .sf-gallery-accordion-btn {
    background: #0e4252;
    color: #ffffff;
}

.page-template-simple-flex .sf-gallery-accordion-icon {
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
}

/* Tighter spacing for collapsed accordion items */
.page-template-simple-flex .sf-gallery-block.is-accordion-mode .sf-gallery-group:not(.is-accordion-open) {
    margin-bottom: 16px;
}