/* ==========================================================
   Klinik Bad Trissl – gemeinsames Stylesheet
   ========================================================== */

:root {
  --color-primary: #0b4f6c;      /* dunkles Petrol/Blau */
  --color-primary-dark: #073950;
  --color-accent: #4fa77b;       /* ruhiges Grün */
  --color-accent-light: #e6f2ec;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8f8;
  --color-text: #26333a;
  --color-text-light: #5a6b72;
  --color-border: #e1e8ea;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(11, 79, 108, 0.08);
  --max-width: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--color-primary-dark);
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--color-primary-dark);
  color: #dce8ec;
  font-size: 0.85rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: #dce8ec; }
.topbar .emergency { color: #ffd9d9; font-weight: 600; }

/* ---------- Header / Nav ---------- */
header.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  flex-wrap: wrap;
  gap: 10px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-primary-dark);
}
.logo .mark {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo .mark img {
  display: block;
  height: 42px;
  width: auto;
}
.logo small {
  display: block;
  font-family: "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--color-text-light);
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  margin: 0;
  padding: 0;
}
nav.main-nav a {
  display: inline-block;
  padding: 8px 12px;
  color: var(--color-text);
  font-size: 0.93rem;
  border-radius: 6px;
}
nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  background: var(--color-accent-light);
  color: var(--color-primary-dark);
  text-decoration: none;
}

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--color-accent-light); }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 2px solid var(--color-accent);
  cursor: pointer;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: #3d8c65; text-decoration: none; border-color: #3d8c65; }
.btn-outline {
  background: transparent;
  color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}
.btn-outline:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }

/* ---------- Video carousel (as hero background) ---------- */
.video-carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-primary-dark);
  z-index: 0;
}
.video-carousel__item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.video-carousel__item.is-active { opacity: 1; }
.video-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,57,80,0.25) 0%, rgba(7,57,80,0.45) 100%);
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(7,57,80,0.55), rgba(11,79,108,0.4) 70%);
  color: #fff;
  padding: 70px 0;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.15rem; color: #dfeef0; max-width: 46ch; }
.hero .actions { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.hero-visual {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 26px;
  font-size: 0.95rem;
  backdrop-filter: blur(2px);
}
.hero-visual ul { margin: 0; padding-left: 1.2em; }
.hero-visual li { margin-bottom: 8px; }

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(7,57,80,0.55), rgba(11,79,108,0.4) 70%);
  color: #fff;
  padding: 46px 0;
  min-height: 190px;
  display: flex;
  align-items: center;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero .breadcrumb { font-size: 0.85rem; color: #cfe6ea; }
.page-hero .breadcrumb a { color: #cfe6ea; }

/* ---------- Sections ---------- */
section { padding: 60px 0; }
section.alt { background: var(--color-bg-alt); }
.section-intro { max-width: 68ch; margin-bottom: 34px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card .icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-row .num { font-family: Georgia, serif; font-size: 2.1rem; color: var(--color-primary-dark); font-weight: 700; }
.stat-row .label { font-size: 0.85rem; color: var(--color-text-light); }

/* ---------- Person / team ---------- */
.person {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.person h3 { margin-bottom: 2px; }
.person .role { color: var(--color-accent); font-size: 0.88rem; font-weight: 600; margin-bottom: 8px; }

/* ---------- Ratings / testimonials ---------- */
.stars {
  color: var(--color-accent);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

/* ---------- Timeline ---------- */
.timeline { border-left: 3px solid var(--color-accent); padding-left: 24px; margin-left: 6px; }
.timeline .item { margin-bottom: 26px; position: relative; }
.timeline .item::before {
  content: "";
  position: absolute;
  left: -30px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
}
.timeline .year { font-weight: 700; color: var(--color-primary-dark); }

/* ---------- Forms ---------- */
form.contact-form, form.appointment-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.88rem; font-weight: 600; color: var(--color-primary-dark); }
input, select, textarea {
  padding: 11px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--color-accent); border-color: var(--color-accent); }
.form-note { font-size: 0.82rem; color: var(--color-text-light); margin-top: 10px; }
fieldset { border: none; padding: 0; margin: 0 0 16px; }
legend { font-weight: 700; color: var(--color-primary-dark); margin-bottom: 8px; padding: 0; }

/* ---------- FAQ (details) ---------- */
details.faq {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary-dark);
  list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "+ "; color: var(--color-accent); font-weight: 700; }
details.faq[open] summary::before { content: "– "; }
details.faq p { margin-top: 10px; color: var(--color-text-light); }

/* ---------- News ---------- */
.news-item {
  border-bottom: 1px solid var(--color-border);
  padding: 22px 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
}
.news-item .date { color: var(--color-accent); font-weight: 700; font-size: 0.85rem; }
.news-item:last-child { border-bottom: none; }

/* ---------- Notice / callout ---------- */
.notice {
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-light);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
}
.notice.warn { border-left-color: #c98a2b; background: #fbf1e0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--color-accent);
  color: #fff;
  padding: 46px 0;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner .btn-outline { border-color: #fff; color: #fff; }
.cta-banner .btn-outline:hover { background: #fff; color: var(--color-accent); }

/* ---------- Table ---------- */
table.simple { width: 100%; border-collapse: collapse; }
table.simple th, table.simple td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}
table.simple th { color: var(--color-primary-dark); }

/* ---------- Map placeholder ---------- */
.map-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-frame iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--color-primary-dark);
  color: #cfe0e4;
  padding: 50px 0 20px;
  margin-top: 20px;
}
footer.site-footer .grid-4 { margin-bottom: 30px; }
footer.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
footer.site-footer a { color: #cfe0e4; }
footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
footer.site-footer li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 18px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: #9fb6bc;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }

  /* Collapsible mobile navigation */
  .nav-row { position: relative; flex-wrap: nowrap; }
  .logo { flex: 1 1 auto; min-width: 0; }
  .logo small { white-space: normal; }
  .nav-toggle { display: flex; order: 2; }
  .nav-row .btn.btn-primary {
    order: 3;
    padding: 9px 14px;
    font-size: 0.82rem;
  }
  nav.main-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-basis: 100%;
  }
  nav.main-nav.is-open { display: block; }
  nav.main-nav ul {
    flex-direction: column;
    gap: 2px;
    padding: 10px 0 16px;
    border-top: 1px solid var(--color-border);
    margin-top: 10px;
  }
  nav.main-nav a {
    display: block;
    padding: 12px 10px;
    font-size: 1rem;
  }
}
