/* =====================================================================
   Amirian Haustechnik – Mobil-Optimierung (Stand 26.10.2026)
   1. Anrufleiste „Jetzt anrufen“ (nur Handy-Breite bis 767 px)
   2. Startseite: Kopfbereich – Logo und Hinweis „Meisterbetrieb …“
      überlappen nicht mehr
   3. Brotkrumen-Zeile (<nav class="crumbs">) wird nicht mehr wie das
      Hauptmenü oben fixiert
   Am Computer (ab 768 px) bleibt bis auf Punkt 3 alles wie vorher.
   ===================================================================== */

/* ---------- 1. Anrufleiste ---------- */
.ah-callbar{display:none}

@media (max-width:767px){
  .ah-callbar{
    display:block;
    position:fixed;left:0;right:0;bottom:0;
    z-index:150;                      /* unter Menü (200) und Cookie-Banner (9999) */
    padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));
    background:rgba(10,33,56,.97);
    box-shadow:0 -4px 18px rgba(3,20,40,.22);
    transition:transform .25s ease;
    -webkit-tap-highlight-color:transparent;
  }
  .ah-callbar__btn{
    display:flex;align-items:center;justify-content:center;gap:10px;
    min-height:50px;padding:0 16px;
    border-radius:10px;
    background:#146c46;color:#fff;
    font-family:inherit;font-size:1rem;font-weight:800;letter-spacing:.01em;line-height:1.1;
    text-decoration:none;
    box-shadow:0 4px 14px rgba(28,138,90,.35);
  }
  .ah-callbar__btn:active{background:#125c3f}
  .ah-callbar__btn:focus-visible{outline:3px solid #fff;outline-offset:2px}
  .ah-callbar__icon{width:20px;height:20px;flex:0 0 20px;fill:currentColor}
  .ah-callbar__nr{font-size:.86rem;font-weight:600;opacity:.95;white-space:nowrap}

  /* Platz am Seitenende, damit nichts dauerhaft unter der Leiste liegt */
  body{padding-bottom:calc(66px + env(safe-area-inset-bottom,0px))}

  /* WhatsApp-Button über die Leiste setzen (Feinsteuerung per JS bei Cookie-Banner) */
  body .wa-float{bottom:calc(80px + env(safe-area-inset-bottom,0px))}

  /* Während Eingaben in Formularen (Tastatur offen) ausblenden */
  html.ah-kbd .ah-callbar{transform:translateY(120%)}
  html.ah-kbd body .wa-float{bottom:18px}

  /* Geöffnetes Handy-Menü: Leiste ausblenden, damit das Menü frei bleibt */
  html:has(.nav-links.open) .ah-callbar{transform:translateY(120%)}

  /* ---------- 2. Startseite: Kopfbereich ---------- */
  #hero{
    height:auto;
    min-height:100vh;min-height:100svh;
    padding:96px 0 44px;              /* Abstand unter dem fixierten Kopf */
  }
  #hero .hero-badge{margin-bottom:1.4rem;max-width:100%}
  #hero .hero-badge-text{letter-spacing:.16em;line-height:1.45}

  /* Hinweis-Zeile ohne Silbentrennung („Düssel-dorf“) */
  .hero-badge-text{-webkit-hyphens:manual;hyphens:manual;text-wrap:balance}
}

@media print{.ah-callbar{display:none!important}}

/* ---------- 3. Brotkrumen nicht fixieren ----------
   Die allgemeine Regel nav{position:fixed…} des Hauptmenüs griff auch auf
   <nav class="crumbs">. :where() hält die Spezifität niedrig, damit
   seiteneigene .crumbs-Regeln weiter gelten. */
nav:where(.crumbs){
  position:static;top:auto;left:auto;right:auto;z-index:auto;
  display:block;padding:0;
  background:none;box-shadow:none;
  -webkit-backdrop-filter:none;backdrop-filter:none;
  transition:none;
}

/* Lesbarkeit und Bedienung für die vorhandenen Seitentypen */
@media screen {
  :where(html) { scroll-padding-block: 6rem 5rem; }
  :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid #005a98;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #fff;
  }
  :is(.hero-sub, .section-sub, .faq-a-inner, .regie-note, .regie-rule p) {
    font-size: 1.0625rem;
    line-height: 1.65;
  }
  #hero .hero-h1 em { color: #7ad7a5; }
  #hero .hero-tool.t-navy .hero-tool-txt span { color: #7ad7a5; }
  :is(.section-label, .hero-badge-text, .k-label, .crumbs, .k-tag, .hero-secondary) {
    font-size: .875rem;
    letter-spacing: .055em;
    line-height: 1.45;
  }
  :is(.section-label, .k-label) { color: #24516d; }
  :is(.notdienst-text, .foerderung-text, .werte-left, .kontakt-left) :is(.section-label, .k-label) { color: #75c7ed; }
  :is(.btn-primary, .btn-outline, .btn-navy, .btn-send, .regie-download, .hero-tool, .page-cta > a) {
    font-size: .9375rem;
    letter-spacing: .045em;
    line-height: 1.35;
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
  .btn-send { padding-inline: 1rem; }
  :is(.faq-q, .form-title) { font-size: 1.0625rem; }
  .faq-item.open .faq-a { max-height: none; }
  :is(.faq-q-text, .k-value, .regie-rule p, .regie-example-row span:first-child) { overflow-wrap: anywhere; }
  :is(.f-group, .form-group, .field) :is(label, legend), .lbl { font-size: .9375rem; letter-spacing: .04em; }
  :is(input, select, textarea) { font-size: 1rem; max-width: 100%; }
  :is(.f-group, .form-group, .field, .form-row) { min-width: 0; }
  .footer-links { flex-wrap: wrap; }
  :is(.footer-links a, .footer-copy, .footer-text) { font-size: .875rem; line-height: 1.5; }
  :is(.brand-card, .vorteil-card, .info-card, .wpc-text, .ks-card, .weiter-card, .rg-card, .art-wrap) { min-width: 0; overflow-wrap: anywhere; }
  :is(.faq-mehr, .faq-jump) a { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
  .tabelle:focus-visible { outline: 2px solid #005a98; outline-offset: 3px; }

  .regie-meta, .regie-foot { font-size: 1rem; line-height: 1.6; }
  #regie-intro, .regie-block { opacity: 1; transform: none; }
  #regie-intro { padding-block-start: clamp(3.5rem, 6vw, 6rem); }
  #regie-intro .section-title em { color: #17638c; }
  .regie-meta { gap: .5rem 1.5rem; }
  .regie-foot { font-style: normal; }
  .regie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; }
  .regie-actions .regie-download { margin-top: 0; justify-content: center; }
  .regie-actions a:not(.regie-download) { color: #174c6a; font-weight: 700; padding-block: .6rem; }
  .page-cta > .regie-chat { display: none; }
  .price-table { font-size: 1rem; }
  :is(.price-table th, .price-table .nr, .price-table .leistung-desc, .zuschlag-pill) { font-size: .9375rem; }
  .price-table .nr { color: #24516d; }
  .price-table th, .regie-example h3 { letter-spacing: .035em; }
  .regie-example h3 { font-size: 1rem; }
  :is(.regie-example-row, .regie-example-row.total) { font-size: 1rem; }
  .price-mobile-label { display: none; }
}

@media screen and (max-width: 900px) {
  .wpc-card { flex-direction: column; text-align: center; padding-inline: clamp(16px, 4vw, 40px); }
  .tabelle table { min-width: 0; table-layout: fixed; font-size: 1rem; }
  .tabelle :is(th, td, th.r, td.r) { padding-inline: clamp(7px, 2vw, 14px); white-space: normal; overflow-wrap: anywhere; }
  :is(#regie-intro, .regie-block) .section-title { font-size: clamp(1.75rem, 6vw, 2.8rem); line-height: 1.1; overflow-wrap: anywhere; }
  .regie-block h2 { line-height: 1.25; }
  .regie-example { padding: 1rem; }
  .regie-example-row { gap: .5rem; }
  .regie-example-row span:last-child { white-space: nowrap; }
  .table-scroll { overflow: visible; }
  .price-table, .price-table tbody { display: block; min-width: 0; }
  .price-table thead {
    position: absolute; inline-size: 1px; block-size: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .price-table tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem;
    padding: .9rem; margin-block: 0 .65rem; border: 1px solid var(--border); border-radius: .55rem;
    background: var(--light);
  }
  .regie-block.alt .price-table tbody tr { background: #fff; }
  #einsatzzeiten .price-table tbody tr { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
  #einsatzzeiten .price-table tbody td:nth-child(3) { hyphens: auto; }
  .price-table tbody tr td, .regie-block.alt .price-table tbody tr:nth-child(even) td {
    display: block; padding: 0; border: 0; background: transparent; overflow-wrap: anywhere;
  }
  .price-table tbody td:nth-child(-n+2) { grid-column: 1 / -1; }
  .price-table td.num { text-align: left; white-space: normal; }
  .price-mobile-label { display: block; color: #24516d; font-weight: 650; font-size: .875rem; margin-bottom: .15rem; }
  .price-table .nr .price-mobile-label { display: inline; margin-right: .35rem; }
  .price-table .zuschlag-pill { padding: .15rem .45rem; }
}

@media screen and (max-width: 767px) {
  .ah-callbar__nr { font-size: .9375rem; }
  .ah-callbar__btn { padding: .45rem .6rem; gap: .45rem; flex-wrap: wrap; }
  .ah-callbar__icon { flex-shrink: 0; }
  :is(.section-label, .hero-badge-text, .k-label) { letter-spacing: .045em; }
  #hero .hero-badge-text { letter-spacing: .055em; }
  :is(.btn-primary, .btn-outline, .btn-navy) { padding-inline: 1.15rem; }
  :is(.nav-hamburger, .hamburger) { min-width: 44px; min-height: 44px; }
  #cookie-consent .cc-btn { min-height: 44px; }
  body:has(#regie-intro) .wa-float { display: none; }
  .page-cta > .regie-chat { display: table; margin: .75rem auto 0; }
}

@media screen and (max-width: 359px) {
  .nav-logo img { max-inline-size: 39vw; height: auto; }
  .th-logo img { max-inline-size: 41vw; height: auto; }
  .th-notdienst { padding-inline: .65rem; min-height: 44px; }
  .brand-grid { grid-template-columns: minmax(0, 1fr); }
  :is(.vorteil-card, .info-card) { padding-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  :is(.reveal, .reveal-item) { opacity: 1; transform: none; transition: none; }
}

@media print { .price-mobile-label { display: none; } }
