/* ============================================================
   Subpage layout — Behandlungsbereiche detail pages
   Reuses tokens, header, footer & dropdown from styles.css
   ============================================================ */

.subpage { flex: 1 1 auto; width: 100%; }
.sub-wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--pad); }

/* Theming hook: pages set --accent / --accent-deep / --accent-tint / --accent-line */
.subpage {
  --accent: var(--cool);
  --accent-deep: var(--cool-deep);
  --accent-tint: var(--cool-tint);
  --accent-line: oklch(0.88 0.06 29);
  --accent-grad: oklch(0.45 0.17 29);
}

.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 15.4px; font-weight: 600; color: var(--muted);
  margin: clamp(22px, 3vw, 32px) 0 0;
  transition: gap .2s ease, color .2s ease;
}
.back-link:hover { color: var(--ink); gap: 10px; }
.back-link svg { width: 16px; height: 16px; }

/* ---------- HERO ---------- */
.sub-hero {
  padding: clamp(28px, 4vw, 52px) 0 clamp(28px, 4vw, 48px);
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 64px); align-items: center;
}
.sub-hero .kicker {
  font-family: var(--mono); font-size: 13.2px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 16px;
}
.sub-hero h1 {
  margin: 0 0 18px; font-size: clamp(37.4px, 4.84vw, 57.2px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.03; color: var(--ink); text-wrap: balance;
}
.sub-hero .lead {
  font-size: clamp(17.6px, 1.54vw, 20.9px); color: var(--muted); line-height: 1.62;
  max-width: 52ch; margin: 0 0 26px; text-wrap: pretty;
}
.hero-docs { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.hero-docs .doc {
  display: flex; align-items: center; gap: 10px;
  font-size: 16.5px; font-weight: 600; color: var(--ink);
}

.hero-photo {
  aspect-ratio: 4 / 3; border-radius: 18px; border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.hero-photo.cool {
  background: repeating-linear-gradient(135deg,
    oklch(0.948 0.024 248) 0 14px, oklch(0.972 0.015 248) 14px 28px);
}
.hero-photo.warm {
  background: repeating-linear-gradient(135deg,
    oklch(0.95 0.026 46) 0 14px, oklch(0.975 0.016 46) 14px 28px);
}
.hero-photo .photo-tag {
  position: absolute; left: 18px; bottom: 18px;
  font-family: var(--mono); font-size: 12.1px; letter-spacing: 0.04em;
  color: var(--faint); background: rgba(255,255,255,0.82);
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-soft);
}

/* Doctor team — horizontal slider (all viewports) */
/* Doctor team — scales to fit the container width (no horizontal scroll) */
.hero-team {
  display: flex; gap: 16px; align-items: stretch;
}
.doc-card {
  margin: 0; display: flex; flex-direction: column;
  flex: 1 1 0; min-width: 0; max-width: 240px;
}
/* phantom card: holds a flex slot so a lone doctor resizes like the multi-card layout */
.doc-card--phantom { visibility: hidden; pointer-events: none; }
.doc-photo {
  aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: var(--cool-tint);
}
.doc-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block;
}
.doc-photo--placeholder {
  display: flex; align-items: flex-end; justify-content: flex-start;
  background: repeating-linear-gradient(135deg,
    oklch(0.948 0.024 248) 0 14px, oklch(0.972 0.015 248) 14px 28px);
}
.doc-photo--placeholder .photo-tag {
  font-family: var(--mono); font-size: 12.1px; letter-spacing: 0.04em;
  color: var(--faint); background: rgba(255,255,255,0.82);
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-soft); margin: 14px;
}
.doc-card figcaption {
  position: relative;
  margin-top: 12px; text-align: center;
  display: flex; flex-direction: column;
  flex: 1 1 auto;
}

/* Doctor name toggle */
.doc-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 60px; flex: 1 1 auto; margin: 0; padding: 8px 10px;
  font-family: inherit; font-size: 15.95px; font-weight: 600; line-height: 1.3; color: var(--ink);
  text-align: center; background: none; border: none; cursor: pointer;
  border-radius: 10px; transition: background .18s ease;
}
.doc-toggle:hover { background: var(--accent-tint); }
.doc-toggle .doc-chev {
  width: 15px; height: 15px; flex: 0 0 auto; color: var(--accent-deep);
  transition: transform .25s ease;
}
.doc-card.is-open .doc-toggle .doc-chev { transform: rotate(180deg); }

/* Drop-DOWN info panel — floats below the name, full card width (all viewports) */
.doc-info {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.doc-card.is-open .doc-info { opacity: 1; visibility: visible; transform: translateY(0); }
.doc-info ul {
  list-style: none; margin: 0; padding: 13px 16px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px -22px oklch(0.40 0.03 250 / 0.5), 0 2px 10px -6px oklch(0.40 0.03 250 / 0.28);
}
.doc-info li {
  display: flex; align-items: flex-start; gap: 8px; text-align: left;
  font-size: 14.3px; font-weight: 500; line-height: 1.4; color: var(--muted);
}
.doc-info li::before {
  content: ""; flex: 0 0 auto; width: 5px; height: 5px; margin-top: 7px;
  border-radius: 50%; background: var(--accent);
}

/* ---------- SECTIONS ---------- */
.sub-section { padding: clamp(36px, 4.5vw, 60px) 0; border-top: 1px solid var(--line-soft); }

/* ---------- AKTUELLES / POSTS ---------- */
.post-list { display: flex; flex-direction: column; gap: 16px; padding-bottom: clamp(20px, 3vw, 32px); }
.post-card {
  display: grid; grid-template-columns: 132px 1fr auto; align-items: center; gap: 22px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px; text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.post-card:hover {
  border-color: var(--accent-line);
  box-shadow: 0 14px 36px -22px oklch(0.40 0.03 250 / 0.4);
  transform: translateY(-2px);
}
.post-date {
  font-family: var(--mono); font-size: 12.65px; letter-spacing: 0.06em;
  color: var(--faint); white-space: nowrap;
}
.post-body { min-width: 0; }
.post-body h3 {
  margin: 0 0 6px; font-size: 19.8px; font-weight: 700; letter-spacing: -0.015em;
  color: var(--ink); line-height: 1.25;
}
.post-body p {
  margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--muted);
  text-wrap: pretty;
}
.post-arrow {
  width: 20px; height: 20px; color: var(--accent-deep); flex: 0 0 auto;
  transition: transform .2s ease;
}
.post-card:hover .post-arrow { transform: translateX(4px); }
.post-empty {
  margin: 0; padding: 40px 26px; text-align: center;
  background: var(--accent-tint); border: 1px dashed var(--accent-line);
  border-radius: 16px; color: var(--muted); font-size: 16.5px;
}

@media (max-width: 620px) {
  .post-card { grid-template-columns: 1fr auto; gap: 6px 18px; }
  .post-date { grid-column: 1; grid-row: 1; }
  .post-body { grid-column: 1; grid-row: 2; }
  .post-arrow { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- LEGAL / PROSE ---------- */
.legal { max-width: 760px; padding-bottom: clamp(40px, 6vw, 80px); }
.legal h2 {
  margin: clamp(28px, 3.5vw, 40px) 0 12px; font-size: clamp(22px, 2.2vw, 28.6px);
  font-weight: 700; letter-spacing: -0.015em; color: var(--ink);
}
.legal h2:first-of-type { margin-top: 0; }
.legal h3 {
  margin: 22px 0 8px; font-size: 17.6px; font-weight: 700; color: var(--ink);
}
.legal p, .legal li {
  font-size: 17.05px; line-height: 1.7; color: var(--muted); margin: 0 0 14px;
  text-wrap: pretty;
}
.legal a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal .placeholder {
  margin: 8px 0 20px; padding: 16px 18px; border-radius: 12px;
  background: var(--accent-tint); border: 1px solid var(--accent-line);
  font-family: var(--mono); font-size: 14.3px; line-height: 1.6; color: var(--accent-deep);
}
.legal address { font-style: normal; color: var(--ink); line-height: 1.7; font-size: 17.05px; }

.section-head { margin-bottom: clamp(24px, 3vw, 36px); max-width: 60ch; }
.section-head .eyebrow {
  font-family: var(--mono); font-size: 12.65px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 12px;
}
.section-head h2 {
  margin: 0 0 10px; font-size: clamp(26.4px, 2.86vw, 37.4px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.12; color: var(--ink);
}
.section-head p { margin: 0; color: var(--muted); font-size: 17.6px; line-height: 1.6; }

/* ---------- SERVICE GRID (horizontal slider, all viewports) ---------- */
.svc-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* bleed to the section edges; restore inset via scroll-padding */
  margin-left: calc(-1 * var(--pad));
  margin-right: calc(-1 * var(--pad));
  padding: 4px var(--pad) 16px;
  scroll-padding-left: var(--pad);
  /* fade out at the horizontal edges instead of an abrupt cut */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--pad), #000 calc(100% - var(--pad)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--pad), #000 calc(100% - var(--pad)), transparent 100%);
}
.svc-grid::-webkit-scrollbar { display: none; }
.svc-card {
  flex: 0 0 clamp(282px, 31%, 332px);
  scroll-snap-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 26px 28px; transition: border-color .2s ease, box-shadow .2s ease;
}
.svc-card:hover {
  border-color: var(--accent-line);
  box-shadow: 0 14px 36px -22px oklch(0.40 0.03 250 / 0.4);
}
.svc-card h3 {
  display: flex; align-items: center; gap: 11px;
  font-size: 17.6px; font-weight: 700; color: var(--ink); margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.svc-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.svc-card li {
  position: relative; padding-left: 20px;
  font-size: 15.95px; color: oklch(0.40 0.012 250); line-height: 1.45;
}
.svc-card li::before {
  content: ""; position: absolute; left: 2px; top: 7px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0.55;
}
.svc-card li.li-intro { padding-left: 0; }
.svc-card li.li-intro::before { content: none; }

/* dot used in heads & hero */
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: var(--accent); }
.dot--cool { background: var(--cool); }
.dot--warm { background: var(--warm); }

/* ---------- INFO / HOURS / CONTACT ---------- */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px; align-items: start;
}
.info-card {
  background: var(--accent-tint); border: 1px solid var(--accent-line);
  border-radius: 16px; padding: 26px 28px;
}
.info-card h3 {
  font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.info-card h3 .ico { width: 17px; height: 17px; color: var(--accent-deep); flex: 0 0 auto; }

.hours-row {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 9px 0; border-bottom: 1px solid var(--accent-line);
}
.hours-row:last-child { border-bottom: none; padding-bottom: 0; }
.hours-row .day { color: var(--ink); font-weight: 600; font-size: 15.4px; white-space: nowrap; }
.hours-row .time { color: var(--muted); font-size: 15.4px; text-align: right; white-space: nowrap; }
.hours-row .time-note {
  display: block; margin-top: 0; white-space: nowrap;
  font-size: 15.4px; color: var(--muted); font-weight: 400; line-height: 1.4;
}
.hours-row .time-sep {
  display: block; height: 1px; width: 72px; margin: 7px 0 7px auto;
  background: var(--accent-line);
}
.hours-note { margin: 14px 0 0; font-size: 14.3px; color: var(--muted); line-height: 1.5; }

.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-list .row { display: flex; gap: 14px; align-items: baseline; }
.contact-list .label {
  font-family: var(--mono); font-size: 11.55px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint); min-width: 54px; flex: 0 0 auto;
}
.contact-list .val { font-size: 17.05px; color: var(--ink); font-weight: 500; }
.contact-list a { color: var(--accent-deep); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Kontakt card as a button/link */
a.info-card--cta {
  display: flex; flex-direction: column; text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
a.info-card--cta:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 40px -24px oklch(0.40 0.03 250 / 0.5);
  transform: translateY(-2px);
}
.info-card--cta .cta-text {
  margin: 0 0 20px; color: var(--muted); font-size: 15.95px; line-height: 1.55;
}
.info-card--cta .cta-btn {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent-deep); color: #fff;
  font-weight: 600; font-size: 15.95px;
  padding: 12px 22px; border-radius: 999px; white-space: nowrap;
  transition: gap .2s ease;
}
a.info-card--cta:hover .cta-btn { gap: 13px; }
.info-card--cta .cta-btn svg { width: 16px; height: 16px; }

/* Rezept callout */
.callout {
  margin-top: 20px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 24px;
}
.callout .tag {
  display: inline-block; font-family: var(--mono); font-size: 11.55px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-deep);
  margin: 0 0 10px;
}
.callout p { margin: 0 0 8px; font-size: 16.5px; color: var(--ink); line-height: 1.55; }
.callout p:last-child { margin-bottom: 0; }
.callout .big { font-size: 24.2px; font-weight: 700; letter-spacing: -0.01em; }
.callout .hint { font-size: 14.3px; color: var(--muted); }
.callout a { color: var(--accent-deep); }

/* Visit / address */
.visit {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px; background: linear-gradient(135deg, var(--accent-deep), var(--accent-grad)); color: #fff;
  border-radius: 20px; padding: clamp(28px, 3.5vw, 44px) clamp(28px, 4vw, 48px);
}
.visit .v-text h2 { margin: 0 0 8px; font-size: clamp(24.2px, 2.64vw, 33px); font-weight: 700; letter-spacing: -0.02em; }
.visit .v-text p { margin: 0; color: oklch(0.90 0.03 248); font-size: 17.6px; }
.visit .v-addr { font-size: clamp(19.8px, 2.2vw, 24.2px); font-weight: 600; }
.visit a.maps {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: var(--accent-deep); font-weight: 600; font-size: 16.5px;
  padding: 13px 22px; border-radius: 999px; white-space: nowrap;
  transition: transform .2s ease;
}
.visit a.maps:hover { transform: translateY(-2px); }
.visit a.maps svg { width: 17px; height: 17px; }

/* active nav state */
.dropdown-panel a[aria-current="page"] { background: var(--cool-tint); color: var(--ink); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .sub-hero { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo { order: -1; aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .visit { flex-direction: column; align-items: flex-start; }
  .svc-card { flex: 0 0 81%; }
}
