/* ── Gallery heading - centered with gold lines (matches .events-heading) ── */
.gallery-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #BB8F2D;
    overflow: hidden;
}

.gallery-heading::before,
.gallery-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #BB8F2D;
}

/* ── Section cards (matches .event-card) ── */
.gallery-card {
    border-radius: 16px;
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.06) 0px 2px 8px 0px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.gallery-card:focus-visible {
    outline: 2px solid #BB8F2D;
    outline-offset: 3px;
}

.gallery-card-img-wrap {
    position: relative;
    overflow: hidden;
}

.gallery-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.04);
}

.gallery-card-img-empty {
    background-color: #ebebe8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c3c3bc;
    font-size: 2.5rem;
}

.gallery-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #bb8f2d;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1.4;
}

.gallery-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}

.gallery-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    transition: color 0.2s ease;
}

.gallery-card:hover .gallery-card-title {
    color: #bb8f2d;
}

.gallery-card-meta {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.gallery-card-action-wrap {
    border-top: 1px solid #E5E7EB;
    margin-top: auto;
    padding-top: 12px;
}

.gallery-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #bb8f2d;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}

.gallery-card-action::after {
    content: "→";
    font-size: 13px;
    line-height: 1;
}

.gallery-card:hover .gallery-card-action {
    color: #c99a36;
}

/* ── Sub-gallery picker modal (dark, matches .header-wrapper) ── */
.gallery-modal .modal-content {
    background-color: #000;
    border: 1px solid #BB8F2D;
    border-radius: 16px;
    color: #fff;
}

.gallery-modal .modal-header,
.gallery-modal .modal-footer {
    border-color: rgba(187, 143, 45, 0.3);
}

.gallery-modal .modal-footer {
    justify-content: space-between;
}

.gallery-modal-title {
    color: #BB8F2D;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.gallery-modal-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.gallery-modal-pill {
    font-size: 13px;
    font-weight: 600;
    color: #BB8F2D;
    border: 1px solid rgba(187, 143, 45, 0.4);
    border-radius: 20px;
    padding: 2px 12px;
}

/* ── Sub-gallery cards inside the modal ── */
.gallery-sub-card {
    background-color: #131313;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
    transition: transform 0.2s ease, border-color 0.25s ease;
}

.gallery-sub-card:hover {
    transform: translateY(-4px);
    border-color: #BB8F2D;
}

.gallery-sub-card:focus-visible {
    outline: 2px solid #BB8F2D;
    outline-offset: 2px;
}

.gallery-sub-card-img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.gallery-sub-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-sub-card:hover .gallery-sub-card-img {
    transform: scale(1.06);
}

.gallery-sub-card-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-sub-card:hover .gallery-sub-card-hover,
.gallery-sub-card:focus-visible .gallery-sub-card-hover {
    opacity: 1;
}

.gallery-sub-card-open {
    background-color: #bb8f2d;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 14px;
    border-radius: 4px;
    pointer-events: none;
}

.gallery-sub-card-body {
    padding: 12px;
}

.gallery-sub-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 2px;
}

.gallery-sub-card-count {
    font-size: 13px;
    color: #BB8F2D;
}

/* ── Lightbox: sit above the fixed topbar (z-index 99999) and navbar ── */
.glightbox-container {
    z-index: 999999 !important;
}

/* Breathing room around the photo — GLightbox defaults to max-height:97vh,
   which runs the image edge-to-edge vertically.

   No !important here on purpose: zoomIn() writes maxWidth/maxHeight inline on
   the img, then translates it by (viewportWidth - naturalWidth) / 2. An
   !important cap would beat those inline styles, so the image would stay small
   but still get shifted — landing off-centre to the left. Matching GLightbox's
   own specificity (.gslide-image img) lets the cap apply while unzoomed and lets
   the inline zoom styles win on click. */
.glightbox-container .gslide-image img {
    max-height: 82vh;
    max-width: calc(100vw - 9rem);
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Zoomed images get dragged around; the shadow and radius just get in the way. */
.glightbox-container .gslide.zoomed .gslide-image img {
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 767px) {
    .glightbox-container .gslide-image img {
        max-height: 76vh;
        max-width: calc(100vw - 3.5rem);
    }
}

@media (max-width: 600px) {
    .gallery-heading {
        font-size: 1.6rem;
    }
}
