/* ==========================================================================
   Granty Chomutov – Zdravotnictví
   Modrá identita města (#0c4a7c) + tyrkysový zdravotnický akcent (#0d9488)
   ========================================================================== */

:root {
  /* ---- Oficiální paleta dle Grafického manuálu SM Chomutov (2011) ----
     petal-blue-dark  #5186AA  CMYK 60/20/0/30  PANTONE 659 C  (Kamencové jezero)
     petal-blue-light #B6D5E9  CMYK 30/5/0/5    PANTONE 544 C  (hokej/sport)
     petal-green      #C8D200  CMYK 30/0/100/0  PANTONE 381 C  (Bezručovo údolí)
     petal-orange     #F29400  CMYK 0/50/100/0  PANTONE 152 C  (zoopark)
     wordmark-gray     #707070  PANTONE Cool Gray 11 C
     Odstíny níže jsou z těchto přesných tónů odvozené (ztmavené/zesvětlené)
     pro čitelnost textu a kontrast na webu – samotné 5 základních
     hodnot výše zůstává nezměněno. */

  --blue-900: #23445a;   /* ztmavená petal-blue-dark – hlavička/patička */
  --blue-800: #35617d;   /* ztmavená petal-blue-dark – nadpisy, odkazy */
  --blue-700: #5186aa;   /* přesná petal-blue-dark – tlačítka, akcenty */
  --blue-100: #b6d5e9;   /* přesná petal-blue-light – jemné podklady */
  --blue-50: #eaf3f8;    /* zesvětlená petal-blue-light – pozadí sekcí */

  --accent-800: #1c4b66; /* ztmavená petal-blue-light – text na světlém podkladu */
  --accent-700: #4a86ab; /* petal-blue-light zesyceno – ikony, rámečky */
  --accent-600: #b6d5e9; /* přesná petal-blue-light – plné plochy (status, chip) */
  --accent-100: #e3f0f8; /* zesvětlená petal-blue-light – jemné podklady */
  --accent-50: #f2f8fb;  /* velmi světlá petal-blue-light – pozadí sekcí */

  --orange-600: #f29400; /* přesná petal-orange – doplňkový detail */

  --ink: #2e2e2e;
  --ink-secondary: #5c5c5c; /* odvozeno z wordmark-gray #707070 */
  --ink-muted: #8a8a8a;
  --line: #e3e1da;
  --line-strong: #cac8c0;
  --bg: #f7f7f5;
  --white: #ffffff;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Základní firemní písmo dle manuálu je Myriad Pro; pro web (bez licence
     na webfont) manuál povoluje substituci písmy Calibri / Arial. */
  --font-sans: "Calibri", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* -------------------- Scroll reveal -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* -------------------- Skip link -------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-800);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* -------------------- Header -------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo .logo-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}

.logo .logo-word {
  display: block;
  font-family: Arial, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--ink-secondary);
  line-height: 1.15;
}

.logo .logo-sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-800);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--blue-50);
  color: var(--blue-800);
}

.main-nav a.active {
  background: var(--accent-100);
  color: var(--accent-800);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--blue-800);
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--accent-50) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  top: -120px;
  right: -140px;
  width: 480px;
  height: 480px;
  opacity: 0.14;
  transform: rotate(18deg);
  pointer-events: none;
}

.hero-blob svg,
.hero-blob img { width: 100%; height: 100%; object-fit: contain; }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(32px, 4.6vw, 46px);
  font-weight: 700;
  color: var(--blue-900);
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.hero-text h1 .highlight {
  position: relative;
  color: var(--accent-800);
  white-space: nowrap;
}

.hero-text h1 .highlight::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 10px;
  background: var(--accent-600);
  opacity: 0.45;
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-1deg);
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--accent-600);
  color: var(--accent-800);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 210, 0, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--blue-800);
  border: 1.5px solid var(--blue-800);
}

.btn-ghost:hover {
  background: var(--blue-800);
  color: #fff;
  transform: translateY(-2px);
}

.hero-media {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px -20px rgba(35, 68, 90, 0.35);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-media:hover img { transform: scale(1.04); }

.hero-media-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(35, 68, 90, 0.9);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  backdrop-filter: blur(2px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-100);
  color: var(--accent-800);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-600);
}

.hero .lede {
  font-size: 16.5px;
  color: var(--ink-secondary);
  max-width: 480px;
  margin: 0 0 22px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-pill {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-pill:hover {
  transform: translateY(-2px);
  border-color: var(--blue-700);
}

.stat-pill .num {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-800);
  margin-right: 6px;
}

.stat-pill .lbl {
  font-size: 12px;
  color: var(--ink-muted);
}

/* -------------------- Programs section -------------------- */
.programs {
  padding: 48px 0 64px;
}

.programs-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.programs-heading h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-900);
  margin: 0;
}

.programs-heading .count {
  font-size: 14px;
  color: var(--ink-muted);
}

.program-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.program-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px 28px 16px 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px -24px rgba(35, 68, 90, 0.3);
}

.program-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  background: var(--blue-50);
}

.program-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.4s ease;
}

.program-card:hover .program-image img {
  transform: scale(1.05);
}

.program-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35,68,90,0) 40%, rgba(35,68,90,0.55) 100%);
}

.program-image-tags {
  position: absolute;
  left: 18px;
  bottom: 14px;
  display: flex;
  gap: 8px;
}

.program-card-header {
  padding: 24px 28px 0;
}

.tag {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

.tag-category {
  background: var(--accent-600);
  color: var(--accent-800);
}

.tag-status-open {
  background: #fff;
  color: #1c6b34;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag-status-open::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2f9e52;
}

.program-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-900);
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.program-subtitle {
  font-size: 14.5px;
  color: var(--accent-800);
  font-weight: 600;
  margin: 0 0 4px;
}

.program-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin: 0 0 16px;
}

.program-body {
  padding: 0 28px 28px;
}

.program-desc p {
  color: var(--ink-secondary);
  font-size: 15px;
  margin: 0 0 12px;
}

.program-desc ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--ink-secondary);
  font-size: 15px;
}

.program-desc ul li { margin-bottom: 4px; }

.fact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.fact-chip {
  flex: 1 1 140px;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fact-chip .fc-value {
  font-size: 17px;
  font-weight: 700;
}

.fact-chip .fc-label {
  font-size: 12px;
  opacity: 0.85;
}

.fact-chip-blue { background: var(--blue-50); color: var(--blue-900); }
.fact-chip-blue .fc-value { color: var(--blue-800); }
.fact-chip-green { background: var(--accent-50); color: var(--accent-800); }
.fact-chip-orange { background: #fff3e0; color: #8a4b00; }
.fact-chip-orange .fc-value { color: #a35a00; }

.fact-note {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: -10px 0 16px;
}

.perk-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 0 0 16px;
}

.perk-banner .ico {
  width: 20px; height: 20px;
  color: var(--blue-700);
  flex-shrink: 0;
  margin-top: 2px;
}

.perk-banner p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.perk-banner strong { color: var(--blue-900); }

.timeline {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.timeline .tl-item {
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.timeline .tl-item strong {
  display: block;
  color: var(--blue-900);
  font-size: 14.5px;
}

.timeline .tl-sep {
  color: var(--line-strong);
}

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue-800);
  background: var(--white);
  transition: all 0.15s;
}

.doc-link:hover {
  border-color: var(--blue-700);
  background: var(--blue-800);
  color: #fff;
  transform: translateY(-1px);
}

.doc-link:hover .ico { color: #fff; }

.doc-link .ico {
  width: 15px; height: 15px;
  flex-shrink: 0;
  color: var(--accent-700);
  transition: color 0.15s;
}

.program-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 20px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-block .contact-title {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.contact-person {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.contact-person strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.contact-person a { color: var(--blue-700); }
.contact-person a:hover { text-decoration: underline; }

/* -------------------- Footer -------------------- */
.site-footer {
  background: var(--blue-900);
  color: #cfe0ee;
  padding: 24px 0;
  margin-top: 40px;
}

.footer-bottom {
  font-size: 12.5px;
  color: #7d9ab5;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 860px) {
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .program-footer { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; aspect-ratio: 16 / 9; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 2px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .hero { padding: 36px 0 32px; }
  .program-card-header, .program-body { padding-left: 20px; padding-right: 20px; }
  .program-footer { padding: 18px 20px; }
}

@media (max-width: 520px) {
  .program-grid { grid-template-columns: 1fr 1fr; }
}
