/* ==========================================================================
   AllDent Zahnzentrum Bremen — Basis-Stylesheet
   Ergänzt die Tailwind-Utilities um Typografie, Fokus-Zustände und
   wiederverwendbare Komponentenklassen (Buttons, Cards, Sections).
   Schriften werden bewusst NICHT vom Google-CDN geladen (DSGVO):
   Outfit / Source Sans 3 werden verwendet, wenn sie lokal oder
   selbst gehostet vorliegen, sonst greift ein sauberer System-Stack.
   ========================================================================== */

:root {
  --c-primary: #0E3A5B;
  --c-primary-light: #1B5E8C;
  --c-primary-pale: #E7EFF5;
  --c-cta: #0B7A76;
  --c-cta-hover: #095F5C;
  --c-emergency: #B3261E;
  --c-star: #E8A33D;
  --c-bg: #F6F9FB;
  --c-surface: #FFFFFF;
  --c-text: #14212B;
  --c-text-muted: #52646F;
  --c-border: #DCE5EA;
}

/* --------------------------------------------------------------------------
   Grundlagen
   -------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7.5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}

@media (min-width: 768px) {
  body { font-size: 18px; }
}

h1, h2, h3, h4, .font-display {
  font-family: "Outfit", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--c-primary);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
}

h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

@media (min-width: 768px) {
  h1 { font-size: 56px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }
}

small, .text-meta {
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-text-muted);
}

table, .tabular, .price, time {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Fokus & Skip-Link — durchgängig sichtbar, nie entfernt
   -------------------------------------------------------------------------- */

a, button, input, select, textarea, summary, [tabindex] {
  outline-color: var(--c-cta);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--c-cta);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Kontrast des Fokusrings auf dunklen Flächen sichern */
.on-dark a:focus-visible,
.on-dark button:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100px;
  z-index: 100;
  background: var(--c-cta);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  transition: top 0.15s ease-in-out;
}

.skip-link:focus {
  top: 0;
}

/* --------------------------------------------------------------------------
   Layout-Bausteine
   -------------------------------------------------------------------------- */

.container-page {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 1024px) {
  .container-page { padding-inline: 2rem; }
}

.section {
  padding-block: 3.5rem;
}

@media (min-width: 768px) {
  .section { padding-block: 5rem; }
}

.section-alt {
  background-color: var(--c-primary-pale);
}

.section-dark {
  background-color: var(--c-primary);
  color: #EAF2F8;
}

.section-dark h2,
.section-dark h3 {
  color: #FFFFFF;
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2.25rem;
}

.section-head p {
  color: var(--c-text-muted);
  margin-top: 0.75rem;
}

.eyebrow {
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-cta);
  margin-bottom: 0.5rem;
  display: block;
}

.section-dark .eyebrow { color: #7FD3CE; }

.measure {
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   Buttons — ein Muster für die gesamte Website
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Outfit", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  padding: 0.9375rem 1.5rem;
  border-radius: 8px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  min-height: 48px;
}

.btn-primary {
  background-color: var(--c-cta);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--c-cta-hover);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--c-primary);
  border-color: var(--c-primary);
}

.btn-secondary:hover {
  background-color: var(--c-primary);
  color: #FFFFFF;
}

.btn-emergency {
  background-color: var(--c-emergency);
  color: #FFFFFF;
}

.btn-emergency:hover {
  background-color: #8E1D17;
}

.btn-ghost {
  background-color: transparent;
  color: var(--c-cta);
  border-color: var(--c-border);
}

.btn-ghost:hover {
  border-color: var(--c-cta);
  background-color: #FFFFFF;
}

.btn-block {
  width: 100%;
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  background-color: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--c-text-muted);
}

.card-link {
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card-link:hover {
  border-color: var(--c-cta);
}

.card-cta {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--c-cta);
  font-weight: 600;
  font-family: "Outfit", sans-serif;
}

.card-media {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  background-color: var(--c-primary-pale);
}

/* --------------------------------------------------------------------------
   Bewertungs-Badge und Sterne — Sandgold ausschließlich hier
   -------------------------------------------------------------------------- */

.stars {
  color: var(--c-star);
  letter-spacing: 0.08em;
  font-size: 1.125rem;
  line-height: 1;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  background-color: #FFFFFF;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 0.875rem 1.125rem;
  text-decoration: none;
  color: var(--c-text);
}

.rating-badge:hover {
  border-color: var(--c-cta);
}

.rating-score {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Öffnungsstatus
   -------------------------------------------------------------------------- */

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  display: inline-block;
  background-color: currentColor;
  flex: none;
}

.hours-table th,
.hours-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--c-border);
  text-align: left;
}

.hours-table tr:last-child th,
.hours-table tr:last-child td {
  border-bottom: 0;
}

.hours-table tr[data-today="true"] {
  background-color: var(--c-primary-pale);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */

.field-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 0.375rem;
  color: var(--c-text);
}

.field-input {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background-color: #FFFFFF;
  padding: 0.75rem 0.875rem;
  font-size: 17px;
  color: var(--c-text);
  min-height: 48px;
}

.field-input::placeholder { color: #7C8C97; }

.field-input:focus {
  border-color: var(--c-cta);
}

.field-input[aria-invalid="true"] {
  border-color: var(--c-emergency);
  border-width: 2px;
}

.field-hint {
  font-size: 15px;
  color: var(--c-text-muted);
  margin-top: 0.25rem;
}

.field-error {
  display: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-emergency);
  margin-top: 0.375rem;
}

.field-error.is-visible {
  display: block;
}

.form-status {
  border-radius: 10px;
  padding: 1rem 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.form-status--error {
  background-color: #FBEAE9;
  color: #8E1D17;
  border: 1px solid #E5B4B0;
}

.form-status--success {
  background-color: #E4F2F1;
  color: #08544F;
  border: 1px solid #9CCFCC;
}

.spinner {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav-link {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--c-primary);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--c-cta);
}

.nav-link[aria-current="page"] {
  color: var(--c-cta);
  border-bottom-color: var(--c-cta);
}

.subnav {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 19rem;
  background: #FFFFFF;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 12px 28px rgba(14, 58, 91, 0.12);
  z-index: 60;
}

.subnav a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  color: var(--c-text);
  text-decoration: none;
  font-size: 16px;
}

.subnav a:hover {
  background-color: var(--c-primary-pale);
  color: var(--c-primary);
}

/* --------------------------------------------------------------------------
   Fließtext auf Rechts- und Inhaltsseiten
   -------------------------------------------------------------------------- */

.prose-page h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.prose-page h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose-page p,
.prose-page ul,
.prose-page ol {
  margin-bottom: 1rem;
  max-width: 70ch;
}

.prose-page ul,
.prose-page ol {
  padding-left: 1.25rem;
}

.prose-page ul { list-style: disc; }
.prose-page ol { list-style: decimal; }

.prose-page li { margin-bottom: 0.375rem; }

.prose-page a {
  color: var(--c-cta);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-page a:hover { color: var(--c-cta-hover); }

.prose-page dt { font-weight: 600; margin-top: 0.75rem; }
.prose-page dd { color: var(--c-text-muted); }

/* --------------------------------------------------------------------------
   Details / FAQ
   -------------------------------------------------------------------------- */

.faq-item {
  background: #FFFFFF;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.125rem;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  color: var(--c-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--c-cta);
  font-size: 1.5rem;
  line-height: 1;
  flex: none;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item .faq-body {
  padding: 0 1.125rem 1.125rem;
  color: var(--c-text-muted);
  max-width: 70ch;
}

/* --------------------------------------------------------------------------
   Mobile Bottom-Bar
   -------------------------------------------------------------------------- */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--c-border);
  background: #FFFFFF;
}

.bottom-bar a {
  padding: 0.9375rem 0.5rem;
  text-align: center;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  text-decoration: none;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

@media (min-width: 1024px) {
  .bottom-bar { display: none; }
}

body.has-bottom-bar { padding-bottom: 56px; }

@media (min-width: 1024px) {
  body.has-bottom-bar { padding-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Karten-Consent-Overlay
   -------------------------------------------------------------------------- */

.map-consent {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--c-border);
  background-color: var(--c-primary-pale);
}

.map-consent__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1.5rem;
  background: rgba(14, 58, 91, 0.86);
  color: #FFFFFF;
}

.map-consent__overlay p { max-width: 32ch; font-size: 16px; }

/* --------------------------------------------------------------------------
   Sonstiges
   -------------------------------------------------------------------------- */

.divider {
  border: 0;
  border-top: 1px solid var(--c-border);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 14px;
  font-weight: 600;
  font-family: "Outfit", sans-serif;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background-color: var(--c-primary-pale);
  color: var(--c-primary);
}

.step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--c-primary);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  flex: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
