/* ==========================================================================
   KLEINTIERPRAXIS MOELLER (moeller-vet.de) - CENTRAL STYLESHEET
   Original Flieder-/Violett-Farbschema | Echter Schwarz-Gelb Hochkontrast
   Development: Confirmation Bias - CEO & Founder: Angelika Keussen
   ========================================================================== */

:root {
  --font-scale: 1;
  --brand-primary: #5b2c6f;      /* Kräftiges Praxis-Violett */
  --brand-secondary: #7d3c98;    /* Akzent-Lila */
  --brand-light: #e8daef;        /* Kräftigerer, warmer Flieder-Ton für Boxen */
  --brand-dark: #2c1338;         /* Dunkelviolett für Leisten & Footer */
  --accent-cat: #0e6655;         /* Smaragdgrün für Katzenbehandlungszimmer */
  --accent-cat-bg: #d1f2eb;      /* Sanftes Mintgrün für Katzenzimmer-Box */
  --alert-bg: #fef3c7;           /* Urlaubs-/Hinweisbox Hintergrund */
  --alert-border: #d97706;       /* Warn-/Hinweis-Rahmen */
  --text-main: #1f122b;
  --text-muted: #4a355b;
  --bg-body: #efe6f5;            /* Warmer Flieder-Seitenhintergrund */
  --bg-card: #f8f2fc;            /* Sanft getönte Karten */
  --bg-accent: #e2cef0;          /* Hervorgehobene Innenboxen */
  --border-color: #c39bd3;       /* Sichtbarer Flieder-Rahmen */
  --focus-ring: #ffbf00;
  --shadow-soft: 0 6px 20px rgba(44, 19, 56, 0.12);
  --radius-main: 12px;
  --max-width: 1160px;
}
/* =========================================================
   iPAD HOCHFORMAT: KEIN HIN- UND HERSCHIEBEN MEHR
   Zwingt die komplette Seite + alle Kinder in die Bildschirmbreite
   ========================================================= */

/* 1. Globaler Überlauf-Riegel (clip statt hidden, weil iOS Safari hidden oft ignoriert!) */
html, body {
  max-width: 100% !important;
  overflow-x: clip !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 2. Speziell fürs iPad im Hochformat (bis 1024px Breite) */
@media only screen and (max-width: 1024px) and (orientation: portrait) {

  /* Alle Hauptblöcke dürfen niemals breiter als das Display sein */
  body, header, nav, main, section, article, aside, footer, div {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Killer Nr. 1 auf deinen Seiten: Grids mit festen Spaltenbreiten knacken */
  * {
    min-width: 0 !important; /* Verhindert, dass Flex/Grid-Kinder den Container aufdrücken */
  }

  /* Killer Nr. 2: Bilder, SVGs, Tabellen und Karten auf Displaybreite begrenzen */
  img, svg, video, canvas, iframe, table {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Killer Nr. 3: Lange Wörter oder Links (z.B. im Impressum/Footer) umbrechen */
  p, h1, h2, h3, h4, a, span, li {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
  }
}
/* ECHTER HOCHKONTRAST-MODUS (Tiefschwarz mit leuchtend gelber Schrift) */
html.high-contrast {
  --brand-primary: #ffff00;
  --brand-secondary: #ffff00;
  --brand-light: #000000;
  --brand-dark: #000000;
  --accent-cat: #ffff00;
  --accent-cat-bg: #000000;
  --alert-bg: #000000;
  --alert-border: #ffff00;
  --text-main: #ffff00;
  --text-muted: #ffff00;
  --bg-body: #000000;
  --bg-card: #000000;
  --bg-accent: #000000;
  --border-color: #ffff00;
  --focus-ring: #ffffff;
  --shadow-soft: none;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: calc(100% * var(--font-scale));
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Skip-Link für Tastaturnutzer & Screenreader */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-dark);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--focus-ring);
}

:focus-visible {
  outline: 3px solid var(--focus-ring) !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   BARRIEREFREIHEITS-LEISTE (TOP-BAR) - KOMPAKT IN DER MITTE
   ========================================================================== */
.a11y-bar {
  background-color: var(--brand-dark);
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--border-color);
}

html.high-contrast .a11y-bar {
  color: #ffff00;
}

.a11y-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
}

.a11y-label {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.a11y-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.a11y-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease;
}

.a11y-btn:hover,
.a11y-btn[aria-pressed="true"] {
  background: #ffffff;
  color: var(--brand-dark);
}

html.high-contrast .a11y-btn {
  background: #000000;
  color: #ffff00;
  border: 2px solid #ffff00;
}

html.high-contrast .a11y-btn:hover,
html.high-contrast .a11y-btn[aria-pressed="true"] {
  background: #ffff00;
  color: #000000;
}

/* ==========================================================================
   ZENTRALER HEADER & HAUPTNAVIGATION
   ========================================================================== */
.site-header {
  background: linear-gradient(180deg, #f5eafb 0%, var(--brand-light) 100%);
  border-bottom: 3px solid var(--brand-primary);
  box-shadow: var(--shadow-soft);
}

html.high-contrast .site-header {
  background: #000000;
  border-bottom: 3px solid #ffff00;
}

.header-top {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1rem;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: var(--brand-primary);
  flex: 1;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand-primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.94rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.2rem;
}

.header-quick-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.phone-cta {
  background-color: var(--brand-primary);
  color: #ffffff;
  text-decoration: none;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid transparent;
  white-space: nowrap;
}

.phone-cta:hover {
  background-color: var(--brand-dark);
}

html.high-contrast .phone-cta {
  background-color: #000000;
  color: #ffff00;
  border: 2px solid #ffff00;
}

html.high-contrast .phone-cta:hover {
  background-color: #ffff00;
  color: #000000;
}

.fb-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-color: #1877f2;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.fb-icon-link:hover {
  background-color: #0d5bd9;
}

html.high-contrast .fb-icon-link {
  background-color: #000000;
  color: #ffff00;
  border: 2px solid #ffff00;
}

.main-nav-bar {
  background-color: var(--brand-primary);
}

html.high-contrast .main-nav-bar {
  background-color: #000000;
  border-top: 2px solid #ffff00;
}

.main-nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  gap: 0.35rem;
}

.main-nav-container li a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  padding: 0.8rem 1.05rem;
  font-weight: 700;
  font-size: 0.96rem;
  border-bottom: 3px solid transparent;
}

.main-nav-container li a:hover,
.main-nav-container li a[aria-current="page"] {
  background-color: rgba(255, 255, 255, 0.18);
  border-bottom-color: #ffbf00;
}

html.high-contrast .main-nav-container li a {
  color: #ffff00;
}

html.high-contrast .main-nav-container li a:hover,
html.high-contrast .main-nav-container li a[aria-current="page"] {
  background-color: #ffff00;
  color: #000000;
  border-bottom-color: #ffffff;
}

/* ==========================================================================
   MAIN LAYOUT & SECTIONS
   ========================================================================== */
main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* Urlaubs- und Neuigkeiten-Banner */
.vacation-box {
  background-color: var(--alert-bg);
  border: 3px solid var(--alert-border);
  border-radius: var(--radius-main);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-soft);
}

.vacation-box[hidden] {
  display: none !important;
}

.vacation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.vacation-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html.high-contrast .vacation-title {
  color: #ffff00;
}

.vacation-body p {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.vacation-highlight {
  font-weight: 800;
  text-decoration: underline;
}

/* Hero-Sektion */
.hero-card {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--bg-card) 100%);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-main);
  padding: 2rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

html.high-contrast .hero-card {
  background: #000000;
  border: 2px solid #ffff00;
}

.hero-badge {
  display: inline-block;
  background-color: var(--brand-primary);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

html.high-contrast .hero-badge {
  background-color: #ffff00;
  color: #000000;
}

.hero-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  color: var(--brand-dark);
  margin-bottom: 1rem;
  line-height: 1.25;
}

html.high-contrast .hero-title {
  color: #ffff00;
}

.hero-text p {
  margin-bottom: 0.9rem;
}

.hero-signature {
  font-weight: 800;
  color: var(--brand-primary);
  margin-top: 1rem;
  font-size: 1.08rem;
}

.hero-visual {
  background: var(--brand-light);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-main);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Wichtiger Zahlungs-Hinweis (EC/Kreditkarte kontaktlos) */
.payment-banner {
  background-color: var(--bg-accent);
  border-left: 6px solid var(--brand-primary);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.1rem 1.35rem;
  border-radius: 8px;
  margin-top: 1.1rem;
  font-weight: 700;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

html.high-contrast .payment-banner {
  background-color: #000000;
  color: #ffff00;
  border: 2px solid #ffff00;
}

/* Sektionen & Vorlese-Button pro Abschnitt */
.content-section {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-main);
  padding: 1.85rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-soft);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.35rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  color: var(--brand-primary);
}

.section-tts-btn {
  background-color: var(--brand-light);
  color: var(--brand-dark);
  border: 2px solid var(--brand-primary);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.section-tts-btn:hover {
  background-color: var(--brand-primary);
  color: #ffffff;
}

html.high-contrast .section-tts-btn {
  background-color: #000000;
  color: #ffff00;
  border: 2px solid #ffff00;
}

html.high-contrast .section-tts-btn:hover {
  background-color: #ffff00;
  color: #000000;
}

/* Grid-System für Sprechzeiten, Katzenzimmer & Leistungen */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Sprechzeiten-Tabelle */
.hours-list {
  list-style: none;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-card);
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.hours-list li:last-child {
  border-bottom: none;
}

.hours-list li:nth-child(even) {
  background-color: var(--brand-light);
}

.hours-day {
  font-weight: 700;
}

.hours-closed {
  color: #b91c1c;
  font-weight: 700;
}

html.high-contrast .hours-closed {
  color: #ffff00;
  text-decoration: underline;
}

/* Katzenbehandlungszimmer Spezial-Sektion */
.cat-room-highlight {
  background-color: var(--accent-cat-bg);
  border-color: var(--accent-cat);
}

.cat-room-highlight .section-title {
  color: var(--accent-cat);
}

.feature-checklist {
  list-style: none;
  margin-top: 1rem;
}

.feature-checklist li {
  padding: 0.45rem 0;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

/* Leistungskarten */
.service-card {
  background: var(--brand-light);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.service-card h3 {
  color: var(--brand-primary);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Links im Hauptbereich bei Hochkontrast */
html.high-contrast main a {
  color: #ffff00 !important;
  text-decoration: underline;
}

/* ==========================================================================
   ZENTRALER FOOTER (INKL. CONFIRMATION BIAS / ANGELIKA KEUSSEN)
   ========================================================================== */
.site-footer {
  background-color: var(--brand-dark);
  color: #ffffff;
  margin-top: auto;
  padding: 2.5rem 1rem 1.5rem;
  border-top: 4px solid var(--brand-primary);
}

html.high-contrast .site-footer {
  color: #ffff00;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-col h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #ffbf00;
}

.footer-col p,
.footer-col li {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

html.high-contrast .footer-col p,
html.high-contrast .footer-col li {
  color: #ffff00;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-col a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
}

.footer-col a:hover {
  color: #ffbf00;
}

html.high-contrast .footer-col a {
  color: #ffff00;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 1.25rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
}

html.high-contrast .footer-bottom {
  color: #ffff00;
}

.footer-bottom a {
  color: #ffbf00;
  text-decoration: underline;
  font-weight: 700;
}

/* ==========================================================================
   SUBARU-STERNZENTRALE (ADMIN & URLAUBSSCHALTUNG)
   ========================================================================== */
.admin-form-group {
  margin-bottom: 1.15rem;
}

.admin-form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.admin-input,
.admin-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

html.high-contrast .admin-input,
html.high-contrast .admin-textarea {
  background-color: #000000;
  color: #ffff00;
  border-color: #ffff00;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff;
  border: 2px solid transparent;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background-color: var(--brand-dark);
}

html.high-contrast .btn-primary {
  background-color: #ffff00;
  color: #000000;
  border-color: #ffff00;
}

.stat-box {
  background: var(--brand-light);
  border: 2px solid var(--brand-primary);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-primary);
}

@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 1.35rem;
  }
  .header-top {
    flex-wrap: wrap;
  }
  .brand-link {
    flex-wrap: wrap;
  }
}