/* ------------------------------------------------------------------
   Portál bydlení – demo web pro Umbraco CMS
   Jeden stylopis, bez externích závislostí.
   ------------------------------------------------------------------ */

:root {
    --ink: #14202b;
    --ink-soft: #4c5a66;
    --brand: #10395e;
    --brand-dark: #0b2740;
    --brand-2: #0f6f62;
    --accent: #a8471f;
    --bg: #f6f7f5;
    --card: #ffffff;
    --line: #dbe1de;
    --line-strong: #b9c3bf;
    --focus: #b3540d;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(20, 32, 43, .06), 0 8px 24px rgba(20, 32, 43, .06);
    --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 17px/1.65 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, h4 { color: var(--brand-dark); line-height: 1.22; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--accent); }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 3px;
}

img { max-width: 100%; height: auto; }

.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--brand-dark); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------- demo pruh */

.demo-ribbon {
    background: repeating-linear-gradient(135deg, #2b2118, #2b2118 12px, #33281d 12px, #33281d 24px);
    color: #ffe9c9;
    font-size: .85rem;
    padding: .45rem 1.25rem;
    display: flex; gap: .6rem; align-items: center; justify-content: center; flex-wrap: wrap;
}
.demo-ribbon strong {
    background: #ffcf8b; color: #2b2118; border-radius: 4px; padding: .05rem .45rem;
    letter-spacing: .08em; font-size: .78rem;
}
.demo-ribbon__link { color: #ffe9c9; }

/* ---------------------------------------------------------- hlavička */

.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; padding: .85rem 0; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.brand__mark {
    width: 44px; height: 44px; border-radius: 9px; flex: none;
    background: linear-gradient(140deg, var(--brand), var(--brand-2));
    color: #fff; font-weight: 700; letter-spacing: .04em;
    display: grid; place-items: center; font-size: 1rem;
}
.brand__text { display: grid; }
.brand__name { font-weight: 700; color: var(--brand-dark); line-height: 1.2; }
.brand__claim { font-size: .82rem; color: var(--ink-soft); }

.nav__list { display: flex; gap: .35rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav__link {
    display: block; padding: .5rem .8rem; border-radius: 7px;
    text-decoration: none; color: var(--ink); font-size: .96rem;
}
.nav__link:hover { background: #eef2f0; }
.nav__link.is-current { background: var(--brand); color: #fff; }

/* ---------------------------------------------------------- hero */

.site-main { padding-bottom: 4rem; }

.hero { position: relative; background: var(--brand-dark); margin-bottom: 2.5rem; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .48; }
.hero__overlay {
    position: relative;
    padding: clamp(3rem, 6vw, 6rem) 0;
    background: linear-gradient(90deg, rgba(9,33,55,.92) 0%, rgba(9,33,55,.72) 55%, rgba(9,33,55,.35) 100%);
    color: #fff;
}
.hero__eyebrow {
    text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
    color: #9fd3c9; margin-bottom: .5rem;
}
.hero__title { color: #fff; max-width: 22em; }
.hero__text { max-width: 40em; font-size: 1.1rem; color: #e4ecf1; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------------------------------------------------------- tlačítka */

.btn {
    display: inline-block; padding: .7rem 1.25rem; border-radius: 8px;
    font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer;
    font-size: 1rem; font-family: inherit;
}
.btn--primary { background: var(--brand-2); color: #fff; }
.btn--primary:hover { background: #0b5b50; color: #fff; }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--small { padding: .45rem .8rem; font-size: .9rem; background: var(--brand); color: #fff; }
.btn--small.btn--ghost { background: transparent; color: var(--brand); border-color: var(--line-strong); }
.btn--outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; }
.btn--wide { padding-inline: 2rem; }

/* ---------------------------------------------------------- sekce */

.section { margin: 3rem 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section__title { margin-bottom: 1rem; }
.section__more { font-weight: 600; font-size: .95rem; }

.empty { color: var(--ink-soft); font-style: italic; }

.badge {
    display: inline-block; background: #e7efec; color: #0b4c42; border-radius: 999px;
    padding: .15rem .7rem; font-size: .8rem; font-weight: 600; margin: 0 0 .5rem;
}

/* ---------------------------------------------------------- náhled redakce
   Zobrazuje se jen v náhledu (preview). Na veřejném webu se do šablony nedostane,
   protože se z cache vracejí jen publikované stránky. */

.preview-note {
    background: #fff4e0; border-bottom: 1px solid #e0b877; color: #47300a;
    font-size: .92rem; padding: .55rem 0;
}
.preview-note__inner { display: flex; gap: .7rem; align-items: baseline; flex-wrap: wrap; }
.preview-note__tag {
    background: #8f3f08; color: #fff; border-radius: 4px; padding: .05rem .5rem;
    font-size: .76rem; letter-spacing: .08em; white-space: nowrap;
}

.draftmark {
    display: inline-block; background: #fdeadf; color: #8a3a12; border: 1px dashed #c1703f;
    border-radius: 999px; padding: .02rem .6rem; font-size: .76rem; font-weight: 600;
    white-space: nowrap; vertical-align: middle;
}
.draftmark--nav { padding: 0 .45rem; font-size: .7rem; }
.card--draft, .newsitem--draft, .doccard--draft { border: 1px dashed #c1703f; }
.doccard__tags { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.doccard__tags .badge { margin: 0; }

/* ---------------------------------------------------------- představení portálu */

.intro { background: var(--card); border-bottom: 1px solid var(--line); padding: 2.5rem 0 2.75rem; }
.intro__inner { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1.5rem 3rem; }
.intro__title { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.intro__text { max-width: 44em; }
.intro__text p { margin: 0 0 .85em; }
.intro__text p:last-child { margin-bottom: 0; }
@media (max-width: 820px) {
    .intro__inner { grid-template-columns: 1fr; gap: .75rem; }
}

/* ---------------------------------------------------------- rozcestník */

.tiles, .cards, .newslist, .doclist, .linklist, .services { list-style: none; margin: 0; padding: 0; }

.services { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.service {
    padding: 1.5rem 1.4rem 1.4rem;
    display: flex; flex-direction: column;
}
.service__icon {
    width: 48px; height: 48px; border-radius: 12px; margin-bottom: 1rem;
    display: grid; place-items: center; flex: none;
    background: #e8f0ed; color: var(--brand-2);
}
.service__icon svg { width: 26px; height: 26px; }
.service__title { font-size: 1.1rem; margin-bottom: .4rem; }
.service__text { color: var(--ink-soft); font-size: .95rem; margin: 0; }

.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tile {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow);
}
.tile__title { font-size: 1.08rem; margin-bottom: .35rem; }
.tile__title a { text-decoration: none; }
.tile__title a:hover { text-decoration: underline; }
.tile__text { color: var(--ink-soft); font-size: .95rem; margin: 0; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card__image { width: 100%; height: 170px; object-fit: cover; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; }
.card__date, .newsitem__date, .article__meta { color: var(--ink-soft); font-size: .86rem; margin-bottom: .3rem; }
.card__title { font-size: 1.1rem; margin-bottom: .4rem; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__text { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.card__action { margin: .9rem 0 0; }

/* ---------------------------------------------------------- aktuality */

.newslist { display: grid; gap: 1.25rem; }
.newsitem {
    display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
}
.newsitem:has(.newsitem__body:only-child) { grid-template-columns: 1fr; }
.newsitem__media { display: block; }
.newsitem__media img { width: 100%; height: 100%; min-height: 170px; object-fit: cover; }
.newsitem__body { padding: 1.2rem 1.4rem; }
.newsitem__title { font-size: 1.25rem; margin-bottom: .35rem; }
.newsitem__title a { text-decoration: none; }
.newsitem__title a:hover { text-decoration: underline; }
.newsitem__lead { color: var(--ink-soft); margin-bottom: .75rem; }
.newsitem__action { margin: 0; }
.link-more { font-weight: 600; }

@media (max-width: 700px) {
    .newsitem { grid-template-columns: 1fr; }
    .newsitem__media img { min-height: 190px; }
}

/* ---------------------------------------------------------- článek */

.breadcrumb { padding: 1.25rem 0 .25rem; font-size: .88rem; color: var(--ink-soft); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--line-strong); }

.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2.75rem); box-shadow: var(--shadow); margin-bottom: 2rem; }
.article__head { margin-bottom: 1.5rem; }
.article__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46em; }
.article__figure { margin: 0 0 1.75rem; }
.article__figure img { width: 100%; border-radius: var(--radius); }
.article__figure figcaption, .prose figcaption {
    font-size: .86rem; color: var(--ink-soft); padding-top: .5rem;
}

/* Text z editoru (i vložený z Wordu) */
.prose { max-width: 46em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2rem; padding-bottom: .3rem; border-bottom: 2px solid #e6ebe8; }
.prose h3 { margin-top: 1.6rem; color: var(--brand); }
.prose h4 { margin-top: 1.3rem; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose ul { list-style: none; padding-left: 1.35em; }
.prose ul li { position: relative; }
.prose ul li::before {
    content: ""; position: absolute; left: -1.05em; top: .62em;
    width: .42em; height: .42em; border-radius: 50%; background: var(--brand-2);
}
.prose blockquote {
    margin: 1.5rem 0; padding: .75rem 1.25rem; border-left: 4px solid var(--brand-2);
    background: #f0f5f3; color: var(--ink-soft);
}
.prose figure { margin: 1.75rem 0; }
.prose img { border-radius: var(--radius); }
.prose a { font-weight: 500; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose table {
    width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .96rem;
    display: block; overflow-x: auto; white-space: normal;
}
.prose table thead th, .prose table th {
    background: #eef2f0; text-align: left; color: var(--brand-dark);
    font-weight: 700; border-bottom: 2px solid var(--line-strong);
}
.prose table th, .prose table td { padding: .6rem .8rem; border: 1px solid var(--line); vertical-align: top; }
.prose table tbody tr:nth-child(even) { background: #fafbfa; }
.prose table caption { caption-side: bottom; font-size: .85rem; color: var(--ink-soft); padding-top: .5rem; }

.linklist { display: grid; gap: .1rem; }
.linklist li {
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.linklist__meta { color: var(--ink-soft); font-size: .88rem; }

/* ---------------------------------------------------------- dokumenty */

.doclist { display: grid; gap: 1rem; }
.doccard {
    display: grid; grid-template-columns: 92px 1fr; gap: 1.25rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow);
}
.doccard__icon {
    width: 76px; height: 96px; border-radius: 6px; position: relative;
    background: linear-gradient(160deg, #f3f5f4, #e3e9e6);
    border: 1px solid var(--line-strong);
    display: grid; place-items: center;
}
.doccard__icon::before {
    content: ""; position: absolute; top: 0; right: 0; width: 22px; height: 22px;
    background: linear-gradient(225deg, #cdd6d2 50%, transparent 50%);
}
.doccard__ext { font-size: .78rem; font-weight: 700; color: #a2311d; letter-spacing: .05em; }
.doccard__title { font-size: 1.18rem; margin-bottom: .3rem; }
.doccard__title a { text-decoration: none; }
.doccard__title a:hover { text-decoration: underline; }
.doccard__lead { color: var(--ink-soft); margin-bottom: .6rem; }
.doccard__meta, .docdetail__meta { display: grid; grid-template-columns: auto 1fr; gap: .15rem 1rem; margin: 0 0 .9rem; font-size: .92rem; }
.doccard__meta dt, .docdetail__meta dt { color: var(--ink-soft); }
.doccard__meta dd, .docdetail__meta dd { margin: 0; font-weight: 600; }
.doccard__actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }

@media (max-width: 620px) {
    .doccard { grid-template-columns: 1fr; }
}

.docdetail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.docdetail__previewlabel { font-size: .86rem; color: var(--ink-soft); }
.docdetail__frame {
    width: 100%; height: 560px; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: #fff;
}
.docdetail__side { font-size: .96rem; }
@media (max-width: 900px) {
    .docdetail { grid-template-columns: 1fr; }
    .docdetail__frame { height: 420px; }
}

.notebox {
    background: #f0f5f3; border: 1px solid #cfe0da; border-left: 4px solid var(--brand-2);
    border-radius: 8px; padding: 1rem 1.2rem; margin: 1.5rem 0;
}
.notebox--muted { background: #f6f7f5; border-color: var(--line); border-left-color: var(--line-strong); }
.notebox--warn { background: #fdf6ec; border-color: #ecd9b4; border-left-color: #c98a1e; }
.notebox code {
    background: #eceee9; border-radius: 4px; padding: .05em .35em;
    font-family: ui-monospace, Consolas, monospace; font-size: .88em;
}
.notebox__title { font-size: 1rem; margin-bottom: .35rem; }
.archive { list-style: none; margin: 0; padding: 0; font-size: .94rem; }
.archive li { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.archive li:last-child { border-bottom: 0; }
.archive__meta { color: var(--ink-soft); white-space: nowrap; }
.notebox p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- iframe / kalkulačka */

.embed { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.embed__frame { display: block; width: 100%; border: 0; }
.embed__fallback { font-size: .9rem; color: var(--ink-soft); margin-top: .6rem; }

/* ---------------------------------------------------------- formulář */

.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow); }
.form__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.5rem; }
.field { grid-column: span 2; }
.field--half { grid-column: span 1; }
@media (max-width: 640px) {
    .form__grid { grid-template-columns: 1fr; }
    .field, .field--half { grid-column: span 1; }
}

.field__label { display: block; font-weight: 600; margin-bottom: .3rem; }
.field__input {
    width: 100%; padding: .6rem .75rem; font: inherit; color: inherit;
    background: #fff; border: 1px solid var(--line-strong); border-radius: 7px;
}
.field__input:focus-visible { border-color: var(--brand); }
.field__help { font-size: .87rem; color: var(--ink-soft); margin: .3rem 0 0; }
.field__error { font-size: .9rem; color: #a3261a; font-weight: 600; margin: .35rem 0 0; }
.field--error .field__input { border-color: #a3261a; background: #fdf6f5; }
.field--hidden { display: none; }
.field__check { display: flex; gap: .6rem; align-items: flex-start; }
.field__check input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; flex: none; }
.req { color: #a3261a; text-decoration: none; margin-left: .15rem; }
.form__note { font-size: .88rem; color: var(--ink-soft); margin-top: 1.25rem; }

.alert { border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; border: 1px solid; }
.alert--success { background: #eef7f2; border-color: #b6dcc7; }
.alert--error { background: #fdf3f2; border-color: #e8bfb9; }
.alert--error ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.alert__meta { font-size: .95rem; color: var(--ink-soft); margin-bottom: .5rem; }

/* ---------------------------------------------------------- chybová stránka 404 */

.error404 {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: clamp(1.75rem, 5vw, 3.5rem);
    margin: 1.5rem 0 2rem; text-align: center;
}
.error404__code {
    font-size: clamp(4rem, 12vw, 7rem); line-height: 1; font-weight: 800; margin: 0;
    color: #e3e9e6; letter-spacing: -.03em;
}
.error404__title { margin: -.4em 0 .5rem; }
.error404__lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 46em; margin: 0 auto 1.5rem; }
.error404__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin: 0; }

/* ---------------------------------------------------------- audit přístupnosti */

.a11y-panel {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 90; width: min(430px, calc(100% - 2rem));
    max-height: min(72vh, 620px); overflow: auto;
    background: #fff; border: 1px solid var(--line-strong); border-radius: 12px;
    box-shadow: 0 12px 40px rgba(10, 26, 40, .25); font-size: .92rem;
}
.a11y-panel__head {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .8rem 1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff;
}
.a11y-panel__title { font-size: 1rem; margin: 0; }
.a11y-panel__body { padding: .5rem 1rem 1rem; }
.a11y-panel__item { border-bottom: 1px solid var(--line); padding: .7rem 0; }
.a11y-panel__item:last-child { border-bottom: 0; }
.a11y-panel__impact {
    display: inline-block; border-radius: 4px; font-size: .74rem; font-weight: 700;
    padding: .1rem .4rem; margin-right: .4rem; text-transform: uppercase; letter-spacing: .04em;
}
.a11y-impact-critical, .a11y-impact-serious { background: #fbe3df; color: #8f2314; }
.a11y-impact-moderate { background: #fdf0d8; color: #8a5a08; }
.a11y-impact-minor { background: #e6eef4; color: #1b4b6b; }
.a11y-panel__target { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--ink-soft); word-break: break-all; }
.a11y-btn {
    position: fixed; right: 1rem; bottom: 1rem; z-index: 89;
    background: var(--brand-dark); color: #fff; border: 0; border-radius: 999px;
    padding: .7rem 1.15rem; font: 600 .95rem/1 inherit; cursor: pointer;
    box-shadow: 0 6px 20px rgba(10, 26, 40, .3);
}
.a11y-summary { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.a11y-summary strong { font-size: 1.3rem; display: block; }
.a11y-close { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink-soft); }

/* ---------------------------------------------------------- patička */

.site-footer { background: var(--brand-dark); color: #cfdbe4; margin-top: 3rem; padding: 2.5rem 0 3rem; }
.site-footer__inner { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.site-footer__title { color: #fff; font-weight: 700; margin-bottom: .5rem; }
.site-footer a { color: #a8d5cb; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.site-footer p { font-size: .93rem; }
