/* ── Dive Sites page ─────────────────────────────────────────── */

/* Intro / section body text */
.ba-ds-intro .ba-section__body,
.ba-ds-map .ba-section__body,
.ba-ds-explore .ba-section__body {
    max-width: 62ch;
    line-height: 1.75;
    color: var(--color-text-muted);
}

/* ── Map ─────────────────────────────────────────────────────── */
.ba-ds-map {
    background: var(--gradient-ocean);
}

.ba-ds-map .ba-section__body {
    color: var(--color-text-light);
}

.ba-ds-map__frame {
    position: relative;
    max-width: 720px;
    margin: 2rem auto 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.ba-ds-map__img {
    display: block;
    width: 100%;
    height: auto;
}

/* Clickable dive-flag hotspots — thick green rings so they read as
   tappable markers on the map */
.ba-ds-map__spot {
    position: absolute;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 4px solid var(--color-green);
    background: rgba(46, 175, 92, 0.15);
    box-shadow: 0 0 0 0 rgba(46, 175, 92, 0.55);
    animation: ba-ds-pulse 2.4s ease-out infinite;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ba-ds-map__spot:hover,
.ba-ds-map__spot:focus-visible {
    border-color: var(--color-green-dark);
    background: rgba(46, 175, 92, 0.3);
    transform: translate(-50%, -50%) scale(1.15);
}

@keyframes ba-ds-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(46, 175, 92, 0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(46, 175, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 175, 92, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .ba-ds-map__spot { animation: none; }
}

/* ── Map popup ───────────────────────────────────────────────── */
.ba-ds-modal {
    width: min(92vw, 720px);
    padding: 0;
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.ba-ds-modal::backdrop {
    background: rgba(12, 52, 97, 0.7);
    backdrop-filter: blur(3px);
}

.ba-ds-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    transition: background 0.2s ease;
}

.ba-ds-modal__close:hover {
    background: var(--color-primary);
}

.ba-ds-modal__video {
    aspect-ratio: 9 / 16;
    max-height: 55vh;
    margin: 0 auto;
    background: var(--color-dark);
}

.ba-ds-modal__video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.ba-ds-modal__body {
    padding: 1.5rem;
}

.ba-ds-modal__title {
    margin: 0.85rem 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
}

.ba-ds-modal__desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.ba-ds-modal__caption {
    margin-bottom: 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-muted);
}

/* Tablet+ — video beside text inside the popup */
@media (min-width: 768px) {
    .ba-ds-modal {
        width: min(92vw, 760px);
    }

    .ba-ds-modal[open] {
        display: grid;
        grid-template-columns: 280px 1fr;
    }

    .ba-ds-modal__video {
        aspect-ratio: auto;
        max-height: none;
        height: 100%;
        min-height: 480px;
    }

    .ba-ds-modal__body {
        align-self: center;
        padding: 2rem;
    }
}

/* ── Explore — alternating site rows ─────────────────────────── */
.ba-ds-site {
    display: grid;
    gap: 1.75rem;
    align-items: center;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-surface-alt);
    scroll-margin-top: calc(var(--ba-header-h) + 1rem);
}

/* Vertical (Shorts) video — 9:16, card-style frame */
.ba-ds-site__video {
    justify-self: center;
    width: min(100%, 300px);
    aspect-ratio: 9 / 16;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--color-dark);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.ba-ds-site__video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.ba-ds-site__title {
    margin: 1rem 0 0.75rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
}

.ba-ds-site__desc {
    max-width: 55ch;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.ba-ds-site__caption {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    max-width: 55ch;
    margin-bottom: 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-muted);
}

.ba-ds-site__caption .bi {
    color: var(--color-primary);
}

/* Tablet+ — video and text side by side, alternating */
@media (min-width: 768px) {
    .ba-ds-site {
        grid-template-columns: 320px 1fr;
        gap: 3rem;
    }

    .ba-ds-site--flip .ba-ds-site__video { order: 2; }
    .ba-ds-site--flip .ba-ds-site__body  { order: 1; justify-self: end; text-align: right; }
    .ba-ds-site--flip .ba-ds-site__desc,
    .ba-ds-site--flip .ba-ds-site__caption { margin-left: auto; }
    .ba-ds-site--flip .ba-ds-site__caption { flex-direction: row-reverse; }
}

@media (min-width: 992px) {
    .ba-ds-site { gap: 4.5rem; }
}
