/* ==========================================================================
   Mecsekalja Apartman · Design System & Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Theme Variables
   -------------------------------------------------------------------------- */
:root {
    --bg: #f4f7f1;
    --card: #ffffff;
    --ink: #1f2d25;
    --mute: #4f5f56;
    --green: #2f5d46;
    --sage: #d9e6d6;
    --sun: #e8b45f;
    --on-sun: #1f2d25;
    --line: #dfe8dc;
    --stage: #e6ece3;
    --hero-top: #cfe5d3;
    --focus: #1f6fb2;

    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #141c17;
        --card: #1c2822;
        --ink: #eaf1ea;
        --mute: #a3b4a8;
        --green: #8cc5a0;
        --sage: #25382d;
        --line: #2b3a31;
        --stage: #0f1511;
        --hero-top: #1f3a2b;
        --focus: #7fc4ff;
    }
}

/* --------------------------------------------------------------------------
   2. Base & Reset
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    /* No scroll-padding-top: anchor links must land with the target section's top edge at the top
       of the viewport. The header is not pinned (.stage has overflow: hidden, which makes
       position: sticky inert), so reserving space for it left part of the previous section
       visible above the target. If the header is ever made truly sticky, set scroll-padding-top
       to its height. */
}

body {
    background: var(--stage);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   3. Page Wrapper
   -------------------------------------------------------------------------- */
.stage {
    width: 100%;
    margin: 0 auto;
    background: var(--bg);
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    gap: 0.625rem;
}

.logo {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    color: var(--green);
    font-size: 1.1875rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.logo:hover {
    color: var(--green);
    opacity: 0.9;
}

.nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.375rem;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav ul::-webkit-scrollbar {
    display: none;
}

.nav ul li {
    display: inline-flex;
    flex-shrink: 0;
}

.nav ul a {
    text-decoration: none;
    color: var(--mute);
    font: 500 0.875rem/1 Inter, system-ui, sans-serif;
    padding: 0.5rem 0.875rem;
    border-radius: 6.1875rem;
    border: 1px solid var(--line);
    background: var(--card);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav ul a:hover {
    color: var(--green);
    background: var(--sage);
    border-color: transparent;
}

.lang {
    display: inline-flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6.1875rem;
    padding: 0.1875rem;
    gap: 2px;
}

.lang .lang-ic {
    margin-left: 0.375rem;
    margin-right: 2px;
    color: var(--sun);
    display: inline-flex;
    align-items: center;
}

.lang a {
    border: 0;
    background: transparent;
    text-decoration: none;
    color: var(--mute);
    font: 600 0.75rem/1 Inter, system-ui, sans-serif;
    padding: 0.375rem 0.625rem;
    border-radius: 6.1875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang a:hover {
    color: var(--green);
}

.lang a.on {
    background: var(--green);
    color: var(--bg);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding: 3rem 1.25rem 10.625rem;
    background: linear-gradient(var(--hero-top), var(--bg) 90%);
    overflow: hidden;
}

.hero svg {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 9.375rem;
    pointer-events: none;
    z-index: 1;
}

.hero-tower {
    position: absolute;
    left: 78.2%;
    bottom: 7.8125rem;
    transform: translateX(-50%);
    width: 2.25rem;
    height: 6.75rem;
    pointer-events: none;
    display: block;
    z-index: 2;
}

.hero> :not(svg):not(.hero-tower) {
    position: relative;
    z-index: 3;
}

.hero h1 {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 2.25rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--green);
    max-width: 14em;
}

.hero p {
    margin: 1rem 0 1.5rem;
    color: var(--mute);
    max-width: 32em;
    font-size: 1rem;
    line-height: 1.6;
}

.btns {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.btn {
    display: block;
    text-align: center;
    padding: 0.875rem 1.375rem;
    border-radius: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--green);
    color: var(--bg);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.92;
}

.btn.alt {
    background: var(--card);
    color: var(--green);
    border: 1.5px solid var(--green);
}

/* --------------------------------------------------------------------------
   6. General Content Sections & Cards
   -------------------------------------------------------------------------- */
section {
    padding: 2.75rem 1.25rem;
}

h2 {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--green);
    margin-bottom: 0.75rem;
}

.grid {
    display: grid;
    gap: 0.875rem;
    margin-top: 1.25rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 1.125rem;
    padding: 1.25rem;
}

.card .ic {
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 0.75rem;
    background: var(--sage);
    display: grid;
    place-items: center;
    margin-bottom: 0.625rem;
}

/* The decorative icon keeps the emoji's footprint: centred inside the same 2.625rem tile */
.card .ic img {
    width: 1.75rem;
    height: 1.75rem;
    max-width: 100%;
    object-fit: contain;
}

.card h3 {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.card p {
    color: var(--mute);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.facts {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-top: 1.125rem;
}

.facts span {
    background: var(--sage);
    border-radius: 0.75rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: var(--green);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Gallery – mobile default: 1 full-width image per slide, no adjacent peeking */
.gal-wrap {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-top: 1.25rem;
    width: 100%;
}

.gal-wrap::-webkit-scrollbar {
    display: none;
}

.gal {
    position: relative;
    display: flex;
    gap: 0.875rem;
    width: 100%;
}

.gal-item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #a9c5a0, #5d8a5a);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: end;
    padding: 0;
    color: #ffffff;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.feat-grid {
    grid-template-columns: 1fr;
}

.gal-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
}

.area {
    background: var(--sage);
}

.area li {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.area li.col-head {
    padding: 0.25rem 0 0.5rem;
}

.area li.col-head b {
    font-size: 0.6875rem;
    white-space: normal;
    text-align: right;
}

.area li.no-line {
    border-bottom: 0;
    padding-bottom: 0.25rem;
    font-weight: 600;
}

.area li.sub {
    display: block;
    padding: 0 0 0.5rem 1.125rem;
}

.area li.sub ul {
    margin-top: 0;
}

.area li.sub li {
    font-size: 0.875rem;
    padding: 0.5rem 0;
    color: var(--mute);
}

.area ul {
    padding: 0;
    margin-top: 0.75rem;
}

.area b {
    color: var(--green);
    font-family: 'Space Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Distance values (~11 km) are orange pills like the booking buttons: --sun fill with --on-sun text.
   Orange text directly on this section's background would be unreadable on the light theme (1.5:1).
   Scoped to #area; the column heading keeps its plain green text. */
.area li:not(.col-head) > b {
    background: var(--sun);
    color: var(--on-sun);
    padding: 0.125rem 0.625rem;
    border-radius: 6.1875rem;
    /* Keep the pill's own height when a long label wraps onto several lines */
    align-self: flex-start;
}

.cta {
    text-align: center;
    background: var(--green);
    color: var(--bg);
}

.cta h2 {
    color: var(--bg);
}

.cta .btn {
    background: var(--bg);
    color: var(--green);
}

.cta .btn.alt {
    background: transparent;
    color: var(--bg);
    border-color: var(--bg);
}

/* Booking buttons (hero and CTA): orange at rest, a subtle brightness shine on hover */
.btn,
.btn.alt,
.cta .btn,
.cta .btn.alt {
    background: var(--sun);
    color: var(--on-sun);
    border: 1.5px solid var(--sun);
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
    .btn:hover,
    .btn.alt:hover,
    .cta .btn:hover,
    .cta .btn.alt:hover {
        filter: brightness(1.18);
        box-shadow: 0 0 14px rgba(235, 175, 95, 0.45);
        opacity: 1;
    }
}

.cta .btns {
    max-width: 21.25rem;
    margin: 1.25rem auto 0;
}

/* --------------------------------------------------------------------------
   7. Calendar & Programs Widget (#events)
   -------------------------------------------------------------------------- */
.chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.chips button {
    font: 500 0.8125rem Inter, sans-serif;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    padding: 0.4375rem 0.875rem;
    border-radius: 6.1875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chips button.on {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
}

.cw {
    --cw-gap: 1.125rem;
    display: grid;
    gap: var(--cw-gap);
}

.cal,
.dp {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    padding: 1rem;
}

.ch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
}

.ch b {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: capitalize;
    font-variant-numeric: tabular-nums;
}

.ch button {
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--green);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ch button:disabled {
    opacity: 0.3;
    cursor: default;
}

.cg {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
}

.cg i {
    font-style: normal;
    font-size: 0.6875rem;
    color: var(--mute);
    text-transform: uppercase;
    padding: 0.25rem 0;
    font-variant-numeric: tabular-nums;
}

.cg button {
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.75rem;
    background: var(--bg);
    color: var(--ink);
    font: 500 0.875rem 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cg button:disabled {
    background: none;
    color: var(--mute);
    opacity: 0.4;
    cursor: default;
}

.cg button.td {
    outline: 2px solid var(--sun);
}

.cg button.sl {
    background: var(--green);
    color: var(--bg);
}

.dp h3 {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    text-transform: capitalize;
    font-variant-numeric: tabular-nums;
}

/* Program list card: the date heading stays visible while the cards scroll underneath.
   Mobile: the card is capped in height. Desktop (08-desktop.css): it takes the height of the
   calendar + map column instead. */
.dp {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
    max-height: 70dvh;
}

.dp-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    /* No overscroll-behavior: at either end of the list the scroll continues on the page */
    /* Reserve the scrollbar's space so cards do not change width between short and long days */
    scrollbar-gutter: stable;
    padding-right: 0.25rem;
}

/* Firefox only: Chromium and Safari use the ::-webkit-scrollbar rules below, because there the
   standard properties would override them and bring back the native arrow buttons. */
@supports not selector(::-webkit-scrollbar) {
    .dp-list {
        scrollbar-width: thin;
        scrollbar-color: color-mix(in srgb, var(--green) 45%, transparent) transparent;
    }
}

.dp-list::-webkit-scrollbar {
    width: 0.5rem;
}

.dp-list::-webkit-scrollbar-track {
    background: transparent;
}

.dp-list::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--green) 45%, transparent);
    border-radius: 6.1875rem;
}

.dp-list::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--green) 70%, transparent);
}

.pg {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.875rem;
    margin-bottom: 0.625rem;
    background: var(--bg);
}

.pg.pk {
    border-color: var(--sun);
    background: color-mix(in srgb, var(--sun) 14%, var(--bg));
}

.pg strong {
    display: block;
    font-size: 0.9375rem;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.pg small {
    color: var(--mute);
    font-size: 0.8125rem;
}

.bd2 {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-top: 0.375rem;
}

.bd2 em {
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 0.5625rem;
    border-radius: 6.1875rem;
    background: var(--sage);
    color: var(--green);
    font-variant-numeric: tabular-nums;
}

/* Scraped venue names can be long addresses; let them wrap inside the card on narrow screens. */
.bd2 em.pg-venue {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.bd2 em.k {
    background: #e8b45f;
    color: #3b2a0a;
}

.pk-l {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #a8731f;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nt {
    font-size: 0.75rem;
    color: var(--mute);
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
}

.nt a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.125rem;
}

.pg a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--sun);
    text-underline-offset: 0.1875rem;
}

.events-intro {
    color: var(--mute);
}

.pg-body {
    flex: 1;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   7. Map & Directions Section (#map)
   -------------------------------------------------------------------------- */
.map-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    overflow: hidden;
    margin-top: 0;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.04);
}

.map-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    gap: 0.625rem;
}

.map-addr-wrap {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.map-addr-wrap .ic {
    font-size: 1rem;
}

.map-addr {
    font-family: 'Space Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2f5d46;
    font-variant-numeric: tabular-nums;
}

.map-dir-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #2f5d46;
    color: var(--bg) !important;
    padding: 0.4375rem 0.875rem;
    border-radius: 6.1875rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.map-dir-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.map-frame {
    position: relative;
    width: 100%;
    height: 15rem;
    background: var(--stage);
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* --------------------------------------------------------------------------
   8. Compact (mobile) layout – base styles, applied at every width
   -------------------------------------------------------------------------- */

/* Hide header navigation links */
.nav ul {
    display: none;
}

/* Compact language switcher aligned to the right side */
.lang {
    margin-left: auto;
    padding: 2px;
    gap: 1px;
}

.lang .lang-ic {
    display: none;
}

.lang a {
    padding: 0.25rem 0.4375rem;
    font-size: 0.6875rem;
}

/* Ensure the tower element is always visible on mobile */
.hero-tower {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    left: 78.2%;
    bottom: 7.8125rem;
    width: 2.25rem;
    height: 6.75rem;
}

/* Mobile sequence for #events: 1. Calendar, 2. Filters, 3. Program list, 4. Google Maps */
.cal {
    order: 1;
}

.chips {
    order: 2;
    margin: 0;
}

.dp {
    order: 3;
}

.map-card {
    order: 4;
}

/* --------------------------------------------------------------------------
   9. Responsive Enhancements (viewport >= 47.5rem)
   -------------------------------------------------------------------------- */
@media (min-width: 47.5rem) {
    /* Calendar and map form one flush left column; the program list fills the right column
       and ends exactly where the map ends. Row spacing comes from the map's margin only, so
       exactly one card gap separates calendar and map. */
    .cw {
        grid-template-columns: 1.1fr 1fr;
        grid-template-rows: auto auto auto;
        column-gap: var(--cw-gap);
        row-gap: 0;
        align-items: start;
    }

    /* Filters sit above the whole widget on desktop */
    .chips {
        grid-column: 1 / -1;
        grid-row: 1;
        margin: 1rem 0;
        order: unset;
    }

    .cal {
        grid-column: 1;
        grid-row: 2;
        order: unset;
    }

    .map-card {
        grid-column: 1;
        grid-row: 3;
        margin-top: var(--cw-gap);
        order: unset;
    }

    /* `contain: size` makes the list's own length irrelevant to the grid, so the card is exactly
       as tall as the left column (stretched) and its .dp-list scrolls inside that height. */
    .dp {
        grid-column: 2;
        grid-row: 2 / -1;
        align-self: stretch;
        contain: size;
        max-height: none;
        order: unset;
    }

    .cal,
    .dp {
        padding: 1.5rem;
    }

    .nav {
        padding: 1rem 3.5rem;
        flex-wrap: nowrap;
        gap: 1.5rem;
    }

    .nav ul {
        display: flex;
        width: auto;
        overflow: visible;
        gap: 0.375rem;
    }

    .nav ul a {
        background: transparent;
        border-color: transparent;
    }

    .nav ul a:hover {
        background: var(--sage);
        color: var(--green);
        border-color: transparent;
    }

    .lang {
        margin-left: 0;
        padding: 0.1875rem;
        gap: 2px;
    }

    .lang .lang-ic {
        display: inline-flex;
    }

    .lang a {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    body {
        font-size: 1.0625rem;
    }

    .hero {
        padding: 6rem 3.5rem 12.5rem;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 4vw, 3.75rem);
        line-height: 1.1;
        max-width: none;
    }

    .hero svg {
        height: 12.5rem;
    }

    .hero-tower {
        bottom: 10.5rem;
        width: 3rem;
        height: 9rem;
    }

    .btns {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .btn {
        padding: 0.875rem 1.625rem;
    }

    .cta .btns {
        max-width: 46.875rem;
        justify-content: center;
    }

    section {
        padding: 5rem 3.5rem;
    }

    h2 {
        font-size: 2.375rem;
        line-height: 1.15;
    }

    .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .feat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gal-item img {
        object-fit: contain;
    }

    .split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3.5rem;
        align-items: center;
    }

    .gal-wrap {
        overflow-x: visible;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .gal {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.875rem;
        width: auto;
        scroll-snap-type: none;
    }

    .gal .clone {
        display: none !important;
    }

    .gal-item {
        display: block;
        flex: none;
        width: auto;
        min-width: 0;
        max-width: none;
        padding: 0;
        aspect-ratio: 3 / 4;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }

    .map-frame {
        height: 16.875rem;
    }

    .map-header {
        padding: 0.875rem 1.125rem;
    }
}

/* --------------------------------------------------------------------------
   10. Language chooser (root page)
   -------------------------------------------------------------------------- */
.lang-chooser {
    min-height: 100dvh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    background: var(--bg);
}

.lang-chooser h1 {
    color: var(--green);
}

/* --------------------------------------------------------------------------
   11. Accessibility: focus, touch targets, reduced motion
   -------------------------------------------------------------------------- */
:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.nav ul a,
.chips button,
.ch button,
.cg button,
.map-dir-btn,
.btn,
.logo {
    min-height: 2.75rem;
}

.ch button {
    min-width: 2.75rem;
}

/* Keeps the compact pill look while giving a 44px-tall touch target */
.lang a {
    position: relative;
}

.lang a::after {
    content: '';
    position: absolute;
    inset: -0.75rem -0.125rem;
}

.lang a,
.nav ul a,
.btn,
.map-dir-btn,
.chips button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn {
    display: flex;
}

/* The nav landmark stays out of the compact header layout; its links appear on wider screens */
.nav nav {
    display: none;
}

@media (min-width: 47.5rem) {
    .nav nav {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   10. Footer & legal notice page (Impresszum)
   -------------------------------------------------------------------------- */
.site-footer {
    padding: 2rem 1.25rem;
    color: var(--mute);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: grid;
    gap: 1.25rem;
    justify-items: center;
    max-width: 72rem;
    margin: 0 auto;
    text-align: center;
}

.footer-rating {
    display: grid;
    justify-items: center;
    gap: 0.375rem;
}

/* The slot keeps its size whether it holds the placeholder or the logo, so adding the logo shifts nothing. */
.footer-rating-slot {
    display: grid;
    place-items: center;
    width: 10rem;
    height: 3rem;
    border: 1px dashed var(--line);
    border-radius: 0.75rem;
}

.footer-rating-slot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a,
.footer-pending {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

.footer-links a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.1875rem;
}

.footer-pending {
    cursor: default;
}

.footer-copy {
    margin: 0;
}

@media (min-width: 47.5rem) {
    .site-footer {
        padding: 2rem 3.5rem;
    }

    .footer-inner {
        grid-template-columns: auto 1fr;
        align-items: center;
        justify-items: start;
        text-align: left;
    }

    .footer-links {
        justify-self: end;
    }

    .footer-links ul {
        justify-content: flex-end;
    }

    .footer-copy {
        grid-column: 1 / -1;
    }
}

/* Legal notice page */
.legal {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
}

.legal h1 {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.18;
    color: var(--green);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--green);
    text-underline-offset: 0.1875rem;
}

.legal-list {
    display: grid;
    gap: 0.875rem;
    margin-top: 0.5rem;
}

.legal-item {
    padding: 1rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 1rem;
}

.legal-item h2 {
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mute);
}

.legal-item p {
    overflow-wrap: anywhere;
}

@media (min-width: 47.5rem) {
    .legal {
        padding: 4rem 3.5rem 5rem;
    }

    .legal h1 {
        font-size: 2.375rem;
    }
}
