/* =====================================================================
   Hausarztpraxis Northeim – stylesheet
   Colours and fonts are defined once below (:root) and used everywhere.
   ===================================================================== */

:root {
  --brand-1: #f39a56;           /* logo gradient, left  */
  --brand-2: #f6c35b;           /* logo gradient, right */
  --brand-gradient: linear-gradient(100deg, var(--brand-1), var(--brand-2));
  --accent: #b5560c;            /* links, icons (readable on white) */
  --accent-strong: #8f4205;
  --ink: #16252a;               /* text */
  --muted: #5b6770;
  --line: #e6e1da;
  --bg: #ffffff;
  --bg-soft: #fbf6ef;
  --bg-dark: #16252a;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(22 37 42 / .06), 0 8px 24px rgb(22 37 42 / .06);
  --container: 1120px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand-1); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(40px, 7vw, 72px) 0; }
.section--soft { background: var(--bg-soft); }
.section__head { max-width: 680px; margin-bottom: 32px; }
.section__head p { color: var(--muted); }
.section__more { margin-top: 24px; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; }
.plain-list { list-style: none; margin: 0; padding: 0; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .75em 1.35em;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--ghost { background: rgb(255 255 255 / .92); border-color: #fff; }
.btn--light { background: #fff; margin-top: 8px; }
.btn--small { padding: .45em 1em; font-size: .95rem; }
.more-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand__logo { width: 48px; height: 48px; border-radius: 10px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand__sub { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.nav__phone, .nav__link { white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 16px; }
.nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
  display: flex; align-items: center; gap: 2px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 550;
}
.nav__link:hover, .nav__link.is-active { color: var(--accent); background: var(--bg-soft); }
.nav__chevron { width: 1em; height: 1em; }
.nav__sub {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  list-style: none; margin: 0; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-sub:hover .nav__sub, .has-sub:focus-within .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.nav__sub a:hover, .nav__sub a[aria-current] { background: var(--bg-soft); color: var(--accent); }
.nav-toggle { display: none; }

@media (max-width: 1180px) {
  .nav__phone { display: none; }
}
@media (max-width: 1000px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; font: inherit; color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; }
  .nav__sub { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 0 16px; }
  .nav__chevron { display: none; }
  .nav__phone { display: inline-flex; align-self: flex-start; margin-top: 8px; }
  .brand__sub { display: none; }
}

/* ---------- Page header (sub pages) ---------- */
.page-header { background: var(--brand-gradient); padding: clamp(36px, 6vw, 60px) 0; }
.page-header h1 { margin: 0; }
.page-header__sub { margin: .4em 0 0; font-size: 1.15rem; }
.page-header__meta { margin: 0 0 .3em; font-weight: 600; opacity: .85; }

.profile-head { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.profile-head__photo { width: 150px; border-radius: var(--radius); border: 4px solid #fff; box-shadow: var(--shadow); }

/* ---------- Home: hero ---------- */
.hero {
  position: relative;
  min-height: clamp(380px, 58vh, 560px);
  display: flex; align-items: center;
  background:
    linear-gradient(90deg, rgb(243 154 86 / .95) 0%, rgb(246 195 91 / .82) 45%, rgb(246 195 91 / 0) 75%),
    var(--hero-image, none) center / cover no-repeat,
    var(--brand-gradient);
}
.hero__inner { padding-top: 48px; padding-bottom: 48px; }
.hero__title { font-size: clamp(2.2rem, 5.5vw, 3.6rem); max-width: 14ch; margin-bottom: .25em; }
.hero__text { font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 30ch; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .btn:first-child { background: var(--ink); color: #fff; }
@media (max-width: 700px) {
  .hero { background:
    linear-gradient(180deg, rgb(243 154 86 / .93), rgb(246 195 91 / .9)),
    var(--hero-image, none) center / cover no-repeat; }
}

/* ---------- Notices & callouts ---------- */
.notice, .callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff7ec; border: 1px solid #f5d3a8; border-left: 5px solid var(--brand-1);
  border-radius: var(--radius); padding: 18px 22px;
}
.notice { margin-top: -36px; position: relative; box-shadow: var(--shadow); }
.notice > .icon { color: var(--accent); width: 1.6em; height: 1.6em; margin-top: 2px; }
.notice__title { font-weight: 700; margin-bottom: .25em; }
.notice p:last-child, .callout p:last-child { margin-bottom: 0; }
.callout { flex-direction: column; gap: 4px; margin: 1.5em 0; }
.callout__title { display: flex; align-items: center; gap: .5em; font-weight: 700; margin: 0; color: var(--accent-strong); }
.callout__body { font-size: 1.05rem; }

/* ---------- Cards & grids ---------- */
.card-grid { display: grid; gap: 20px; }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .card-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .card-grid--4 { grid-template-columns: 1fr; } }
.card-grid--news { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.feature, .news-card, .panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.feature p { color: var(--muted); margin: 0; }
.feature__icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px;
  border-radius: 12px; background: var(--brand-gradient); color: var(--ink);
}
.feature__icon .icon { width: 26px; height: 26px; }

.news-card { display: flex; flex-direction: column; }
.news-card__meta { font-size: .9rem; color: var(--muted); margin-bottom: .4em; }
.news-card__title a { color: var(--ink); text-decoration: none; }
.news-card__title a:hover { color: var(--accent); }
.news-card .more-link { margin-top: auto; }

.team-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.team-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.team-card img, .team-card__placeholder { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--bg-soft); }
.team-card__placeholder { display: grid; place-items: center; color: #e2b98a; }
.team-card__placeholder .icon { width: 40%; height: 40%; stroke-width: 1.2; }
.team-card__body { padding: 14px 16px 18px; }
.team-card__name { font-weight: 700; margin: 0 0 .2em; }
.team-card__name a { color: inherit; }
.team-card__role { font-size: .92rem; color: var(--muted); margin: 0; line-height: 1.4; }

/* ---------- Contact & hours ---------- */
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.panel h2, .panel h3 { display: flex; align-items: center; gap: .5em; font-size: 1.15rem; margin-top: 0; }
.panel h2 .icon, .panel h3 .icon { color: var(--accent); }
.prose .contact-grid { margin-bottom: 1.5em; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.contact-list .icon { color: var(--accent); margin-top: .25em; }
.hours { margin: 0; }
.hours + .hours__title { margin-top: 16px; }
.hours__title { font-weight: 700; margin: 0 0 4px; }
.hours__row { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; }
.hours__note { display: block; font-size: .9rem; color: var(--muted); }
.hours__extra { margin: 10px 0 0; font-style: italic; }

/* ---------- Prose (Markdown content) ---------- */
.prose { max-width: 760px; }
.prose--legal { max-width: 820px; font-size: 1rem; }
.prose--legal h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose--legal h3 { margin-top: 1.4em; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }

.check-list { list-style: none; padding: 0; margin: 0 0 2em; columns: 2 300px; column-gap: 40px; }
.check-list li { position: relative; padding: 8px 0 8px 30px; break-inside: avoid; border-bottom: 1px solid var(--line); }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 14px; height: 8px;
  border-left: 3px solid var(--brand-1); border-bottom: 3px solid var(--brand-1); transform: rotate(-45deg);
}

/* ---------- Doctor CV timeline ---------- */
.cv + .cv { margin-top: 40px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--brand-2); }
.timeline__item { display: grid; grid-template-columns: 11em 1fr; gap: 20px; padding: 0 0 24px 24px; position: relative; }
.timeline__item::before {
  content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand-1);
}
.timeline__period { font-weight: 700; color: var(--accent-strong); margin: 0; }
.timeline__place { font-weight: 600; margin: 0; }
.timeline__role { margin: 0; font-style: italic; }
.timeline__body p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .timeline__item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Doctor overview ---------- */
.doctor-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.doctor-card { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.doctor-card img { width: 96px; border-radius: 10px; }
.doctor-card__placeholder { display: grid; place-items: center; width: 96px; height: 128px; border-radius: 10px; background: var(--bg-soft); color: var(--accent); flex: none; }
.doctor-card__placeholder .icon { width: 40px; height: 40px; }
.doctor-card h2 { font-size: 1.25rem; margin-bottom: .2em; }
.doctor-card p { color: var(--muted); margin-bottom: .5em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #d9dee0; padding-top: 48px; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer .icon { color: var(--brand-2); }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding-bottom: 32px; }
.site-footer__title { font-weight: 700; color: #fff; margin-bottom: .6em; }
.site-footer .hours__row { border-color: rgb(255 255 255 / .12); }
.site-footer .hours__note { color: #aab4b8; }
.site-footer .plain-list li { padding: 4px 0; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  border-top: 1px solid rgb(255 255 255 / .12); padding-top: 18px; padding-bottom: 24px; font-size: .92rem;
}
.site-footer__links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }

@media print {
  .site-header, .site-footer, .hero__buttons { display: none; }
  .page-header { background: none; padding: 0 0 1em; }
}
