/* gallery v18 — hero + three frames.
   Geometry shared by both CSS frameworks (Bootstrap has no grid-template / aspect utilities). */
.gallery-cascade-grid__section {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

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

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

.gallery-cascade-grid__head {
    margin-bottom: 2.5rem;
}

.gallery-cascade-grid__title {
    font-size: 1.875rem;
    margin-bottom: 0.75rem;
}

.gallery-cascade-grid__lead {
    font-size: 1.125rem;
}

.gallery-cascade-grid__hero {
    aspect-ratio: 16 / 7;
}

.gallery-cascade-grid__thumb {
    aspect-ratio: 1 / 1;
}

.gallery-cascade-grid__img {
    object-fit: cover;
    transition: transform 300ms ease;
}

/* hover zoom — `:where()` keeps specificity at 0-1-0 so Tailwind's hover:scale-105 wins there */
:where(.gallery-cascade-grid__img):hover {
    transform: scale(1.05);
}

/* caption scrim: Bootstrap has no gradient utility, so the flat fill is toned down instead */
.gallery-cascade-grid__caption {
    --bs-bg-opacity: 0.55;
}

.gallery-cascade-grid__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .gallery-cascade-grid__row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

@media (prefers-reduced-motion: reduce) {
    :where(.gallery-cascade-grid__img):hover {
        transform: none;
    }
}

.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 companion — hairline width for BS decor */
.content-companion__hair {
    width: 3rem;
}

/* numeric index column width on small screens */
.content-companion__index {
    min-width: 0;
}

.content-companion__index-digit {
    font-variant-numeric: tabular-nums;
}

/* 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;
}


.passage-chapter__visual--glow:hover { transform: scale(1.05); transition: transform .2s ease; }

.passage-chapter__prompt--glow:hover { transform: scale(1.05); transition: transform .2s ease; }

.content-heading-gap {
    margin-bottom: 2rem;
}

.content-img-compact {
    display: block;
    width: 100%;
    height: 12rem;
    min-height: 12rem;
    flex-shrink: 0;
    object-fit: cover;
}
@media (min-width: 768px) {
    .content-img-compact {
        height: 14rem;
        min-height: 14rem;
    }
}

/* 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-margin-notes__aside {
    align-self: start;
}

@media (min-width: 992px) {
    .content-margin-notes__aside {
        position: sticky;
        top: 2rem;
    }
}

/* Values v22 - Bauhaus asymmetric grid geometric accents (layout/shape only, no colors) */

/* Match TW container (~1280–1536px); default BS .container caps at 1140px */
.values-bauhaus__wrap {
    max-width: 96rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Shared shape sizing/position; hover scale+rotate is triggered by the parent card via
   the arbitrary-variant selector hover:[&_.values-bauhaus__shape]:scale-125 / :rotate-12
   authored in component.html tw:. Renaming this class requires updating that selector too. */
.values-bauhaus__shape {
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    width: 6rem;
    height: 6rem;
    opacity: 0.16;
    pointer-events: none;
    transition: transform 300ms ease;
}

/* featured card - large ring */
.values-bauhaus__shape--00 {
    top: -2.5rem;
    right: -2.5rem;
    width: 10rem;
    height: 10rem;
    border-radius: 9999px;
    border: 0.75rem solid currentColor;
    background: transparent;
    opacity: 0.12;
}

/* circle */
.values-bauhaus__shape--01 {
    border-radius: 9999px;
    background: currentColor;
}

/* triangle */
.values-bauhaus__shape--02 {
    background: currentColor;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* square rotated */
.values-bauhaus__shape--03 {
    background: currentColor;
    transform: rotate(15deg);
}

/* half circle */
.values-bauhaus__shape--04 {
    border-radius: 9999px 9999px 0 0;
    background: currentColor;
}

/* diamond */
.values-bauhaus__shape--05 {
    background: currentColor;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

