/* ── CMS Content ──────────────────────────────── */
.cms-content-section {
    position: relative;
    overflow-x: clip;
}

.cms-content-section .content {
    line-height: 1.7;
    font-size: 1rem;
}

.cms-content-section .content img {
    max-width: 100%;
    height: auto;
    border-radius: .5rem;
}

/* ── Map containers ───────────────────────────── */
.map-container-full iframe,
.video-container-full iframe {
    width: 100%;
    border-radius: .5rem;
}

.map-container-left,
.video-container-left,
.image-container-left {
    float: left;
    width: 45%;
    margin: 0 1.5rem 1rem 0;
}

.map-container-right,
.video-container-right,
.image-container-right {
    float: right;
    width: 45%;
    margin: 0 0 1rem 1.5rem;
}

.map-container-left iframe,
.map-container-right iframe,
.video-container-left iframe,
.video-container-right iframe {
    width: 100%;
    border-radius: .5rem;
}

/* ── Gallery grid (layout_14) ─────────────────── */
.cms-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.cms-gallery-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cms-gallery-thumb {
    position: relative;
    overflow: hidden;
    border-radius: .75rem;
    background: var(--clr-linen, #f8fafc);
}

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

.cms-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s ease;
}

.cms-gallery-overlay i {
    color: #fff;
    font-size: 1.5rem;
    transform: scale(.7);
    transition: transform .3s ease;
}

.cms-gallery-item:hover .cms-gallery-thumb img { transform: scale(1.06); }
.cms-gallery-item:hover .cms-gallery-overlay { opacity: 1; }
.cms-gallery-item:hover .cms-gallery-overlay i { transform: scale(1); }

.cms-gallery-caption {
    display: block;
    margin-top: .5rem;
    font-size: .8125rem;
    color: var(--clr-stone, #64748b);
    text-align: center;
}

/* ── Image containers ─────────────────────────── */
.cms-image-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cms-image-stack a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ── Magnific Popup tweaks ────────────────────── */
.mfp-bg       { background: var(--clr-bark, #0f172a); }
.mfp-counter  { color: rgba(255,255,255,.7); font-size: .8125rem; }
.mfp-title    { color: #fff; font-size: .9375rem; padding: .5rem 0; }
img.mfp-img   { padding: 40px 0; margin: 0 auto; }
.mfp-figure::after { background: transparent; }
.mfp-content  { text-align: center; }

/* Close button — always visible top-right */
.mfp-close {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 36px;
    color: #fff;
    opacity: .85;
    right: 0;
    top: 0;
    position: fixed;
    z-index: 1046;
    text-align: center;
    padding: 0;
    cursor: pointer;
}
.mfp-close:hover,
.mfp-close:focus { opacity: 1; }

/* ── CMS lightbox hover overlay ───────────────── */
.cms-lightbox { position: relative; display: inline-block; }
.cms-lightbox-hover {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s;
    background: rgba(0,0,0,.25); color: #fff; font-size: 2rem;
}
.cms-lightbox:hover .cms-lightbox-hover { opacity: 1; }

/* ── Clearfix for float layouts ───────────────── */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 767.98px) {
    .cms-gallery-thumb img { height: 160px; }

    .map-container-left,
    .map-container-right,
    .video-container-left,
    .video-container-right,
    .image-container-left,
    .image-container-right {
        float: none;
        width: 100%;
        margin: 0 0 1rem 0;
    }
}
