/* ==========================================================================
   region-cards.css — the three blocks below the photo carousel of the region
   detail page

     1. .na-flow          shared WATERFALL for both photo blocks.  CSS
                          columns, so every card keeps its own height and the
                          columns stagger — the waterfall look — while the
                          grid itself still reaches both edges.
     2. .na-cul-card      "Regional cuisine" — one waterfall card per dish
     3. .na-fes-card      "Festivals & events" — four festival cards plus two
                          season cards (same footprint, no photo)
     4. .na-fun-grid      "Fun & curious" — text-only trivia cards

   Every card is TEXT FIRST with a small photo thumbnail tucked beside it, so
   the whole description stays readable on screen: nothing hides behind a
   hover, nothing is clamped. Palette matches region-showcase.css.
   ========================================================================== */

/* ---------- shared little caption under a section head ---------- */
.na-sh-hint {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-bottom: .9rem;
    font-size: .7rem;
    color: #8A6A5C;
}

.na-sh-hint i { font-size: .85rem; color: #B4436A; }

/* ==========================================================================
   1. THE WATERFALL
   ========================================================================== */

.na-flow {
    column-count: 3;
    column-gap: 1rem;
}

/* a card must never be split across two columns */
.na-flow-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 1rem;
}

/* the waterfall never lines up: every second card drops a little, so the
   columns break at different heights instead of in neat rows */
@media (min-width: 761px) {
    .na-flow-item:nth-child(even) { margin: 1.6rem 0 1rem; }
}

.na-flow-card {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    width: 100%;
    padding: .7rem .75rem .75rem;
    background: #fff;
    border: 1px solid rgba(214, 175, 186, .55);
    border-radius: 14px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.na-flow-item > .na-flow-card:hover,
.na-flow-item > button.na-flow-card:hover {
    transform: translateY(-3px);
    border-color: rgba(180, 67, 106, .45);
    box-shadow: 0 14px 30px rgba(120, 70, 90, .16);
}

.na-flow-card:focus-within {
    border-color: rgba(180, 67, 106, .6);
    box-shadow: 0 14px 30px rgba(120, 70, 90, .18);
}

/* ---------- the photo half: small, and one size for every block ---------- */
.na-flow-shots {
    display: grid;
    /* auto-fit collapses the empty track, so a card with only one photo
       still gets the full thumbnail width */
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: start;
    flex: 0 0 34%;
    min-width: 92px;
    gap: 4px;
}

.na-flow-shot {
    position: relative;
    display: block;
    flex: 1 1 0;
    min-width: 0;                 /* never let an image's intrinsic width win */
    padding: 0;
    /* one fixed height for every card in both blocks: the frame never jumps,
       and the picture is drawn whole and centred inside it (see object-fit). */
    height: 104px;
    border-radius: 10px;
    overflow: hidden;
    background: #EFE4E9;
}

/* every picture is cropped symmetric­ally to the middle of its frame, so a
   snow sculpture shot with white snow at the bottom and a flat plate of
   ramen both end up centred instead of hugging the top edge */
.na-flow-shot > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform .45s ease;
}

.na-flow-shot-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.na-flow-shot-btn > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform .45s ease;
}

.na-flow-card:hover .na-flow-shot-btn > img { transform: scale(1.07); }

/* the second frame is the very same small rectangle, just beside the first */
.na-flow-shot--extra { border: 1px solid rgba(255, 255, 255, .9); cursor: zoom-in; }

.na-flow-shot-tag {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 0 .25rem;
    background: rgba(38, 20, 16, .7);
    color: #fff;
    font-size: .5rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: .04em;
}

.na-flow-zoom {
    position: absolute;
    right: .3rem;
    bottom: .3rem;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #B4436A;
    font-size: .58rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.na-flow-card:hover .na-flow-zoom { opacity: 1; transform: none; }

/* ---------- the text half: all of it, always ---------- */
.na-flow-body {
    flex: 1 1 auto;
    min-width: 0;
}

.na-flow-head {
    display: flex;
    align-items: baseline;
    gap: .35rem;
}

.na-flow-no {
    flex: 0 0 auto;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: rgba(180, 67, 106, .55);
}

.na-flow-title {
    display: block;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.3;
    color: #3E231A;
}

.na-flow-ja {
    display: block;
    margin-top: .12rem;
    font-size: .68rem;
    line-height: 1.4;
    color: #8A6A5C;
}

/* the description — on screen, never hidden behind a hover overlay */
.na-flow-note {
    display: block;
    margin: .4rem 0 0;
    font-size: .73rem;
    line-height: 1.6;
    color: #6B4A3A;
}

/* date badge, in flow so a long month range can never overflow the photo */
.na-flow-when {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    margin-top: .35rem;
    padding: .14rem .45rem;
    border-radius: 999px;
    background: rgba(180, 67, 106, .1);
    color: #B4436A;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .03em;
    white-space: nowrap;
}

.na-flow-when--static {
    background: rgba(255, 255, 255, .8);
    box-shadow: none;
}

/* ==========================================================================
   2. REGIONAL CUISINE — one waterfall card per dish
   ========================================================================== */

.na-cul-card {
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: zoom-in;
}

.na-cul-card.is-pending {
    cursor: default;
    background: repeating-linear-gradient(135deg, #FBF4F6 0 10px, #F6ECEF 10px 20px);
    border-style: dashed;
}

.na-cul-card.is-pending .na-flow-shot::after {
    content: "photo pending";
    position: absolute;
    inset: auto 0 .35rem 0;
    text-align: center;
    font-size: .58rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #B08C9C;
}

/* ==========================================================================
   3. FESTIVALS & EVENTS — four festival cards + two season cards
   ========================================================================== */

/* the two text-only season cards share the exact same box, minus the photo */
.na-note-card {
    padding: .8rem .85rem .9rem;
    background: linear-gradient(160deg, #FFF8F9 0%, #F1E7EC 100%);
    border-style: dashed;
    border-color: rgba(214, 175, 186, .8);
}

.na-note-top {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-height: 1.4rem;
}

.na-note-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(180, 67, 106, .12);
    color: #B4436A;
    font-size: .85rem;
}

.na-note-mark {
    margin-top: .6rem;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    color: #B4436A;
}

.na-note-ja {
    font-size: .68rem;
    color: #8A6A5C;
}

.na-note-text {
    margin: .45rem 0 0;
    font-size: .74rem;
    line-height: 1.6;
    color: #6B4A3A;
}

/* ==========================================================================
   4. FUN & CURIOUS — text-only trivia cards
   ========================================================================== */

.na-fun-section .na-fun-lede {
    max-width: 46rem;
    margin: -.2rem 0 1.1rem;
    font-size: .84rem;
    line-height: 1.65;
    color: #6B4A3A;
}

.na-fun-lede b { color: #B4436A; }

.na-fun-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1rem;
}

.na-fun-card {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.05rem 1.05rem;
    background: #fff;
    border: 1px solid rgba(214, 175, 186, .5);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(120, 70, 90, .06);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.na-fun-card:hover {
    transform: translateY(-3px);
    border-color: rgba(180, 67, 106, .45);
    box-shadow: 0 16px 34px rgba(120, 70, 90, .15);
}

.na-fun-top {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2rem;
}

.na-fun-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(160deg, rgba(180, 67, 106, .14), rgba(180, 67, 106, .06));
    color: #B4436A;
    font-size: .95rem;
}

.na-fun-tag {
    display: inline-flex;
    align-items: center;
    padding: .18rem .6rem;
    border-radius: 999px;
    background: rgba(180, 67, 106, .1);
    color: #B4436A;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* pushes everything else down when there is no stat on the card */
.na-fun-top:only-child { margin-bottom: .2rem; }

.na-fun-stat {
    margin-top: .55rem;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.01em;
    color: #B4436A;
}

.na-fun-label {
    margin-top: .55rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.3;
    color: #3E231A;
}

.na-fun-reading {
    margin-top: .1rem;
    font-size: .7rem;
    letter-spacing: .04em;
    color: #8A6A5C;
}

.na-fun-title {
    margin: .5rem 0 0;
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.35;
    color: #3E231A;
}

.na-fun-note {
    margin: .35rem 0 0;
    font-size: .78rem;
    line-height: 1.62;
    color: #6B4A3A;
}

.na-fun-say {
    align-self: flex-start;
    margin-top: .7rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .65rem;
    border: 1px solid rgba(180, 67, 106, .35);
    border-radius: 999px;
    background: #fff;
    color: #B4436A;
    font: inherit;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.na-fun-say:hover {
    background: #B4436A;
    border-color: #B4436A;
    color: #fff;
    transform: translateY(-1px);
}

.na-fun-say:focus-visible {
    outline: 2px solid #B4436A;
    outline-offset: 2px;
}

.na-fun-say.is-speaking {
    background: #B4436A;
    border-color: #B4436A;
    color: #fff;
}

/* ==========================================================================
   responsive — the waterfall simply drops a column
   ========================================================================== */
@media (max-width: 1100px) {
    .na-flow { column-count: 2; }
}

@media (max-width: 760px) {
    /* one column: the photo sits above its own text, side by side no more */
    .na-flow { column-count: 1; }
    .na-flow-card { flex-direction: column; }
    .na-flow-shots {
        flex: 0 0 auto;
        width: 100%;
        max-width: 220px;
    }
    .na-flow-item > .na-flow-card:hover,
    .na-flow-item > button.na-flow-card:hover { transform: none; }
}

@media (max-width: 420px) {
    .na-fun-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .na-flow-card,
    .na-flow-card:hover,
    .na-flow-shot-btn > img,
    .na-flow-zoom,
    .na-fun-card,
    .na-fun-card:hover,
    .na-fun-say { transition: none; animation: none; }
    .na-flow-card:hover { transform: none; }
    .na-flow-card:hover .na-flow-shot-btn > img { transform: none; }
}
