:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #1e6fd9;
    --primary-hover: #155fc3;
    --accent: #0b3b77;

    --radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.05);

    --max: 1100px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

html{
    scroll-padding-top: 96px;
}

/* Header */
header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;

    background: linear-gradient(180deg, #0b3b77, #1457b6);
    color: #ffffff;
    padding: 18px 0;
    box-shadow: 0 10px 28px rgba(0,0,0,0.10);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

header p {
    margin: 6px 0 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
}

nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #ffffff, #eef3fb);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.hero h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.hero p {
    margin: 0;
    color: var(--muted);
    max-width: 700px;
}

/* Sections */
section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

h2 {
    margin: 0 0 14px 0;
    font-size: 19px;
}

h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.muted {
    color: var(--muted);
}

/* Grid helpers */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Form */
form {
    margin-top: 10px;
}

label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(30, 111, 217, 0.6);
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 111, 217, 0.12);
}

button,
input[type="submit"] {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 13px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
}

button:hover,
input[type="submit"]:hover {
    background-color: var(--primary-hover);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--muted);
    font-size: 13px;
}
/* Impressum + Datenschutz: dezenter links ausgerichtet */
body.legal footer{
    text-align: left;
}

body.legal footer .container{
    justify-content: flex-start;
}

body.legal footer .link-pill{
    margin-left: 0;
}

/* Impressum/Datenschutz: Footer dezenter links, wenn Seite .wrap verwendet */
.wrap footer{
    text-align: left;
}
.wrap footer .container{
    justify-content: flex-start;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-top: 10px;
    }
}

/* Arztbild – vollständig sichtbar + passend zu Theme */
.doctor-photo{
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #ffffff, #eef3fb);
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.doctor-image{
    width: 100%;
    max-width: 520px;         /* verhindert „riesig“ auf großen Screens */
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: contain;      /* kein Cropping */
    filter: saturate(1.02) contrast(1.03);
}


/* Arzt-Bereich: Bild links, Text rechts (stabil mit grid-areas) */
.doctor-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr;
    grid-template-areas: "photo text";
    gap: 32px;
    align-items: start;
}

/* Text-Card rechts */
.doctor-grid .card:first-child {
    grid-area: text;
}

/* Bild-Card links */
.doctor-grid .card:last-child {
    grid-area: photo;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-top: 10px;
    }

    /* Arztbereich auf Mobile untereinander (Text zuerst, dann Bild) */
    .doctor-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "photo";
        gap: 18px;
    }
}


/* --- UI Upgrade (additiv) ---------------------------------------------- */

/* Better links */
a { color: var(--primary); }
a:hover { text-decoration: underline; }

/* Hero actions */
.hero-actions {
    display:flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    text-decoration:none;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: rgba(30, 111, 217, 0.35);
}
.btn-primary:hover { background: var(--primary-hover); text-decoration:none; }
.btn-ghost {
    background: #fff;
    color: var(--text);
}
.btn-ghost:hover { background: rgba(11, 59, 119, 0.04); text-decoration:none; }

/* Quick cards */
.quick-grid {
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.quick {
    display:flex;
    gap: 12px;
    align-items: stretch;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.quick .qi {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(30, 111, 217, 0.10);
    display:flex;
    align-items:center;
    justify-content:center;
    flex: 0 0 auto;
}
.quick .qt { font-weight: 900; margin: 0; }
.quick .qd { margin: 4px 0 0 0; color: var(--muted); font-size: 13px; }
/* Quick-Kacheln: rechter Inhalt als Column, Button unten bündig */
.quick > div:last-child{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
}
/* sorgt für gleichmäßige Unterkante in allen Quick-Kacheln */
.quick > div:last-child{
    min-height: 92px; /* gleiche Basis-Höhe für Text+Button */
}

.quick > div:last-child .link-pill{
    margin-top: auto;        /* immer nach unten */
    align-self: flex-start;  /* wirkt seriöser als zentriert */
}

/* Links als dezente Buttons (seriös, keine Pills) */
.link-pill{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 12px;
    margin-top: 10px;

    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: transparent;

    color: rgba(0, 0, 0, 0.78);
    text-decoration: none;

    font-weight: 600;
    font-size: 13px;
    line-height: 1;

    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
/* gleiche Breite in Quick-Kacheln */
.quick .link-pill{
    min-width: 110px;
    justify-content: center;
}

.link-pill:hover{
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.22);
    color: rgba(0, 0, 0, 0.86);
    text-decoration: none;
}

.link-pill:active{
    background: rgba(0, 0, 0, 0.06);
}

/* Doctor image */
.doctor-image{
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 12px;
}

/* Header mobile nav */
.nav-toggle {
    display:none;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 900;
}
.nav-cta {
    background: #ffffff;
    color: #1457b6 !important;
    font-weight: 900;
}
nav.is-open { display:flex; }

/* Mobile sticky action bar */
.mobile-bar {
    display:none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 999;
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 18px;
    padding: 10px;
    backdrop-filter: blur(10px);
}
.mobile-bar .mb-grid {
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.mobile-bar a { text-decoration:none; }
.mobile-bar .mb-btn {
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 10px;
    padding: 12px 10px;
    border-radius: 14px;
    font-weight: 900;
    border: 1px solid var(--border);
    background:#fff;
    color: var(--text);
}
.mobile-bar .mb-btn.primary {
    background: var(--primary);
    border-color: rgba(30, 111, 217, 0.35);
    color:#fff;
}
/* Kontakt: Map + Buttons */
.contact-actions{
    display:flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 14px 0;
}
.contact-actions .btn{
    width: auto;          /* btn soll nicht 100% breit sein */
    padding: 10px 12px;
    border-radius: 12px;
}

.map-embed{
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.map-embed iframe{
    width: 100%;
    height: 320px;
    border: 0;
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    header .container { align-items: flex-start; }
    nav { display:none; width: 100%; padding-top: 10px; }
    .nav-toggle { display:inline-flex; }
    header .container { flex-wrap: wrap; }
    .quick-grid { grid-template-columns: 1fr 1fr; }
    .mobile-bar { display:block; }
    main { padding-bottom: 96px; } /* Platz für Sticky-Bar */
}
@media (max-width: 480px) {
    .quick-grid { grid-template-columns: 1fr; }
    .hero { padding: 22px; }
    header h1 { font-size: 20px; }
}

/* Impressum & Datenschutz dezenter linksbündig */
.impressum,
.datenschutz {
    text-align: left;
}
/* Legal-Seiten: linksbündiger Footer */
.legal footer{
    text-align: left;
}
.legal footer .container{
    justify-content: flex-start;
}
/* Legal-Seiten: weiter links statt zentriert */
body.legal .wrap{
    max-width: var(--max);     /* exakt wie Hauptlayout */
    margin: 0 auto;            /* sauber zentriert */
    padding: 0 20px;           /* identisch zu .container */
}

body.legal .wrap h2{
    margin-top: 18px;
}

body.legal{
    display: block;
}

body.legal .container{
    max-width: 1100px;         /* bleibt wie Hauptlayout */
}
/* Booking: Inaktive Tage (Wochenende oder keine Slots) */
.week-day.inactive{
    background: #f1f3f5;
    color: #9aa1a9;
    border-color: #e3e6ea;
    pointer-events: none;
    opacity: 0.8;
}

/* Optional: Wochenende leicht anders */
.week-day.inactive .weekday{
    color: #9aa1a9;
}
/* --- Additiv: Burger Icon für den vorhandenen .nav-toggle Button --- */
@media (max-width: 900px) {
  .nav-toggle {
    position: relative;
    width: 48px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;            /* Text "Menü" visuell ausblenden */
    line-height: 0;
  }

  .nav-toggle::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: 14px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 8px 0 #fff, 0 16px 0 #fff; /* 3 Linien */
  }
}

/* --- Additiv: Arztbild auf Mobile vor den Text setzen (zwischen H2 und Name) --- */
@media (max-width: 900px) {
  .doctor-grid {
    grid-template-areas:
      "photo"
      "text";
  }
}
/* --- Additiv: Mobile Navigation sichtbar/lesbar machen --- */
@media (max-width: 900px) {
  /* nav im offenen Zustand als Spalte */
  #site-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 10px;

    /* Optional: damit es wie ein Menü-Panel aussieht */
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 12px;
  }

  /* Links im Menü als volle Zeilen */
  #site-nav.is-open a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
  }
}

/* --- Additiv: Mobile Menü als Panel sichtbar machen --- */
@media (max-width: 900px) {
  /* Wenn offen: Nav als Panel */
  #site-nav.is-open{
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 10px;

    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 12px;
  }

  #site-nav.is-open a{
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
  }
}
/* === Hervorhebung: Online-Termin === */
#online-termin{
  border: 2px solid rgba(30, 111, 217, 0.25);
  background: linear-gradient(135deg, rgba(30,111,217,0.08), #ffffff 55%);
  box-shadow: 0 14px 34px rgba(30, 111, 217, 0.12);
  position: relative;
}

#online-termin h2{
  display: flex;
  align-items: center;
  gap: 10px;
}

#online-termin h2::before{
  content: "★";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(30,111,217,0.14);
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

#online-termin .booking-accordion{
  border-color: rgba(30,111,217,0.30);
}

#online-termin .booking-accordion > summary{
  background: var(--primary);
  color: #fff;
  border-radius: 14px;
  margin: 10px;
  padding: 14px 16px;
}

#online-termin .booking-accordion > summary:after{
  opacity: 0.95;
}

#online-termin .booking-accordion .booking-body{
  background: #fff;
  border-top: 1px solid rgba(30,111,217,0.18);
}
