/* ==========================================================================
   Arztpraxis Uwe Schnurr – Stylesheet
   ========================================================================== */

@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 200; font-display: swap; src: url("../fonts/source-sans-pro-200.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/source-sans-pro-300.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-pro-400.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-pro-600.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/source-sans-pro-700.woff2") format("woff2"); }
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/montserrat-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2");
}

:root {
  --accent: #3bafbf;
  --accent-dark: #2f97a6;
  --navy: #333c4e;
  --text: #7e8890;
  --heading: #333c4e;
  --grey-bg: #f7f7f7;
  --line: #e5e5e5;
  --font-body: "Source Sans Pro", Arial, Helvetica, sans-serif;
  --font-nav: "Montserrat", Arial, Helvetica, sans-serif;
  --font-button: "Inter", Arial, Helvetica, sans-serif;
  --header-h: 115px;
  --container: 1170px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 300;
  line-height: 2.25;
  color: var(--text);
  background: #fff;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { margin: 0; font-weight: 400; color: var(--heading); }

p { margin: 0 0 20px; }

ul { margin: 0; padding-left: 1.2em; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 60px);
  margin-inline: auto;
  padding-inline: 30px;
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 10px 20px;
  background: #fff;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 13px 29px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-button);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition: background-color 0.2s;
}
.button:hover, .button:focus-visible { background: var(--accent-dark); color: #fff; }
.button--small { padding: 11px 23px; font-size: 13px; }
.button--block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: none;
  padding-inline: 60px;
}

/* Startseite: Header liegt transparent über dem Titelbild und wird beim Scrollen dunkel */
@media (min-width: 961px) {
  .home .site-header {
    position: fixed;
    left: 0;
    right: 0;
    background: transparent;
    box-shadow: none;
    transition: background-color 0.3s, box-shadow 0.3s;
  }
  .home .site-header.is-scrolled {
    background: var(--navy);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  }
  .home .hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 60px;
  }
}

.logo img { width: 80px; height: 80px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 42px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  font-family: var(--font-nav);
  font-size: 14px;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
  transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--accent); }
.main-nav a.button { color: #fff; letter-spacing: 0.015em; }

.nav-toggle {
  display: none;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Sections ---------- */
.section { padding: 60px 0 40px; text-align: center; }
.section--grey { background: var(--grey-bg); }

.section-icon { margin: 0 auto 10px; width: auto; max-width: 80px; height: auto; }

.section-title {
  font-size: 46px;
  font-weight: 200;
  line-height: 1.25;
}

.separator {
  width: 280px;
  max-width: 60%;
  height: 0;
  margin: 15px auto 30px;
  border: 0;
  border-top: 2px solid #e0dede;
}

.lead {
  max-width: 765px;
  margin: 0 auto 30px;
  font-size: 22px;
  font-weight: 300;
  line-height: 2.2;
  letter-spacing: 1px;
  color: var(--heading);
}
.lead--wide { max-width: 1000px; }
.welcome-lead { margin-top: 20px; }

.text { max-width: 765px; margin-inline: auto; }
.text--wide { max-width: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    #555 url("../img/hero.jpg") center / cover no-repeat;
  color: #fff;
  padding: 70px 0 90px;
}

.hero .container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
  align-items: start;
  max-width: 1290px;
}

.hero h1 {
  margin-bottom: 35px;
  font-size: 80px;
  font-weight: 300;
  line-height: 1;
  color: #fff;
}

.hero-sub {
  margin: 0 0 13px;
  font-size: 26px;
  line-height: 36px;
}

.hero .button { margin-top: 20px; }

/* Mobil/Tablet: Foto bleibt beim Scrollen stehen (sticky), bis die Unterkante
   des Heros erreicht ist - dann liegt die Sprechzeiten-Box ganz im Foto. */
.hero-bg { display: none; }

@media (max-width: 1024px) {
  .hero {
    position: relative;
    isolation: isolate;
    background: var(--navy);
  }
  .hero-bg {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
  }
  .hero-bg::before {
    content: "";
    position: sticky;
    top: var(--hero-stick-top, 0px);
    display: block;
    height: calc(100vh - var(--hero-stick-top, 0px));
    height: calc(100svh - var(--hero-stick-top, 0px));
    max-height: 100%;
    background:
      linear-gradient(#333c4e77, #333c4e77),
      url("../img/hero.jpg") 28% top / cover no-repeat;
  }
}

@media (max-width: 960px) {
  .hero { --hero-stick-top: var(--header-h); }
}

.hours-box {
  padding: 36px 28px;
  background: rgba(59, 175, 191, 0.45);
  color: #fff;
  text-align: center;
}

.hours-box h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 4px solid var(--accent);
  margin-bottom: 15px;
  font-size: 22px;
  line-height: 1.6;
  color: #fff;
}

.hours-box .phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 22px;
  color: #fff;
}

.hours {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.hours th, .hours td {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  vertical-align: middle;
  font-weight: 400;
}
.hours td { text-align: right; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

.hours-box .hours th, .hours-box .hours td { color: #fff; font-size: 16px; line-height: 2.25; }

/* ---------- Leistungen ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 30px;
  text-align: center;
}

.service {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.service img { margin: 0 auto 20px; width: 85px; height: 85px; }

.service h3 {
  min-height: 60px;
  font-size: 24px;
  font-weight: 200;
  line-height: 1.25;
  color: #333;
  text-transform: uppercase;
}

.toggle summary {
  display: inline-block;
  margin: 10px 0 0;
  padding: 9px 30px;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-button);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 32px;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.2s;
}
.toggle summary::-webkit-details-marker { display: none; }
.toggle summary:hover { background: var(--accent-dark); }
.toggle summary .when-open { display: none; }
.toggle[open] summary .when-open { display: inline; }
.toggle[open] summary .when-closed { display: none; }

.toggle ul {
  margin-top: 20px;
  text-align: left;
  font-size: 16px;
  line-height: 1.7;
}
.toggle li { margin-bottom: 8px; }

/* ---------- Team ---------- */
.team-lead {
  margin: 20px auto 60px;
}

.person { margin: 0; color: var(--heading); }
.person img { margin: 0 auto 30px; width: 200px; height: 300px; object-fit: cover; }
.person-name {
  display: block;
  font-size: 18px;
  letter-spacing: 1px;
  line-height: 2;
  text-transform: uppercase;
}
.person-role { display: block; font-size: 16px; line-height: 2; letter-spacing: 0.5px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 46px;
  margin-top: 60px;
}

.team-grid .person {
  padding: 40px 30px 30px;
  background: #f5f5f5;
  border-bottom: 6px solid rgba(59, 175, 191, 0.49);
  text-align: left;
}

/* ---------- Galerie ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 30px 0 20px;
  padding: 0;
  list-style: none;
}

.gallery a {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--accent);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.4s;
}

.gallery span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  color: #fff;
  font-size: 25px;
  font-weight: 300;
  line-height: 1.3;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.gallery a:hover img, .gallery a:focus-visible img { opacity: 0.55; transform: scale(1.04); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }

.lightbox figure { margin: 0; text-align: center; }
.lightbox img {
  max-width: min(90vw, 1000px);
  max-height: 80vh;
  width: auto;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
.lightbox figcaption { margin-top: 10px; font-size: 18px; text-transform: uppercase; letter-spacing: 1px; }

.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.lightbox button:hover { background: var(--accent); }
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; translate: 0 -50%; }
.lightbox .lb-next { right: 20px; top: 50%; translate: 0 -50%; }

/* ---------- Anfahrt ---------- */
.map {
  position: relative;
  display: block;
  height: 360px;
  margin: 30px 0 20px;
  /* Bild in Originalgröße (nicht skaliert), damit die Beschriftung scharf bleibt */
  background: #b4d6da url("../img/karte.jpg") center / auto no-repeat;
}

.map-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: auto;
  translate: -50% -100%;
  transition: translate 0.2s;
}
.map:hover .map-marker { translate: -50% -108%; }

.map-attribution {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.75);
  color: #333;
  font-size: 11px;
  line-height: 1.6;
}

.section--route { padding-bottom: 60px; }
.section--route .map, .section--route .button { max-width: 765px; margin-inline: auto; }

/* ---------- Termin ---------- */
.appointment {
  padding: 57px 0 8px;
  background: var(--navy) url("../img/termin.jpg") center / cover no-repeat fixed;
  text-align: center;
}

.appointment-box {
  max-width: 750px;
  margin: 0 auto;
  padding: 40px 30px 50px;
  background: rgba(59, 175, 191, 0.2);
  color: #fff;
}
.appointment-box h2 { color: #fff; }
.appointment-box .separator { border-color: rgba(255, 255, 255, 0.8); }
.appointment-box p { color: #fff; font-size: 16px; }
.appointment-box .phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  font-size: 22px;
  color: #fff;
}
.appointment-box .button { margin-top: 15px; }

.link-button {
  display: block;
  margin: 15px auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  text-transform: uppercase;
  cursor: pointer;
}
.link-button:hover { color: var(--accent); }

/* ---------- Modal ---------- */
.modal {
  width: min(92vw, 420px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  color: var(--text);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.6); }

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.modal h2 { font-size: 22px; }
.modal .modal-body { padding: 10px 20px 20px; }
.modal .modal-close {
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}
.modal .hours th, .modal .hours td { padding: 8px 10px; border-color: var(--line); color: var(--text); line-height: 1.6; }
.modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
}
.button--light { background: #eee; color: #555; }
.button--light:hover { background: #ddd; color: #333; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 80px 0 60px;
  background: #fff;
  color: #666;
  font-size: 16px;
}

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

.site-footer h2 {
  margin-bottom: 28px;
  font-family: var(--font-nav);
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
}
.site-footer h2::after {
  content: "";
  display: block;
  width: 30px;
  margin-top: 18px;
  border-top: 2px solid var(--accent);
}

.contact-list { margin: 0 0 20px; padding: 0; list-style: none; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  line-height: 2.2;
}
.contact-list .icon { color: var(--accent); width: 16px; height: 16px; }
.contact-list .spacer { display: inline-block; width: 16px; }
.contact-list a { color: inherit; }
.contact-list a:hover { color: var(--accent); }

.site-footer .hours th, .site-footer .hours td {
  padding: 4px 10px;
  border-bottom: 1px solid var(--line);
  color: #666;
  font-size: 15px;
  line-height: 2.4;
}
.site-footer .hours td { text-align: left; }
.site-footer .hours tr:last-child th, .site-footer .hours tr:last-child td { border-bottom: 1px solid var(--line); }

.footer-toggle summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 0;
  font-family: var(--font-button);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #333;
  cursor: pointer;
  list-style: none;
}
.footer-toggle summary::-webkit-details-marker { display: none; }
.footer-toggle summary .icon { color: var(--accent); width: 18px; height: 18px; transition: rotate 0.2s; }
.footer-toggle[open] summary .icon { rotate: 90deg; }
.footer-toggle summary:hover { color: var(--accent); }
.footer-toggle ul { margin: 5px 0 10px 30px; font-size: 15px; line-height: 1.8; }

.copyright {
  padding: 20px 0;
  background: var(--grey-bg);
  color: var(--text);
  font-size: 13px;
  text-align: center;
}
.copyright a { color: var(--text); font-weight: 700; }
.copyright a:hover { color: var(--accent); }

.to-top {
  position: fixed;
  right: 25px;
  bottom: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px;
  height: 35px;
  border-radius: 4px 4px 0 0;
  background: #333;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: #fff; }

/* ---------- Rechtstexte ---------- */
.legal {
  max-width: 900px;
  padding-block: 60px 80px;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: break-word;
}
.legal h1 { margin-bottom: 30px; font-size: 46px; font-weight: 200; line-height: 1.2; }
.legal h2 { margin: 40px 0 15px; font-size: 28px; font-weight: 300; line-height: 1.3; }
.legal h3 { margin: 30px 0 10px; font-size: 21px; font-weight: 400; line-height: 1.4; }
.legal h4 { margin: 20px 0 10px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.legal p, .legal ul { margin: 0 0 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .main-nav ul { gap: 24px; }
  .site-header .container { padding-inline: 30px; }
  .hero h1 { font-size: 64px; }
}

@media (max-width: 960px) {
  :root { --header-h: 90px; }

  .logo img { width: 50px; height: 50px; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0 20px; }
  .main-nav li a:not(.button) { display: block; padding: 10px 30px; line-height: 1.6; }
  .main-nav li a.button { margin: 10px 30px 0; }

  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 54px; }

  .services { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; gap: 30px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }

  .appointment { background-attachment: scroll; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding-inline: 20px; }
  .site-header .container { padding-inline: 20px; }

  .hero { padding-top: 50px; }
  .hero h1 { font-size: 44px; }
  .hero-sub { font-size: 22px; line-height: 1.4; }
  .hours-box { padding: 30px 15px; }
  .hours th, .hours td { padding: 8px 10px; }

  .section-title { font-size: 36px; }
  .lead { font-size: 18px; line-height: 2; letter-spacing: 0.5px; }

  .services { grid-template-columns: 1fr; }
  .service h3 { min-height: 0; margin-bottom: 5px; }

  .gallery span { font-size: 16px; }

  .appointment-box { padding-inline: 20px; }
  .appointment-box .phone, .hours-box .phone { font-size: 19px; }

  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 20px; translate: none; }
  .legal h1 { font-size: 34px; }
}

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