/* ==========================================================================
   R-S 72 Nízká - hlavní styl webu
   Barevné schéma vychází z původního webu (style72.css, main.asp):
     #DFDFDE  podklad stránky        #3D3937  tmavé lišty nadpisů
     #727070  spodní lišty panelů    #EDC189  pískový akcent
   ========================================================================== */

:root {
    --bg: #dfdfde;
    --bg-2: #d5d4d2;
    --surface: #ffffff;
    --surface-2: #f5f4f2;
    --ink: #1c1a19;
    --ink-soft: #57524e;
    --ink-faint: #7c7772;
    --dark: #3d3937;
    --dark-2: #2b2826;
    --bar: #727070;
    --sand: #edc189;
    --sand-2: #f6dcbb;
    --sand-ink: #8a5a20;
    --line: #d7d4d1;
    --line-soft: #e8e6e3;
    --radius: 3px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .13);
    --shadow-lg: 0 6px 22px rgba(0, 0, 0, .18);
    --max: 1180px;
    --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: "Segoe UI Semibold", "Segoe UI", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--sand-ink); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--sand-ink); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--dark); color: var(--sand); padding: 10px 16px;
}
.skip-link:focus { left: 0; }

/* ---------- horní lišta sítě opevneni.cz ---------- */

.topbar {
    max-width: var(--max);
    margin: 0 auto;
    background: var(--dark-2);
    color: #cfcac5;
    font-size: 12.5px;
    border-bottom: 1px solid #000;
}
.topbar .container { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.topbar strong { color: #fff; letter-spacing: .08em; font-weight: 600; }
.topbar a { color: #cfcac5; }
.topbar a:hover { color: var(--sand); text-decoration: none; }

/* ---------- hlavička ---------- */

.site-header {
    max-width: var(--max);
    margin: 0 auto;
    background: var(--dark);
    background-image: linear-gradient(90deg, rgba(61, 57, 55, .05) 0%, rgba(61, 57, 55, .92) 46%, var(--dark) 62%);
    background-repeat: no-repeat;
    border-bottom: 3px solid var(--sand);
    position: relative;
    overflow: hidden;
}
.site-header::before {
    content: "";
    position: absolute; inset: 0 auto 0 0;
    width: 62%;
    background: url("/images/ui/objekt.jpg") left center/cover no-repeat;
    filter: grayscale(1) contrast(1.05);
    opacity: .5;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .9) 45%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .9) 45%, rgba(0, 0, 0, 0) 100%);
}
.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 116px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 18px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-text { display: block; }
.brand-kicker {
    display: block;
    font-size: 13px; letter-spacing: .34em; text-transform: uppercase;
    color: var(--sand); font-weight: 600;
}
.brand-name {
    display: block;
    font-family: var(--font-head);
    font-size: clamp(26px, 4.6vw, 42px);
    font-weight: 700; letter-spacing: .01em; color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
.brand-sub { display: block; font-size: 13px; color: #d8d2cb; margin-top: 2px; }
.header-logo { width: 92px; flex: none; opacity: .96; }

/* ---------- hlavní navigace ---------- */

.mainnav { max-width: var(--max); margin: 0 auto; background: var(--dark-2); position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow); }
.mainnav .container { display: flex; align-items: stretch; gap: 0; padding: 0 8px; }
.mainnav ul { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; flex: 1; }
.mainnav a {
    display: block;
    padding: 12px 11px;
    color: #ded9d3;
    font-size: 13px; font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}
.mainnav a:hover { color: #fff; background: #383331; text-decoration: none; }
.mainnav a.is-active { color: var(--sand); border-bottom-color: var(--sand); background: #383331; }
.mainnav li.nav-vedlejsi a { color: #a9a29b; }
.mainnav li.nav-vedlejsi a:hover { color: #fff; }

.nav-toggle {
    display: none;
    background: none; border: 0; color: var(--sand);
    font: inherit; font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
    padding: 12px 8px; cursor: pointer;
}

/* ---------- rozvržení stránky ---------- */

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; padding: 22px 0 40px; }
.layout--wide { grid-template-columns: minmax(0, 1fr); }
.col-main { min-width: 0; }
.col-side { min-width: 0; }

/* ---------- panely ---------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.panel-head {
    background: var(--dark);
    color: var(--sand);
    padding: 9px 14px;
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    flex-wrap: wrap;
}
.panel-head h1, .panel-head h2, .panel-head h3 {
    margin: 0;
    font-size: 15px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--sand);
}
.panel-head .panel-meta { font-size: 12.5px; color: #cbc4bc; letter-spacing: .04em; }
.panel-head a { color: var(--sand-2); }
.panel-body { padding: 16px 18px; }
.panel-body > :first-child { margin-top: 0; }
.panel-body > :last-child { margin-bottom: 0; }
.side-image { margin-bottom: 20px; }
.panel-foot {
    background: var(--bar);
    color: #f2efec;
    padding: 8px 14px;
    font-size: 13px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.panel-foot a { color: #fff; }
.panel-foot .btn { color: var(--sand); }
.panel-foot .btn--svetle { color: var(--ink); }

/* ---------- obsah článků a statických stránek ---------- */

.obsah { font-size: 15.5px; line-height: 1.65; color: var(--ink); }
.obsah p { margin: 0 0 1em; }
.obsah ul, .obsah ol { margin: 0 0 1em; padding-left: 1.4em; }
.obsah li { margin-bottom: .35em; }
.obsah strong { color: var(--ink); }
.obsah img { border-radius: 2px; }
.obsah img[align="right"] { float: right; margin: 0 0 12px 16px; }
.obsah img[align="left"] { float: left; margin: 0 16px 12px 0; }
.obsah table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 14.5px; }
.obsah table table { margin: 0; }
.obsah td, .obsah th { padding: 5px 8px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.obsah table table td { border-bottom: 0; padding: 2px 6px; }
.obsah td:first-child { color: var(--ink-soft); }
.obsah hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.obsah::after { content: ""; display: block; clear: both; }

/* ---------- novinky ---------- */

.novinky { list-style: none; margin: 0; padding: 0; }
.novinky li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.novinky li:first-child { padding-top: 0; }
.novinky li:last-child { border-bottom: 0; padding-bottom: 0; }
.novinky time {
    flex: none; width: 92px;
    font-size: 13px; font-weight: 700; color: var(--sand-ink);
    letter-spacing: .02em; padding-top: 2px;
}
.novinky .zprava { font-size: 15px; }

/* ---------- seznamy článků ---------- */

.clanky { list-style: none; margin: 0; padding: 0; }
.clanky li { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.clanky li:last-child { border-bottom: 0; }
.clanky .nadpis { font-weight: 600; font-size: 15.5px; }
.clanky .meta { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }

/* ---------- dlaždice kategorií ---------- */

.skupina-nadpis {
    font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-faint); font-weight: 700;
    margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.skupina-nadpis:first-child { margin-top: 0; }

.dlazdice { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.dlazdice a {
    display: block; background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden; color: var(--ink);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.dlazdice a:hover { border-color: var(--sand-ink); box-shadow: var(--shadow-lg); text-decoration: none; transform: translateY(-1px); }
.dlazdice .nahled { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #cbc7c3; }
.dlazdice .prazdny { display: flex; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 12px; }
.dlazdice .popisek { display: block; padding: 8px 10px; }
.dlazdice .nazev { display: block; font-size: 14px; font-weight: 600; }
.dlazdice .pocet { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* ---------- mřížka fotografií ---------- */

.fotomrizka { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.fotokarta {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.fotokarta a { display: block; color: inherit; }
.fotokarta img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #cbc7c3; }
.fotokarta .text { padding: 8px 10px; font-size: 13px; color: var(--ink-soft); }
.fotokarta .datum { display: block; font-size: 12px; color: var(--ink-faint); margin-bottom: 2px; }
.fotokarta:hover { border-color: var(--sand-ink); }

/* pásek náhledů pod textem stránky */
.pasek-fotek { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.pasek-fotek img {
    height: 62px; width: auto; border: 1px solid var(--line);
    border-radius: 2px; background: #cbc7c3;
}
.pasek-fotek a:hover img { border-color: var(--sand-ink); }

/* ---------- detail fotografie ---------- */

.foto-detail { background: #17150f; padding: 14px; text-align: center; }
.foto-detail img { max-height: 74vh; width: auto; }
.foto-detail img.js-foto-zoom { cursor: zoom-in; }
.foto-popis { padding: 14px 18px; background: var(--surface-2); border-top: 1px solid var(--line); }
.foto-popis .komentar { font-size: 15px; }
.foto-popis .meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-faint); margin-top: 8px; }
.foto-ovladani { display: flex; align-items: center; gap: 8px; }

/* ---------- lightbox: zvětšená fotografie po kliknutí ---------- */

body.foto-lightbox-otevren { overflow: hidden; }
.foto-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 9, 8, .88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 24px;
    box-sizing: border-box;
    cursor: zoom-out;
    animation: foto-lightbox-fade .15s ease-out;
}
.foto-lightbox img {
    max-width: 96vw;
    max-height: 96vh;
    width: auto;
    height: auto;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .6);
}
@keyframes foto-lightbox-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- tlačítka ---------- */

.btn {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid var(--dark);
    border-radius: var(--radius);
    background: var(--dark); color: var(--sand);
    font: inherit; font-size: 14px; font-weight: 600;
    letter-spacing: .04em; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #4c4643; color: var(--sand-2); text-decoration: none; }
.btn--svetle { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--svetle:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-faint); }
.btn--male { padding: 5px 10px; font-size: 13px; }
.btn--nebezpeci { background: #8c2f22; border-color: #8c2f22; color: #fff; }
.btn--nebezpeci:hover { background: #a4392a; color: #fff; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- stránkování a filtry ---------- */

.strankovani { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.strankovani a, .strankovani span {
    display: inline-block; min-width: 30px; text-align: center;
    padding: 4px 8px; border-radius: var(--radius);
    font-size: 13.5px; color: #fff; border: 1px solid transparent;
}
.strankovani a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.strankovani .je-aktivni { background: var(--sand); color: var(--dark); font-weight: 700; }

.filtr-roky { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; }
.filtr-roky a { color: #d9d3cc; padding: 2px 6px; border-radius: 2px; }
.filtr-roky a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.filtr-roky .je-aktivni { background: var(--sand); color: var(--dark); font-weight: 700; }

.drobecky { font-size: 13px; color: var(--ink-faint); margin: 0 0 12px; }
.drobecky a { color: var(--ink-soft); }

/* ---------- postranní sloupec ---------- */

.side-box { font-size: 14.5px; }
.side-box p:last-child { margin-bottom: 0; }
.pocitadlo {
    display: flex; align-items: baseline; justify-content: space-between;
    font-size: 13px; color: var(--ink-faint);
}
.pocitadlo strong { font-size: 17px; color: var(--ink); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.fb-odkaz { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.odkazy-seznam { list-style: none; margin: 0; padding: 0; }
.odkazy-seznam li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.odkazy-seznam li:last-child { border-bottom: 0; }
.odkazy-seznam .url { display: block; font-size: 12.5px; color: var(--ink-faint); word-break: break-all; }

/* ---------- formuláře ---------- */

.form-radek { margin-bottom: 14px; }
.form-radek label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; letter-spacing: .03em; }
.form-radek .napoveda { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="file"], textarea, select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff; color: var(--ink);
    font: inherit; font-size: 15px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--sand-ink); outline: none; box-shadow: 0 0 0 3px rgba(138, 90, 32, .14); }
.form-radek--uzky { max-width: 220px; }
.form-radky { display: flex; gap: 14px; flex-wrap: wrap; }
.form-radky > * { flex: 1 1 180px; }
.zaskrtavatko { display: flex; align-items: center; gap: 8px; }
.zaskrtavatko input { width: auto; }

.hlaska { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14.5px; }
.hlaska--ok { background: #e7f0e2; border: 1px solid #b6cfa8; color: #33502a; }
.hlaska--chyba { background: #f6e2df; border: 1px solid #d9b0a9; color: #7d2b1e; }
.hlaska--info { background: #eee9e1; border: 1px solid #d6cbb8; color: #5a4b33; }

.past { position: absolute; left: -9999px; }

/* ---------- návštěvní kniha ---------- */

.prispevky { list-style: none; margin: 0; padding: 0; }
.prispevky li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.prispevky li:last-child { border-bottom: 0; }
.prispevky .hlavicka { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 4px; }
.prispevky .autor { font-weight: 700; color: var(--sand-ink); }
.prispevky .datum { color: var(--ink-faint); }
.prispevky .text { white-space: pre-wrap; font-size: 15px; }
.captcha-radek { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha-radek img { border: 1px solid var(--line); border-radius: var(--radius); }
.captcha-radek input { width: 90px; }

/* ---------- patička ---------- */

.site-footer { max-width: var(--max); margin: 10px auto 0; background: var(--dark); color: #b9b2ab; font-size: 13px; border-top: 3px solid var(--sand); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; padding-top: 20px; padding-bottom: 22px; }
.site-footer a { color: #ded7cf; }
.site-footer a:hover { color: var(--sand); }
.site-footer strong { color: #fff; }
.footer-blok { max-width: 420px; }

/* ---------- responzivita ---------- */

@media (max-width: 1000px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .col-side { order: 2; }
}

@media (max-width: 760px) {
    body { font-size: 15.5px; }
    .site-header::before { width: 100%; opacity: .28; }
    .header-inner { min-height: 92px; }
    .header-logo { width: 62px; }
    .nav-toggle { display: block; }
    .mainnav .container { flex-direction: column; padding: 0; }
    .mainnav ul { display: none; flex-direction: column; width: 100%; border-top: 1px solid #46403d; }
    .mainnav.is-open ul { display: flex; }
    .mainnav a { padding: 11px 16px; border-bottom: 1px solid #383331; border-left: 3px solid transparent; white-space: normal; }
    .mainnav a.is-active { border-bottom-color: #383331; border-left-color: var(--sand); }
    .topbar { font-size: 12px; }
    .novinky li { flex-direction: column; gap: 2px; }
    .novinky time { width: auto; }
    .panel-body { padding: 14px; }
}

@media print {
    .topbar, .mainnav, .site-footer, .col-side, .strankovani { display: none; }
    .panel { border: 0; box-shadow: none; }
    .panel-head { background: none; color: #000; border-bottom: 2px solid #000; }
    .panel-head h1, .panel-head h2 { color: #000; }
}
