/* ==========================================================================
   Úvalská stavební – hlavní styl
   Barvy a rozměry naměřené z původního webu (WordPress + šablona Customify),
   aby nový web vypadal stejně. Zdroj hodnot: reference/audit-wordpress.md
   ========================================================================== */

:root {
  /* barvy – naměřeno na originálu */
  --c-topbar-bg: #235787;
  --c-topbar-fg: rgba(255, 255, 255, 0.99);
  --c-header-bg: #ffffff;
  --c-header-fg: rgba(0, 0, 0, 0.6);
  --c-nav-bg: #f0f0f0;
  --c-nav-fg: rgba(0, 0, 0, 0.6);
  --c-titlebar-bg: #f9f9f9;
  --c-footer-bg: #303030;
  --c-footer-fg: rgba(255, 255, 255, 0.99);
  --c-footerbottom-bg: #1a1a1a;

  --c-text: #686868;
  --c-heading: #2b2b2b;
  --c-link: #191e23;
  --c-primary: #0085ba;
  --c-primary-dark: #006d99;
  --c-border: #e4e4e4;
  --c-bg: #ffffff;
  --c-error: #b32d2e;
  --c-success: #1e7b34;

  /* typografie */
  --font-body: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  --fs-base: 1rem;          /* 16 px */
  --lh-base: 1.618;         /* 25,888 px – zlatý řez, výchozí v Customify */
  --fs-h1: 1.4158rem;       /* 22,652 px */
  --fs-h2: 1.2rem;
  --fs-h3: 1.1rem;
  --fs-small: 0.875rem;
  --fs-menu: 0.8125rem;

  /* rozměry */
  --h-topbar: 33px;
  --h-header: 90px;
  --h-nav: 55px;
  --w-container: 1200px;
  --gap: 1.5rem;
  --radius: 6px;
}

/* --------------------------------------------------------------- reset --- */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--c-heading);
  font-weight: 400;
  line-height: 1.216;
  margin: 0 0 0.6em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-link); text-decoration: underline; }
a:hover { color: var(--c-primary); }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li + li { margin-top: 0.3em; }

hr { border: 0; border-top: 1px solid var(--c-border); margin: 2rem 0; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; }
th, td { padding: 0.55rem 0.7rem; border: 1px solid var(--c-border); text-align: left; }
th { background: #f7f7f7; color: var(--c-heading); font-weight: 600; }

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

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; padding: 0.7rem 1rem;
}
.skip-link:focus { left: 0; }

/* ----------------------------------------------------------- kontejner --- */

.container {
  width: 100%;
  max-width: var(--w-container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* -------------------------------------------------------------- topbar --- */

.topbar {
  background: var(--c-topbar-bg);
  color: var(--c-topbar-fg);
  font-size: var(--fs-small);
  min-height: var(--h-topbar);
  display: flex;
  align-items: center;
}
.topbar .container {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap);
}
.topbar__note { opacity: 0.9; }
.topbar__social { display: flex; gap: 0.75rem; margin-left: auto; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; }
.topbar a:hover { opacity: 0.75; color: inherit; }

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

.header {
  background: var(--c-header-bg);
  color: var(--c-header-fg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.header .container {
  min-height: var(--h-header);
  display: flex; align-items: center; gap: var(--gap);
}

.brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; }
.brand:hover { color: inherit; }
.brand__logo { width: 120px; height: auto; flex: none; }   /* naměřeno na originálu */
.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-size: 1.5rem;          /* 24 px jako originál */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--c-heading);
  line-height: 1.2;
}
.brand__tagline {
  font-size: 0.72rem;         /* 11,5 px jako originál */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--c-text);
  margin-top: 0.15rem;
}

.header__note { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.04em; }
.header__search { margin-left: auto; }

.search { display: flex; }
.search input[type="search"] {
  font: inherit; font-size: var(--fs-small);
  padding: 0.5rem 0.7rem; min-width: 190px;
  border: 1px solid var(--c-border); border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: #fff; color: var(--c-heading);
}
.search button {
  font: inherit; cursor: pointer;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--c-primary);
  background: var(--c-primary); color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.search button:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); }

/* --------------------------------------------------------------- menu --- */

.nav {
  background: var(--c-nav-bg);
  color: var(--c-nav-fg);
  min-height: var(--h-nav);
}
.nav .container { display: flex; align-items: center; justify-content: center; }

.nav__toggle {
  display: none; font: inherit; cursor: pointer;
  background: none; border: 0; padding: 0.9rem 0; color: inherit;
  align-items: center; gap: 0.5rem;
}

.menu { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; margin: 0; }
.menu > li > a {
  display: block; padding: 1.05rem 0.95rem;
  font-size: var(--fs-menu); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--c-nav-fg); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.menu > li > a:hover,
.menu > li.is-active > a { color: var(--c-heading); border-bottom-color: var(--c-primary); }
.menu > li.is-active > a { color: var(--c-heading); }

.menu__caret { font-size: 0.7em; margin-left: 0.35em; opacity: 0.7; }

.submenu {
  list-style: none; margin: 0; padding: 0.35rem 0;
  position: absolute; top: 100%; left: 0; z-index: 40;
  min-width: 250px;
  background: #fff; border: 1px solid var(--c-border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.menu > li:hover > .submenu,
.menu > li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu li { margin: 0; }
.submenu a {
  display: block; padding: 0.5rem 1rem;
  font-size: var(--fs-small); color: var(--c-text); text-decoration: none;
}
.submenu a:hover { background: #f7f7f7; color: var(--c-primary); }

/* ------------------------------------------------------ pruh s názvem --- */

.pagehead { background: var(--c-titlebar-bg); border-bottom: 1px solid var(--c-border); }
.pagehead .container { padding-block: 1.15rem; }
.pagehead h1 { margin: 0; }
.breadcrumb {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin: 0.3rem 0 0; padding: 0; font-size: var(--fs-small);
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.45rem; opacity: 0.6; }

/* -------------------------------------------------------------- obsah --- */

.main { padding-block: 2.5rem 3.5rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose blockquote {
  margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--c-primary); color: var(--c-heading);
}

/* ------------------------------------------------------- výsledky hledání --- */

.vysledky { margin-top: 0.5rem; }
.vysledek {
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--c-border);
}
.vysledek:first-child { padding-top: 0.5rem; }
.vysledek h2 { font-size: 1.35rem; margin: 0 0 0.55rem; }
.vysledek h2 a { text-decoration: none; color: var(--c-heading); }
.vysledek h2 a:hover { color: var(--c-primary); }
.vysledek p { font-size: var(--fs-small); margin: 0 0 1rem; }
.vysledek mark { background: #fff3b0; color: inherit; padding: 0 0.1em; }
.vysledek__vice {
  display: inline-block; text-decoration: none;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--c-primary); border-radius: var(--radius);
  color: var(--c-primary);
}
.vysledek__vice:hover { background: var(--c-primary); color: #fff; }
.hledani-pocet { font-size: var(--fs-small); color: #8a8a8a; }
.hledani-popis { font-size: var(--fs-small); }
.sdileni { margin-top: 2rem; }

/* Další články pod textem. Odstup musí být na sekci samotné - dřív ho dělalo
   tlačítko na sdílení nad ní, a když se vyplo, nadpis se nalepil na poslední
   odstavec článku. */
.post article + section,
.post .sdileni + section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #e5e5e5; }

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

.btn {
  display: inline-block; cursor: pointer;
  font: inherit; font-size: 0.9375rem; font-weight: 500;
  padding: 0.625rem 1.1rem;
  border: 1px solid var(--c-primary); border-radius: var(--radius);
  background: var(--c-primary); color: #fff; text-decoration: none;
}
.btn:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-primary); }
.btn--ghost:hover { background: var(--c-primary); color: #fff; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* -------------------------------------------------------------- výpisy --- */

.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: #fff; overflow: hidden;
  display: flex; flex-direction: column;
}
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: #f2f2f2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.card__meta { font-size: 0.8125rem; color: #8a8a8a; margin-bottom: 0.35rem; }
.card__title { font-size: 1.05rem; margin: 0 0 0.5rem; }
.card__title a { text-decoration: none; color: var(--c-heading); }
.card__title a:hover { color: var(--c-primary); }
.card__excerpt { font-size: var(--fs-small); margin: 0 0 1rem; }
.card__more { margin-top: auto; font-size: var(--fs-small); }

.badge {
  display: inline-block; font-size: 0.75rem; padding: 0.1rem 0.5rem;
  border-radius: 999px; background: #eaf4f9; color: #16607f; text-decoration: none;
}

/* ---------------------------------------------------------- fotogalerie --- */

.gallery { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.25s; }
.gallery a:hover img { transform: scale(1.04); }

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

.form { max-width: 640px; }
.form__row { margin-bottom: 1.1rem; }
.form__row label { display: block; font-size: var(--fs-small); color: var(--c-heading); margin-bottom: 0.3rem; }
.form__row .hint { display: block; font-size: 0.8125rem; color: #8a8a8a; margin-top: 0.25rem; }
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea,
.form select {
  font: inherit; width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: #fff; color: var(--c-heading);
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--c-primary); }
.form__check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: var(--fs-small); }
.form__check input { margin-top: 0.35rem; }
.form .hp { position: absolute; left: -9999px; }   /* past na roboty */
.form__msg { padding: 0.8rem 1rem; border-radius: var(--radius); margin-bottom: 1.2rem; display: none; }
.form__msg--ok { display: block; background: #e8f5ec; color: var(--c-success); }
.form__msg--err { display: block; background: #fdeaea; color: var(--c-error); }

/* --------------------------------------------------- pruh s novinkami --- */

.novinky {
  background: #f5f8fa;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.novinky__inner {
  display: grid; gap: var(--gap);
  grid-template-columns: 1fr 1fr;
  align-items: start;
  padding-block: 2.2rem;
}
.novinky h2 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.novinky p { font-size: var(--fs-small); margin: 0; }
.novinky__form { max-width: none; }
.novinky__radek { display: flex; gap: 0.5rem; margin-bottom: 0.7rem; }
.novinky__radek input { flex: 1; min-width: 0; }
.novinky__radek .btn { flex: none; }
.novinky__souhlas { font-size: 0.8125rem; }
.novinky .form__msg { margin-bottom: 0.8rem; }

@media (max-width: 720px) {
  .novinky__inner { grid-template-columns: 1fr; }
  .novinky__radek { flex-direction: column; }
}

/* ------------------------------------------------------- blok s formulářem --- */

.form-blok {
  margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}
.form-blok > p { font-size: var(--fs-small); }
.form abbr[title] {
  color: var(--c-error); text-decoration: none; cursor: help; font-weight: 700;
}

/* Odpověď na dotaz „v jakém stavu je přípojka na téhle adrese" */
.stav-adresy { display: none; margin-top: 0.7rem; }
.stav-adresy.je-videt {
  display: block;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--c-primary);
  background: #f5f8fa;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--fs-small);
}
.stav-adresy__stitek { display: block; color: var(--c-heading); font-weight: 600; margin-bottom: 0.2rem; }
.stav-adresy__akce { display: block; margin-top: 0.4rem; color: #6b6b6b; }
.stav-adresy--aktivni.je-videt { border-left-color: var(--c-success); }
.stav-adresy--nezjisteno.je-videt { border-left-color: #b0b0b0; }
.stav-adresy--hleda.je-videt { border-left-color: #d0d0d0; color: #8a8a8a; }

/* --------------------------------------------------------------- karusel --- */

.slider { position: relative; }
.slider__track {
  display: flex; gap: 0.75rem; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
  padding-bottom: 0.5rem;
}
.slider__track > * { flex: 0 0 clamp(220px, 30%, 320px); scroll-snap-align: start; }
.slider__track img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.slider__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; cursor: pointer;
  border: 1px solid var(--c-border); border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); color: var(--c-heading);
  display: grid; place-items: center;
}
.slider__btn--prev { left: -8px; }
.slider__btn--next { right: -8px; }

.slider__dots { display: flex; justify-content: center; gap: 0.55rem; margin-top: 1.1rem; }
.slider__dot {
  position: relative;
  width: 9px; height: 9px; padding: 0; cursor: pointer;
  border: 1px solid #c4c4c4; border-radius: 50%;
  background: transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.slider__dot::after { content: ""; position: absolute; inset: -8px; }  /* klikací plocha */
.slider__dot:hover { border-color: var(--c-primary); }
.slider__dot.is-active {
  background: var(--c-primary); border-color: var(--c-primary); transform: scale(1.15);
}

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

.footer { background: var(--c-footer-bg); color: var(--c-footer-fg); }
.footer .container { padding-block: 2.5rem; }
.footer__grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.footer h2 {
  font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.07em;
  color: #fff; margin-bottom: 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 0.6rem; }
.footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; font-size: var(--fs-small); }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__map { border-radius: var(--radius); overflow: hidden; background: #3a3a3a; min-height: 140px; }

.footer-bottom {
  background: var(--c-footerbottom-bg); color: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-small); text-align: center;
}
.footer-bottom .container { padding-block: 1.5rem; }

/* ------------------------------------------------- prohlížeč fotek --- */

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center; gap: 0.5rem;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  background: rgba(0, 0, 0, 0.9);
}
.lightbox.is-open { display: flex; }
.lightbox__figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox__figure img {
  max-width: 100%; max-height: calc(100vh - 8rem);
  width: auto; margin-inline: auto; border-radius: var(--radius);
}
.lightbox figcaption { color: #fff; font-size: var(--fs-small); margin-top: 0.9rem; }
.lightbox__close,
.lightbox__nav {
  flex: none; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, 0.14); border: 0; border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center;
}
.lightbox__close { position: absolute; top: 1rem; right: 1rem; }
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.28); }

/* -------------------------------------------------------------- mapa --- */

/* Mapa je obyčejný obrázek s odkazem – žádný cizí rám, žádné cizí ovládání.
   Uvedení autorů mapy je pod obrázkem, malým písmem, a nic nezakrývá. */
.mapa-obr { margin: 1.5rem 0; max-width: 700px; }   /* jako původní rám 700 px */
.mapa-obr > a { display: block; border-radius: var(--radius); overflow: hidden; }
.mapa-obr img { width: 100%; height: auto; }
.mapa-obr > a:hover img { opacity: 0.93; }
.mapa-obr figcaption { margin-top: 0.5rem; line-height: 1.5; }

.mapa-obr__odkaz {
  display: inline-block;
  font-size: var(--fs-small);
  color: var(--c-primary);
  text-decoration: underline;
}
.mapa-obr__odkaz:hover { color: var(--c-primary-dark); }
.mapa-obr__ven { margin-left: 0.3em; text-decoration: none; display: inline-block; }

.mapa-obr__zdroj {
  display: block;
  font-size: 0.75rem; color: #8a8a8a; margin-top: 0.2rem;
}
.mapa-obr__zdroj a { color: inherit; text-decoration: underline; }
.mapa-obr__zdroj a:hover { color: var(--c-primary); }

.mapa-obr--maly { max-width: 100%; }

.footer .mapa-obr { margin: 0; }
.footer .mapa-obr__odkaz { color: #fff; text-decoration: underline; }
.footer .mapa-obr__odkaz:hover { color: rgba(255, 255, 255, 0.75); }
.footer .mapa-obr__zdroj { color: rgba(255, 255, 255, 0.45); }
.footer .mapa-obr__zdroj a { color: rgba(255, 255, 255, 0.6); }

/* ---------------------------------------------------------- responzivně --- */

@media (max-width: 880px) {
  .header .container { flex-wrap: wrap; padding-block: 1rem; }
  .header__note { order: 3; width: 100%; }
  .header__search { margin-left: auto; }

  .nav .container { justify-content: flex-start; }
  .nav__toggle { display: inline-flex; }
  .menu {
    display: none; flex-direction: column; width: 100%;
    padding-bottom: 0.75rem;
  }
  .nav.is-open .menu { display: flex; }
  .menu > li > a { padding: 0.7rem 0; border-bottom: 0; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; background: transparent;
    padding: 0 0 0.5rem 1rem;
  }
  .submenu a { color: var(--c-text); padding: 0.35rem 0; }
}

@media (max-width: 520px) {
  .search input[type="search"] { min-width: 0; width: 100%; }
  .header__search { width: 100%; margin-left: 0; }
}

@media print {
  .topbar, .nav, .header__search, .footer, .footer-bottom { display: none; }
  body { color: #000; }
}
