/* ordinace-ranglova.cz – main stylesheet, variant C "Teplá písková" (forked from revma-beroun.cz) */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2-variations");
  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: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2-variations");
  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;
}

@layer reset, tokens, base, layout, components, utilities;

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  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: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  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;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
  img, svg { display: block; max-width: 100%; height: auto; }
  button { font: inherit; color: inherit; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    --c-bg: #fffdfa;
    --c-surface: #faf4ec;
    --c-border: #e6d8c6;
    --c-text: #2a211c;
    --c-muted: #5e5048;
    --c-primary: #9a3f22;
    --c-primary-hover: #7d321a;
    --c-primary-active: #5a2a1a;
    --c-on-primary: #ffffff;
    --c-notice-bg: #fff4d6;
    --c-notice-border: #b7791f;
    --c-notice-text: #4a3000;
    --c-footer-bg: #3b2219;
    --c-footer-text: #f5ece4;
    --c-open: #1a7f37;
    --c-closed: #6b7785;

    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --head-weight: 600;
    --head-tracking: -0.005em;

    --fs-base: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
    --fs-sm: 0.9375rem;
    --fs-lg: 1.125em;
    --fs-h1: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
    --fs-h2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
    --fs-h3: 1.1875rem;

    --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
    --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4.5rem;

    --radius: 0.375rem;
    --shadow: 0 8px 28px color-mix(in srgb, var(--c-primary) 14%, transparent);
    --measure: 68ch;
    --container: 72rem;
  }
}

@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: var(--space-5); }
  body { background: var(--c-bg); color: var(--c-text); font: var(--fs-base)/1.6 var(--font-body); min-height: 100vh; display: flex; flex-direction: column; }
  main { flex: 1; }
  h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); line-height: 1.15; text-wrap: balance; }
  h1 { font-size: var(--fs-h1); }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }
  p { max-width: var(--measure); }
  a { color: var(--c-primary); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
  a:hover { color: var(--c-primary-hover); text-decoration-thickness: 2px; }
  :focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: 3px; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  }
}

@layer layout {
  .container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
  .section { padding-block: var(--space-7); }
  .section--alt { background: var(--c-surface); }
  .section > .container > h2, .section-head { margin-bottom: var(--space-5); }
  .grid-2 { display: grid; gap: var(--space-6); }
  .stack > * + * { margin-top: var(--space-4); }
  @media (min-width: 48rem) {
    .grid-2 { grid-template-columns: 1fr 1fr; gap: var(--space-7); }
    .grid-2--wide-left { grid-template-columns: 1.25fr 1fr; }
    .section { padding-block: var(--space-8); }
  }
}

@layer components {
  /* Skip link */
  .skip-link { position: absolute; left: var(--space-4); top: -5rem; z-index: 20; background: var(--c-text); color: #fff; padding: var(--space-3) var(--space-4); border-radius: var(--radius); }
  .skip-link:focus { top: var(--space-2); color: #fff; outline-color: #fff; }

  /* Icons */
  .icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* Buttons */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 3rem; padding: 0.6rem 1.25rem; font-weight: 700; line-height: 1.2; text-decoration: none; border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
  .btn--primary { background: var(--c-primary); color: var(--c-on-primary); }
  .btn--primary:hover { background: var(--c-primary-hover); color: var(--c-on-primary); }
  .btn--primary:active { background: var(--c-primary-active); }
  .btn--secondary { background: transparent; color: var(--c-primary); border-color: currentColor; }
  .btn--secondary:hover { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }
  .btn--lg { min-height: 3.5rem; font-size: 1.1875rem; padding-inline: 1.5rem; }
  .btn .nowrap, .nowrap { white-space: nowrap; }
  .btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); max-width: none; }
  /* Label is centred in the button; the icon sits at the start edge without shifting it */
  .btn { text-align: center; }
  .btn:has(> .icon) { position: relative; padding-inline: 2.5em; }
  .btn > .icon { position: absolute; inset-inline-start: 0.875em; top: 50%; translate: 0 -50%; }

  /* Header */
  .site-header { position: relative; background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
  .site-header > .container { display: grid; grid-template-columns: 1fr auto auto; grid-template-rows: auto minmax(4.5rem, auto); align-items: center; column-gap: var(--space-3); }
  .site-header > .container > * { grid-row: 2; }
  .open-status { grid-row: 1 !important; grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: baseline; gap: var(--space-2); max-width: none; padding-top: var(--space-2); margin-bottom: calc(-1 * var(--space-1)); font-size: var(--fs-sm); line-height: 1.4; color: var(--c-muted); }
  .open-status::before { content: ""; flex: none; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--c-closed); }
  .open-status.is-open { color: var(--c-text); font-weight: 600; }
  .open-status.is-open::before { background: var(--c-open); }
  .brand { display: flex; align-items: center; gap: var(--space-3); margin-inline-end: auto; padding-block: var(--space-2); color: var(--c-text); text-decoration: none; }
  .brand:hover { color: var(--c-text); }
  .brand__mark { width: 2.5rem; height: 2.5rem; flex: none; color: var(--c-primary); }
  .brand__name { display: block; font-weight: 700; font-size: 1.125rem; line-height: 1.2; letter-spacing: -0.01em; }
  .brand__sub { display: none; font-size: 0.875rem; line-height: 1.3; color: var(--c-muted); }
  .btn.header-phone { flex: none; padding-inline: 0; width: 3rem; }
  .btn.header-phone > .icon { position: static; translate: none; }
  .nav-toggle { flex: none; }
  .header-phone__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav-toggle { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 3rem; padding: 0 var(--space-3); font-weight: 600; background: none; border: 2px solid var(--c-text); border-radius: var(--radius); cursor: pointer; }
  .nav-toggle[aria-expanded="true"] { background: var(--c-text); color: #fff; }
  .site-nav { display: none; position: absolute; inset: 100% 0 auto 0; z-index: 10; background: var(--c-bg); border-bottom: 1px solid var(--c-border); box-shadow: 0 12px 24px rgb(0 0 0 / 0.12); }
  .site-nav.is-open { display: block; }
  .site-nav ul { list-style: none; padding: var(--space-2) var(--space-4) var(--space-4); }
  .site-nav a { display: flex; align-items: center; min-height: 3rem; padding-inline: var(--space-3); color: var(--c-text); font-weight: 600; text-decoration: none; border-radius: 0.5rem; }
  .site-nav a:hover { background: var(--c-surface); color: var(--c-primary); }
  .site-nav a[aria-current] { color: var(--c-primary); box-shadow: inset 4px 0 0 var(--c-primary); }
  @media (min-width: 30rem) {
    .brand__sub { display: block; }
  }
  @media (min-width: 48rem) {
    .btn.header-phone { width: auto; padding-inline: 2.5em; }
    .btn.header-phone > .icon { position: absolute; translate: 0 -50%; }
    .header-phone__text { position: static; width: auto; height: auto; clip-path: none; }
  }
  @media (min-width: 64rem) {
    .nav-toggle { display: none; }
    .site-nav { display: block; position: static; background: none; border: 0; box-shadow: none; }
    .site-nav ul { display: flex; gap: var(--space-1); padding: 0; }
    .site-nav a { white-space: nowrap; padding-inline: var(--space-3); font-size: 1rem; }
    .site-nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--c-primary); border-radius: 0; }
    .brand__sub { display: none; }
  }
  @media (min-width: 80rem) {
    .brand__sub { display: block; }
  }

  /* Notice */
  .notice { background: var(--c-notice-bg); color: var(--c-notice-text); border-bottom: 2px solid var(--c-notice-border); }
  .notice > .container { display: flex; align-items: flex-start; gap: var(--space-3); padding-block: var(--space-3); }
  .notice .icon { margin-top: 0.2em; }
  .notice p { max-width: none; }
  .notice p + p { margin-top: var(--space-1); }

  /* Hero (home) */
  .hero { position: relative; isolation: isolate; overflow: hidden; background: var(--c-surface); padding-block: var(--space-7); }
  /* Subtle plus pattern (echoes the logo mark), fading out towards the text */
  .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/pattern-plus.svg") 0 0 / 2.5rem 2.5rem; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 100%); mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 100%); pointer-events: none; }
  .hero { text-align: center; }
  .hero__grid { display: grid; gap: var(--space-6); justify-items: center; }
  .hero__lead { margin-inline: auto; }
  .hero .card { width: 100%; max-width: 44rem; text-align: start; }
  .hero__eyebrow { color: var(--c-muted); font-weight: 600; margin-bottom: var(--space-3); }
  .hero h1 { margin-bottom: var(--space-4); }
  .hero__lead { color: var(--c-muted); font-size: var(--fs-lg); }
  .hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-5); }
  .hero__actions .btn { flex: 1 1 14rem; }
  @media (min-width: 56rem) {
    .hero { padding-block: var(--space-8); }
    .hero__grid { gap: var(--space-7); }
    .hero__actions .btn { flex: 0 0 auto; }
  }

  /* Page head (inner pages) */
  .page-head { background: var(--c-surface); padding-block: var(--space-6) var(--space-6); border-bottom: 1px solid var(--c-border); }
  .page-head p { margin-top: var(--space-3); color: var(--c-muted); font-size: var(--fs-lg); }

  /* Card + opening hours */
  .card { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--space-5); }
  .card--raised { box-shadow: var(--shadow); }
  .card > h2, .card > h3 { margin-bottom: var(--space-3); }
  .hours { width: 100%; border-collapse: collapse; }
  .hours caption { text-align: start; font-weight: 700; font-size: var(--fs-h3); letter-spacing: -0.01em; padding-bottom: var(--space-3); }
  .hours th, .hours td { text-align: start; vertical-align: top; padding: var(--space-3) 0; border-top: 1px solid var(--c-border); font-variant-numeric: tabular-nums; }
  .hours th { width: 42%; font-weight: 400; padding-inline-end: var(--space-3); }
  .hours td span { display: block; }
  .hours tr.is-today :is(th, td) { font-weight: 700; }
  .hours .today-label { display: inline-block; margin-inline-start: var(--space-2); padding: 0 var(--space-2); font-size: 0.8125rem; font-weight: 700; color: var(--c-on-primary); background: var(--c-primary); border-radius: 1rem; vertical-align: 0.1em; }
  .hours tr.is-closed td { color: var(--c-muted); }
  .card__note { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--c-muted); }
  /* Acute-patient slot under the regular hours (clinic_acute) */
  .hours .hours__acute { margin-top: var(--space-1); font-size: var(--fs-sm); font-weight: 400; color: var(--c-muted); }
  .hours .hours__acute::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-inline-end: var(--space-2); border-radius: 50%; background: var(--c-notice-border); vertical-align: 0.1em; }
  .hours-legend { max-width: none; margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--c-muted); }
  .hours-legend::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-inline-end: var(--space-2); border-radius: 50%; background: var(--c-notice-border); vertical-align: 0.1em; }
  /* Callout (e.g. acute patients, how to book) */
  .callout { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-4); background: var(--c-bg); border: 1px solid var(--c-border); border-top: 4px solid var(--c-notice-border); border-radius: var(--radius); }
  .callout .icon { width: 1.5rem; height: 1.5rem; color: var(--c-notice-border); margin-top: 0.15em; }
  .callout h3 { margin-bottom: var(--space-1); }
  .callout p { color: var(--c-muted); }

  /* Lists */
  .check-list { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
  .check-list li { display: grid; grid-template-columns: 1.5rem 1fr; gap: var(--space-3); }
  .check-list .icon { width: 1.5rem; height: 1.5rem; margin-top: 0.1em; color: var(--c-primary); stroke-width: 2.5; }
  .tiles { list-style: none; padding: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
  .tiles li { background: var(--c-bg); border: 1px solid var(--c-border); border-top: 4px solid var(--c-primary); border-radius: var(--radius); padding: var(--space-4); font-weight: 600; }
  .tiles small { display: block; font-size: var(--fs-sm); font-weight: 400; color: var(--c-muted); }
  .tiles .tile__code { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--c-primary); font-variant-numeric: tabular-nums; }

  /* People */
  .people { display: grid; gap: var(--space-5); }
  .person { display: grid; gap: var(--space-4); align-items: start; }
  .person__photo { width: 8.75rem; aspect-ratio: 7 / 9; object-fit: cover; border-radius: var(--radius); background: var(--c-surface); }
  .person__role { color: var(--c-muted); font-weight: 600; margin-bottom: var(--space-3); }
  .person :is(h2, h3) { font-size: 1.5rem; margin-bottom: var(--space-1); }
  @media (min-width: 36rem) { .person { grid-template-columns: 8.75rem 1fr; gap: var(--space-5); } }
  @media (min-width: 64rem) { .people { grid-template-columns: 1fr 1fr; } }

  /* Contact */
  .contact-list { display: grid; gap: var(--space-4); }
  .contact-list dt { font-size: var(--fs-sm); font-weight: 600; color: var(--c-muted); }
  .contact-list dd { font-size: var(--fs-lg); }
  .contact-list a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; overflow-wrap: anywhere; }
  .contact-list small { display: block; font-size: var(--fs-sm); color: var(--c-muted); max-width: 34ch; }
  .location { display: grid; gap: var(--space-4); justify-items: start; align-content: center; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--space-5); }
  .location__pin { width: 3rem; height: 3rem; color: var(--c-primary); }
  .location__photo { width: 100%; height: auto; border-radius: var(--radius); }
  .location address { font-style: normal; font-size: var(--fs-lg); }
  /* Map variant: greyscale map tinted with the surface colour as the card background, content in a white panel */
  /* The practice sits at 50 % / 30 % of the map image; the same values position the
     background and the pin, so they stay aligned at any card size. */
  .location--map { position: relative; min-height: 22rem; align-content: end; padding: var(--space-4); background-color: var(--c-primary); background-image: linear-gradient(color-mix(in srgb, var(--c-surface) 55%, transparent), color-mix(in srgb, var(--c-surface) 55%, transparent)), url("../img/mapa-osm.jpg"); background-image: linear-gradient(color-mix(in srgb, var(--c-surface) 55%, transparent), color-mix(in srgb, var(--c-surface) 55%, transparent)), image-set(url("../img/mapa-osm.webp") type("image/webp"), url("../img/mapa-osm.jpg") type("image/jpeg")); background-size: cover; background-position: 50% 30%; background-blend-mode: normal, screen; }
  .location--map .location__pin { position: absolute; inset-inline-start: 50%; inset-block-start: 30%; translate: -50% -100%; width: 2.75rem; height: 2.75rem; fill: var(--c-primary); stroke: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.3)); }
  .location__panel { position: relative; display: grid; gap: var(--space-3); justify-items: start; background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--space-4); box-shadow: var(--shadow); }
  .location__credit { position: absolute; inset-block-start: var(--space-2); inset-inline-end: var(--space-2); max-width: none; padding: 0 var(--space-2); font-size: 0.75rem; line-height: 1.6; color: var(--c-muted); background: rgb(255 255 255 / 0.85); border-radius: 0.25rem; }
  .location__credit a { color: inherit; }

  /* Prose (editor content) */
  .prose { max-width: var(--measure); }
  .prose > * + * { margin-top: var(--space-4); }
  .prose > * + :is(h2, h3) { margin-top: var(--space-6); }
  .prose :is(ul, ol) { padding-inline-start: 1.5em; }
  .prose li + li { margin-top: var(--space-2); }
  .prose table { width: 100%; border-collapse: collapse; }
  .prose :is(th, td) { text-align: start; padding: var(--space-2) var(--space-3) var(--space-2) 0; border-top: 1px solid var(--c-border); vertical-align: top; }
  .prose blockquote { margin: 0; padding-inline-start: var(--space-4); border-inline-start: 4px solid var(--c-border); color: var(--c-muted); }
  .todo { background: #fff4d6; color: #4a3000; padding: 0 0.25em; border-radius: 0.25em; }
  /* Hints for editors – rendered only inside Fred (data-fred-render="false") */
  .fred-hint { margin-top: var(--space-3); padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); color: var(--c-notice-text); background: var(--c-notice-bg); border: 1px dashed var(--c-notice-border); border-radius: 0.5rem; }

  /* Footer */
  .site-footer { background: var(--c-footer-bg); color: var(--c-footer-text); padding-block: var(--space-5); font-size: var(--fs-sm); }
  .site-footer__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-5); }
  .site-footer p { max-width: none; }
  .site-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; color: inherit; }
  .site-footer a:hover { color: #fff; }
  .site-footer :focus-visible { outline-color: #fff; }
  @media (min-width: 64rem) {
    .site-footer__row { display: grid; grid-template-columns: auto auto auto; justify-content: space-between; column-gap: var(--space-6); }
    .site-footer__row > * { white-space: nowrap; }
  }
}

@layer utilities {
  .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mt-5 { margin-top: var(--space-5); }
  .link-more, .link-list a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; font-weight: 600; }
  .link-list { list-style: none; padding: 0; }
}

@media print {
  .site-nav, .nav-toggle, .skip-link, .hero__actions, .header-phone { display: none !important; }
  .hero, .page-head, .section--alt, .site-footer { background: none; color: #000; }
}
