/* Schloss Apotheke Erbach – Onepager
   Schriften lokal, keine externen Ressourcen. */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ground: #F2F6F6;
  --paper: #FFFFFF;
  --ink: #16292E;
  --muted: #475A5F;
  --green: #0E6673;
  --green-dark: #0A4C56;
  --green-soft: #DCEDEE;
  --line: #D3DFDF;
  --new-bg: #FBE4DF;
  --new-ink: #A02E20;
  --error: #A12B1F;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, svg { max-width: 100%; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Kopfzeile */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(242, 246, 246, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand__a { width: 40px; height: auto; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__logo { height: 56px; width: auto; max-width: 220px; object-fit: contain; display: block; }
.brand { padding: 6px 0; }
.brand__place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 720px) { .brand__name { white-space: nowrap; } }
@media (max-width: 719px) { .top__inner { gap: .6rem; } .brand__name { font-size: 1.2rem; line-height: 1.15; } .brand__a { width: 36px; } .brand { gap: .6rem; } .brand__logo { height: 48px; max-width: min(160px, 36vw); } }
@media (min-width: 720px) { .brand__a { width: 47px; } }
.brand__name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--green); line-height: 1.1; }
.brand__place { font-size: .85rem; color: var(--muted); }
.nav { display: none; gap: 2rem; font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; padding: .5rem 0; }
.nav a:hover { color: var(--green); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--solid { background: var(--green); color: #fff; }
.btn--solid:hover { background: var(--green-dark); color: #fff; }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--lg { min-height: 56px; padding: .9rem 1.8rem; font-size: 1.1rem; }
.btn--block { width: 100%; }
.btn--call__long { display: none; }

/* Sprachschalter – nur bei zweisprachigen Standorten im Kopf */
.btn--lang {
  min-height: 44px; padding: .5rem .9rem; font-size: .95rem; font-weight: 600;
  border-color: var(--line); color: var(--muted); margin-left: auto; white-space: nowrap;
}
.btn--lang:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--lang__long { display: none; }

/* Lieferzusage unter dem Hero – wird per JS auf den aktuellen Tag gesetzt */
.deliver {
  margin: 0 0 1.5rem; font-size: 1.02rem; color: var(--muted);
  position: relative; padding-left: 28px;
}
.deliver::before {
  content: ""; position: absolute; left: 0; top: .18em; width: 20px; height: 20px;
  background: currentColor;
  -webkit-mask: no-repeat center/20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3zM14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E");
  mask: no-repeat center/20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3zM14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E");
}
.deliver.is-live { color: var(--green); font-weight: 600; }
.deliver strong { color: var(--ink); }

/* Hero */
.hero { padding: 2.5rem 0 3rem; }
.hero__grid { display: grid; gap: 2rem; align-items: center; }
.hero__text { display: flex; flex-direction: column; gap: 1.25rem; }
.greeting { font-size: 1.15rem; font-weight: 600; color: var(--green); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hours {
  background: var(--green); color: #fff;
  border-radius: var(--radius-lg); padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.hours a { color: #fff; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.status__link { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem .9rem; border-radius: 999px; background: #fff; color: var(--green) !important; font-weight: 700; text-decoration: none; font-size: 1rem; }
.status__link:hover { background: var(--green-soft); }
.status__link[hidden] { display: none; }
.status__link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.emergency:target { outline: 3px solid var(--green); outline-offset: 4px; }
.status { display: inline-flex; align-items: center; gap: .55rem; align-self: flex-start; background: rgba(255,255,255,0.14); padding: .4rem .9rem; border-radius: 999px; font-weight: 700; font-size: 1rem; }
.status__dot { width: 11px; height: 11px; border-radius: 50%; background: #FF9384; }
.status.is-open .status__dot { background: #7DE39B; }
.hours__title { font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.hours__list { margin: 0; display: flex; flex-direction: column; }
.hours__list div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,0.22); font-size: 1.15rem; }
.hours__list div:last-child { border-bottom: 0; }
.hours__list dd { margin: 0; font-weight: 700; text-align: right; }
.hours__list div.is-today dt::after { content: " (heute)"; font-weight: 400; opacity: .85; }
.hours__addr { font-size: 1.05rem; }
.hours__links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-weight: 600; }

/* Ablauf */
.band { background: var(--paper); padding: 3.5rem 0; border-block: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.75rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; align-content: start; grid-template-columns: 2.75rem 1fr; column-gap: 1rem; row-gap: .35rem; }
.steps li::before { content: counter(step); grid-row: span 2; font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--green); }
.steps p { color: var(--muted); }

/* Abschnitte */
.section { padding: 4rem 0; }
.section--paper { background: var(--paper); border-block: 1px solid var(--line); }
.sub { margin-top: .6rem; color: var(--muted); font-size: 1.15rem; }

.services { display: grid; gap: 1rem; margin-top: 2rem; }
.service {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .7rem; align-items: flex-start;
}
.service p { color: var(--muted); }
.service .btn { margin-top: .4rem; }
.service__head { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.icon { width: 48px; height: 48px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tag { background: var(--new-bg); color: var(--new-ink); font-weight: 700; font-size: .85rem; padding: .25rem .75rem; border-radius: 999px; }
.tag--gkv { background: var(--green-soft); color: var(--green-dark); }

/* Aufklappbare Leistungen */
.services { align-items: start; }
.service { height: auto; }
.service h3 { font-size: 1.3rem; }
.service__teaser { color: var(--muted); }
@media (min-width: 720px) { .service__teaser { min-height: 3.1em; } }
.service__more { width: 100%; margin-top: .3rem; border-top: 1px solid var(--line); }
.service__more summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 48px; padding-top: .5rem; font-weight: 700; color: var(--green); cursor: pointer;
}
.service__more summary::after { content: ""; width: 10px; height: 10px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.service__more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.service__more[open] summary { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .service__more summary::after { transition: none; } }
.service__body { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; padding: .4rem 0 .3rem; }
.service__body p { color: var(--muted); }
.service__body h4 { margin: .2rem 0 0; font-size: 1.05rem; }
.service__body .btn { margin-top: .2rem; }
.hint { background: var(--green-soft); color: var(--ink) !important; border-radius: var(--radius-sm); padding: .7rem 1rem; font-weight: 600; }
.mini-steps, .mini-list { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: .35rem; color: var(--muted); }
.mini-steps li::marker, .mini-list li::marker { color: var(--green); font-weight: 700; }
.terminal { width: 100%; background: var(--ground); border-radius: var(--radius-sm); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.terminal h4 { margin: 0; font-size: 1.1rem; }
.terminal .terminal__time { color: var(--ink); font-weight: 700; }
.terminal a { font-weight: 700; }

.service__cta { display: flex; flex-wrap: wrap; gap: .5rem; }
.service__cta .btn { margin-top: 0; }

/* Bestellung */
.order { display: grid; gap: 2.5rem; }
.order__intro { display: flex; flex-direction: column; gap: 1.1rem; }
.order__intro > p { color: var(--muted); }
.note { border-radius: var(--radius-sm); background: var(--green-soft); padding: 1rem 1.2rem; }
.note h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.note p { font-size: 1.02rem; }

.form { display: flex; flex-direction: column; gap: 1.25rem; background: var(--ground); border-radius: var(--radius-lg); padding: 1.5rem; }
.field { display: flex; flex-direction: column; gap: .4rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: 1.02rem; padding: 0; }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; font: 400 1.1rem/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1.5px solid #93A5A8; border-radius: var(--radius-sm);
  padding: .8rem .9rem; min-height: 50px;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 3px solid var(--green); outline-offset: 1px; border-color: var(--green); }
[aria-invalid="true"] { border-color: var(--error); }
.choice { display: flex; flex-direction: column; gap: .5rem; margin-top: .3rem; }
.choice label { display: flex; align-items: center; gap: .7rem; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; font-weight: 600; cursor: pointer; min-height: 50px; }
.choice label:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
input[type="radio"], input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--green); flex-shrink: 0; margin: 0; }
.grid2 { display: grid; gap: 1.25rem; }
.address { display: flex; flex-direction: column; gap: 1.25rem; }
.address[hidden] { display: none; }
.consent { display: flex; gap: .75rem; align-items: flex-start; font-size: 1rem; color: var(--muted); }
.consent input { margin-top: .15rem; }
.form__error { color: var(--error); font-weight: 700; }
.form__done { background: var(--green-soft); border-radius: var(--radius-sm); padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; font-size: 1.02rem; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Foto-Upload */
.field__label { font-weight: 700; font-size: 1.02rem; }
.upload {
  display: flex; align-items: center; gap: 1rem; cursor: pointer;
  background: #fff; border: 2px dashed #93A5A8; border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; min-height: 64px; font-weight: 400; line-height: 1.35;
}
.upload:hover { border-color: var(--green); background: var(--green-soft); }
.upload svg { width: 32px; height: 32px; flex-shrink: 0; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.upload__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload__input:focus-visible + .upload { outline: 3px solid var(--green); outline-offset: 2px; }
.upload__list { list-style: none; margin: .3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.upload__list:empty { display: none; }
.upload__list li { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .45rem .6rem; font-size: 1rem; }
.upload__list img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--green-soft); flex-shrink: 0; }
.upload__list .file-icon { width: 44px; height: 44px; border-radius: 6px; background: var(--green-soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: var(--green); flex-shrink: 0; }
.upload__list .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__list button { background: none; border: 0; color: var(--error); font: inherit; font-weight: 700; cursor: pointer; padding: .4rem; min-height: 44px; }

/* Spam-Falle (für Menschen unsichtbar) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Senden und Erfolg */
button[disabled] { opacity: .65; cursor: progress; }
.form__success { gap: .8rem; }
.form[hidden], .form__success[hidden] { display: none; }
.form__success h3 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; color: var(--green); }
.form__success #success-id { font-size: 1.2rem; letter-spacing: .04em; }

/* FAQ */
#fragen details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
#fragen details:first-of-type { margin-top: 1.5rem; border-top: 1px solid var(--line); }
#fragen summary { font-weight: 700; font-size: 1.15rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary { list-style: none; }
#fragen summary::after { content: "+"; font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--green); }
#fragen details[open] summary::after { content: "–"; }
#fragen details p { margin-top: .7rem; color: var(--muted); }

/* Kontakt */
.contact { display: grid; gap: 2rem; }
.contact__list { font-style: normal; display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; font-size: 1.15rem; }
.emergency { background: var(--ground); border-radius: var(--radius-lg); padding: 1.75rem; display: flex; flex-direction: column; gap: .9rem; align-items: flex-start; }
.emergency p { color: var(--muted); }

/* Fuß */
.foot { background: var(--ink); color: #CFDDDF; padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: 1rem; }
.foot__inner { display: flex; flex-direction: column; gap: 1rem; }
.foot nav { display: flex; gap: 1.5rem; }
.foot a { color: #fff; }

/* Rechtstexte */
.legal { padding: 3rem 0 4rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.45rem; margin: 2rem 0 .6rem; }
.legal p, .legal ul { margin: 0 0 .8rem; max-width: 42em; }
.legal .back { display: inline-block; margin-bottom: 1.5rem; font-weight: 700; }

/* ab Tablet */
@media (min-width: 720px) {
  .nav { display: flex; }
  .btn--lang__long { display: inline; }
  .btn--lang__short { display: none; }
  .btn--call__long { display: inline; }
  .btn--call__short { display: none; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps li { grid-template-columns: 1fr; }
  .steps li::before { grid-row: auto; margin-bottom: .4rem; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice { flex-direction: row; flex-wrap: wrap; }
  .choice label { flex: 1 1 12rem; }
  .foot__inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 1000px) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4rem; }
  .hours { padding: 2.5rem; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .service { padding: 1.75rem 2rem; }
  .order { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; align-items: start; }
  .order__intro { position: sticky; top: 100px; }
  .form { padding: 2rem; }
  .contact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; align-items: start; }
}
/* Zweisprachige Standorte: Der Sprachschalter braucht Platz, deshalb wird der
   Anrufen-Button auf schmalen Geraeten zum reinen Symbol (aria-label bleibt). */
@media (max-width: 539px) {
  .top__inner--lang .btn--call__short { display: none; }
  .top__inner--lang .btn--call {
    width: 48px; height: 48px; min-height: 48px; padding: 0; flex-shrink: 0;
  }
  .top__inner--lang .btn--call svg { width: 20px; height: 20px; }
}
@media (max-width: 719px) {
  .btn--call { padding: .6rem 1rem; }
  .btn--lang { padding: .5rem .75rem; font-size: .9rem; }
}
.sr-copy { position: fixed; left: -9999px; top: 0; }

@media (max-width: 339px) {
  .btn--call { width: 48px; height: 48px; min-height: 48px; padding: 0; flex-shrink: 0; }
  .btn--call__short { display: none; }
  .btn--call svg { width: 20px; height: 20px; }
}

/* Hinweis auf den Rechtsseiten zweisprachiger Standorte */
.lang-note {
  background: var(--green-soft); border-left: 4px solid var(--green);
  padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin: 0 0 1.75rem;
}

/* Platzhalter in Rechtstexten – vor Livegang alle ersetzen */
.ph { background: #FFF1A8; color: #5A4500; outline: 1px dashed #B08A00; border-radius: 3px; padding: 0 .25em; font-weight: 600; }
.legal ul { padding-left: 1.3rem; }
.legal li { margin-bottom: .4rem; }
.legal .stand { margin-top: 2.5rem; color: var(--muted); font-size: 1rem; }
.foot nav { flex-wrap: wrap; }
