/* ============================================================================
   Handschriftlicher Anpassungs-Layer – WIRTH elektrotechnik · Onepager Kabelmesswagen (Entwurf 2026-11-21)
   Lädt NACH theme.css. Basis bleibt Tailwind; hier stehen nur die Bereichs-Klassen der Startseite (je Abschnitt EINE
   Klasse am Bereich-Block, Auswahl im Editor über theme.json „editor_classes“) und Schmuck, den Utilities nicht können
   (schräge Bänder, Monteur-Abzeichen, Wagen am Rand). Alles auf #content beschränkt.
   Schmuckbilder: uploads/layout/monteur.webp, uploads/layout/wagen-freigestellt.webp (keine Inhaltsbilder).
   ========================================================================== */

/* Kern-Flächen (Bereich › Fläche) in den Farben des Entwurfs. */
:root {
    --nb-flaeche-hell: #f8fbff;
    --nb-flaeche-dunkel: #0e4194;
    --wk-blau: #0e4194;
    --wk-gruen: #76b729;
    --wk-gruen-dunkel: #3d7a14;
    --wk-hell: #f8fbff;
    --wk-grau: #6f6f6f;
}

/* Onepager: Sprungziele nicht unter dem festen Kopf verstecken. */
#content [id] {
    scroll-margin-top: 6rem;
}

@media (min-width: 64rem) {
    #content [id] {
        scroll-margin-top: 10.5rem;
    }
}

/* Schriftgröße im Inhalt mindestens 18 px (Vorgabe Auftraggeber 21.11.) – Text-Blöcke (.prose) eingeschlossen. */
#content .prose {
    font-size: 1.125rem;
}

/* ---- Überschriften-Stile (Text › Gestaltung) ---------------------------------------------------------------- */
#content .wk-titel {
    position: relative;
    margin: 0 0 3rem;
    padding-bottom: 0.9rem;
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wk-blau);
}

#content .wk-titel::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 4.5rem;
    height: 5px;
    background-color: var(--wk-gruen);
}

#content .wk-gross {
    margin: 0;
    font-size: clamp(2.25rem, 4.2vw, 3.75rem);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    color: var(--wk-blau);
}

#content .wk-unterzeile {
    margin: 0.75rem 0 1.75rem;
    font-size: clamp(1.15rem, 1.6vw, 1.5rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wk-blau);
}

/* ---- Hero (Startseite): Bild, drei Zeilen über dem Titel mit grünem Strich, Hotline-Knopf, Monteur unten rechts ---- */
#content .nb-hero {
    min-height: clamp(30rem, 44vw, 52rem);
    align-items: flex-end;
    overflow: visible;
}

#content .nb-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 8rem;
    padding-bottom: 4.5rem;
}

/* Die Einleitung des Hero-Blocks steht im Entwurf ÜBER dem Titel (drei kurze Zeilen in Versalien). */
#content .nb-hero__text {
    order: -1;
    position: relative;
    margin: 0 0 1.5rem;
    padding-bottom: 1.1rem;
    font-size: clamp(1.125rem, 1.15vw, 1.3rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#content .nb-hero__text::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 12rem;
    height: 8px;
    background-color: var(--wk-gruen);
}

#content .nb-hero__title {
    max-width: 8em;
    font-size: clamp(2.75rem, 6vw, 5.75rem);
    font-weight: 800;
    line-height: 0.95;
    text-transform: uppercase;
}

#content .nb-hero__actions {
    margin-top: 2rem;
}

#content .nb-hero__cta--primary {
    background-color: var(--wk-gruen-dunkel);
    color: #ffffff;
    font-size: 1.125rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.8rem 2rem;
}

#content .nb-hero__cta--primary:hover {
    background-color: #336812;
}

#content .nb-hero__cta--secondary {
    color: #ffffff;
    box-shadow: inset 0 0 0 2px currentColor;
}

/* Schmuck: grünes Schrägband + Monteur-Abzeichen unten rechts (für Screenreader unsichtbar, da nur CSS). */
#content .nb-hero::before,
#content .wk-vorteile::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: -2.4vw;
    z-index: 5;
    width: 30.1vw;
    height: 6.3vw;
    background-color: var(--wk-gruen);
    clip-path: polygon(3.6% 0, 100% 0, 100% 100%, 0 100%);
    pointer-events: none;
}

#content .nb-hero::after,
#content .wk-vorteile::after {
    content: "";
    position: absolute;
    right: 6.35vw;
    bottom: -1.4vw;
    z-index: 6;
    width: 8.8vw;
    aspect-ratio: 1;
    background: url("/uploads/layout/monteur.webp") center / contain no-repeat;
    pointer-events: none;
}

/* In den Vorteilen sitzt der Schmuck an der Unterkante des Abschnitts (darunter beginnt der Fuß). */
#content .wk-vorteile::before {
    bottom: 0;
}

#content .wk-vorteile::after {
    bottom: 1rem;
}

/* ---- Leistungen: Icon-Reihe auf dem blauen Band unter dem Hero ----------------------------------------------- */
#content .wk-leistungen {
    position: relative;
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 7.03vw;
    background-color: var(--wk-hell);
}

#content .wk-leistungen::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 14.84vw;
    background-color: var(--wk-blau);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 94.53% 66.67%, 5.47% 66.67%, 0 36.49%);
    pointer-events: none;
}

#content .wk-leistungen > .grid {
    position: relative;
    max-width: 112rem;
    margin-inline: auto;
    row-gap: 2.5rem;
}

@media (min-width: 80rem) {
    #content .wk-leistungen > .grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

#content .wk-leistungen .nb-col {
    text-align: center;
}

#content .wk-leistungen figure {
    margin: 0 0 1rem;
}

#content .wk-leistungen img {
    display: block;
    width: clamp(4.5rem, 5.5vw, 7rem);
    margin-inline: auto;
    border-radius: 9999px;
    box-shadow: 0 6px 18px rgb(14 65 148 / 0.15);
}

#content .wk-leistungen h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--wk-blau);
}

#content .wk-leistungen p {
    margin: 0.3rem 0 0;
    font-size: 1.125rem;
    line-height: 1.35;
    text-transform: uppercase;
    color: var(--wk-grau);
}

/* ---- Text mit Bild: Bild links (hochkant) mit grünem Hinweis-Streifen, Text rechts ---------------------------- */
#content .wk-intro {
    margin-top: 0;
    margin-bottom: 0;
}

@media (min-width: 64rem) {
    #content .wk-intro > .grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        column-gap: 5rem;
    }
}

#content .wk-intro figure {
    margin: 0;
}

#content .wk-intro img {
    display: block;
    width: 100%;
}

#content .wk-intro p:not(.wk-unterzeile, .wk-angebot) {
    color: var(--wk-grau);
    line-height: 1.75;
}

#content .wk-intro strong {
    color: #4b4b4b;
}

/* Grüner Hinweis-Streifen (Text › Gestaltung „wk-angebot“): ragt schräg unter das Bild. */
#content .wk-angebot {
    position: relative;
    z-index: 1;
    margin: -2.25rem 0 0 -1.5rem;
    padding: 0.85rem 2rem 0.85rem 3.5rem;
    background-color: var(--wk-gruen-dunkel);
    clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
    font-size: 1.125rem;
    line-height: 1.4;
    color: #ffffff;
}

#content .wk-intro .wk-angebot {
    color: #ffffff;
}

#content .wk-angebot a {
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

#content .wk-angebot a:hover,
#content .wk-angebot a:focus-visible {
    text-decoration: underline;
}

/* ---- Bildreihe: drei Fotos randlos ohne Abstand ------------------------------------------------------------- */
#content .wk-bildreihe {
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-inline: 0;
}

#content .wk-bildreihe > .grid {
    gap: 0;
}

#content .wk-bildreihe figure {
    margin: 0;
}

#content .wk-bildreihe img {
    display: block;
    width: 100%;
    max-width: none;
    aspect-ratio: 9 / 8;
    object-fit: cover;
    border-radius: 0;
}

/* ---- Einsatzgebiete: Merkmal-Liste „Logo-Leiste“, Wagen links am Rand ---------------------------------------- */
#content .wk-einsatz {
    position: relative;
    margin-top: 0;
    margin-bottom: 0;
}

@media (min-width: 90rem) {
    #content .wk-einsatz::before {
        content: "";
        position: absolute;
        left: calc((100% - 100vw) / 2 - 6rem);
        bottom: 0;
        width: 22rem;
        aspect-ratio: 640 / 568;
        background: url("/uploads/layout/wagen-freigestellt.webp") center / contain no-repeat;
        pointer-events: none;
    }
}

/* Mobil eine Spalte – lange Namen wie „Straßenbeleuchtung“ passen in 18 px nicht zu zweit nebeneinander. */
#content .wk-einsatz .nb-merkmale--logos {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    row-gap: 3rem;
}

@media (min-width: 40rem) {
    #content .wk-einsatz .nb-merkmale--logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    #content .wk-einsatz .nb-merkmale--logos {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

#content .wk-einsatz .nb-merkmale__item {
    position: relative;
    padding: 1.25rem 0.5rem;
}

#content .wk-einsatz .nb-merkmale__item::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(11.6rem, 100%);
    aspect-ratio: 1;
    border: 2px solid var(--wk-gruen);
    border-radius: 9999px;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

@media (hover: hover) {
    #content .wk-einsatz .nb-merkmale__item:hover::before {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    #content .wk-einsatz .nb-merkmale__item:hover .nb-merkmale__titel {
        color: var(--wk-gruen-dunkel);
    }
}

@media (prefers-reduced-motion: reduce) {
    #content .wk-einsatz .nb-merkmale__item::before {
        transition: none;
    }
}

#content .wk-einsatz .nb-merkmale--logos img {
    max-height: 5.25rem;
}

#content .wk-einsatz .nb-merkmale__titel {
    position: relative;
    margin-top: 0.9rem;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--wk-blau);
}

/* ---- Vorteile: Foto als Hintergrund, heller Kasten rechts mit grünen Haken ---------------------------------- */
#content .wk-vorteile {
    position: relative;
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
    padding-inline: 0;
    overflow: hidden;
}

#content .wk-vorteile figure {
    margin: 0;
}

#content .wk-vorteile img {
    display: block;
    width: 100%;
    max-width: none;
    border-radius: 0;
}

#content .wk-vorteile .nb-col:nth-child(2) {
    margin: 0 1rem 5rem;
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    background-color: rgb(232 241 252 / 0.94);
}

@media (min-width: 64rem) {
    #content .wk-vorteile {
        min-height: clamp(30rem, 34vw, 40rem);
        padding-block: 3.5rem 6rem;
    }

    #content .wk-vorteile > .grid {
        position: static;
        max-width: 80rem;
        margin-inline: auto;
        padding-inline: 2rem;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    }

    /* Erste Spalte (Foto) füllt den ganzen Abschnitt hinter dem Kasten. */
    #content .wk-vorteile .nb-col:first-child {
        position: absolute;
        inset: 0;
    }

    #content .wk-vorteile .nb-col:first-child :is(figure, a) {
        height: 100%;
    }

    #content .wk-vorteile .nb-col:first-child img {
        height: 100%;
        object-fit: cover;
    }

    #content .wk-vorteile .nb-col:nth-child(2) {
        grid-column: 2;
        position: relative;
        z-index: 1;
        margin: 0;
        padding: 2.75rem 3rem;
        background-color: rgb(232 241 252 / 0.9);
        backdrop-filter: blur(4px);
    }
}

/* Vorteils-Liste (Liste › Gestaltung „wk-haken“): zweispaltig, grüner Haken im Kreis, Titel in Versalien. */
#content .wk-haken {
    display: grid;
    gap: 0 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Zweispaltig wie im Entwurf: die ersten drei Vorteile links, der Rest rechts (dense füllt rechts von oben). */
@media (min-width: 48rem) {
    #content .wk-haken {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row dense;
        align-items: start;
    }

    #content .wk-haken > li:nth-child(-n+3) {
        grid-column: 1;
    }

    #content .wk-haken > li:nth-child(n+4) {
        grid-column: 2;
    }
}

#content .wk-haken > li {
    position: relative;
    margin: 0 0 1.5rem;
    padding-left: 2.1rem;
    font-size: 1.125rem;
    line-height: 1.45;
    color: var(--wk-blau);
}

#content .wk-haken > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid var(--wk-gruen-dunkel);
    border-radius: 9999px;
}

#content .wk-haken > li::after {
    content: "";
    position: absolute;
    left: 0.42rem;
    top: 0.33rem;
    width: 0.3rem;
    height: 0.55rem;
    border-right: 2px solid var(--wk-gruen-dunkel);
    border-bottom: 2px solid var(--wk-gruen-dunkel);
    transform: rotate(45deg);
}

#content .wk-haken strong {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Mobil: Schmuck kleiner, Hero-Text luftiger. */
@media (max-width: 47.99rem) {
    #content .nb-hero::before,
    #content .wk-vorteile::before {
        width: 55%;
        height: 2rem;
    }

    #content .nb-hero__inner {
        padding-bottom: 5.5rem;
    }
}
