/* Koutný real: page CSS shared by every page of the site (only what the kit lacks) */

/* the emergency line's signal dot: a status green with a slow ring pulsing out of it, "on call, right now" */
.sos-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3a9d6a; margin-right: var(--s-2); flex: none; }
.sos-dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: sos-pulse 3.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; pointer-events: none; }
@keyframes sos-pulse {
  0%   { transform: scale(1);   opacity: 0.35; }
  60%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .sos-dot::after { animation: none; opacity: 0; } }

/* a row's description under its name, 16px in ink */
.rows .rows__name small { display: block; font-weight: 400; color: var(--ink); font-size: var(--t-body); line-height: 1.5; margin-top: var(--s-1); }
.rows a.rows__name { color: inherit; text-decoration: none; }
.after-rows { margin-top: var(--s-5); }

/* the hero's float card: the emergency number as a 44px tap target */
.ly-float__title a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--t-lead); font-weight: 500; color: inherit; }

/* a wide photograph under a section's head and its facts */
main > .section > .wrap > .band-photo { min-height: 200px; }
.fact-row { margin: 0 0 var(--s-6); row-gap: var(--s-4); }
.fact-row dt { font-size: var(--t-small); color: var(--muted); }
.fact-row dd { margin: var(--s-1) 0 0; font-size: var(--t-lead); font-weight: 500; }

/* contacts: a label over its value, wrapping on a phone */
.contact-lines { display: grid; gap: var(--s-4); }
.contact-lines p { display: grid; gap: var(--s-1); margin: 0; font-size: var(--t-lead); overflow-wrap: anywhere; }
.contact-lines .muted { font-size: var(--t-small); }

/* #kancelar (kontakt): the page opens on its details, no hero. The words take the left half (two contact
   blocks side by side, then the hours and the address across), the photograph the right, down to the foot */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-7); }
.contact-grid__wide { grid-column: 1 / -1; }
@media (max-width: 639px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
/* a wide screen under 900px tall cannot hold it in one screen: the section grows instead of running into the next */
/* the same for the enquiry (#poptavka): its form grows by the error lines a failed submit shows, and the section
   grows with it, so the photograph beside the form keeps the section's foot padding instead of meeting the footer */
@media (min-width: 1280px) {
  main > :is(#kancelar, #poptavka).section { height: auto; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
  main > :is(#kancelar, #poptavka).section > .wrap { flex: 1 0 auto; height: auto; }
  main > #kancelar.section > .wrap > .grid.fill { flex: 1 0 auto; }
}
/* at every width the enquiry's photo-and-form row is at least as tall as its content (never squeezed to the screen) */
main > #poptavka.section > .wrap > .grid.fill { flex: 1 0 auto; }

/* office hours: one panel, three columns (day over time), hairlines between; a phone stacks them as rows */
.week { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--s-4) 0 0; padding: var(--s-5) 0;
  background: var(--p-surface); border-radius: var(--r-lg); }
.week > div { display: grid; gap: var(--s-1); align-content: start; padding-inline: clamp(12px, 1.6vw, 24px); }
.week > div + div { border-left: 1px solid var(--line); }
.week dt { font-size: var(--t-small); color: var(--muted); }
.week dd { margin: 0; font-size: var(--t-lead); font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.week__closed dd { color: var(--muted); font-weight: 400; }
@media (max-width: 639px) {
  .week { grid-template-columns: minmax(0, 1fr); padding: var(--s-1) var(--s-5); }
  .week > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: var(--s-4) 0; }
  .week > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* documents to download: the real file-type icon, the name, the format */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.doc { display: flex; align-items: center; gap: var(--s-4); min-height: 64px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); color: inherit; text-decoration: none; font-weight: 500; }
.doc small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-small); }
.doc .ic { width: 40px; height: 40px; flex: none; }

/* the enquiry: the photograph beside the form, as tall as the form */
.pop-photo { height: auto; min-height: 240px; min-width: 0; width: 100%; }
.contact .grid.fill { align-items: stretch; }
.form-card { background: var(--g-alt); border: 0; }
@media (max-width: 1023px) { .pop-photo { aspect-ratio: 4 / 3; } }
@media (max-width: 639px) {
  .pop-photo { aspect-ratio: 1 / 2; }
  .form-card { background: none; padding: 0; }
}

/* plain lists: one item a line, 16px in ink */
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.plain-list li { break-inside: avoid; line-height: 1.5; }
.addr-cols.plain-list { display: block; }
.addr-cols.plain-list li { margin-bottom: var(--s-1); }
.link-list { gap: var(--s-4); }
.groups { row-gap: var(--s-6); }
.groups h3 { margin-bottom: var(--s-3); }
.groups h3 .muted { font-weight: 400; }
.two-lists { row-gap: 0; }

/* #rozsah: the four areas two by two beside the stairwell photograph, each opening on a hairline and its number */
.scope { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--s-7); }
.scope > li { display: grid; gap: var(--s-3); align-content: start; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.scope__no { font-size: var(--t-label); font-weight: 500; letter-spacing: 0.04em; color: var(--muted); font-variant-numeric: tabular-nums; }
.scope h3 { margin: 0 0 var(--s-2); }
@media (min-width: 1024px) and (max-width: 1279px) { .scope { gap: var(--s-7) var(--s-6); } }
@media (max-width: 639px) { .scope { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-6); } }
.prose > * + * { margin-top: var(--s-5); }
.prose p { font-size: var(--t-lead); line-height: 1.6; max-width: 60ch; }
.contact-address { font-style: normal; font-size: var(--t-lead); line-height: 1.5; }

/* picture-develops: the section's one photograph, filling its frame */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; position: relative; }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.develop.frame--fill { height: 100%; }
@media (min-width: 1024px) { .grid.fill > .develop.frame--fill { min-height: 0; } }
@media (max-width: 1023px) { .grid > .develop.frame--fill { aspect-ratio: 4 / 3; height: auto; } }

/* a photograph under a split's words (facts, legal entities) */
.side-photo { aspect-ratio: 4 / 3; }

/* tablet: a split with a long list grows its section; its photograph keeps a ratio (a phone fills its screens) */
@media (min-width: 640px) and (max-width: 1023px) {
  main > .section > .wrap > .grid.fill.grow { flex: 0 0 auto; }
  .grid.fill.grow > :is(.frame--fill, .develop) { flex: none; height: auto; min-height: 0; aspect-ratio: 4 / 3; }
}
/* phone: a band photograph takes a real share of the screen */
@media (max-width: 639px) {
  main > .section > .wrap > .band-photo { min-height: 36vh; }
}

/* a photograph a phone needs to fill a long section's two screens (a wide screen has the room beside it) */
.phone-only { display: none; }
@media (max-width: 639px) { .phone-only { display: block; } }
figure.phone-only { margin: 0; border-radius: var(--r-lg); overflow: hidden; }
figure.phone-only > img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* #reference: the h2 and lead, then a looping row of district photographs (marquee-row). Live, the track
   drifts sideways; still (phone, reduced motion, before the module loads) it is a row you swipe, snapping
   card by card. Selectors carry #reference so they win over marquee-row/moment.css, which loads later. */
.loc-head { display: grid; gap: var(--s-4); max-width: 46ch; }
#reference .loc-mq { --mo-gap: 24px; margin-top: var(--s-7); padding-block: 0; }
#reference .loc-mq .mo-mq__track { display: flex; align-items: start; gap: var(--mo-gap); margin: 0; padding: 0; list-style: none;
  font: inherit; letter-spacing: normal; color: inherit; white-space: normal; }
#reference .loc-mq .mo-mq__track > li { flex: none; width: clamp(260px, 28vw, 400px); display: grid; gap: var(--s-2); align-content: start; }
#reference .loc-mq .mo-mq__track img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--r-md); opacity: 1; margin-bottom: var(--s-3); }
#reference .loc-mq .mo-mq__track p { color: var(--muted); }
#reference .loc-mq .mo-mq__pause { display: none; }
#reference .loc-mq .mo-mq__rail { padding-right: 0; }
#reference .loc-mq:not(.is-live) .mo-mq__track, #reference .loc-mq.is-still .mo-mq__track { flex-wrap: nowrap; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: var(--s-3); overscroll-behavior-x: contain; }
#reference .loc-mq:not(.is-live) .mo-mq__track > li { scroll-snap-align: start; }
@media (max-width: 639px) { #reference .loc-mq .mo-mq__track > li { width: 80vw; } }
@media (prefers-reduced-motion: reduce) {
  #reference .loc-mq.is-live .mo-mq__track { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; }
}

/* #cinnost: the statement under the hero is a few lines, so it takes only its own height instead of a full
   screen; its foot padding is the hero's (--hpadb), so the gap under it (--hpadb + the next --padt) equals
   the gap above it (the hero's --hpadb + its own --padt) at every width */
main > #cinnost.statement { height: auto; min-height: 0; padding-bottom: var(--hpadb); }
