/**
 * Unified content gallery ([gallery] shortcode) — Swiper slider + Fancybox lightbox.
 * One whole image at a time (no cropping); the next appears only on swipe / next.
 * Each image uses the same padding + gradient background as regular body images.
 */

.od-gallery {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 1.75rem 0;
    overflow: hidden;      /* clip to exactly one slide — no peek of the next */
}

/* Match slide heights to the current image (images keep their natural aspect). */
.od-gallery .swiper-wrapper { align-items: center; }
/* Force each slide to fill exactly one viewport so the next never peeks in.
   (The theme caps `.swiper-slide { max-width: 564px }` for its card sliders —
   override that here so the gallery slide spans the full width.) */
.od-gallery .swiper-slide {
    width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 0 !important;
    box-sizing: border-box;
    height: auto;
}

.od-gallery__link {
    display: block;
    width: 100%;
    cursor: zoom-in;
    text-align: center;
}

/* Whole image, natural aspect ratio (never cropped), framed like body images. */
.od-gallery__link img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh;                 /* keep very tall images in view */
    margin: 0 auto;
    padding: clamp(4px, 1.5vw, 8px);
    border-radius: 1rem;
    background: #E8F6F2;
    background: linear-gradient(45deg, rgba(232, 246, 242, 0.61) 0%, rgba(238, 242, 255, 1) 25%, rgba(232, 246, 242, 1) 50%, rgba(245, 245, 245, 1) 75%, rgba(242, 242, 242, 1) 100%);
}

.od-gallery__caption {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #3e444a;
    text-align: center;
}

/* Prev / next arrows */
.od-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    border-radius: 9999px;
    font-size: 22px;
    line-height: 1;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}
.od-gallery__nav:hover { background: rgba(15, 23, 42, 0.8); }
.od-gallery__nav--prev { left: 12px; }
.od-gallery__nav--next { right: 12px; }
.od-gallery__nav.is-disabled { opacity: 0; pointer-events: none; }

/* Dots */
.od-gallery__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}
.od-gallery__dots .od-gallery__dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
    pointer-events: auto;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: width 0.15s ease, background-color 0.15s ease;
}
.od-gallery__dots .od-gallery__dot.is-active {
    width: 22px;
    background: #fff;
}

/* Single-image gallery: hide the slider chrome. */
.od-gallery--single .od-gallery__nav,
.od-gallery--single .od-gallery__dots { display: none; }
