/* gallery v15 — hero image + caption chips.
   Geometry shared by both CSS frameworks (Bootstrap has no utilities for it). */
.gallery-hero-chips__section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.mxw-5xl {
    max-width: 64rem !important;
}

.mxw-2xl {
    max-width: 42rem !important;
}

.gallery-hero-chips__head {
    margin-bottom: 2.5rem;
}

.gallery-hero-chips__title {
    font-size: 1.875rem;
    margin-bottom: 0.75rem;
}

.gallery-hero-chips__lead {
    font-size: 1.125rem;
}

.gallery-hero-chips__stage {
    aspect-ratio: 16 / 9;
}

.gallery-hero-chips__img {
    object-fit: cover;
}

/* The chips sit in a grid overlay — one chip per cell. Grid cells never overlap, so no
   amount of generated copy can make two chips collide (the cell just grows/wraps). */
.gallery-hero-chips__overlay {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 0.75rem;
    padding: 1.5rem;
}

.gallery-hero-chips__chip {
    /* both frameworks position these absolutely; the overlay owns placement now */
    position: static !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 20rem;
    padding: 0.75rem 1rem;
    pointer-events: auto;
    --bs-bg-opacity: 0.95;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* a flex item never shrinks below its min-content width — let the copy wrap instead */
.gallery-hero-chips__chip > :not(i) {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.gallery-hero-chips__chip > i {
    flex-shrink: 0;
}

/* one chip per corner — four distinct grid cells, so two chips can never share a spot */
.gallery-hero-chips__chip--tl {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
}

.gallery-hero-chips__chip--tr {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
}

.gallery-hero-chips__chip--bl {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    align-self: end;
}

.gallery-hero-chips__chip--br {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    align-self: end;
}

.gallery-hero-chips__chip-text {
    font-size: 0.75rem;
}

/* Phones/tablets: half a stage is too little for a chip, so the whole thing becomes a
   column — photo first, chips under it. Identical in both frameworks. */
@media (max-width: 767.98px) {
    .gallery-hero-chips__stage {
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
    }

    .gallery-hero-chips__img {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    .gallery-hero-chips__overlay {
        position: static !important;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        padding: 0.75rem;
    }

    .gallery-hero-chips__chip,
    .gallery-hero-chips__chip--tl,
    .gallery-hero-chips__chip--tr,
    .gallery-hero-chips__chip--bl,
    .gallery-hero-chips__chip--br {
        grid-column: 1;
        grid-row: auto;
        justify-self: stretch;
        align-self: auto;
        max-width: none;
    }
}

@media (min-width: 768px) {
    .gallery-hero-chips__title {
        font-size: 2.25rem;
    }
}

.content-river__arc {
    width: 18rem;
    height: 18rem;
}

.content-river__node {
    width: 0.75rem;
    height: 0.75rem;
    transform: translate(-50%, -50%);
}

@media (min-width: 768px) {
    .content-river__copy--right {
        grid-column-start: 2;
    }

    .content-river__copy--left {
        grid-column-start: 1;
        grid-row-start: 1;
    }

    .content-river__spacer--left {
        order: 2;
    }
}

/* content plain — thin vertical rule height (BS has no h-16 spine utility) */
.content-plain__fine-rule {
    height: 6rem;
}

.content-col-grow {
    flex: 1 1 0%;
    min-width: 0;
}

.content-img-fill {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 16rem;
    min-width: 0;
    object-fit: cover;
    flex-shrink: 0;
}

.prose-bodycopy__text-panel-inset {
    padding: 4rem;
}

.split-screen-halo {
    width: 600px;
    height: 600px;
}

.split-screen-halo-soft {
    width: 500px;
    height: 500px;
}

.split-screen-beam-main {
    width: 24rem;
    height: 1px;
}

.split-screen-beam-side {
    width: 20rem;
    height: 1px;
}

.split-screen-frame {
    width: 6rem;
    height: 6rem;
}

.split-screen-orb {
    width: 4rem;
    height: 4rem;
}

.split-screen-marker {
    width: 2rem;
    height: 2rem;
}

.split-screen-emblem {
    width: 5rem;
    min-width: 5rem;
    height: 5rem;
    min-height: 5rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .split-screen-principle--odd {
        margin-left: 2rem;
    }
}

/* content gutter — bracket ticks share width */
.content-gutter__tick {
    width: 1px;
}

/* solo column: span full grid / row when second stack hidden */
.content-gutter__lead--span {
    grid-column: 1 / -1;
}

.content-ledger__label {
    letter-spacing: 0.05em;
}

/* min-width: 0 — довгий текст/флекс у колонці не роздуває рядок */
.content-col-grow {
    min-width: 0;
}

.content-stack-col--text {
    overflow-wrap: anywhere;
}

.content-stack-col--text > :first-child {
    width: 100%;
    max-width: 65ch;
    margin-inline: auto;
}

/* gap лише для Tailwind (grid). У Bootstrap — відступи через g-* у component (row-cols + g-3), без CSS gap на .row */
.content-grid-gap:not(.row) {
    gap: 1rem;
}

.content-full-frame {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.content-section-pad {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* Третина рядка: стабільна висота прев’ю, без height:100% від сусіднього тексту */
.content-img-fullheight {
    display: block;
    width: 100%;
    max-width: min(100%, 28rem);
    margin-inline: auto;
    min-width: 0;
    aspect-ratio: 3 / 4;
    max-height: 28rem;
    height: auto;
    flex-shrink: 1;
    object-fit: cover;
    object-position: center;
}

