/* Praxis-Template – Gemeinschaftspraxis Lehmair/Celik Obernburg
   Schlicht, schnell, ohne Fremdschriften und ohne externe Anfragen. */

:root {
  --pink: #d4097a;            /* Logo-Pink (Flächen, Linien) */
  --pink-text: #b30866;       /* Pink für Text auf Weiß (Kontrast > 6:1) */
  --taupe: #c4ad8a;           /* Logo-Beige (Flächen, Linien) */
  --taupe-dark: #6f5d41;      /* Beige-Braun für Text auf Weiß (Kontrast > 6:1) */
  --ink: #2f2a26;
  --muted: #6b635b;
  --bg: #ffffff;
  --card: #f8f4ee;
  --line: #e7dfd3;
  --radius: 8px;
  --maxw: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;       /* 17 px */
  line-height: 1.65;
}

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 1rem; }

img { max-width: 100%; height: auto; }

a { color: var(--pink-text); text-underline-offset: 0.15em; }
a:hover, a:focus-visible { color: var(--pink); }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Kopf ---------- */
.site-header { background: var(--bg); }

.brand { display: block; position: relative; text-decoration: none; color: inherit; padding-top: .75rem; }
.brand-art { display: block; width: 100%; height: auto; }

.brand-text {
  position: absolute; left: 15.5%; right: 1%; bottom: 17%;
  display: flex; flex-direction: column; gap: .2em;
}
.brand-title {
  font-size: clamp(1.1rem, 3.6vw, 2.3rem); font-weight: 600; letter-spacing: .02em;
  line-height: 1.15; color: var(--taupe-dark);
}
.brand-sub {
  font-size: clamp(.72rem, 1.7vw, 1.1rem); color: var(--pink-text); line-height: 1.3;
}

@media (max-width: 560px) {
  .brand-text { position: static; padding: .35rem 0 .25rem; }
  .brand-title { font-size: 1.3rem; }
  .brand-sub { font-size: .85rem; }
}

/* ---------- Navigation ---------- */
.site-nav { border-bottom: 1px solid var(--line); }
.nav-list ul {
  display: flex; flex-wrap: wrap; gap: 0 1.5rem; list-style: none; margin: 0; padding: 0;
}
.nav-list a {
  display: block; padding: .7rem .1rem .55rem; text-decoration: none;
  color: var(--taupe-dark); font-weight: 600; border-bottom: 3px solid transparent;
}
.nav-list a:hover, .nav-list a:focus-visible { color: var(--pink-text); border-bottom-color: var(--taupe); }
.nav-list li.active > a, .nav-list a[aria-current="page"] { color: var(--pink-text); border-bottom-color: var(--pink); }

.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem; margin: .5rem 0;
    padding: .5rem .9rem; font: inherit; font-weight: 600; color: var(--taupe-dark);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 1.2rem; height: 2px; background: currentColor; content: ""; position: relative;
  }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after  { position: absolute; top: 6px; }
  .js .nav-list { display: none; }
  .js .nav-list.is-open { display: block; padding-bottom: .5rem; }
  .nav-list ul { flex-direction: column; gap: 0; }
  .nav-list a { padding: .65rem .25rem; border-bottom: 1px solid var(--line); }
  .nav-list li.active > a { border-bottom-color: var(--pink); }
}

/* ---------- Seitenraster ---------- */
.site-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 1.75rem 3rem;
}
.has-sidebar .site-grid { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; }
@media (max-width: 900px) {
  .has-sidebar .site-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Inhalt ---------- */
main h1, main h2, main h3 { line-height: 1.25; margin: 1.6em 0 .5em; }
main h1 { font-size: clamp(1.5rem, 3.2vw, 2rem); color: var(--pink-text); margin-top: 0; font-weight: 600; }
main h2 { font-size: 1.4rem; color: var(--pink-text); font-weight: 600; }
main h3 { font-size: 1.15rem; color: var(--taupe-dark); font-weight: 650; }
main .page-header h1 { margin-bottom: .75rem; }
main p { margin: 0 0 1em; }
main ul, main ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
main li { margin: .25em 0; }
main li::marker { color: var(--pink); }
main strong { font-weight: 650; }

.lead {
  background: var(--card); border-left: 4px solid var(--pink); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem; margin: 0 0 1.5rem;
}
.lead h2 { margin: 0 0 .35em; font-size: 1.3rem; }
.lead p:last-child { margin-bottom: 0; }

.lead > :first-child, .notice > :first-child { margin-top: 0; }

.notice {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1.2rem; margin: 0 0 1.5rem;
}
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }

.emergency {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem;
}
.emergency > div {
  border: 1px solid var(--line); border-top: 4px solid var(--pink); border-radius: var(--radius);
  padding: .8rem 1.1rem; background: #fff;
}
.emergency .label { display: block; color: var(--muted); font-size: .95rem; }
.emergency .number { display: block; font-size: 1.7rem; font-weight: 650; color: var(--pink-text); letter-spacing: .02em; }
.emergency .number a { color: inherit; text-decoration: none; }

.team-photo { margin: 0 0 1.5rem; }
.team-photo img { display: block; width: 100%; max-width: 700px; border-radius: var(--radius); }
.team-photo figcaption { color: var(--muted); font-size: .9rem; margin-top: .35rem; }

/* Zeitgesteuerter Hinweis „Praxis geschlossen“ (Modul in Position main-top) */
.closure-notice {
  background: #fff3f9; border: 2px solid var(--pink); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin: 0 0 1.75rem;
}
.closure-notice h2 { margin: 0 0 .4em; font-size: 1.35rem; color: var(--pink-text); }
.closure-notice p { margin: 0 0 .6em; }
.closure-notice ul { margin: 0 0 .8em; padding-left: 1.3rem; }
.closure-notice > :last-child { margin-bottom: 0; }

/* Tabellen */
main table { border-collapse: collapse; width: auto; max-width: 100%; margin: 0 0 1.25rem; }
main th, main td { text-align: left; vertical-align: top; padding: .5rem 1.1rem .5rem 0; border-bottom: 1px solid var(--line); }
main thead th { color: var(--taupe-dark); font-weight: 650; }
.table-scroll { overflow-x: auto; }

/* Team */
.team-doctors { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; margin: 1rem 0 2rem; }
.team-staff   { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 1.5rem 1.25rem; margin: 0 0 1rem; }
.person { margin: 0; text-align: center; }
.person img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--taupe); }
.team-doctors .person img { max-width: 15rem; margin-inline: auto; box-shadow: 0 0 0 3px var(--pink); }
.team-staff .person img { max-width: 9.5rem; margin-inline: auto; }
.person h3 { margin: .8rem 0 .15rem; font-size: 1.1rem; color: var(--ink); }
.person p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.person .badge { display: inline-block; margin-top: .4rem; font-size: .8rem; font-weight: 650; color: var(--pink-text); }

/* Sidebar */
.sidebar-card {
  background: var(--card); border-top: 4px solid var(--pink); border-radius: 0 0 var(--radius) var(--radius);
  padding: 1rem 1.25rem 1.1rem;
}
.sidebar-card h2 { font-size: 1.2rem; color: var(--pink-text); margin: 0 0 .6rem; font-weight: 600; }
.sidebar-card table { width: 100%; margin: 0 0 .9rem; border-collapse: collapse; }
.sidebar-card th, .sidebar-card td { padding: .35rem .5rem .35rem 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.sidebar-card th { width: 3.2rem; color: var(--taupe-dark); font-weight: 650; }
.sidebar-card p { margin: 0 0 .3em; }
.sidebar-card .phone { font-size: 1.25rem; font-weight: 650; }
.sidebar-card .phone a { color: var(--pink-text); text-decoration: none; }

/* Auf der Sprechzeiten-Seite steht die Karte auf dem Handy vor dem Text */
@media (max-width: 900px) {
  .page-sprechzeiten .container-sidebar { order: -1; }
}

/* ---------- Fuß ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: .92rem; padding-block: 1.1rem 1.5rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--taupe-dark); }
.site-footer p { margin: .4rem 0 0; }
.footer-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; align-items: baseline; }
.to-top { text-align: right; }

/* ---------- Offline / Fehler ---------- */
.offline-box, .error-box { text-align: center; padding-block: 4rem; }
.button {
  display: inline-block; padding: .6rem 1.2rem; background: var(--pink-text); color: #fff; border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
}
.button:hover { background: var(--pink); color: #fff; }
.error-code { color: var(--muted); font-size: .9rem; }

/* ---------- System-Meldungen ---------- */
joomla-alert, .alert { display: block; margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }

/* ---------- Druck ---------- */
@media print {
  .site-nav, .nav-toggle, .skip-link, .to-top, .site-footer ul { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .brand-text { bottom: 10%; }
  .has-sidebar .site-grid { grid-template-columns: 1fr; }
}

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

/* Rezept-/Überweisungsformulare */
.rx-intro { margin-bottom: 1.75rem; }
.rx-hint { background:#fff3f9; border-left:4px solid var(--pink); padding:.75rem 1rem; border-radius:var(--radius); }
.rx-form fieldset { border:1px solid #e3d9c8; border-radius:var(--radius); padding:1rem 1.25rem 1.25rem; margin:0 0 1.5rem; min-width:0; }
.rx-form legend { font-weight:700; color:var(--taupe-dark); padding:0 .5rem; }
.rx-field { margin:0 0 1rem; }
.rx-field > label, .rx-label { display:block; font-weight:600; margin-bottom:.3rem; }
.rx-field > .rx-inline, .rx-inline { display:inline-block; font-weight:400; margin-right:1.25rem; }
.rx-form input[type=text], .rx-form input[type=tel], .rx-form input[type=email], .rx-form input[type=date], .rx-form select {
  width:100%; max-width:34rem; padding:.6rem .75rem; font:inherit; border:1px solid #b9a98a; border-radius:6px; background:#fff; box-sizing:border-box; }
.rx-form input:focus, .rx-form select:focus { outline:3px solid var(--pink); outline-offset:1px; }
.rx-form small, .rx-note { display:block; color:#5c5240; font-size:.9rem; margin-top:.25rem; }
.rx-check { display:flex; gap:.6rem; align-items:flex-start; margin:0 0 .9rem; }
.rx-check input { margin-top:.35rem; flex:none; width:1.1rem; height:1.1rem; }
.rx-hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.rx-submit { background:var(--pink-text); color:#fff; border:0; border-radius:6px; padding:.8rem 1.6rem; font:inherit; font-weight:700; cursor:pointer; }
.rx-submit:hover, .rx-submit:focus { background:var(--pink); }
.rx-thanks h2 { color:var(--pink-text); }
