/* Handy: Inhalt zuerst. Schmaler Seitenkopf, keine Brotkrumen, Einleitung hinter einem i-Knopf,
   Seitentitel wandert beim Scrollen in die Kopfzeile (js/mobil-kompakt.js). */
.rha-info-knopf, .rha-kopf-titel, .rha-mw-knopf { display: none; }

@media (max-width: 767px) {
  :root { --rh-logo-gross: 4.5rem; }
  /* Brotkrumen braucht es hier nicht: die Reiterleiste zeigt, wo man ist */
  .rha-brotkrumen { display: none !important; }

  /* Seitenkopf mit Bild: nur noch ein schmaler Streifen mit Titel */
  #hero > div.relative { padding-top: calc(var(--rha-kopf, 64px) - var(--rh-logo-push, 0px) + .9rem) !important; padding-bottom: .9rem !important; }
  #hero div.relative .flex { justify-content: flex-start !important; text-align: left !important; }
  #hero div.relative .flex > div > :not(h1) { display: none !important; }
  #hero h1 { font-size: 1.45rem !important; line-height: 1.2 !important; margin: 0 !important; }
  #hero.rha-hero-mit-i > div.relative { padding-right: 3.5rem !important; }
  #hero > div.relative > .flex > div { width: 100% !important; }

  /* Standortseiten: Bild bleibt gross, Titel unten im Bild */
  body:has(.rha-standort) #hero > div.relative { min-height: calc(var(--rha-kopf, 64px) + 8rem); display: flex; align-items: flex-end; }
  body:has(.rha-standort) #hero > div.relative > .flex { width: 100%; }
  body:has(.rha-standort) #hero > div.relative { padding-bottom: 1rem !important; }

  /* Inhaltsbereich näher an den Kopf */
  main > div > .py-12 { padding-top: 1rem !important; padding-bottom: 1.5rem !important; }
  .rh-content h2 { font-size: 1.3rem !important; margin-top: 1.1rem !important; margin-bottom: .6rem !important; }
  .rh-content .rha-gruppe { margin-top: .9rem; }
  .rha-gruppe-text { font-size: .98rem; margin-bottom: .75rem; }
  /* Produkt-Kacheln: flacheres Bild, kleinere Schrift, engere Abstände */
  .rha-kat-bild img { height: 7rem !important; }
  .rha-kategorien { gap: .8rem !important; }
  .rha-kat-text { padding: .7rem .95rem .85rem !important; }
  .rha-kat-text h3, .rha-kat-text h2 { font-size: 1.2rem !important; margin: 0 0 .25rem !important; }
  .rha-kat-text p { font-size: .98rem !important; line-height: 1.35 !important; margin: 0 0 .35rem !important; }
  .rha-kat-text .rha-sorten { font-size: .88rem !important; color: #4b5563; }
  .rha-kat-text .rha-erhaeltlich .rha-badge { font-size: .82rem; padding: .15rem .6rem; }

  /* Standort-Kacheln: kompakt, Vorschaubild links, «Details ›» als Pfeil rechts */
  .rha-eintraege { gap: .6rem !important; }
  .rha-eintrag a { min-height: 0 !important; padding: .65rem .8rem !important; border-width: 1.5px !important; position: relative; }
  .rha-eintrag a.rha-e-mit-bild { gap: .75rem; }
  .rha-e-bild { width: 6rem; height: 6rem; }
  .rha-e-name { font-size: 1.05rem !important; line-height: 1.25; }
  .rha-e-zeile { font-size: .92rem !important; line-height: 1.3; }
  .rha-e-mehr { display: none !important; }
  .rha-eintrag a::after { content: "›"; position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; line-height: 1; color: #0f5c43; }
  .rha-e-text { padding-right: 1.1rem; }

  /* Sprungmarken (Über uns): kompakter */
  .rha-sprung { gap: .4rem !important; margin-bottom: .6rem !important; }
  .rha-sprung a { min-height: 2.5rem !important; padding: .25rem .9rem !important; font-size: .95rem !important; border-width: 1.5px !important; }

  /* Einleitung hinter dem i-Knopf */
  .rha-info-knopf { position: absolute; right: .9rem; bottom: .45rem; top: auto; transform: none; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 2px solid #fff; border-radius: 50%; background: rgba(15, 92, 67, .92); color: #fff; font: italic 700 1.3rem/1 Georgia, "Times New Roman", serif; cursor: pointer; }
  .rha-info-knopf[aria-expanded="true"] { background: #fff; color: #0f5c43; }
  .rha-info-knopf--frei { position: static; transform: none; margin: 0 0 .6rem auto; border-color: #0f5c43; background: #e3f3ec; color: #0f5c43; }
  .rha-info-knopf--frei[aria-expanded="true"] { background: #0f5c43; color: #fff; }
  /* Knopf «Mehrweg» links neben dem i-Knopf */
  .rha-mw-knopf { position: absolute; right: 3.9rem; bottom: .45rem; z-index: 2; display: inline-flex; align-items: center; gap: .35rem; height: 2.5rem; padding: 0 .85rem 0 .7rem; border: 2px solid #fff; border-radius: 999px; background: rgba(15, 92, 67, .92); color: #fff; font-size: .95rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .rha-mw-knopf svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  #hero.rha-hero-mit-mw > div.relative { padding-right: 10.5rem !important; }
  .rha-info-zu { display: none !important; }
  .rha-info-offen { animation: rha-einblenden .25s ease; }
  .rha-info-puls::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #167a5a; animation: rha-puls 1.6s ease-out infinite; pointer-events: none; }
  #hero .rha-info-puls::after { border-color: #fff; }

  /* Seitentitel in der Kopfzeile, sobald der Titel im Seitenkopf aus dem Bild gescrollt ist */
  .rha-kopf-titel { position: absolute; left: 5.75rem; right: 4.75rem; top: 0; bottom: 0; display: none; align-items: center; min-width: 0; font-weight: 700; font-size: 1.1rem; line-height: 1.2; color: #1f2937; pointer-events: none; }
  .rha-kopf-titel span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
  html.rha-titel-im-kopf .rha-kopf-titel { display: flex; animation: rha-einblenden .2s ease; }
  html.rha-titel-im-kopf.logo-gross .rha-kopf-titel { display: none; }
  header.rha-suche-kopf .rha-kopf-titel { display: none !important; }
  /* Hero-Bild läuft hinter dem Titel in die Kopfzeile weiter */
  header.rha-kopf-bild { background-image: linear-gradient(rgba(17, 24, 20, var(--rha-kopf-abdunkeln, .75)), rgba(17, 24, 20, var(--rha-kopf-abdunkeln, .75))), var(--rha-kopf-bild); background-size: cover; background-position: center; }
  header.rha-kopf-bild .rha-kopf-titel { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
}
.dark .rha-kopf-titel { color: #f3f4f6; }

@keyframes rha-einblenden { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rha-puls { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rha-info-offen, html.rha-titel-im-kopf .rha-kopf-titel { animation: none; } .rha-info-puls::after { animation: none; opacity: .8; } }
