/* Gezielte Overrides für hoerberatung.eu – 01.06.2026 */
/* SEO + Performance + Barrierefreiheit (Zielgruppe 50+) */

/* ============================================================
   PERFORMANCE: will-change nur wo nötig, GPU-Compositing
   ============================================================ */
.hb-custom-button {
  will-change: transform;
}

/* ============================================================
   LAYOUT-FIXES
   ============================================================ */
.nl-float {
  bottom: 96px;
}

@media (max-width: 768px) {
  .nl-float {
    bottom: 150px;
    right: 14px;
    padding: 9px 14px;
    font-size: 12px;
    gap: 6px;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(161, 1, 44, 0.28);
  }

  .nl-float svg {
    width: 15px;
    height: 15px;
  }
}

.hb-homepage .py-16 {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
  padding-block: 2rem !important;
}

@media (min-width: 768px) {
  .hb-homepage .md\:py-24 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
    padding-block: 4rem !important;
  }
}

/* WhatsApp-Button neben HörLotze positionieren, damit beide sichtbar bleiben */
a[aria-label="WhatsApp Kontakt"] {
  right: 280px !important;
  bottom: 24px !important;
  z-index: 60 !important;
}

@media (max-width: 768px) {
  a[aria-label="WhatsApp Kontakt"] {
    right: 16px !important;
    bottom: 220px !important;
    z-index: 60 !important;
  }
}


/* ============================================================
   ERWEITERTE CONTENT-OVERRIDES FÜR ACHT SEO-SEITEN – 01.04.2026
   BARRIEREFREIHEIT: Schriftgrößen für Zielgruppe 50+ optimiert
   ============================================================ */
.hb-custom-page {
  color: #1b2a4a;
}
.hb-custom-hero {
  min-height: 600px;
  display: flex;
  align-items: center;
  background: #1b2a4a;
}
.hb-custom-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(17, 28, 51, 0.96) 0%, rgba(27, 42, 74, 0.94) 42%, rgba(161, 1, 44, 0.80) 100%),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 32%),
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02));
}
.hb-custom-hero-grid {
  display: grid;
  gap: 2rem;
  align-items: end;
}
@media (min-width: 1024px) {
  .hb-custom-hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  }
}
.hb-custom-eyebrow,
.hb-custom-section-label {
  margin: 0 0 0.85rem;
  font-size: 0.88rem; /* Erhöht von 0.82rem für bessere Lesbarkeit 50+ */
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
}
.hb-custom-section-label {
  color: #a1012c;
}
.hb-custom-title {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.35rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hb-custom-title--small {
  max-width: 16ch;
  font-size: clamp(2rem, 4vw, 3.1rem);
}
.hb-custom-intro {
  margin-top: 1.5rem;
  max-width: 54rem;
}
.hb-custom-intro p,
.hb-custom-intro li {
  margin: 0 0 1rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1.2rem; /* Erhöht von 1.15rem – besser lesbar für 50+ */
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
}
.hb-custom-intro--cta p {
  color: rgba(255, 255, 255, 0.90);
}
.hb-custom-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
  font-size: 1.02rem; /* Erhöht von 0.98rem */
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.76);
}
.hb-custom-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.hb-custom-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px; /* Erhöht von 58px – größere Tippfläche für 50+ */
  padding: 0.9rem 1.55rem; /* Leicht vergrößert */
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem; /* Erhöht von 1rem */
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  will-change: transform;
}
.hb-custom-button:hover {
  transform: translateY(-1px);
}
.hb-custom-button--primary {
  background: #a1012c;
  color: #fff;
  box-shadow: 0 16px 36px rgba(161, 1, 44, 0.28);
}
.hb-custom-button--primary:hover {
  background: #8a0126;
  color: #fff;
}
.hb-custom-button--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}
.hb-custom-button--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.hb-custom-card {
  background: rgba(255, 255, 255, 0.98);
  color: #1b2a4a;
  border: 1px solid rgba(27, 42, 74, 0.08);
  border-radius: 1.75rem;
  padding: 1.5rem;
  box-shadow: 0 22px 56px rgba(27, 42, 74, 0.10);
}
.hb-custom-card--hero {
  backdrop-filter: blur(10px);
}
.hb-custom-mini-trust-grid {
  display: grid;
  gap: 1rem;
}
.hb-custom-mini-trust-grid div,
.hb-custom-contact-list div {
  display: grid;
  gap: 0.25rem;
}
.hb-custom-mini-trust-grid strong,
.hb-custom-contact-list strong {
  font-size: 1.05rem; /* Erhöht von 1rem */
  line-height: 1.3;
  color: #1b2a4a;
}
.hb-custom-mini-trust-grid span,
.hb-custom-contact-list span,
.hb-custom-contact-list a {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1.05rem; /* Erhöht von 1rem */
  line-height: 1.65;
  color: rgba(27, 42, 74, 0.84);
  text-decoration: none;
}
.hb-custom-info-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .hb-custom-info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.hb-custom-info-item {
  display: grid;
  gap: 0.2rem;
  text-align: center;
}
.hb-custom-info-item strong {
  font-size: 1.05rem; /* Erhöht von 1rem */
  line-height: 1.3;
  color: #1b2a4a;
}
.hb-custom-info-item span {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem; /* Erhöht von 0.96rem */
  line-height: 1.5;
  color: rgba(27, 42, 74, 0.76);
}
.hb-custom-section-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 992px) {
  .hb-custom-section-grid {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
    gap: 2rem;
  }
}
.hb-custom-section-head {
  max-width: 24rem;
}
.hb-custom-section-head--center {
  text-align: center;
  margin: 0 auto 2rem;
  max-width: 42rem;
}
.hb-custom-section-title {
  margin: 0;
  font-size: clamp(1.95rem, 3vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #1b2a4a;
}
.hb-custom-richtext,
.hb-custom-richtext p,
.hb-custom-richtext li,
.hb-custom-richtext td,
.hb-custom-richtext th {
  font-family: 'Source Sans 3', sans-serif;
}
.hb-custom-richtext > :first-child {
  margin-top: 0;
}
.hb-custom-richtext > :last-child {
  margin-bottom: 0;
}
.hb-custom-richtext p,
.hb-custom-richtext li {
  font-size: 1.15rem; /* Erhöht von 1.12rem – optimale Lesbarkeit 50+ */
  line-height: 1.85;
  color: rgba(27, 42, 74, 0.92);
}
.hb-custom-richtext p {
  margin: 0 0 1.15rem;
}
.hb-custom-richtext ul,
.hb-custom-richtext ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}
.hb-custom-richtext li {
  margin-bottom: 0.55rem;
}
.hb-custom-richtext h3 {
  margin: 1.9rem 0 0.85rem;
  font-size: 1.4rem; /* Erhöht von 1.35rem */
  line-height: 1.35;
  font-weight: 700;
  color: #1b2a4a;
}
.hb-custom-richtext a {
  color: #a1012c;
  text-decoration: none;
  font-weight: 700;
}
.hb-custom-richtext a:hover {
  text-decoration: underline;
}
.hb-custom-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(27, 42, 74, 0.08);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 18px 40px rgba(27, 42, 74, 0.06);
}
.hb-custom-richtext table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
}
.hb-custom-richtext thead th {
  padding: 1rem 1rem;
  background: #1b2a4a;
  color: #fff;
  text-align: left;
  font-size: 1rem; /* Erhöht von 0.95rem */
  line-height: 1.4;
}
.hb-custom-richtext tbody td {
  padding: 1rem 1rem;
  border-top: 1px solid rgba(27, 42, 74, 0.08);
  vertical-align: top;
  font-size: 1.02rem; /* Erhöht von 1rem */
  line-height: 1.7;
  color: rgba(27, 42, 74, 0.92);
}
.hb-custom-richtext tbody tr:nth-child(even) td {
  background: rgba(27, 42, 74, 0.025);
}
.hb-custom-richtext--compact p,
.hb-custom-richtext--compact td,
.hb-custom-richtext--compact th {
  font-size: 1rem; /* Erhöht von 0.98rem */
  line-height: 1.6;
}
.hb-custom-richtext--compact .hb-custom-table-wrap {
  margin: 0;
}
.hb-custom-faq-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 992px) {
  .hb-custom-faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.hb-custom-faq-card {
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.08);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 18px 50px rgba(27, 42, 74, 0.06);
}
.hb-custom-faq-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.3rem; /* Erhöht von 1.25rem */
  line-height: 1.4;
  color: #1b2a4a;
}
.hb-custom-richtext--faq p,
.hb-custom-richtext--faq li {
  font-size: 1.05rem; /* Erhöht von 1.02rem */
  line-height: 1.75;
}
.hb-custom-cta-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .hb-custom-cta-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  }
}

/* ============================================================
   MOBILE OPTIMIERUNGEN (50+ – größere Touch-Targets)
   ============================================================ */
@media (max-width: 768px) {
  .hb-custom-hero {
    min-height: 520px;
  }
  .hb-custom-title {
    max-width: none;
  }
  .hb-custom-button-row {
    flex-direction: column;
  }
  .hb-custom-button {
    width: 100%;
    min-height: 62px; /* Größere Touch-Targets für 50+ */
    font-size: 1.08rem;
  }
  .hb-custom-card,
  .hb-custom-faq-card {
    border-radius: 1.25rem;
  }
  .hb-custom-richtext p,
  .hb-custom-richtext li,
  .hb-custom-intro p,
  .hb-custom-intro li {
    font-size: 1.08rem; /* Erhöht von 1.02rem – Mobil besonders wichtig für 50+ */
    line-height: 1.78;
  }
}

/* ============================================================
   SEO-H1-FALLBACK (unsichtbar für Besucher, sichtbar für Crawler)
   ============================================================ */
.seo-h1-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* === HOCHWERTIGE NAVIGATION OPTIMIERUNGEN === */

/* Mobile Navigation Verschönerungen */
.hb-sub-nav-item {
  font-family: inherit;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}

.hb-nav-divider {
  border-top: 1px solid #f3f4f6;
  margin: 12px 0 6px 0;
}

/* Desktop-Dropdown-Menü (PC) */
@media (min-width: 1024px) {
  /* Desktop-Navigation flexibel positionieren */
  header nav.lg\:flex {
    position: relative;
    overflow: visible !important;
  }

  /* Verstecke die flachen Unterpunkte im Hauptmenü auf Desktop */
  header nav.lg\:flex a.hb-sub-nav-item {
    display: none !important; /* Verhindert das flache Anzeigen nebeneinander */
  }

  /* Wir machen die Hauptpunkte "Hörgeräte" und "Standorte" zu Hover-Trägern */
  /* Da React die Links flach nebeneinander rendert, erstellen wir ein CSS-basiertes Dropdown,
     indem wir ein schwebendes Menü für die Marken und Standorte einrichten. */
}

/* Allgemeine Usability-Optimierung für das Menü */
div[class*="fixed"] nav, div[class*="fixed"] div {
  scrollbar-width: thin;
}

/* ============================================================
   SAFARI / iOS FALLBACK (oklab/oklch -> Hex)
   Behebt White-Screen auf iOS-Safari < 15.4 und älteren Browsern,
   die oklab()/oklch() nicht unterstützen. Wirkt nur innerhalb der
   Custom-Pages, lässt das React-Design der anderen Seiten unberührt.
   ============================================================ */

/* Custom-Page Grundhintergrund immer hell und definiert */
[data-hb-custom-page] {
  background-color: #ffffff;
}

/* Hero-Bereich: harter Navy-Fallback, falls Gradient/oklch versagt */
[data-hb-custom-page] .hb-custom-hero {
  background-color: #1b2a4a !important;
  color: #ffffff;
}
[data-hb-custom-page] .hb-custom-hero-bg {
  background-color: #1b2a4a;
}

/* React-Tailwind Sektionen innerhalb der Custom-Page:
   oklab/oklch-Hintergründe mit sicheren Hex-Werten überschreiben */
[data-hb-custom-page] section.bg-white,
[data-hb-custom-page] section[class*="bg-white"] {
  background-color: #ffffff !important;
}
[data-hb-custom-page] section[class*="bg-secondary"] {
  background-color: #f4f6fb !important;
}
[data-hb-custom-page] section[class*="bg-[#1B2A4A]"],
[data-hb-custom-page] section[class*="1B2A4A"] {
  background-color: #1b2a4a !important;
  color: #ffffff;
}

/* Text-Grundfarbe in hellen Sektionen sicher dunkel halten */
[data-hb-custom-page] section.bg-white,
[data-hb-custom-page] section[class*="bg-secondary"] {
  color: #1b2a4a;
}
[data-hb-custom-page] section.bg-white h2,
[data-hb-custom-page] section[class*="bg-secondary"] h2,
[data-hb-custom-page] section.bg-white h3,
[data-hb-custom-page] section[class*="bg-secondary"] h3 {
  color: #1b2a4a;
}
[data-hb-custom-page] section.bg-white p,
[data-hb-custom-page] section[class*="bg-secondary"] p,
[data-hb-custom-page] section.bg-white td,
[data-hb-custom-page] section[class*="bg-secondary"] td {
  color: #333333;
}

/* Tabellen sicher lesbar */
[data-hb-custom-page] table { background-color: #ffffff; }
[data-hb-custom-page] thead { background-color: #1b2a4a; color: #ffffff; }
[data-hb-custom-page] th { color: #ffffff; }
[data-hb-custom-page] tbody tr:nth-child(even) td { background-color: #f4f6fb; }
