/* ══════════════════════════════════════════
   MAIN.CSS – Gemeinsame Styles
   Kinder- und Jugendarztpraxis Dr. Scheel und Walter
══════════════════════════════════════════ */

:root {
  --cream: #fdf8f2;
  --warm-white: #fff9f4;
  --sand: #e8ddd0;
  --primary: #4797f3;
  --primary-dark: #2d7de0;
  --accent: #18aaff;
  --heading: #3bace0;
  --text: #3a2e28;
  --text-light: #7a6a60;
  --shadow: rgba(92, 61, 46, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(253, 248, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
  transition: box-shadow .3s;
}
nav.scrolled { box-shadow: 0 4px 30px var(--shadow); }

.nav-logo {
  display: flex; flex-direction: column;
  font-family: 'Cormorant Garamond', serif;
  text-decoration: none;
  line-height: 1.2;
}
.nav-logo .logo-top {
  font-size: .68rem; font-weight: 600;
  color: var(--text-light); letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-logo .logo-bottom {
  font-size: 1.15rem; font-weight: 700;
  color: var(--primary); letter-spacing: .02em;
}

.nav-links {
  display: flex; gap: 2rem; list-style: none;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.nav-links a {
  text-decoration: none; color: var(--text-light);
  font-size: .9rem; font-weight: 500;
  transition: color .3s; letter-spacing: .03em;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active { font-weight: 700; }

.nav-cta {
  background: var(--primary); color: #fff !important;
  padding: .5rem 1.3rem; border-radius: 30px;
  transition: background .3s !important;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px;
  background: none; border: none; z-index: 200;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--heading); border-radius: 2px; transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILES MENÜ ── */
.mobile-menu {
  display: none; position: fixed;
  top: 84px; left: 0; right: 0;
  background: rgba(253, 248, 242, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--sand);
  padding: 1rem 5% 1.5rem;
  flex-direction: column; gap: .2rem;
  z-index: 99; box-shadow: 0 8px 32px var(--shadow);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none; color: var(--text);
  font-size: 1rem; font-weight: 500;
  padding: .8rem .5rem;
  border-bottom: 1px solid var(--sand); transition: color .2s;
}
.mobile-menu a:hover { color: var(--primary); }
.mobile-menu .mob-cta {
  margin-top: .8rem;
  background: var(--primary); color: #fff !important;
  text-align: center; padding: .85rem;
  border-radius: 30px; font-weight: 700; border-bottom: none !important;
}
.mobile-menu .lang-row {
  display: flex; gap: .5rem; padding: .8rem .5rem;
  flex-wrap: wrap; border-bottom: none !important;
}
.mobile-menu .lang-row .mob-lang-btn {
  background: var(--cream); border: 1.5px solid var(--sand);
  border-radius: 8px; padding: .3rem .6rem; cursor: pointer;
  display: flex; align-items: center; gap: .3rem;
  font-size: .8rem; font-weight: 600; color: var(--text-light);
  transition: border-color .2s, color .2s;
}
.mobile-menu .lang-row .mob-lang-btn .flag { font-size: 1.1rem; }
.mobile-menu .lang-row .mob-lang-btn.active {
  border-color: var(--primary); color: var(--primary);
}

/* ── SPRACHAUSWAHL DROPDOWN ── */
.lang-switcher { position: relative; margin-left: .5rem; }
.lang-current {
  background: none; border: 1.5px solid var(--sand);
  border-radius: 8px; padding: .3rem .6rem;
  cursor: pointer; font-size: 1.3rem;
  display: flex; align-items: center; gap: .4rem;
  transition: border-color .2s; white-space: nowrap;
}
.lang-current:hover { border-color: var(--primary); }
.lang-current .arrow { font-size: .65rem; color: var(--text-light); transition: transform .25s; }
.lang-switcher.open .arrow { transform: rotate(180deg); }
.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--sand);
  border-radius: 12px; box-shadow: 0 12px 40px var(--shadow);
  overflow: hidden; min-width: 160px; z-index: 300;
}
.lang-switcher.open .lang-dropdown { display: block; }
.lang-option {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem 1rem; cursor: pointer; font-size: .9rem;
  color: var(--text); font-weight: 500;
  background: none; border: none; width: 100%;
  text-align: left; transition: background .15s;
}
.lang-option:hover { background: var(--cream); }
.lang-option.active { color: var(--primary); font-weight: 700; }
.lang-option .flag { font-size: 1.2rem; }

/* ── SECTION BASE ── */
section { padding: 100px 5%; }
.section-label {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .8rem;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--heading); line-height: 1.2; margin-bottom: 1rem;
}
.section-sub {
  color: var(--text-light); font-size: 1rem;
  line-height: 1.75; max-width: 540px;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--primary); color: #fff;
  padding: .85rem 2rem; border-radius: 50px;
  text-decoration: none; font-weight: 600; font-size: .95rem;
  letter-spacing: .03em;
  transition: background .3s, transform .2s, box-shadow .3s;
  box-shadow: 0 6px 24px rgba(71,151,243,.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(71,151,243,.45);
}
.btn-secondary {
  background: transparent; color: var(--heading);
  padding: .85rem 2rem; border-radius: 50px;
  border: 1.5px solid var(--sand);
  text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: border-color .3s, color .3s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ── SCROLL ANIMATION ── */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.from-left  { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.visible { opacity: 1; transform: translate(0); }

/* ── FOOTER ── */
footer {
  background: var(--heading);
  color: rgba(255,255,255,.7);
  text-align: center; padding: 3rem 5%; font-size: .85rem;
}
footer a { color: #ffffff; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; color: #fff; margin-bottom: .5rem;
}

/* ── COOKIE BANNER ── */
#cookieBanner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--sand);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.1);
  padding: 1.5rem 5%;
  animation: slideUp .4s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cookie-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 280px; }
.cookie-text strong { display: block; font-size: 1rem; color: var(--heading); margin-bottom: .4rem; }
.cookie-text p { font-size: .82rem; color: var(--text-light); line-height: 1.6; margin-bottom: .3rem; }
.cookie-text a { color: var(--primary); text-decoration: underline; }
.cookie-buttons { display: flex; gap: .8rem; flex-shrink: 0; flex-wrap: wrap; }
.cookie-btn-accept {
  background: var(--primary); color: #fff; border: none;
  border-radius: 30px; padding: .7rem 1.8rem; font-size: .9rem;
  font-weight: 700; cursor: pointer; font-family: 'Nunito', sans-serif;
  transition: background .2s, transform .2s;
}
.cookie-btn-accept:hover { background: var(--primary-dark); transform: translateY(-1px); }
.cookie-btn-info {
  background: transparent; color: var(--text-light);
  border: 1.5px solid var(--sand); border-radius: 30px;
  padding: .7rem 1.5rem; font-size: .9rem; font-weight: 600;
  cursor: pointer; font-family: 'Nunito', sans-serif;
  transition: border-color .2s, color .2s;
}
.cookie-btn-info:hover { border-color: var(--primary); color: var(--primary); }

/* ══════════════════════════════════════════
   POP-UP / MODAL SYSTEM
   Wird für Arzt-Kacheln & interaktive Leistungen genutzt
══════════════════════════════════════════ */
.clickable-card { cursor: pointer; transition: transform .3s, box-shadow .3s, border-color .3s; }
.clickable-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px var(--shadow); border-color: var(--primary); }
.clickable-card::after {
  content: '→';
  display: inline-block;
  margin-top: .6rem;
  color: var(--primary);
  font-weight: 700;
  font-size: .85rem;
  opacity: .7;
}

.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(20, 30, 50, 0.55);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 5vh 5%;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 24px;
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
  animation: modalIn .3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.06); border: none;
  color: var(--text); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: rgba(0,0,0,.12); }

.modal-image {
  width: 100%; height: 220px;
  object-fit: cover;
  border-radius: 24px 24px 0 0;
  display: block;
}
.modal-content { padding: 2rem 2.2rem 2.2rem; }
.modal-content .modal-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(71,151,243,.15), rgba(24,170,255,.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin-bottom: 1.2rem;
}
.modal-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; color: var(--heading); margin-bottom: .3rem;
}
.modal-content .modal-subtitle {
  font-size: .85rem; color: var(--primary); font-weight: 600; margin-bottom: 1.2rem;
}
.modal-content p {
  font-size: .92rem; color: var(--text-light); line-height: 1.8; margin-bottom: 1rem;
}
.modal-download {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--primary); color: #fff;
  padding: .7rem 1.5rem; border-radius: 30px;
  text-decoration: none; font-weight: 600; font-size: .88rem;
  margin-top: .5rem;
  transition: background .2s, transform .2s;
}
.modal-download:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ── ARZT-BILD (größer, zentriert) ── */
.modal-content-doctor { padding-top: 2.2rem; text-align: center; }
.modal-doctor-image {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1.2rem;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
  border: 4px solid #fff;
  outline: 1px solid var(--sand);
}
.modal-icon-large {
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, rgba(71,151,243,.15), rgba(24,170,255,.1));
}
.modal-doctor-name { text-align: center; }
.modal-subtitle-center { text-align: center; }
.modal-content-doctor p { text-align: left; }

/* ── DOWNLOAD-DROPDOWN (mehrere PDFs) ── */
.modal-dropdown { position: relative; display: block; width: 100%; margin-top: .5rem; }
.modal-dropdown-btn {
  cursor: pointer; border: none;
  width: 100%; justify-content: space-between;
}
.modal-dropdown-arrow { transition: transform .2s; display: inline-block; }
.modal-dropdown.open .modal-dropdown-arrow { transform: rotate(180deg); }
.modal-dropdown-list {
  display: none;
  position: relative; top: auto; left: auto;
  width: 100%; margin-top: .6rem;
  background: #fff; border: 1px solid var(--sand);
  border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.08);
  overflow: hidden; z-index: 5;
}
.modal-dropdown.open .modal-dropdown-list { display: block; }
.modal-dropdown-item {
  display: block; padding: .9rem 1.4rem;
  font-size: .9rem; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--sand);
  transition: background .15s;
}
.modal-dropdown-item:last-child { border-bottom: none; }
.modal-dropdown-item:hover { background: var(--cream); color: var(--primary); }

/* ── MODAL-GALERIE (z.B. Lungenfunktionstest) ── */
.modal-gallery { position: relative; }
.modal-gallery .modal-image { border-radius: 24px 24px 0 0; }
.modal-gallery-prev, .modal-gallery-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.35); border: none; color: #fff;
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-gallery-prev:hover, .modal-gallery-next:hover { background: rgba(0,0,0,.55); }
.modal-gallery-prev { left: .7rem; }
.modal-gallery-next { right: .7rem; }
.modal-gallery-counter {
  position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.4); color: #fff;
  font-size: .75rem; padding: .25rem .7rem; border-radius: 20px;
}

/* ── RESPONSIVE ── */
/* ── ETWAS ENGERE NAV BEI MITTLEREN BREITEN (z.B. iPad Pro quer) ──
   Verhindert, dass Nav-Punkte oder der Termin-Button umbrechen, bevor
   das Hamburger-Menü bei 1024px übernimmt. */
@media (min-width: 1025px) and (max-width: 1320px) {
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: .82rem; }
  .nav-cta { padding: .5rem 1rem; }
  .nav-logo .logo-bottom { font-size: 1rem; }
}

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .lang-switcher { display: none; }
  .nav-logo .logo-top { font-size: .62rem; }
  .nav-logo .logo-bottom { font-size: 1rem; }
  nav { height: 76px; padding: 0 5%; }
  .mobile-menu { top: 76px; }
  section { padding: 60px 5%; }
  .cookie-inner { flex-direction: column; gap: 1rem; }
  .cookie-buttons { width: 100%; }
  .cookie-btn-accept, .cookie-btn-info { flex: 1; text-align: center; }
  .modal-box { max-height: 85vh; }
  .modal-content { padding: 1.5rem 1.5rem 1.8rem; }
}
@media (max-width: 480px) {
  .nav-logo .logo-top { font-size: .58rem; }
  .nav-logo .logo-bottom { font-size: .9rem; }
  nav { height: 70px; }
  .mobile-menu { top: 70px; }
}
