/* Instrument Sans (variable weight 400–600) and Instrument Serif, self-hosted, SIL Open Font License
   (assets/fonts/*-OFL.txt); latin-ext carries the Czech letters */
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('../themes/jagu-orlov/assets/fonts/instrument-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('../themes/jagu-orlov/assets/fonts/instrument-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../themes/jagu-orlov/assets/fonts/instrument-serif-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../themes/jagu-orlov/assets/fonts/instrument-serif-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../themes/jagu-orlov/assets/fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../themes/jagu-orlov/assets/fonts/instrument-serif-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Design tokens of concept 2 "Situace": light paper, forest green accent, Instrument Serif headings,
   rounded cards and pill buttons */
:root {
    --c-accent: #336144;
    --c-accent-soft: #DCEDE1;
    --c-accent-select: #D6EFDE;
    --c-ink: #1C2420;
    --c-text: #4D5650;
    --c-muted: #6D766F;
    --c-subtle: #56605A;
    --c-paper: #F6F7F4;
    --c-white: #FFFFFF;
    --c-line: #DFE4DC;
    --c-line-soft: #EEF1EC;
    --c-line-strong: #D6DCD3;
    --c-tint: #E8EEE5;
    --c-photo: #E9E6DF;
    --c-hover: #F3F5F1;
    --c-contact: #DCEDE1;
    --c-contact-text: #3A443E;
    --c-logo: #336144;

    --status-available-bg: #E3EFE4;
    --status-available-fg: #24552E;
    --status-reserved-bg: #F6EAD2;
    --status-reserved-fg: #7A5415;
    --status-sold-bg: #E9EAE7;
    --status-sold-fg: #5F635E;

    --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --text-display: clamp(2.75rem, 5.6vw, 4.75rem);
    --text-hero: clamp(2.5rem, 5.4vw, 4.25rem);
    --text-h2: clamp(2.25rem, 4.4vw, 3.5rem);
    --text-h3: 2rem;

    /* Widths as on Srdcovka: sections run the full window width with a fluid gutter, only text has
       a reading width; --page-max caps the few centred wrappers (.container) */
    --page-max: 90rem;
    --gutter: clamp(1.25rem, 4vw, 3.5rem);
    --section-gap: 7rem;
    --radius-lg: 1.75rem;
    --radius: 1.5rem;
    --radius-md: 1.125rem;
    --radius-sm: 0.75rem;
    --header-h: 4.5rem;
}

@media (max-width: 640px) {
    :root {
        --section-gap: 4.5rem;
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

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

body {
    margin: 0;
    background: var(--c-paper);
    color: var(--c-ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1;
    text-wrap: balance;
}

h1 { font-size: var(--text-display); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); line-height: 1.1; }

h1 em, h2 em {
    color: var(--c-accent);
}

p {
    margin: 0;
    text-wrap: pretty;
}

a {
    color: var(--c-accent);
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;

    &:hover { color: var(--c-ink); }
}

:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

input, textarea, select, button {
    font: inherit;
    color: inherit;
}

ul, ol {
    margin: 0;
    padding: 0;
}

address {
    font-style: normal;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: var(--c-ink);
    color: var(--c-white);
    transform: translateY(-200%);

    &:focus { transform: none; color: var(--c-white); }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Rich text from the editor (block pages, unit intro) */
.prose {
    max-width: 46rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--c-text);

    & > * + * { margin-top: 1em; }
    & h2 { margin-top: 1.6em; font-size: 2.25rem; color: var(--c-ink); }
    & h3 { margin-top: 1.4em; font-size: 1.75rem; color: var(--c-ink); }
    & ul, & ol { padding-left: 1.25em; }
    & li + li { margin-top: 0.35em; }
    & a { text-decoration: underline; text-underline-offset: 3px; }
    & strong { color: var(--c-ink); font-weight: 600; }

    & table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9375rem;

        & th, & td {
            padding: 0.625rem 0.75rem 0.625rem 0;
            border-bottom: 1px solid var(--c-line);
            text-align: left;
            vertical-align: top;
        }

        & th { color: var(--c-ink); font-weight: 600; }

        /* Phones: a wide table (cookies) scrolls on its own instead of the whole page */
        @media (max-width: 719px) {
            display: block;
            overflow-x: auto;
        }
    }
}

/* Page frame: full-width sections with a fluid gutter (as on Srdcovka), sticky header, page heading,
   call to action band, footer */
.container {
    padding-inline: var(--gutter);
}

.section {
    padding: var(--section-gap) var(--gutter) 0;

    &.is-first { padding-top: 3rem; }
    &.is-near { padding-top: 3.5rem; }

    /* Right under the compact page head (house detail): the same gap as between its cards */
    &.is-tight { padding-top: 1rem; }

    /* Directly under the page heading (Kontakt) */
    .section-after-head > & { padding-top: 3.5rem; }

    /* Room for the lower photo of a .media-pair in the section above */
    &.is-after-pair { padding-top: calc(var(--section-gap) + 3rem); }

    /* Text block (legal pages): one centred reading column instead of a left column with an empty right half */
    &.is-text {
        box-sizing: content-box;
        max-width: 46rem;
        margin-inline: auto;
    }
}

/* Heading row of a section: title left, short text right */
.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem 3rem;
    margin-bottom: 2rem;

    & p {
        max-width: 29rem;
        color: var(--c-text);
        line-height: 1.6;
    }
}

.section-note {
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--c-muted);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--c-line);

    /* The frosted background sits on a pseudo-element: a backdrop-filter on the header itself
       would make it the containing block of the fixed phone menu and squeeze the menu to nothing */
    &::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: rgb(246 247 244 / 0.94);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: var(--header-h);
}

.brand {
    display: flex;
    flex: none;
    align-items: center;
    gap: 0.75rem;
    color: var(--c-ink);

    &:hover { color: var(--c-ink); }

    & svg {
        flex: none;
        width: 3rem;
        height: auto;
        color: var(--c-logo);
    }
}

.brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1;

    & strong {
        font-size: 1.3125rem;
        font-weight: 600;
        letter-spacing: 0.16em;
    }

    & span {
        margin-top: 0.3rem;
        font-size: 0.6875rem;
        letter-spacing: 0.22em;
        color: var(--c-logo);
        white-space: nowrap;
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;

    & a:not(.btn) {
        padding: 0.375rem 0;
        color: var(--c-ink);
        font-size: 0.9375rem;
        white-space: nowrap;
        text-underline-offset: 8px;
        text-decoration-thickness: 1.5px;
        text-decoration-color: var(--c-accent);

        &:hover { color: var(--c-accent); }
        &[aria-current="page"] { text-decoration-line: underline; }
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-paper);
    cursor: pointer;

    & span {
        width: 18px;
        height: 1.5px;
        background: var(--c-ink);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    &[aria-expanded="true"] {
        & span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
        & span:nth-child(2) { opacity: 0; }
        & span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
    }
}

@media (max-width: 899px) {
    .nav-toggle { display: flex; }

    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 0.5rem var(--gutter) 1.5rem;
        background: var(--c-paper);
        border-top: 1px solid var(--c-line);
        overflow: auto;

        &.is-open { display: flex; }

        & a:not(.btn) {
            padding: 0.875rem 0;
            border-bottom: 1px solid var(--c-line);
            font-size: 1.25rem;
        }

        & .btn { margin-top: 1.5rem; padding-block: 1rem; font-size: 1rem; }
    }

    body:has(.site-nav.is-open) { overflow: hidden; }
}

/* Page heading of inner pages: tinted panel with breadcrumbs, title and lead */
.page-head {
    margin-top: 1rem;
    padding: 0 var(--gutter);
}

.page-head-panel {
    padding: 1.25rem clamp(1.5rem, 3vw, 2.5rem) 0.25rem;
    border-radius: var(--radius);
    background: var(--c-tint);
}

.page-head-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.page-head-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem 3rem;
    padding: 2.5rem 0 3rem;

    & h1 {
        flex: 1 1 22.5rem;
        font-size: var(--text-display);
    }

    & p {
        flex: 0 1 28.75rem;
        font-size: 1.0625rem;
        line-height: 1.6;
        color: var(--c-subtle);
    }
}

/* Lead with a how-to under it (page-head hint) */
.page-head-text {
    flex: 0 1 28.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-head-text p { flex: none; }

.page-head-title .page-head-hint {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--c-text);
}

.page-head.is-short .page-head-title { padding: 1.25rem 0 1.75rem; }

.page-head.is-compact .page-head-panel {
    padding-bottom: 1.25rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.875rem;
    color: var(--c-subtle);

    & li + li::before {
        content: "/";
        margin-right: 0.5rem;
        color: var(--c-subtle);
    }

    & a {
        color: var(--c-subtle);
        white-space: nowrap;

        &:hover { color: var(--c-accent); }
    }

    & [aria-current="page"] {
        color: var(--c-ink);
    }
}

/* Call to action band above the footer */
.cta-band {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 2rem 0;
    border-block: 1px solid var(--c-line);

    & p {
        font-family: var(--font-serif);
        font-size: 1.875rem;
        line-height: 1.15;
        color: var(--c-ink);
    }
}

/* Footer */
.site-footer {
    margin-top: 6rem;
    border-top: 1px solid var(--c-line);
    font-size: 0.9375rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.75rem), 1fr));
    gap: 2rem 3rem;
    padding-top: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    & .brand svg { width: 2.75rem; }
    & .brand-name strong { font-size: 1.25rem; }
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--c-muted);
}

.footer-company {
    max-width: 26.25rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--c-muted);
}

/* The menu and the contacts: a small title, then the items with one even gap (as on Srdcovka),
   so on a phone the stacked columns read as groups */
.footer-nav,
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;

    & .label {
        margin-bottom: 0.25rem;
        font-family: var(--font-sans);
        font-size: 0.75rem;
        font-weight: 600;
        line-height: 1.4;
    }
    & a { color: var(--c-ink); }
    & a:hover { color: var(--c-accent); }
}

.footer-contact a[href^="mailto"] { color: var(--c-accent); }

/* Phone: the menu in two columns under its title, the same gap as the contacts */
@media (max-width: 719px) {
    .footer-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.625rem 1.5rem;

        & .label { grid-column: 1 / -1; }
    }
}

.footer-place {
    color: var(--c-muted);
}

.footer-disclaimer {
    max-width: 22.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--c-subtle);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-block: 1.25rem 1.75rem;
    border-top: 1px solid var(--c-line);
    font-size: 0.8125rem;
    color: var(--c-muted);

    & a { color: var(--c-muted); }
    & a:hover { color: var(--c-ink); }
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.footer-credit {
    display: flex;
    flex: none;
    align-items: center;
    white-space: nowrap;

    & a { color: var(--c-ink); }
}

/* Jagu attribution icon, see the "JaguIcon do patičky" wiki page */
.jagulogo-jagu::before {
    position: relative;
    top: 2px;
    margin: 0 5px;
    font-size: 150%;
    color: #f8981d;
}

/* Buttons: green pill for the main action, white outlined pill for the others */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.875rem 1.625rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--c-accent);
    color: var(--c-white);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;

    &:hover { background: var(--c-ink); color: var(--c-white); }

    &.is-secondary {
        background: var(--c-white);
        border-color: var(--c-line-strong);
        color: var(--c-ink);

        &:hover { border-color: var(--c-ink); }
    }

    &.is-small {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    &.is-block {
        width: 100%;
        padding-block: 1rem;
    }
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

/* Text link with an arrow, e.g. "Kompletní technické řešení →" */
.link-arrow {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    font-size: 0.9375rem;
    white-space: nowrap;
}

/* Sale status pill */
.status {
    display: inline-block;
    justify-self: start;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--status-available-bg);
    color: var(--status-available-fg);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;

    &.is-pre_reserved, &.is-reserved {
        background: var(--status-reserved-bg);
        color: var(--status-reserved-fg);
    }

    &.is-sold {
        background: var(--status-sold-bg);
        color: var(--status-sold-fg);
    }
}

/* Rounded photo frame */
.media {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--c-photo);

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    &.is-5-4 { aspect-ratio: 5 / 4; }
    &.is-4-5 { aspect-ratio: 4 / 5; }
    &.is-4-3 { aspect-ratio: 4 / 3; }
    &.is-3-2 { aspect-ratio: 3 / 2; }
    /* width: 100% – otherwise the min-height is turned into a 594px width via the ratio (phones scroll sideways) */
    &.is-wide { width: 100%; aspect-ratio: 16 / 7; min-height: 16.25rem; }
}

/* White rounded card */
.card {
    padding: 1.375rem;
    border-radius: var(--radius-md);
    background: var(--c-white);
}

.label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-accent);
}

/* Key facts in one row (Úvod, under the hero photo) */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.375rem, 1fr));
    border-bottom: 1px solid var(--c-line);

    & div {
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
        padding: 1.75rem 0;
    }

    & dt {
        font-size: 0.8125rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--c-muted);
    }

    & dd {
        margin: 0;
        font-size: 1.5rem;
        color: var(--c-ink);
    }
}

/* Short list of places: name and description on one row (Úvod – Lokalita) */
.point-list {
    list-style: none;
    border-top: 1px solid var(--c-line);

    & li {
        display: grid;
        grid-template-columns: minmax(0, 8.125rem) 1fr;
        gap: 1rem;
        padding: 0.8rem 0;
        border-bottom: 1px solid var(--c-line);
        font-size: 0.9375rem;
    }

    & strong { font-weight: 500; color: var(--c-ink); }
    & span { color: var(--c-text); }
}

/* Longer names (tips for trips, Lokalita): the name above its description */
.point-list.is-stacked li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
}

/* One house per row: code, layout and area, plot, price, status, "Mám zájem". The code link
   stretches over the whole row (detail), the button sits above it (enquiry on the detail) */
.house-list {
    border-top: 1px solid var(--c-line);
}

.house-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(4.5rem, 0.8fr) repeat(3, minmax(0, 1.2fr)) minmax(0, 0.9fr) auto;
    grid-template-areas: "code meta plot price status cta";
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid var(--c-line);
    font-size: 0.9375rem;
    color: var(--c-text);
    transition: background-color 0.15s ease;

    &:hover, &.is-hover { background: var(--c-hover); }

    & .house-code {
        grid-area: code;
        display: inline-flex;
        align-items: center;
        min-height: 2.75rem;
        font-family: var(--font-serif);
        font-size: 1.875rem;
        color: var(--c-ink);

        &::after {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
        }

        &:focus-visible { outline: none; }
        &:focus-visible::after { outline: 2px solid var(--c-accent); outline-offset: -2px; }
    }

    & .house-cta {
        grid-area: cta;
        position: relative;
        z-index: 1;
        display: flex;
        justify-content: flex-end;
        min-width: 7rem;
    }

    & .house-meta { grid-area: meta; }
    & .house-plot { grid-area: plot; }

    & .house-price {
        grid-area: price;
        font-weight: 600;
        color: var(--c-ink);
    }

    & .status { grid-area: status; }
}

/* Phones: a compact card – code and status, layout and plot, price and "Mám zájem" */
@media (max-width: 719px) {
    .house-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "code status"
            "meta plot"
            "price cta";
        gap: 0.25rem 0.75rem;
        padding: 1rem 0.25rem;

        & .house-code { min-height: 0; font-size: 1.75rem; line-height: 1.1; }
        & .status { justify-self: end; }
        & .house-plot { justify-self: end; text-align: right; }
        & .house-price { align-self: center; font-size: 1rem; }
        & .house-cta { min-width: 0; margin-top: 0.375rem; }
    }
}

/* Rows inside the situation card are rounded and highlight with the plan */
.house-list.is-boxed {
    border-top-color: var(--c-line-soft);

    & .house-row {
        padding-inline: 1rem;
        border-bottom-color: var(--c-line-soft);
        border-radius: var(--radius-sm);

        /* The row of the hovered plot: green tint and a bar on the left, like the plot outline */
        &.is-hover {
            background: var(--c-accent-select);
            box-shadow: inset 4px 0 0 var(--c-accent);
        }

        &.is-selected {
            background: var(--c-accent-select);
            box-shadow: inset 4px 0 0 var(--c-accent);
        }
    }

    & .house-code { font-size: 1.625rem; }
}

/* Label above a value, used in grids of parameters */
.param {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;

    & dt {
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--c-muted);
    }

    & dd {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 500;
        color: var(--c-ink);
    }
}

/* Enquiry form (partial forms/enquiry) */
.form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: clamp(1.125rem, 3vw, 1.75rem);
    border-radius: 1.375rem;
    background: var(--c-white);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.25rem), 1fr));
    gap: 0.75rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;

    & label {
        font-size: 0.8125rem;
        color: var(--c-text);
    }

    & input, & select, & textarea {
        width: 100%;
        padding: 0.875rem;
        border: 1px solid var(--c-line);
        border-radius: var(--radius-sm);
        background: var(--c-paper);
        color: var(--c-ink);
        font-size: 1rem;

        &:focus {
            outline: 2px solid var(--c-accent);
            outline-offset: -1px;
            border-color: var(--c-accent);
        }
    }

    & select {
        appearance: none;
        padding-right: 2.5rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231C2420' stroke-width='1.5'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
    }

    & textarea {
        min-height: 6.5rem;
        resize: vertical;
    }

    &:has(.form-error:not(:empty)) :is(input, select, textarea) {
        border-color: #A33A2B;
    }
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--c-text);

    & input {
        flex: none;
        width: 1.125rem;
        height: 1.125rem;
        margin: 0.15rem 0 0;
        accent-color: var(--c-accent);
    }

    & a { text-decoration: underline; }
}

.form-error {
    font-size: 0.875rem;
    color: #A33A2B;

    &:empty { display: none; }
}

.form-submit {
    width: 100%;
    margin-top: 0.25rem;
    padding-block: 1rem;
    font-size: 1rem;

    &[disabled] { opacity: 0.6; cursor: progress; }
}

.form-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-success {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.625rem;
    min-height: 16rem;

    & h3 { font-size: 2.25rem; }
    & p { color: var(--c-text); line-height: 1.6; }
}

/* Social profiles as round icon buttons (footer, contact panel) */
.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;

    & a {
        display: grid;
        place-items: center;
        width: 2.75rem;
        height: 2.75rem;
        border: 1px solid var(--c-line);
        border-radius: 50%;
        color: var(--c-accent);
        transition: background-color 0.2s, color 0.2s, border-color 0.2s;

        &:hover { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-white); }
    }

    & svg { width: 1.125rem; height: 1.125rem; }
}

/* In the green contact panel the buttons are white like the row icons */
.contact .socials a { border-color: transparent; background: var(--c-white); }
.contact .socials a:hover { background: var(--c-accent); }

/* Quick edit button for a signed in backend user (partial site/edit-bar) */
.edit-bar {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-white);
    box-shadow: 0 6px 24px rgb(28 36 32 / 0.25);

    &:hover { background: var(--c-ink); color: var(--c-white); }

    @media print { display: none; }
}

/* Map of the project and places nearby (partial ui/map, assets/js/map.js) */
.map {
    position: relative;
    z-index: 0;
    height: 100%;
    min-height: 23.75rem;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--c-line);

    &.is-failed { display: grid; place-items: center; }

    & .leaflet-container, &.leaflet-container {
        font: inherit;
        background: var(--c-line);
    }
}

.map-consent {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.5rem;
    text-align: center;

    & p { max-width: 32rem; color: var(--c-text); }
}

.map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid var(--c-accent);
    border-radius: 50%;
    background: var(--c-white);
    color: var(--c-accent);
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgb(28 36 32 / 0.3);
    cursor: pointer;

    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;

    &.is-main {
        width: 40px;
        height: 40px;
        border-color: var(--c-white);
        background: var(--c-accent);
        color: var(--c-white);
    }

    /* The pin of the card under the mouse or the picked one */
    &.is-active {
        background: var(--c-accent);
        border-color: var(--c-white);
        color: var(--c-white);
        transform: scale(1.25);
    }
}

.map-popup {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: var(--c-ink);
    font-family: var(--font-sans);
    font-size: 0.9375rem;

    & span { font-size: 0.875rem; color: var(--c-muted); }
    /* The place's website (new tab); :is() outweighs the map library's own link colour */
    &:is(div) a {
        align-self: flex-start;
        margin-top: 0.2rem;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--c-accent);
        text-decoration: underline;
        text-decoration-color: rgb(51 97 68 / 0.35);
        text-underline-offset: 0.2em;

        &::after { content: " ↗"; }
        &:hover { text-decoration-color: currentColor; }
    }
}

.map-logo img { display: block; }

/* Gallery viewer: large photo with arrows, thumbnails below, lightbox on click */
.viewer-stage {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.viewer-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;

    &::-webkit-scrollbar { display: none; }
}

.viewer-slide {
    scroll-snap-align: start;

    /* The lightbox link and its figure fill the slide */
    & :is(a, figure) { display: block; margin: 0; }

    & img {
        width: 100%;
        aspect-ratio: 3 / 2;
        max-height: 75vh;
        object-fit: cover;
        background: var(--c-photo);
    }
}

.viewer-arrow {
    position: absolute;
    top: 50%;
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.9);
    color: var(--c-ink);
    font-size: 1.25rem;
    transform: translateY(-50%);
    cursor: pointer;

    &.is-prev { left: 1rem; }
    &.is-next { right: 1rem; }
}

.viewer-caption {
    display: none;
    justify-content: space-between;
    gap: 1rem;
    min-height: 1.6em;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--c-muted);
}

.viewer-count {
    flex: none;
    font-variant-numeric: tabular-nums;
}

/* Compact: fills its frame (the photo of the house detail), the counter sits on the photo */
.viewer.is-compact {
    height: 100%;

    & .viewer-stage, & .viewer-track, & .viewer-slide { height: 100%; }
    & .viewer-slide img { height: 100%; aspect-ratio: auto; max-height: none; }
    & .viewer-arrow { width: 2.5rem; height: 2.5rem; font-size: 1.125rem; }
}

.viewer-count.is-badge {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: rgb(28 36 32 / 0.6);
    color: var(--c-white);
    font-size: 0.8125rem;
    pointer-events: none;
}

.viewer-slide figcaption { display: none; }
.viewer.is-ready .viewer-caption { display: flex; }
.viewer:not(.is-ready) .viewer-slide figcaption { display: block; }

.viewer-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;

    &::-webkit-scrollbar { display: none; }
}

.viewer-thumb {
    flex: 0 0 auto;
    width: 7.5rem;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: none;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s ease, border-color 0.15s ease;

    & img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
    &:hover { opacity: 1; }
    &[aria-current="true"] { border-color: var(--c-accent); opacity: 1; }
}

@media (max-width: 640px) {
    .viewer-thumb { width: 5rem; }
    .viewer-arrow { display: none; }
}

/* Lightbox (PhotoSwipe) */
[data-lightbox] a {
    display: block;
    cursor: zoom-in;
}

.pswp__caption {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    max-width: min(48rem, calc(100% - 2rem));
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transform: translateX(-50%);
    background: rgb(28 36 32 / 0.75);
    color: var(--c-white);
    font: 0.875rem/1.5 var(--font-sans);
    text-align: center;

    &[hidden] { display: none; }
}

/* Page sections of concept 2 "Situace"; markup lives in partials/sections and the pages */

/* Úvod: full photo with a light box at the bottom left */
.hero {
    padding: 1.5rem var(--gutter) 0;
}

.hero-frame {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(78vh, 45rem);
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--c-line);

    & > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.hero-box {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 38.75rem;
    margin: clamp(0.75rem, 3vw, 2rem);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    border-radius: 1.375rem;
    background: var(--c-paper);

    & h1 {
        font-size: var(--text-hero);
        letter-spacing: -0.01em;
    }

    & p {
        font-size: 1.0625rem;
        line-height: 1.6;
        color: var(--c-text);
    }
}

/* Phones: buttons of the hero and the sections are full width, one under the other (the main
   one on top); the small buttons in the house cards keep their size */
@media (max-width: 719px) {
    :is(.hero-box, .split-text, .section-links, .cta-band, .section > .btn-group) .btn:not(.is-small) {
        width: 100%;
        padding-block: 1rem;
    }

    :is(.hero-box, .split-text) .btn-group {
        flex-direction: column;
        align-self: stretch;
    }

    .section-links span { text-align: center; }
    .cta-band { flex-direction: column; align-items: stretch; }
}

/* Text beside a photo (or a pair of photos), the photo may come first */
.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.25rem), 1fr));
    align-items: center;
    gap: 2.5rem 3.5rem;

    &.is-media-first > .split-media { order: -1; }
}

.split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    max-width: 35rem;

    & > p {
        font-size: 1.125rem;
        line-height: 1.65;
        color: var(--c-text);
    }

    & > .btn { align-self: flex-start; }
}

/* Two portrait photos, the second one lower */
.media-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 0.75rem;

    & > :last-child { margin-bottom: -3rem; }
}

.section-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.75rem;

    & span { font-size: 0.875rem; color: var(--c-text); }
}

/* Projekt: intro with a wide photo and three short features */
.intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26.25rem), 1fr));
    align-items: end;
    gap: 2rem 4rem;

    & h2 { font-size: var(--text-display); }

    & p {
        font-size: 1.125rem;
        line-height: 1.65;
        color: var(--c-text);
    }
}

.intro + .media { margin-top: 2.5rem; }

.section-title { margin-bottom: 1.75rem; }

.plan .figure { margin: 0; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.25rem), 1fr));
    gap: 2rem 3rem;
    margin-top: 3rem;

    & div { display: flex; flex-direction: column; gap: 0.625rem; }
    & p { line-height: 1.6; color: var(--c-text); }
}

/* Specification groups (Technické řešení): a card per group, a heading and a short list */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.25rem), 1fr));
    gap: 0.75rem;

    & .card {
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
        padding: 1.5rem;
    }

    & h3 { font-size: 1.75rem; }

    & ul {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        list-style: none;
        font-size: 0.9375rem;
        line-height: 1.5;
        color: var(--c-text);
    }

    & li {
        position: relative;
        padding-left: 1rem;

        &::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0.6em;
            width: 0.375rem;
            height: 0.375rem;
            border-radius: 50%;
            background: var(--c-accent);
        }
    }
}

/* Cards of the block "cards" */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.25rem), 1fr));
    gap: 0.75rem;

    & .card { display: flex; flex-direction: column; gap: 0.75rem; }
    & .media { border-radius: var(--radius-sm); }
    & h3 { font-size: 1.75rem; }
    & p { color: var(--c-text); line-height: 1.6; }
}

/* Floor plans of the house types */
.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 23.75rem), 1fr));
    gap: 0.75rem;
}

.plan {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin: 0;
    padding: 1.25rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    background: var(--c-white);

    & img { width: 100%; }

    /* The captions line up at the bottom even when the plans differ in height */
    & figcaption {
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
        margin-top: auto;
        font-size: 0.9375rem;

        & strong { font-weight: 500; }
        & span { color: var(--c-muted); }
    }
}

/* Domy a ceny: the situation plan with clickable houses above the list */
.situation {
    --situation-pad: clamp(0.75rem, 2vw, 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: var(--situation-pad);
    border-radius: var(--radius);
    background: var(--c-white);
}

.situation-scroll {
    overflow-x: auto;
    border-radius: 1rem;
}

.situation-plan {
    position: relative;
    min-width: 51.25rem;

    & > img { width: 100%; }

    & > svg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    /* Shapes of the uploaded SVG are invisible until hovered (SVG fills black by default) */
    & > svg * {
        fill: transparent;
        stroke: none;
    }

    /* Each unit shape of the uploaded SVG (id = unit code) */
    & [data-unit] {
        fill: transparent;
        stroke: transparent;
        stroke-width: 2;
        stroke-linejoin: round;
        vector-effect: non-scaling-stroke;
        cursor: pointer;
        transition: fill 0.15s ease, stroke 0.15s ease;

        &.is-hover, &:focus-visible {
            fill: rgb(51 97 68 / 0.24);
            stroke: var(--c-accent);
            stroke-width: 3;
            outline: none;
        }

        &.is-selected {
            fill: rgb(51 97 68 / 0.32);
            stroke: var(--c-accent);
            stroke-width: 3;
        }
    }
}

.situation-list {
    position: relative;

    /* Lower rows, so more of them fit under the plan */
    @media (min-width: 720px) {
        & .house-row { padding-block: 0.5rem; }
    }
}

/* The plan stays under the sticky header while the page scrolls through the list, until the
   card ends (situation.js adds is-sticky when the screen has room for it and sets --sticky-top
   to the header height); the white ring hides the rows passing under its rounded corners */
/* The plan lets go one row before the end of the card, so the last row stays visible under it
   (a sticky element stops at the end of its parent's content: the list reaches one row less
   into it, the padding gives the row its room back; --last-row is set by situation.js) */
.situation.is-sticky {
    padding-bottom: calc(var(--situation-pad) + var(--last-row, 0px));

    & .situation-list { margin-bottom: calc(-1 * var(--last-row, 0px)); }
}

.situation.is-sticky .situation-scroll {
    position: sticky;
    top: var(--sticky-top, 0);
    z-index: 2;
    background: var(--c-white);
    box-shadow: 0 0 0 0.75rem var(--c-white);
}

/* Legend of the plot colours, only on phones */
.situation-legend {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    font-size: 0.8125rem;
    color: var(--c-text);

    & li { display: inline-flex; align-items: center; gap: 0.375rem; }

    & i {
        width: 0.875rem;
        height: 0.875rem;
        border-radius: 0.25rem;
        background: var(--status-available-bg);
        border: 1px solid var(--status-available-fg);

        &.is-pre_reserved, &.is-reserved { background: var(--status-reserved-bg); border-color: var(--status-reserved-fg); }
        &.is-sold { background: var(--status-sold-bg); border-color: var(--status-sold-fg); }
    }
}

/* Phones and tablets: the whole plan fits the width (no sideways scrolling) and the plots are
   tinted by status instead of the pills, which would cover the plot numbers at this size */
@media (max-width: 1279px) {
    .situation-scroll { overflow: visible; }
    .situation-plan { min-width: 0; }
    .situation-pill { display: none; }
    .situation-legend { display: flex; }

    .situation-plan [data-unit] {
        &.is-available { fill: rgb(36 85 46 / 0.16); stroke: rgb(36 85 46 / 0.45); stroke-width: 1; }
        &.is-pre_reserved, &.is-reserved { fill: rgb(122 84 21 / 0.22); stroke: rgb(122 84 21 / 0.5); stroke-width: 1; }
        &.is-sold { fill: rgb(95 99 94 / 0.35); stroke: rgb(95 99 94 / 0.5); stroke-width: 1; }

        &.is-hover, &.is-selected {
            fill: rgb(51 97 68 / 0.35);
            stroke: var(--c-accent);
            stroke-width: 2;
        }
    }
}

/* Status of each house at the bottom of its plot (added by situation.js) */
.situation-pill {
    position: absolute;
    margin-top: -0.5rem;
    transform: translate(-50%, -100%);
    pointer-events: none;
}

/* The house detail: card with parameters, photo, position on the situation plan */
.detail-top {
    display: grid;
    gap: 1rem;
}

@media (min-width: 900px) {
    .detail-top { grid-template-columns: 1fr 1fr; }
}

/* The situation plan closes the card, under the price */
.detail-card .situation-mini {
    margin-top: auto;
    border: 1px solid var(--c-line-soft);
}

.detail-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-radius: var(--radius);
    background: var(--c-white);
}

.detail-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;

    & h1 {
        font-size: clamp(2.75rem, 4.6vw, 4rem);
        line-height: 0.95;
    }

    & .status { font-size: 0.8125rem; padding: 0.375rem 0.8rem; }
}

.detail-params {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--c-line-soft);

    & .param {
        padding: 0.875rem 0 0.875rem 1rem;
        background: var(--c-white);
    }

    & .param:nth-child(odd) { padding-left: 0; }
}

.detail-price {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;

    & .price {
        font-family: var(--font-serif);
        font-size: 2.75rem;
        line-height: 1.1;
    }

    & .price-label {
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--c-muted);
    }
}

.detail-media {
    display: grid;
    gap: 1rem;

    /* The photo (or the house's gallery) in a 3:2 frame; beside the card it is as tall as the
       card (the situation plan sits in the card) */
    & .media {
        position: relative;
        aspect-ratio: 3 / 2;

        & > * { position: absolute; inset: 0; }
    }

    /* The lightbox link and its figure fill the rounded frame */
    & .media :is(a, figure) {
        display: block;
        height: 100%;
        margin: 0;
    }

    & .media img { height: 100%; }
}

/* Beside the card the photo is as tall as the card */
@media (min-width: 900px) {
    .detail-media .media { aspect-ratio: auto; min-height: 22rem; }
}

.situation-mini {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--c-white);

    & > img { width: 100%; }

    & > svg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    & > svg * { fill: transparent; stroke: none; }

    & [data-unit] {
        stroke-width: 2;
        stroke-linejoin: round;
        vector-effect: non-scaling-stroke;
    }

    & [data-unit].is-current {
        fill: rgb(51 97 68 / 0.32);
        stroke: var(--c-accent);
    }

    /* The other houses lead to their details, as on the big plan */
    & [data-unit].is-link {
        cursor: pointer;
        transition: fill 0.15s ease, stroke 0.15s ease;

        /* Lighter than the current house, so this one stays recognisable */
        &:hover, &:focus-visible {
            fill: rgb(255 255 255 / 0.35);
            stroke: rgb(51 97 68 / 0.55);
            outline: none;
        }
    }
}

@media (max-width: 719px) {
    .situation-mini [data-unit] { stroke-width: 1.5; }
}

/* Floor plans: heading with the floor switch, then each floor as its plan beside its rooms */
.detail-plan {
    margin-top: 1rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: var(--radius);
    background: var(--c-white);

    & h2 { font-size: 2.5rem; }
    & > .link-arrow { margin-top: 1rem; }
}

.detail-plan-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

/* Segmented switch: floors (1. NP | 2. NP) and galleries (Vizualizace | Interiéry …) */
.floor-tabs, .tabs {
    display: inline-flex;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--c-line-soft);
    overflow-x: auto;
    scrollbar-width: none;

    &::-webkit-scrollbar { display: none; }

    & button { flex: none; white-space: nowrap; }

    &[hidden] { display: none; }

    & button {
        min-height: 2.75rem;
        padding: 0 1.25rem;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--c-text);
        font-size: 0.9375rem;
        font-weight: 500;
        cursor: pointer;

        &:hover { color: var(--c-ink); }

        &[aria-selected="true"] {
            background: var(--c-white);
            color: var(--c-ink);
            box-shadow: 0 1px 3px rgb(28 36 32 / 0.12);
        }
    }
}

/* Plan on the left, its rooms on the right; stacked only on phones */
.floor-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
    gap: 2rem 3rem;

    /* Without the tabs (no script) the floors follow each other */
    & + .floor-panel { margin-top: 2.5rem; }
}

@media (max-width: 719px) {
    .floor-panel { grid-template-columns: minmax(0, 1fr); }
}

/* With the tabs all floors share one grid cell, so the card keeps the height of the tallest
   floor and switching never makes the page jump; the other floors are only invisible */
.is-tabbed .floor-panels {
    display: grid;
}

.is-tabbed .floor-panel {
    grid-area: 1 / 1;
    margin-top: 0;

    &.is-inactive { visibility: hidden; }
}

.floor-plan :is(a, figure) {
    display: block;
    margin: 0;
}

.rooms-floor {
    & .label { margin-bottom: 0.375rem; }

    & ul { list-style: none; }

    & li {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.625rem 0;
        border-bottom: 1px solid var(--c-line-soft);
        font-size: 0.9375rem;

        & span:last-child { color: var(--c-text); white-space: nowrap; }
    }
}

/* Technické řešení and Ke stažení: two cards under the floor plans, one alone spans the row */
.detail-extra {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.detail-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: var(--radius);
    background: var(--c-white);

    & h2 { font-size: 2.5rem; }
    & .link-arrow { margin-top: auto; }
}

/* Items with a small green tick, two columns once the card is wide enough */
.check-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    gap: 0.875rem 2rem;
    list-style: none;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--c-text);

    & li {
        position: relative;
        padding-left: 2rem;
    }

    & li::before {
        content: "";
        position: absolute;
        top: 0.0625rem;
        left: 0;
        width: 1.375rem;
        height: 1.375rem;
        border-radius: 50%;
        background: var(--c-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23336144' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
    }
}

/* Lokalita: text and the public transport box beside the map, places as numbered cards */
.location {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 27.5rem), 1fr));
    gap: 2rem;

    & > div:first-child {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    & .prose { font-size: 1.0625rem; }
    & .card p { margin-top: 0.5rem; font-size: 0.9375rem; line-height: 1.6; }

    /* Without a map (no API key yet) the text keeps a reading width */
    &.is-text-only { grid-template-columns: minmax(0, 46rem); }
}

.places {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
    list-style: none;
}

.place {
    display: flex;
    gap: 0.875rem;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: var(--c-white);
    box-shadow: inset 0 0 0 2px transparent;
    transition: box-shadow 0.15s ease;

    /* Linked to its pin on the map (map.js) */
    &.is-linked { cursor: pointer; }
    &.is-linked:hover, &.is-active { box-shadow: inset 0 0 0 2px var(--c-accent); }
    &.is-active .place-number { background: var(--c-accent); color: var(--c-white); }
}

.place-number {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 999px;
    background: var(--c-line-soft);
    color: var(--c-accent);
    font-size: 0.8125rem;
    font-weight: 600;
}

.place-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;

    & .place-kind {
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--c-muted);
    }

    & .place-name { font-weight: 500; }
    & .place-address { font-size: 0.875rem; color: var(--c-muted); }
    & .place-distance { margin-top: 0.375rem; font-size: 0.875rem; }
}

/* Galerie: photos in a grid, opening the lightbox */
/* Two photos per row (as in the concept), one on phones */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;

    @media (max-width: 719px) { grid-template-columns: minmax(0, 1fr); }

    & a {
        display: block;
        overflow: hidden;
        aspect-ratio: 4 / 3;
        border-radius: var(--radius-md);
        background: var(--c-photo);
    }

    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

    & a:hover img { transform: scale(1.03); }
}

.tabs { margin-bottom: 1.5rem; }
.gallery-panel[hidden] { display: none; }

/* Kontakt: text and contacts left, the form right, on a light green panel */
.contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 23.75rem), 1fr));
    gap: 2.5rem;
    padding: clamp(1.5rem, 5vw, 4rem);
    border-radius: var(--radius-lg);
    background: var(--c-contact);
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;

    & > p {
        font-size: 1.0625rem;
        line-height: 1.6;
        color: var(--c-contact-text);
    }
}

/* Phone, e-mail and the building site as rows with an icon */
.contact-rows {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
    list-style: none;

    & li {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
    }
}

.contact-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--c-white);
    color: var(--c-accent);
}

.contact-row-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.contact-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-contact-text);
}

.contact-value {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--c-ink);
    overflow-wrap: anywhere;
}

a.contact-value { text-decoration: none; }
a.contact-value:hover { color: var(--c-accent); }

.contact-social {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 0.5rem;
}

/* Block pages (Orlov\Pages\Content) */
.blocks > * + * { margin-top: 3.5rem; }

.block-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 2rem 3rem;

    & h3 { margin-bottom: 0.625rem; }
    & p { color: var(--c-text); line-height: 1.6; }
}

.faq {
    max-width: 46rem;
    border-top: 1px solid var(--c-line);

    & details { border-bottom: 1px solid var(--c-line); }

    & summary {
        padding: 1rem 0;
        font-size: 1.0625rem;
        font-weight: 500;
        cursor: pointer;
    }

    & .prose { padding-bottom: 1rem; }
}

/* Files of the house: the whole tile downloads */
.downloads {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;

    & a {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.875rem 1rem 0.875rem 0.875rem;
        border: 1px solid var(--c-line-soft);
        border-radius: var(--radius-md);
        background: var(--c-paper);
        color: var(--c-ink);
        text-decoration: none;
        transition: background-color 0.2s, border-color 0.2s;
    }

    & a:hover { background: var(--c-hover); border-color: var(--c-line-strong); }
    & a:hover .file-action { background: var(--c-accent); color: var(--c-white); }
}

.file-icon {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 3rem;
    height: 3.5rem;
    border-radius: var(--radius-sm);
    background: var(--c-accent-soft);
    color: var(--c-accent);

    & svg { margin-top: -0.5rem; }

    & span {
        position: absolute;
        bottom: 0.4rem;
        font-size: 0.625rem;
        font-weight: 600;
        letter-spacing: 0.06em;
    }
}

.file-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    flex: 1;
}

.file-title { font-weight: 500; line-height: 1.35; }
.file-meta { font-size: 0.8125rem; color: var(--c-muted); }

.file-action {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--c-white);
    color: var(--c-accent);
    transition: background-color 0.2s, color 0.2s;
}

/* 
  Silktide Consent Manager - https://silktide.com/consent-manager/  
*/

/* --------------------------------
  Global Styles
-------------------------------- */
/* Wrapper (Global) */
#stcm-wrapper {
  --boxShadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
  --fontFamily: Helvetica Neue, Segoe UI, Arial, sans-serif;
  --primaryColor: #F9D000;
  --backgroundColor: #050505;
  --textColor: #F4F0DF;
  --backdropBackgroundColor: #00000077;
  --backdropBackgroundBlur: 0px;
  --iconColor: #050505;
  --iconBackgroundColor: #F9D000;
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  pointer-events: none;
  border: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --------------------------------
Links
-------------------------------- */
#stcm-wrapper a {
  all: unset;
  display: inline-block;
  color: var(--primaryColor);
  text-decoration: underline;
}

#stcm-wrapper a:hover {
  cursor: pointer;
  color: var(--textColor);
}

/* --------------------------------
Focus Styles
-------------------------------- */
#stcm-wrapper a:focus,
#stcm-wrapper #stcm-banner button:focus,
#stcm-wrapper #stcm-modal button:focus,
#stcm-wrapper #stcm-icon:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--backgroundColor), 0 0 0 4px var(--textColor);
  border-radius: 5px;
}

#stcm-wrapper #stcm-icon:focus {
  border-radius: 50%;
}

/* --------------------------------
General Styles
-------------------------------- */
#stcm-wrapper .stcm-button {
  color: var(--backgroundColor);
  background-color: var(--primaryColor);
  border: 2px solid var(--primaryColor);
  padding: 10px 20px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
  border-radius: 5px;
}

#stcm-wrapper .stcm-button-primary:hover {
  background-color: var(--backgroundColor);
  color: var(--primaryColor);
}

#stcm-wrapper .stcm-button-secondary {
  background-color: var(--backgroundColor);
  color: var(--primaryColor);
}

#stcm-wrapper .stcm-button-secondary:hover {
  background-color: var(--primaryColor);
  color: var(--backgroundColor);
}

/* --------------------------------
Banner
-------------------------------- */
#stcm-banner {
  font-family: var(--fontFamily);
  color: var(--textColor);
  background-color: var(--backgroundColor);
  box-sizing: border-box;
  padding: 32px;
  border-radius: 12px;
  pointer-events: auto;
  border: 0px;
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 600px;
  overflow: auto;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  transform: translate(0, -20px);
  opacity: 0;
  animation: stcm-slide-down 350ms ease-out;
  animation-delay: 0.3s;
  box-shadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
}

#stcm-banner.stcm-loaded {
  opacity: 1;
  transform: none;
  animation: none;
}

#stcm-banner:focus {
  border-radius: 50%;
}

#stcm-banner.stcm-pos-center {
  top: 50%;
  left: 50%;
  bottom: auto;
  right: auto;
  position: fixed;
  transform: translate(-50%, calc(-50% - 20px));
  animation: stcm-slide-down-center 350ms ease-out forwards;
}

#stcm-banner.stcm-pos-bottom-left {
  bottom: 16px;
  left: 16px;
  position: fixed;
}

#stcm-banner.stcm-pos-bottom-center {
  bottom: 16px;
  left: 50%;
  position: fixed;
  transform: translate(-50%, -20px);
  animation: stcm-slide-down-bottom-center 350ms ease-out forwards;
}

#stcm-banner .stcm-preferences-button {
  display: flex;
  gap: 5px;
  border: none;
  padding: 15px 0px;
  background-color: transparent;
  color: var(--primaryColor);
  cursor: pointer;
  font-size: 16px;
}

#stcm-banner .stcm-preferences-button span {
  display: block;
  white-space: nowrap;
  text-decoration: none;
}

#stcm-banner .stcm-preferences-button span:hover {
  color: var(--textColor);
}

#stcm-banner p {
  font-size: 16px;
  line-height: 24px;
  color: var(--textColor);
  margin: 0px 0px 15px;
}

#stcm-banner a {
  display: inline-block;
  color: var(--primaryColor);
  text-decoration: underline;
  background-color: var(--backgroundColor);
}

#stcm-banner a:hover {
  color: var(--textColor);
}

#stcm-banner a.stcm-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  fill: var(--primaryColor); /* passed down to svg > path */
  margin-left: auto;
  width: 48px;
  height: 48px;
  text-decoration: none;
}

#stcm-banner .stcm-actions {
  display: flex;
  gap: 16px;
  flex-direction: column;
  margin-top: 24px;
}

@media (min-width: 600px) {
  #stcm-banner .stcm-actions {
    flex-direction: row;
    align-items: center;
  }
}

#stcm-banner .stcm-actions-row {
  display: flex;
  gap: 16px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
}

/* --------------------------------
Modal
-------------------------------- */
#stcm-modal {
  display: none;
  pointer-events: auto;
  overflow: auto;
  width: 800px;
  max-width: 100%;
  max-height: 100%;
  border: 0px;
  transform: translate(0px, -20px);
  opacity: 0;
  animation: stcm-slide-up-center 350ms ease-out forwards;
  box-shadow: -5px 5px 10px 0px #00000012, 0px 0px 50px 0px #0000001a;
  font-family: var(--fontFamily);
  color: var(--textColor);
  flex-direction: column;
  padding: 30px;
  background-color: var(--backgroundColor);
  border-radius: 12px;
  box-sizing: border-box;
}

/* --------------------------------
Modal - Header
-------------------------------- */
#stcm-modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}

#stcm-modal h1 {
  font-family: var(--fontFamily);
  color: var(--textColor);
  font-size: 24px;
  font-weight: 500;
  margin: 0px;
}

#stcm-modal .stcm-modal-close {
  display: inline-flex;
  border: none;
  padding: 13px;
  cursor: pointer;
  background: var(--backgroundColor);
  color: var(--primaryColor);
}

#stcm-modal .stcm-modal-close svg {
  fill: var(--primaryColor);
}

/* --------------------------------
Modal - Content
-------------------------------- */
#stcm-modal section {
  flex: 1;
  margin-top: 32px;
}

#stcm-modal section::-webkit-scrollbar {
  display: block; /* Force scrollbars to show */
  width: 5px; /* Width of the scrollbar */
}

#stcm-modal section::-webkit-scrollbar-thumb {
  background-color: var(--textColor); /* Color of the scrollbar thumb */
  border-radius: 10px; /* Rounded corners for the thumb */
}

#stcm-modal p {
  font-size: 16px;
  line-height: 24px;
  color: var(--textColor);
  opacity: 0.8;
  margin: 0px 0px 15px;
}

#stcm-modal p:last-of-type {
  margin: 0px;
}

#stcm-modal fieldset {
  padding: 0px;
  border: none;
  margin: 0px 0px 32px;
}

#stcm-modal fieldset:last-of-type {
  margin: 0px;
}

#stcm-modal legend {
  padding: 0px;
  margin: 0px 0px 10px;
  font-weight: 700;
  color: var(--textColor);
  font-size: 16px;
}

#stcm-modal .stcm-consent-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;  
}

/* --------------------------------
Modal - Switches
-------------------------------- */
#stcm-modal .stcm-toggle {
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  height: 34px;
  width: 74px;
  cursor: pointer;
}

#stcm-modal .stcm-toggle:focus-within {
  outline: none;
  box-shadow: 0 0 0 2px var(--backgroundColor), 0 0 0 4px var(--textColor);
  border-radius: 25px;
}

#stcm-modal .stcm-toggle input {
  opacity: 0;
  position: absolute;
}

/* Unchecked Switch Styles */
#stcm-modal .stcm-toggle-track {
  position: relative;
  display: block;
  height: 34px;
  width: 74px;
  background: var(--textColor);
  border-radius: 25px;
}

#stcm-modal .stcm-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  display: block;
  height: 30px;
  width: 30px;
  background: var(--backgroundColor);
  border-radius: 50%;
  transition: left 150ms ease-out;
}

#stcm-modal .stcm-toggle-off,
#stcm-modal .stcm-toggle-on {
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 500;
  color: var(--backgroundColor);
  position: absolute;
  top: 8px;
  right: 8px;
  transition: right 150ms ease-out, opacity 150ms ease-out;
}

#stcm-modal .stcm-toggle-off {
  opacity: 1;
}

#stcm-modal .stcm-toggle-on {
  opacity: 0;
}

/* Checked Switch Styles */
#stcm-modal .stcm-toggle input:checked + .stcm-toggle-track {
  background: var(--primaryColor);
}

#stcm-modal .stcm-toggle input:checked ~ .stcm-toggle-thumb {
  left: calc(100% - 32px);
}

#stcm-modal .stcm-toggle input:checked ~ .stcm-toggle-off {
  right: calc(100% - 32px);
  opacity: 0;
}

#stcm-modal .stcm-toggle input:checked ~ .stcm-toggle-on {
  right: calc(100% - 34px);
  opacity: 1;
}

#stcm-modal .stcm-toggle input:disabled + .stcm-toggle-track {
  opacity: 0.6;
  filter: grayscale(100%);
  cursor: not-allowed;
}

/* --------------------------------
Modal - Footer
-------------------------------- */
#stcm-modal footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 600px) {
  #stcm-modal footer {
    flex-direction: row;
    align-items: center;
  }
}

#stcm-modal footer a {
  margin-left: auto;
  padding: 0;
}

#stcm-modal footer a.stcm-credit-link {
  text-decoration: none;
}

#stcm-modal footer a.stcm-credit-link:hover {
  text-decoration: underline;
}

/* Cookie Icon */
#stcm-icon {
  display: none;
  position: fixed;
  bottom: 10px;
  left: 10px;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0px;
  border: none;
  background-color: var(--iconColor);
  cursor: pointer;
  box-shadow: 0px 0px 6px 0px #0000001a;
  pointer-events: auto;
  animation: stcm-fade-in 0.3s ease-in-out forwards;
}

#stcm-icon.stcm-pos-bottom-right {
  left: auto;
  right: 10px;
}

#stcm-icon svg {
  fill: var(--iconBackgroundColor);
}

/* --------------------------------
Backdrop
-------------------------------- */
#stcm-backdrop {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--backdropBackgroundColor);
  backdrop-filter: blur(var(--backdropBackgroundBlur));
  pointer-events: all;
}

/* --------------------------------
Animations
-------------------------------- */
@keyframes stcm-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes stcm-slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stcm-slide-down-center {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 20px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes stcm-slide-down-bottom-center {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes stcm-slide-up-center {
  from {
    opacity: 0;
    transform: translate(0px, 20px);
  }
  to {
    opacity: 1;
    transform: translate(0px, 0px);
  }
}

/* --------------------------------
Animation - backdrop click feedback
-------------------------------- */
@keyframes stcm-nudge {
  0%, 100% { right: 16px; }
  10%, 30%, 50%, 70%, 90% { right: 20px; }
  20%, 40%, 60%, 80% { right: 12px; }
}

/* Apply to banner */
#stcm-banner.stcm-nudge {
  animation: stcm-nudge 1s ease-in-out;
}

/* Apply to modal */
#stcm-modal.stcm-nudge {
  animation: stcm-nudge 0.5s ease-in-out;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  #stcm-banner.stcm-nudge,
  #stcm-modal.stcm-nudge {
    animation: stcm-pulse 0.5s ease-in-out;
  }
  
  @keyframes stcm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
  }
}

/* Cookie consent manager (Silktide, assets/vendor/silktide) in the Orlov colours and shapes */
#stcm-wrapper {
    --fontFamily: var(--font-sans);
    --primaryColor: var(--c-accent);
    --backgroundColor: var(--c-white);
    --textColor: var(--c-ink);
    --boxShadow: 0 0.5rem 2rem rgb(28 36 32 / 0.18);
    --backdropBackgroundColor: rgb(28 36 32 / 0.45);
    --iconColor: var(--c-white);
    --iconBackgroundColor: var(--c-accent);
}

#stcm-wrapper .stcm-button {
    font-weight: 500;
    border-radius: 999px;
}

#stcm-wrapper #stcm-banner,
#stcm-wrapper #stcm-modal {
    border-radius: var(--radius-md);
}

/* Phones: a compact strip at the very bottom so the hero (tagline, CTA) stays visible –
   smaller text, Přijmout/Odmítnout side by side, Nastavení on one short line */
@media (max-width: 599px) {
    #stcm-wrapper #stcm-banner {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        max-height: 60vh;
        padding: 1rem 1rem 0.5rem;
    }

    #stcm-wrapper #stcm-banner p {
        margin-bottom: 0;
        font-size: 0.875rem;
        line-height: 1.45;
    }

    #stcm-wrapper #stcm-banner .stcm-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    #stcm-wrapper #stcm-banner .stcm-actions > .stcm-button {
        flex: 1 1 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.9375rem;
    }

    #stcm-wrapper #stcm-banner .stcm-actions-row { flex-basis: 100%; }

    #stcm-wrapper #stcm-banner .stcm-preferences-button {
        padding: 0.375rem 0;
        font-size: 0.875rem;
    }

    #stcm-wrapper #stcm-banner a.stcm-logo {
        width: 2rem;
        height: 2rem;
    }
}

/* Switch labels: Silktide writes English "On/Off" into its markup (aria-hidden spans),
   the Czech words come from here, centred vertically in the track */
#stcm-modal .stcm-toggle-off,
#stcm-modal .stcm-toggle-on {
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    font-size: 0;
}
#stcm-modal .stcm-toggle-off::after,
#stcm-modal .stcm-toggle-on::after {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
#stcm-modal .stcm-toggle-off::after { content: 'Ne'; }
#stcm-modal .stcm-toggle-on::after { content: 'Ano'; }
#stcm-modal .stcm-toggle input:checked ~ .stcm-toggle-on { right: 36px; }

/* Silktide locks the page while its settings are open (position: fixed and overflow: hidden on
   <body>), which throws the page to the top and hides the scrollbar. The settings are an overlay,
   so the page stays as it is. The selector has no space in it, the CSS combiner would remove it
   from the attribute value */
body[style*="fixed"] {
    position: static !important;
    width: auto !important;
    overflow-y: auto !important;
}
