/* Shared contrast corrections. Loaded after the page styles on every page.
   Text pairs use at least 4.5:1; controls and focus indicators at least 3:1. */
:root {
  --color-gray-400: #526176;
  --color-gray-500: #526176;
  --color-accent-dark: #006c60;
  --color-success: #137044;
  --color-warning: #8a5000;
  --color-error: #b42318;
}

/* Status, closed hours and breadcrumbs remain readable on pale surfaces. */
.hours-table .closed,
.hours-table .row-closed th,
.hours-table .row-closed td { color: #475569 !important; }
body.home .cta-box p { color: #e2e8f0; }
.cta-box h2 { color: #0f172a; }
body.home .cta-box h2 { color: #fff; }

/* Service tiles retain the original photo gradients and translucent icons
   defined in home.css. */
.team-card__role { background: #fff; color: #004a99; }

/* Accent buttons use the darker brand shade when carrying white text. */
.btn-accent { background: #006c60; color: #fff; }
.btn-accent:hover,
.btn-accent:focus-visible { background: #00564d; color: #fff; }
.text-gradient {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #004a99;
}

/* Separate light-on-dark footer tokens from muted text on light sections. */
.footer .footer-bottom p,
.footer .footer-legal a { color: #cbd5e1; }
.footer a:hover,
.footer a:focus-visible { color: #93c5fd; }

/* Explicit form surfaces and placeholder colors across browsers. */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
textarea, select {
  color: #1e293b;
  background-color: #fff;
  border-color: #64748b;
}
input::placeholder,
textarea::placeholder { color: #526176; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: #0066cc; }
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 3px;
}
:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

/* Inline component styles load later; specific selectors keep these legible. */
body .toast .toast__close { color: #475569; }
body .toast--success .toast__icon { background: #137044; }
body .toast--error .toast__icon { background: #b42318; }
body .phone-error { color: #b42318; }
body .cb-footer-links,
body .cb-footer-links a { color: #475569; }
body .cb-toggle-row__info span,
body #map-consent-placeholder p { color: #475569; }
body .cb-btn-primary:hover,
body .cb-btn-primary:focus-visible { background: #004a99; filter: none; }
body .cb-switch-track { background: #64748b; }
body .cb-switch input:focus-visible ~ .cb-switch-track {
  outline: 3px solid #0066cc;
  outline-offset: 3px;
}

/* Service detail pages share the existing typography and spacing system. */
.service-article { max-width: 860px; margin-inline: auto; }
.service-article h2 { margin: 2.5rem 0 1rem; font-size: var(--text-2xl); }
.service-article p { margin-bottom: 1rem; line-height: 1.8; }
.service-article ul, .service-article ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.service-article ul { list-style: disc; }
.service-article ol { list-style: decimal; }
.service-article li { margin-bottom: .6rem; line-height: 1.7; }
.service-article a:not(.btn), .service-more, .team-card__body p a {
  color: #005aaf;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.service-article .service-lead-image {
  width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius-xl); margin-bottom: 2rem;
}
.service-article .faq-list { margin: 1.5rem 0; }
.service-article .service-meta { font-size: var(--text-sm); color: #475569; }
.service-related { display: flex; flex-wrap: wrap; gap: 1rem; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100000; padding: 12px 20px;
  background: #fff; color: #004a99; border: 2px solid #004a99;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
@media (max-width: 480px) {
  .service-article .btn { white-space: normal; line-height: 1.4; }
}

/* Count labels and informational badges need the same contrast as body text. */
.jobs-filter-btn.active .jobs-filter-count { background: #004a99; color: #fff; }
.job-tag--ausbildung { color: #8a5000; }
.stats-section .section-label { background: #004a99; color: #fff; }
.praxis-image__zoom { background: #0f172a; color: #fff; }
body #cookie-settings-modal { visibility: hidden; }
body #cookie-settings-modal.open { visibility: visible; }
body #cookie-overlay.hidden { visibility: hidden; }

/* Opaque hover surfaces also work when a secondary button sits on dark blue. */
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: #eff6ff;
  color: #004a99;
  border-color: #004a99;
}

/* Visible sequence numbers retain sufficient contrast as well. */
body.home .reason-row::after { color: #526176; }
