/*
 * Globales Raster (25.11.2026, Theme 2.8.0), siehe inc/raster.php
 * Lädt nach style.css.
 */

/* 1. Hero mit Grafik: H1 läuft über die volle Inhaltsbreite und damit über die Grafik.
      Der globale Kopf-Stil setzt :is(h1,…){text-wrap:balance}, das hält die H1 schmal. */
@media (min-width: 1024px) { h1.sauria-h1-voll { text-wrap: wrap; } }

/* 2. Hero-Faktenkarte (480 x 480) */
.sauria-faktenkarte { display: block; width: 100%; height: auto; }
.sauria-faktenkarte text { font-family: 'Inter', sans-serif !important; }
@media (prefers-reduced-motion: no-preference) {
    .sauria-faktenkarte .fk-ein { animation: fk-ein .5s cubic-bezier(.2, .7, .2, 1) both; }
    .sauria-faktenkarte .fk-balken { transform-box: fill-box; transform-origin: left center; animation: fk-balken 1s cubic-bezier(.2, .7, .2, 1) .35s both; }
    .sauria-faktenkarte .fk-saeule { transform-box: fill-box; transform-origin: center bottom; animation: fk-saeule .8s cubic-bezier(.2, .7, .2, 1) .4s both; }
}
@keyframes fk-ein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fk-balken { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fk-saeule { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* 3. Erstanalyse-Hero mit Faktenkarte: gleiches Raster wie die Leistungen
      (H1 volle Breite, darunter Text links und Karte 480 rechts, oben bündig). */
.ea-seite .ea-h1.sauria-h1-voll { max-width: none; }
.ea-hero-cols:has(.ea-hero-karte) { margin-top: 1.5rem; }
.ea-hero-karte { display: none; width: 100%; max-width: 480px; margin: 0 auto; }
@media (min-width: 768px) { .ea-hero-karte { display: block; } }
@media (min-width: 1024px) {
    .ea-hero-cols:has(.ea-hero-karte) { grid-template-columns: minmax(0, 1fr) 480px; align-items: start; gap: 3rem; }
    .ea-hero-karte { margin-right: 0; }
}
@media (min-width: 1024px) { .sauria-nobr { white-space: nowrap; } }
/* ab 400 px: darunter (320 px, Zoom) dürfen auch kurze Wörter am Bindestrich umbrechen, WCAG 1.4.10 */
@media (min-width: 400px) { .sauria-nobr--immer { white-space: nowrap; } }

/* 4. Leistungs-Hero: Grafikspalte fest 480 px, Textspalte nimmt den Rest (sonst 464 px bei 1024) */
@media (min-width: 1024px) {
    .sauria-hero-text { flex: 1 1 0%; width: auto !important; min-width: 0; }
    .sauria-hero-grafik { flex: 0 0 480px; width: 480px !important; }
}
/* Tool-Vorschau: unter 1024 px zentriert und höchstens 480 px breit, wie die Leistungsgrafik */
.sauria-hero-grafik--tool { width: 100%; max-width: 480px; margin: 2.5rem auto 0; }
@media (min-width: 1024px) { .sauria-hero-grafik--tool { margin: 0; } }
/* Blogbeitrag: Bildspalte wie die Leistungsgrafik, unter 1024 px zentriert, höchstens 480 px */
.sauria-hero-grafik--blog { width: 100%; max-width: 480px; margin: 0 auto; }
@media (min-width: 1024px) { .sauria-hero-grafik--blog { margin: 0; } }
/* Über mich: Porträt 1:1 füllt das 480er-Feld vollständig */
.sauria-hero-grafik--portrait { width: 100%; max-width: 480px; margin: 0 auto; }
.sauria-portrait { aspect-ratio: 1 / 1; }
@media (min-width: 1024px) { .sauria-hero-grafik--portrait { margin: 0; } }

/* 5. Blog-Grafik: Kennzeile als schlichte Textzeile statt Pille mit Gold-Punkt (Regel 23./25.11.2026) */
.blog-grafik__badge { display: block; padding: 0; background: none; border: 0; border-radius: 0; }
.blog-grafik__dot { display: none; }

/* 6. Kopfbereiche ohne Grafik (zentriert): gleiche Abstände wie die Leistungen.
      Breadcrumb bis H1 32 px (mb-8 der Breadcrumb), Kopfbereich bis erster Inhalt = Abstand der
      Folgesektion (py-16 = 64 px). Vorher lagen 64 px Innenabstand oben und unten zusätzlich darin. */
.sauria-kopf { padding: 0 !important; }
.sauria-kopf > .relative > :last-child,
.sauria-kopf > .relative.z-10 > :last-child { margin-bottom: 0 !important; }
/* Nur wenn der Kopf das letzte Element seiner Sektion ist; folgt noch Inhalt (Standort-Kennzahlen,
   Aktionsmarketing-Bild), bekommt der Kopf unten 64 px. Die Folgesektion hat immer 64 px oben,
   auch wenn sie nur pb-16 oder py-8 trägt (Suche, 404, Hoster-Status, Serverstatus). */
section:has(.sauria-kopf:last-child) { padding-bottom: 0 !important; }
.sauria-kopf:not(:last-child) { margin-bottom: 4rem; }
section:has(.sauria-kopf:last-child) + section { padding-top: 4rem !important; }

/* 7. Einheitlicher Sektionsrhythmus (Projektregel py-16): 64 px oben und unten, auf jeder Breite.
      Vorher py-16, py-20 und md:py-24 gemischt, dadurch 128, 160 oder 186 px zwischen Sektionen. */
section.py-20, section.py-24 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
section.pb-20 { padding-bottom: 4rem !important; }
@media (min-width: 768px) {
    section.md\:py-24 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
}
/* Leerer Paginierungs-Container (nur eine Seite) belegt sonst 48 px (Archive Tools, Leistungen, Kategorien) */
div.mt-12.flex.justify-center:not(:has(*)) { display: none; }

/* 8. Bilder, die ihr Feld füllen (Live-Ansichten), Erkennung in sauria_ganzes_bild() */
img.sauria-fuellt { object-fit: cover !important; object-position: center !important; }
.sauria-feld-16-10 { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.sauria-feld-16-10 > img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Karte mit Bildfeld oben: eigener Radius statt rounded-3xl, weil style.css mobil jedem
   [class*="rounded-3xl"] 1rem Innenabstand gibt (das Bild läge sonst eingerückt) */
.sauria-karte { border-radius: 1.5rem; overflow: hidden; }
/* Mega-Menü: Live-Ansichten füllen das 4:3-Vorschaufeld (Schutzzone in der Bildmitte), keine Füllkopie */
#mega-menu-panel .smm-img[src*="/live-ansicht-"] { object-fit: cover !important; width: 100% !important; height: 100% !important; }
#mega-menu-panel .smm-fill[src*="/live-ansicht-"] { display: none !important; }

/* 9. Blogkarten: Bildfeld im Format der Blog-Textgrafik (430 x 448), Text bleibt ganz und ohne Unschärferand */
.sauria-feld-blog { position: relative; aspect-ratio: 430 / 448; overflow: hidden; }
.sauria-feld-blog > img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Seiten-Screenshots füllen ihr Feld und zeigen den oberen Teil der Seite (wie im Browser) */
.am-protokoll img.sauria-vorschau__bild, .css-shot-mobil img.sauria-vorschau__bild { object-fit: cover !important; object-position: center top !important; }
.am-protokoll img.sauria-vorschau__fuell, .css-shot-mobil img.sauria-vorschau__fuell { display: none !important; }
