/*
 * Praxis PD Dr. med. Olga Geisel – Stylesheet
 * Nachbau des früheren WordPress-Themes „Go“ (Stil „welcoming“, Header 2, Footer 1).
 * Fließende Größen folgen derselben Rechnung wie im Original (Basisbreite 750 px).
 */

/* ---------- Schriften (lokal, SIL Open Font License) ---------- */
@font-face { font-family: "Karla"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/karla-normal-latin-ext.woff2") format("woff2"); 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: "Karla"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/karla-normal-latin.woff2") format("woff2"); 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; }
@font-face { font-family: "Karla"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/karla-normal-latin-ext.woff2") format("woff2"); 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: "Karla"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/karla-normal-latin.woff2") format("woff2"); 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; }
@font-face { font-family: "Karla"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/karla-italic-latin-ext.woff2") format("woff2"); 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: "Karla"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/karla-italic-latin.woff2") format("woff2"); 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; }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/work-sans-normal-latin-ext.woff2") format("woff2"); 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: "Work Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/work-sans-normal-latin.woff2") format("woff2"); 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; }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/work-sans-normal-latin-ext.woff2") format("woff2"); 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: "Work Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/work-sans-normal-latin.woff2") format("woff2"); 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; }

/* ---------- Variablen ---------- */
:root {
  --color-primary: hsl(221, 51%, 28%);
  --color-secondary: hsl(222, 97%, 12%);
  --color-background: #eee;
  --color-white: #fff;
  --color-caption: #6a6a6a; /* Original #858585, für ausreichenden Kontrast (WCAG AA) abgedunkelt */

  --font-body: "Karla", sans-serif;
  --font-heading: "Work Sans", sans-serif;

  --max-width: 42rem;
  --max-width-wide: 82rem;

  /* Typografische Skala: Basis 0,7rem unter 960 px, sonst 1rem; Faktor 1,235 */
  --ts-0: 0.7rem;
  --ts-ratio: 1.235;
  --ts-1: calc(var(--ts-0) * var(--ts-ratio));
  --ts-2: calc(var(--ts-1) * var(--ts-ratio));
  --ts-3: calc(var(--ts-2) * var(--ts-ratio));
  --ts-4: calc(var(--ts-3) * var(--ts-ratio));
  --ts-5: calc(var(--ts-4) * var(--ts-ratio));
  --ts-6: calc(var(--ts-5) * var(--ts-ratio));

  /* Abstände: 50/750, 25/750 und 120 bzw. 100/750 der Fensterbreite */
  --space: 2rem;
  --space-lg: calc(120 / 750 * 100vw);
  --pad-x: calc(50 / 750 * 100vw);
  --header-pad-y: calc(25 / 750 * 100vw);
  --nav-gap: 1.5vw;
}
@media only screen and (min-width: 782px) {
  :root { --space-lg: calc(100 / 750 * 100vw); }
}
@media only screen and (min-width: 960px) {
  :root { --ts-0: 1rem; }
}
@media only screen and (min-width: 1440px) {
  :root { --space-lg: 12rem; --pad-x: 6rem; --header-pad-y: 3rem; }
}

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

html {
  background-color: var(--color-white);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  border: 0.75rem solid var(--color-white);
  border-top: 0;
  background-color: var(--color-background);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-rendering: optimizeLegibility;
}

::selection { background-color: var(--color-primary); color: var(--color-white); }

main { display: block; }
img { border-style: none; }
figure { margin: 0; }
picture { display: block; }

a { color: var(--color-primary); background-color: transparent; text-decoration: underline; text-decoration-thickness: 1px; }
a:hover, a:active { color: var(--color-primary); }

strong, b { font-weight: 700; }

p { margin: 0 0 1.25rem; font-size: 1rem; line-height: 1.8; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  clear: both;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-style: normal;
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: normal;
  margin: 0 0 1.75rem;
}
h1 { font-size: var(--ts-6); }
h2 { font-size: var(--ts-5); }
h3 { font-size: var(--ts-4); }
h4 { font-size: var(--ts-3); }

button, input { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; overflow: visible; }

:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999rem;
  top: 0.5rem;
  z-index: 100000;
  padding: 0.75rem 1rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
}
.skip-link:focus { left: 1.25rem; color: var(--color-white); }

/* ---------- Kopfbereich ---------- */
.site-header {
  position: relative;
  z-index: 99;
  background-color: var(--color-white);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2vw var(--pad-x);
}
@media only screen and (min-width: 782px) {
  .header-inner { padding-top: var(--header-pad-y); padding-bottom: var(--header-pad-y); }
}

.search-toggle,
.nav-toggle {
  position: relative;
  display: block;
  margin: 0;
  padding: 0.75rem;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--color-primary);
  font-size: 1rem;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: lowercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.search-toggle svg,
.nav-toggle svg { width: 1.35rem; height: 1.35rem; fill: currentColor; vertical-align: baseline; }

.search-toggle { order: 1; flex: 0 0 auto; margin-left: -0.75rem; z-index: 9999; }

.nav-toggle { order: 3; margin-right: -0.75rem; z-index: 2; }
.nav-toggle .icon-close { display: none; }
.menu-open .nav-toggle .icon-open { display: none; }
.menu-open .nav-toggle .icon-close { display: inline; }

/* Mobile Navigation: Vollbild-Ebene */
.main-nav {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 70px var(--pad-x) 13px;
  background-color: var(--color-white);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.menu-open .main-nav { opacity: 1; visibility: visible; }
.menu-open { overflow: hidden; }

.main-nav ul {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto;
}
.main-nav li { position: relative; width: 100%; white-space: nowrap; }
.main-nav a {
  position: relative;
  display: block;
  padding: 4px;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.8;
  text-decoration: none;
  text-transform: lowercase;
}

@media only screen and (min-width: 960px) {
  .search-toggle { margin-right: var(--nav-gap); }
  .nav-toggle { display: none; }

  .main-nav {
    position: relative;
    top: auto; right: auto; bottom: auto; left: auto;
    order: 2;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    padding: 0 var(--nav-gap) 0 0;
    background-color: transparent;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .main-nav ul { display: block; flex: 0 1 auto; overflow: visible; }
  .main-nav li { display: inline-block; width: auto; }
  .main-nav li:not(:last-child) { margin-right: var(--nav-gap); }
  .main-nav a { display: inline-block; padding: 0; }
  .main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 100%;
    height: 0.2rem;
    background-color: var(--color-primary);
    opacity: 0;
    transform-origin: left center;
    transition: all 0.1s ease-in-out;
  }
}
@media (hover: hover) and (min-width: 960px) {
  .main-nav a:hover::after { opacity: 1; }
}

/* Suche */
.search-modal {
  position: fixed;
  top: 0; left: 0;
  z-index: 10001;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  overflow-y: auto;
}
.search-modal[hidden] { display: none; }
.search-modal-inner {
  background-color: var(--color-white);
  padding: var(--header-pad-y) var(--pad-x);
}
@media only screen and (max-width: 781px) {
  .search-modal-inner { padding-top: 1.25rem; padding-bottom: 1.25rem; }
}
.search-form { display: flex; align-items: stretch; }
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 3.5rem;
  margin: 0;
  padding: 1rem 1.35rem;
  border: 2px solid var(--color-primary);
  border-radius: 0;
  background-color: var(--color-white);
  color: var(--color-primary);
  font-size: 1.1rem;
  line-height: 1.15;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--color-caption); opacity: 1; }
.search-input:focus { outline: none; border-color: var(--color-secondary); }
.search-submit {
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 0 0 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background-color: var(--color-primary);
  color: var(--color-white);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.search-submit:hover, .search-submit:focus { background-color: var(--color-secondary); }
.search-submit svg { width: 1.3rem; height: 1.2rem; fill: currentColor; vertical-align: middle; }
.search-results { margin: 0; padding: 0; list-style: none; }
.search-results:not(:empty) { margin-top: 1rem; }
.search-results li { margin: 0; padding: 0.6rem 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.search-results a { display: block; text-decoration: none; }
.search-results a:hover .search-title, .search-results a:focus .search-title { text-decoration: underline; }
.search-title { display: block; font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.35; }
.search-snippet { display: block; color: var(--color-primary); font-size: 0.9rem; line-height: 1.6; opacity: 0.85; }
.search-results mark { background-color: rgba(35, 58, 108, 0.15); color: inherit; }
.search-empty { color: var(--color-caption); }

/* ---------- Inhalt ---------- */
.site-content { overflow: hidden; }

.entry-header {
  max-width: 70rem;
  margin: 0 auto;
  padding: calc(var(--space-lg) * 0.55) var(--pad-x) 0;
  text-align: center;
}
.entry-title { margin: 0; font-size: var(--ts-6); }

.entry-content > * {
  width: calc(100% - var(--pad-x) * 2);
  max-width: var(--max-width);
  margin: 0 auto var(--space);
}
.entry-content > :first-child { margin-top: calc(var(--space-lg) * 0.5); }
.entry-content > :last-child { margin-bottom: 0; }

.entry-content h2:not(:first-child) { margin-top: 0.83em; }
.entry-content h3:not(:first-child) { margin-top: 1em; }

.entry-content ul { margin-top: 1em; padding-left: 40px; }
.entry-content ul li { margin: 0 0 0.25rem 1rem; }

/* Impressum: Zwischenüberschriften in der Größe des Originals */
.page-impressum .entry-content h2 { font-size: var(--ts-3); }
.page-impressum .entry-content h2:not(:first-child) { margin-top: 1.33em; }

/* Spaltenlayout */
.cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  align-items: normal;
}
.col { min-width: 0; word-break: break-word; overflow-wrap: break-word; }
@media only screen and (max-width: 781px) {
  .col { flex-basis: 100% !important; }
}
@media only screen and (min-width: 782px) {
  .cols { flex-wrap: nowrap; }
  .col { flex-grow: 0; }
  .col:not(:first-child) { padding-left: 2rem; }
  .col:not(:last-child) { padding-right: 2rem; }
}

/* Startseite */
.entry-content > .cols--home {
  width: 100%;
  max-width: none;
  margin: 0 0 var(--space-lg);
}
.cols--home .col--spacer { flex-basis: 15%; }
.cols--home .col--main { flex-basis: 70%; padding: 1rem; align-self: center; }

.home-title {
  margin: 0 0 0.5em;
  font-size: var(--ts-3);
  font-weight: 700;
  text-align: center;
}
.home-address {
  margin: 0 0 2em;
  font-size: 20px;
  text-align: center;
}
.home-figure { display: table; margin: 0 auto; }
.home-figure img {
  display: block;
  width: 198px;
  max-width: 100%;
  height: 200px;
  border-radius: 9999px;
}
.home-text { margin-top: 2.5em; }
.home-text p { max-width: var(--max-width); margin: 0 auto 1em; }
.home-text p:last-child { margin-bottom: 1em; }

/* Zur Person */
.entry-content > .cols--person {
  width: calc(100% - var(--pad-x) * 2);
  max-width: var(--max-width-wide);
  margin-bottom: 0;
}
.cols--person .col--spacer { flex-basis: 15%; }
.cols--person .col--photo { flex-basis: 26.25%; padding-left: 0; padding-right: 0; }
.cols--person .col--cv { flex-basis: 37.5%; }
@media only screen and (min-width: 782px) and (max-width: 1099px) {
  /* Tablet: ohne leere Randspalten, damit der Lebenslauf lesbar bleibt */
  .cols--person .col--spacer { display: none; }
  .cols--person .col--photo { flex-basis: 38%; }
  .cols--person .col--cv { flex-basis: 62%; padding-right: 0; }
}
.person-figure img { display: block; width: 100%; height: auto; }
.person-figure figcaption {
  margin: 0.75em 0 1em;
  color: var(--color-caption);
  font-size: 0.85rem;
  line-height: 1.8;
  text-align: center;
}
.entry-content .cv { margin: 0; padding-left: 40px; }
.entry-content .cv li { margin: 0 0 0.9em 1rem; }

/* Terminvereinbarung */
.contact-box { padding: 2em 0 4em; text-align: center; }
.contact-intro { margin: 0 0 0.5em; }
.contact-mail { margin: 0; font-size: 24px; }

/* 404 */
.notfound-links { list-style: none; padding-left: 0 !important; }

/* ---------- Fußbereich ---------- */
.site-footer {
  margin-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  color: var(--color-primary);
}
.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  text-align: center;
}
.site-info { margin: 0; font-size: 90%; line-height: 1.8; }
.site-footer a { color: var(--color-primary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.privacy-link { position: relative; display: inline; margin-left: 0.85rem; padding-left: 1rem; }
.privacy-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background-color: currentColor;
  opacity: 0.25;
  transform: translateX(-50%);
}

/* ---------- Barrierearmut & Druck ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  html, body { background: #fff; border: 0; }
  .site-header, .search-modal, .skip-link { display: none !important; }
  .entry-content > * { width: 100%; max-width: none; }
  a { color: #000; }
  .site-footer { margin-top: 2rem; padding-bottom: 0; }
}
