/* Gallery pages — shared styles for all year galleries
   Shared overrides (buttons, flex, text) handled by gb-base.css */

/* Hero section — background set per-page in block content */
.gallery-hero {
    min-height: 100vh;
    position: relative;
}

/* Text container */
.gallery-container {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
    text-align: center;
}

.gallery-container p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Slideshow — uses wp:image blocks with .gallery-slide className on <figure> */
.gallery-slideshow {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    height: 700px;
    margin: 0 auto;
    overflow: hidden;
}

/* Each slide (figure.gallery-slide) is absolutely positioned and hidden */
.gallery-slideshow .gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0; /* reset figure margin */
}

.gallery-slideshow .gallery-slide img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
}

.gallery-slideshow .gallery-slide.show {
    opacity: 1;
}

/* Prev/next arrows — GB text blocks with button tagName */
.gallery-slideshow .gallery-arrow {
    position: absolute !important;
    top: 50%;
    z-index: 10;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    padding: 10px 15px !important;
    font-size: 24px !important;
    border-radius: 50% !important;
    transition: background-color 0.3s;
    text-decoration: none !important;
    line-height: 1 !important;
}

.gallery-slideshow .gallery-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.gallery-slideshow .prev-arrow { left: 10px; }
.gallery-slideshow .next-arrow { right: 10px; }

/* Responsive */
@media (max-width: 768px) {
    .gallery-slideshow {
        height: 400px;
    }

    .gallery-container p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gallery-slideshow {
        height: 280px;
    }
}

/* ─── Editor ─── */
/* In the editor, show slides in a grid so they're all visible and editable */
.editor-styles-wrapper .gallery-slideshow {
    max-width: 1000px;
    margin: 0 auto;
    height: auto;
    overflow: visible;
}

.editor-styles-wrapper .gallery-slideshow .gallery-slide {
    position: relative;
    opacity: 1;
    display: inline-block;
    width: 30%;
    height: auto;
    margin: 5px;
    vertical-align: top;
}

.editor-styles-wrapper .gallery-slideshow .gallery-slide img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.editor-styles-wrapper .gallery-slideshow .gallery-arrow {
    display: inline-block !important;
    position: relative !important;
    transform: none;
    margin: 5px;
}
