/* ==========================================================================
   MT MediTeam — Components
   ========================================================================== */

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;               /* generous target; audience skews elderly */
  padding: 0.85rem 1.6rem;
  border-radius: var(--r-pill);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-mid) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--primary {
  background: var(--c-brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn--primary:hover { background: var(--c-brand-dark); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--c-brand);
  border: 1.5px solid var(--c-brand-soft);
}
.btn--ghost:hover { background: var(--c-brand-tint); border-color: var(--c-brand); color: var(--c-brand); }

.btn--onbrand { background: #fff; color: var(--c-brand); }
.btn--onbrand:hover { background: var(--c-brand-tint); color: var(--c-brand-dark); }

.btn--outline-light { border: 1.5px solid rgba(255,255,255,0.5); color: #fff; }
.btn--outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }

.btn--lg { min-height: 60px; padding: 1rem 2.1rem; font-size: var(--step-1); }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--c-line);
  box-shadow: 0 2px 12px rgba(14,21,38,0.05);
}

/* Utility strip: phone + hours. Desktop only — on mobile the call bar wins. */
.topbar { display: none; background: var(--c-brand); color: #fff; }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 42px;
  font-size: var(--step--1);
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__list { display: flex; align-items: center; gap: var(--sp-5); }
.topbar__item { display: inline-flex; align-items: center; gap: 0.45em; }
.topbar__item svg { width: 1em; height: 1em; opacity: 0.85; }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.brand img { width: auto; height: 42px; }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: clamp(0.5rem, 1.4vw, 1.5rem); }
.nav__link {
  position: relative;
  display: block;
  padding: 0.55rem 0.25rem;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--c-ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.15rem;
  height: 2px;
  background: var(--c-brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-mid) var(--ease);
}
.nav__link:hover { color: var(--c-brand); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--c-brand); font-weight: 600; }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: var(--sp-3); }
.header__cta { display: none; }

/* --- Language switcher ---------------------------------------------------- */
.langs { display: flex; align-items: center; gap: 0.15rem; }
.langs__btn {
  padding: 0.35rem 0.55rem;
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-ink-4);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.langs__btn:hover { background: var(--c-brand-tint); color: var(--c-brand); }
.langs__btn[aria-current="true"] { background: var(--c-brand); color: #fff; }
.topbar .langs__btn { color: rgba(255,255,255,0.72); }
.topbar .langs__btn:hover { background: rgba(255,255,255,0.16); color: #fff; }
.topbar .langs__btn[aria-current="true"] { background: rgba(255,255,255,0.2); color: #fff; }

/* --- Burger --------------------------------------------------------------- */
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px; height: 48px;
  padding: 12px 10px;
  border-radius: var(--r-md);
  flex: none;
}
.burger:hover { background: var(--c-brand-tint); }
.burger span {
  display: block;
  height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: transform var(--t-mid) var(--ease), opacity var(--t-fast) var(--ease);
}
.burger span:nth-child(1) { width: 100%; }
.burger span:nth-child(2) { width: 78%; }
.burger span:nth-child(3) { width: 92%; }
body.drawer-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 100%; }
body.drawer-open .burger span:nth-child(2) { opacity: 0; }
body.drawer-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 100%; }

/* --- Drawer (mobile nav): full-screen, large type ------------------------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--t-slow) var(--ease), visibility 0s linear var(--t-slow);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer[data-open="true"] {
  transform: none;
  visibility: visible;
  transition: transform var(--t-slow) var(--ease), visibility 0s;
}
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--c-line-soft);
}
.drawer__body {
  flex: 1;
  padding: var(--sp-6) var(--gutter) var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.drawer__list { display: flex; flex-direction: column; }
.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--c-line-soft);
}
.drawer__link[aria-current="page"] { color: var(--c-brand); }
.drawer__link svg { width: 0.7em; height: 0.7em; color: var(--c-ink-4); }
.drawer__contact {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--c-warm);
  border-radius: var(--r-lg);
}
.drawer__contact a {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-weight: 600; color: var(--c-ink); text-decoration: none;
}
.drawer__contact svg { width: 1.1em; height: 1.1em; color: var(--c-brand); flex: none; }
.drawer__note { font-size: var(--step--1); color: var(--c-ink-3); }

/* --- Sticky call bar (mobile): the primary action on a phone -------------- */
.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-callbar);
  display: flex;
  gap: 1px;
  background: var(--c-line);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 16px rgba(14,21,38,0.10);
  transform: translateY(110%);
  transition: transform var(--t-slow) var(--ease);
}
.call-bar.is-visible { transform: none; }
.call-bar__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: var(--callbar-h);
  padding: 0.5rem 0.75rem;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  background: var(--c-surface);
  color: var(--c-ink);
}
.call-bar__btn svg { width: 1.25em; height: 1.25em; flex: none; }
.call-bar__btn--primary { background: var(--c-brand); color: #fff; }
.call-bar__btn--primary:hover { background: var(--c-brand-dark); color: #fff; }
.call-bar__sub { display: block; font-size: var(--step--2); font-weight: 500; opacity: 0.82; }
body.drawer-open .call-bar { transform: translateY(110%); }

/* --- Cards ---------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  transition: border-color var(--t-mid) var(--ease),
              box-shadow var(--t-mid) var(--ease),
              transform var(--t-mid) var(--ease);
}
.card h3 { font-size: var(--step-1); }
.card p { color: var(--c-ink-3); font-size: var(--step--1); line-height: var(--lh-snug); }

.card--link:hover { border-color: var(--c-brand-soft); box-shadow: var(--sh-md); transform: translateY(-3px); }
.card--link a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--link a { text-decoration: none; color: inherit; }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--c-brand-tint);
  color: var(--c-brand);
  margin-bottom: var(--sp-2);
}
.card__icon svg { width: 26px; height: 26px; }

.card__more {
  margin-top: auto;
  padding-top: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--c-brand);
}
.card__more svg { width: 0.85em; height: 0.85em; transition: transform var(--t-fast) var(--ease); }
.card--link:hover .card__more svg { transform: translateX(3px); }

/* --- Grids ---------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }

/* --- Link list (sidebars, related items) ---------------------------------- */
.link-list { display: grid; gap: var(--sp-1); }
.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0.6rem 0;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--c-ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--c-line-warm);
  transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease-out);
}
.link-list li:last-child a { border-bottom: 0; }
.link-list a:hover { color: var(--c-brand); padding-left: 0.35rem; }
.link-list svg { width: 0.85em; height: 0.85em; flex: none; opacity: 0.5; }
.link-list a:hover svg { opacity: 1; }

/* --- Badges / pills -------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.34rem 0.8rem;
  border-radius: var(--r-pill);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge--accent { background: var(--c-accent-tint); color: var(--c-accent-dark); }
.badge--brand  { background: var(--c-brand-tint); color: var(--c-brand); }
.badge--light  { background: rgba(255,255,255,0.16); color: #fff; }
.badge svg { width: 1em; height: 1em; }

/* --- Forms ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field__label { font-size: var(--step--1); font-weight: 600; color: var(--c-ink); }
.field__req { color: var(--c-brand-mid); }
.field__hint { font-size: var(--step--2); color: var(--c-ink-3); }

.input, .textarea, .select {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  font-size: 1rem;          /* >=16px stops iOS zooming the page on focus */
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--c-ink-4); }
.input:hover, .textarea:hover { border-color: var(--c-ink-4); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 4px var(--c-brand-tint);
}
.textarea { min-height: 148px; resize: vertical; line-height: var(--lh-snug); }

.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #b42318; }
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px #fee4e2; }
.field__error { font-size: var(--step--2); font-weight: 500; color: #b42318; }

.form__grid { display: grid; gap: var(--sp-5); }
.form__foot { display: flex; flex-direction: column; gap: var(--sp-4); }
.counter { font-variant-numeric: tabular-nums; }

/* Honeypot — hidden from people, visible to naive bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: var(--step--2); color: var(--c-ink-3); line-height: var(--lh-snug); }

.form-status { padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md); font-weight: 500; }
.form-status[data-state="ok"]   { background: var(--c-accent-tint); color: var(--c-accent-dark); }
.form-status[data-state="err"]  { background: #fee4e2; color: #912018; }
.form-status[hidden] { display: none; }

/* --- Accordion (FAQ) ------------------------------------------------------- */
.accordion { display: grid; gap: var(--sp-2); }
.accordion__item {
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  overflow: hidden;
}
.accordion__item:has(.accordion__trigger[aria-expanded="true"]) {
  border-color: var(--c-brand-soft);
  background: var(--c-brand-wash);
}
.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  /* Tighter side padding on a phone, where 2rem each side eats the line */
  padding: var(--sp-5) clamp(1rem, 0.55rem + 1.9vw, 2rem);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--c-ink);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
}
.accordion__trigger:hover { color: var(--c-brand); }
.accordion__icon {
  position: relative;
  flex: none;
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  background: var(--c-brand-tint);
  transition: background var(--t-fast) var(--ease);
}
.accordion__icon::before, .accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 11px; height: 2px;
  background: var(--c-brand);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform var(--t-mid) var(--ease), opacity var(--t-fast) var(--ease);
}
.accordion__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.accordion__trigger[aria-expanded="true"] .accordion__icon { background: var(--c-brand); }
.accordion__trigger[aria-expanded="true"] .accordion__icon::before,
.accordion__trigger[aria-expanded="true"] .accordion__icon::after { background: #fff; }
.accordion__trigger[aria-expanded="true"] .accordion__icon::after { transform: translate(-50%, -50%) rotate(0deg); opacity: 0; }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-slow) var(--ease);
}
.accordion__panel[data-open="true"] { grid-template-rows: 1fr; }
.accordion__panel > div { overflow: hidden; }
.accordion__panel p {
  padding: 0 clamp(1rem, 0.55rem + 1.9vw, 2rem) var(--sp-5);
  margin-top: calc(var(--sp-2) * -1);
  color: var(--c-ink-3);
  max-width: 78ch;
}

/* --- Logo strip (Krankenkassen) ------------------------------------------- */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 1rem + 3vw, 3.25rem);
}
.logo-strip img {
  height: clamp(28px, 24px + 1.2vw, 40px);
  width: auto;
  opacity: 0.62;
  filter: grayscale(1);
  transition: opacity var(--t-mid) var(--ease), filter var(--t-mid) var(--ease);
}
.logo-strip img:hover { opacity: 1; filter: none; }

/* --- Stats ---------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-6); }
.stat { text-align: center; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1;
  color: var(--c-brand);
  font-variant-numeric: tabular-nums;
}
.section--brand .stat__num { color: #fff; }
.stat__label { display: block; margin-top: var(--sp-2); font-size: var(--step--1); color: var(--c-ink-3); }
.section--brand .stat__label { color: var(--c-brand-soft); }

/* --- Testimonials --------------------------------------------------------- */
.quote {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
}
.quote__stars { display: flex; gap: 2px; color: #e5a83b; }
.quote__stars svg { width: 18px; height: 18px; }
.quote blockquote { font-size: var(--step-0); color: var(--c-ink-2); line-height: var(--lh-snug); }
.quote__author { margin-top: auto; font-size: var(--step--1); font-weight: 600; color: var(--c-ink); }
.quote__meta { font-size: var(--step--2); color: var(--c-ink-4); font-weight: 500; }

/* --- Area list (Einsatzgebiet) -------------------------------------------- */
.areas { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.areas li {
  padding: 0.5rem 1rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--c-ink-2);
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--c-ink);
  color: rgba(255,255,255,0.72);
  padding-block: var(--sp-9) var(--sp-6);
}
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer a { color: rgba(255,255,255,0.72); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer__grid { display: grid; gap: var(--sp-8); }
.footer__brand img { height: 56px; width: auto; }
.footer__tagline { margin-top: var(--sp-4); max-width: 34ch; font-size: var(--step--1); }
.footer__title {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--sp-4);
}
.footer__list { display: grid; gap: var(--sp-3); font-size: var(--step--1); }
.footer__list a { display: inline-flex; align-items: center; gap: 0.55em; }
.footer__list svg { width: 1.05em; height: 1.05em; flex: none; opacity: 0.7; }

.socials { display: flex; gap: var(--sp-3); }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.08);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.socials a:hover { background: var(--c-brand); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; }

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: var(--step--2);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--sp-5); }

/* Room for the mobile call bar */
.site-footer { padding-bottom: calc(var(--sp-6) + var(--callbar-h) + env(safe-area-inset-bottom, 0px)); }

/* ==========================================================================
   Breakpoints — mobile-first, these only add
   ========================================================================== */

@media (min-width: 34em) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .form__foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 48em) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-7); }
}

@media (min-width: 60em) {
  .topbar { display: block; }
  .nav { display: block; }
  .burger { display: none; }
  .header__cta { display: inline-flex; }
  .brand img { height: 52px; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .call-bar { display: none; }
  .site-footer { padding-bottom: var(--sp-6); }
  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.1fr; }
}
