/* Vzhled webu ordinace. Barvy vycházejí z bublin na původním webu (levandulová a růžová). */

@font-face {
  font-family: "Lexend";
  src: url("../fonts/lexend-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  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: "Lexend";
  src: url("../fonts/lexend-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  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;
}

:root {
  --ink: #2e2a3d;          /* text */
  --plum: #57507a;         /* nadpisy, navigace */
  --lavender: #8c84b0;     /* zadní bublina */
  --lavender-soft: #e9e6f2;
  --rose: #c24d68;         /* přední bublina, tlačítka */
  --rose-soft: #f6e3e7;
  --sand: #efe4d6;         /* pás s úvodem */
  --paper: #ffffff;
  --line: #e2dcea;

  --measure: 66ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --page: 72rem;
}

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

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

body {
  margin: 0;
  font-family: "Lexend", system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  color: var(--plum);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; max-width: var(--measure); }
strong { font-weight: 500; }

a { color: var(--rose); text-underline-offset: 0.2em; }
a:hover { color: var(--plum); }

:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Hlavička ---- */

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--plum);
  margin-right: auto;
}
.brand-mark { width: 2.75rem; height: 2.75rem; flex: none; }
.brand-name { display: block; font-weight: 500; font-size: 1.15rem; line-height: 1.2; }
.brand-subtitle { display: block; font-size: 0.875rem; color: var(--ink); }

.phone-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--rose);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.phone-button:hover { background: var(--plum); color: var(--paper); }
.phone-button svg { width: 1.1em; height: 1.1em; }

.site-nav { flex-basis: 100%; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: var(--plum);
  text-decoration: none;
  font-weight: 400;
}
.site-nav a:hover { background: var(--lavender-soft); }
.site-nav a[aria-current="page"] { background: var(--plum); color: var(--paper); }

/* Na úzkém displeji zmenšit hlavičku, ať je oznámení vidět co nejdřív. */
@media (max-width: 30rem) {
  .site-header .wrap { padding-top: 0.75rem; padding-bottom: 0.75rem; gap: 0.5rem 0.75rem; }
  .brand { gap: 0.5rem; }
  .brand-mark { width: 2.25rem; height: 2.25rem; }
  .brand-name { font-size: 1rem; }
  .brand-subtitle { font-size: 0.8rem; }
  .phone-button { padding: 0.45rem 0.8rem; font-size: 0.95rem; }
  .site-nav ul { gap: 0.15rem 0.1rem; }
  .site-nav a { padding: 0.3rem 0.6rem; font-size: 0.95rem; }
}

/* ---- Úvodní pás s bublinou ---- */

.intro { background: var(--sand); overflow: hidden; }

.intro .wrap {
  display: grid;
  gap: 2.5rem;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

@media (min-width: 52rem) {
  .intro .wrap { grid-template-columns: 1.1fr 1fr; align-items: center; }
}

.intro-lead { font-size: 1.2rem; }

.today {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  border-left: 4px solid var(--plum);
  background: var(--paper);
  border-radius: 0 0.75rem 0.75rem 0;
}
.today strong { color: var(--plum); }

/* Bublina s aktuálními oznámeními – výrazný prvek celého webu. */
.bubble {
  position: relative;
  isolation: isolate;
  min-height: 18rem;
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 3.75rem) clamp(2rem, 7vw, 4.5rem);
  color: var(--paper);
}
.bubble::before,
.bubble::after {
  content: "";
  position: absolute;
  z-index: -1;
}
.bubble::before {
  inset: -9% 30% 35% -5%;
  background: var(--lavender);
  border-radius: 48% 52% 44% 56% / 58% 46% 54% 42%;
}
/* Text leží celý na růžové bublině, ať má všude stejný kontrast. */
.bubble::after {
  inset: 0;
  background: var(--rose);
  border-radius: 56% 44% 52% 48% / 46% 54% 46% 54%;
}
.bubble-dots {
  position: absolute;
  left: 25%;
  bottom: -2.6rem;
  width: 3.5rem;
  height: 2.5rem;
}

.bubble-content { position: relative; width: 100%; }

/* Dětská kresba pod bublinou; bublina je myšlenka nakresleného dítěte. */
.intro-visual { display: grid; gap: 2.25rem; }
.child-drawing { display: block; width: 100%; height: auto; }
.bubble h2 { color: var(--paper); font-size: 1.35rem; margin-bottom: 0.75rem; }

.announcement-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.announcement-list li { max-width: 34ch; }
.announcement-text { display: block; font-weight: 400; font-size: 1.1rem; }
.announcement-date { display: block; font-size: 0.9rem; opacity: 0.9; }
.announcement-empty { margin: 0; }

/* ---- Obsah ---- */

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }

.split { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) {
  .split { grid-template-columns: 1fr 1fr; }
}

/* Ordinační hodiny */
.hours { width: 100%; max-width: 44rem; border-collapse: collapse; margin-bottom: 1.25rem; }
.hours caption { text-align: left; color: var(--ink); padding-bottom: 0.75rem; }
.hours th,
.hours td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours thead th { font-weight: 500; color: var(--plum); font-size: 0.95rem; }
.hours tbody th { font-weight: 400; width: 7rem; }
.hours .closed { color: #7a7487; }
.hours tr.is-today { background: var(--rose-soft); }
.hours tr.is-today th { font-weight: 500; }
.hours tr.is-today th::after { content: " (dnes)"; color: var(--rose); font-size: 0.85rem; }

@media (max-width: 34rem) {
  .hours thead { display: none; }
  .hours tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .hours th,
  .hours td { display: block; border: 0; padding: 0.1rem 0.75rem; }
  .hours td::before { content: attr(data-label) ": "; color: var(--plum); }
}

/* Rozcestník na obě části ordinace */
.services { display: grid; gap: 1.5rem; }
@media (min-width: 44rem) { .services { grid-template-columns: 1fr 1fr; } }

.service {
  display: block;
  padding: 1.75rem;
  border-radius: 1.5rem 1.5rem 1.5rem 0.25rem;
  text-decoration: none;
  color: var(--ink);
}
.service p { margin-bottom: 0.5rem; }
.service-link { color: var(--rose); font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; }
.service:hover .service-link { color: var(--plum); }
.service--psychiatry { background: var(--lavender-soft); }
.service--homeopathy { background: var(--rose-soft); }

/* Osoba lékařky */
.person { max-width: var(--measure); }
.person ul { padding-left: 1.2em; margin: 0 0 1em; }
.person li { margin-bottom: 0.35em; }

.address { font-style: normal; font-size: 1.15rem; }

.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.5rem; font-size: 1.15rem; }

/* Podnadpis uvnitř sekce s textem */
.section p + h3 { margin-top: 1.6em; }

.insurance-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }

/* Ceník homeopatické poradny */
.price-list { width: 100%; max-width: 32rem; border-collapse: collapse; margin-bottom: 1em; }
.price-list th,
.price-list td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-list th { font-weight: 400; }
.price-list td { white-space: nowrap; }

/* Poznámka v návrhu: místo pro text, který ještě dodá Jirka. */
.placeholder-note {
  max-width: var(--measure);
  padding: 0.9rem 1.1rem;
  border: 2px dashed var(--rose);
  border-radius: 0.75rem;
  background: var(--paper);
  color: var(--rose);
  font-size: 0.95rem;
}

.page-title { background: var(--sand); }
.page-title .wrap { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.page-title h1 { margin: 0; }
.page-title p { margin: 0.5rem 0 0; font-size: 1.15rem; }

/* ---- Patička ---- */

.site-footer { background: var(--plum); color: var(--paper); padding: 2.5rem 0; font-size: 0.95rem; }
.site-footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 44rem) { .site-footer .wrap { grid-template-columns: repeat(3, auto); justify-content: space-between; } }
.site-footer p { margin: 0; }
.site-footer a { color: var(--paper); }
.site-footer strong { font-weight: 500; }

/* ---- Správa oznámení (sprava/) ---- */

.admin { max-width: 46rem; }
.admin h1 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem); }
.admin h2 { margin-top: 2.5rem; }

.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--rose);
  border-radius: 999px;
  background: var(--rose);
  color: var(--paper);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--plum); border-color: var(--plum); color: var(--paper); }
.button--quiet { background: var(--paper); color: var(--plum); border-color: var(--line); }
.button--quiet:hover { background: var(--lavender-soft); border-color: var(--lavender-soft); color: var(--plum); }

.logout-form { margin: 0; }

.admin-form { display: grid; gap: 0.4rem; }
.admin-form--narrow { max-width: 22rem; }
.admin-form label { font-weight: 400; color: var(--plum); margin-top: 0.6rem; }
.admin-form input[type="password"],
.admin-form input[type="date"],
.admin-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: 0.6rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
}
.admin-form input:focus,
.admin-form textarea:focus { border-color: var(--lavender); outline: none; }
.admin-form button { justify-self: start; margin-top: 0.8rem; }

.admin-form-dates { display: grid; gap: 0.4rem 1rem; }
@media (min-width: 30rem) { .admin-form-dates { grid-template-columns: 1fr 1fr; } }
.admin-form-dates label { display: block; margin-bottom: 0.4rem; }

.admin-form .admin-checkbox { display: flex; gap: 0.6rem; align-items: center; color: var(--ink); margin-top: 1rem; }
.admin-checkbox input { width: 1.2rem; height: 1.2rem; accent-color: var(--rose); }
.admin-hint { font-size: 0.9rem; color: #6b6578; margin: 0; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.admin-actions form { margin: 0; }
.admin-actions .button { margin-top: 0; }
.admin-form .admin-actions { margin-top: 0.8rem; }

.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.admin-item { padding: 1.1rem 1.25rem; border: 2px solid var(--line); border-radius: 1rem; }
.admin-item--ended { opacity: 0.6; }
.admin-item-text { margin-bottom: 0.3rem; font-weight: 400; }
.admin-item-meta { font-size: 0.9rem; margin-bottom: 0.75rem; }

.message { padding: 0.8rem 1rem; border-radius: 0.75rem; margin-bottom: 1.5rem; }
.message p { margin: 0; }
.message--ok { background: #e3f1dc; color: #2f5a1f; }
.message--error { background: var(--rose-soft); color: #8e2a42; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
