/* =========================================================================
   DASFORMAT + HERO — globales CSS
   Einfügen unter: Elementor → Website-Einstellungen → Custom CSS
   =========================================================================

   WICHTIG — zwei Regeln, die den Aufbau tragen:

   1. Der dunkle Bildverlauf ist KEIN Pseudo-Element.
      ::before und ::after sind von DASFORMAT belegt.
      Den Verlauf setzt du in Elementor:
      Slide-Container → Stil → Hintergrund-Overlay → Verlauf.

   2. Die Klammerfarbe wird VERERBT.
      Farbe einmal am Slide setzen (z.B. dasformat-farbe--lime),
      alle DASFORMAT-Elemente darin übernehmen sie automatisch.
      Eine lokale Farbklasse überschreibt die geerbte.
   ========================================================================= */


/* =========================================================================
   1 — MARKENFARBEN
   ========================================================================= */

:root {
    --dpi-lime:        #CBE836;
    --dpi-blau:        #054CF9;
    --dpi-dark-blau:   #0A1855;
    --dpi-orange:      #FB6502;
    --dpi-schwarz:     #121212;
    --dpi-weiss:       #EEEEED;
}


/* =========================================================================
   2 — DASFORMAT: BASIS
   ========================================================================= */

.dasformat {
    --dasformat-breite:  48px;
    --dasformat-hoehe:   48px;
    --dasformat-staerke: 8px;
    --dasformat-x:       -22px;
    --dasformat-y:       -18px;

    position: relative;
}

.dasformat,
.dasformat::before,
.dasformat::after {
    box-sizing: border-box;
}

.dasformat::before,
.dasformat::after {
    content: "";
    position: absolute;
    display: none;

    width:  var(--dasformat-breite);
    height: var(--dasformat-hoehe);

    border-style: solid;
    border-color: var(--dasformat-farbe, var(--dpi-lime));

    pointer-events: none;
    z-index: 5;
}


/* --- Positionen ------------------------------------------------------- */

.dasformat--oben-links::before,
.dasformat--beide::before {
    display: block;
    top:  var(--dasformat-oben,  var(--dasformat-y));
    left: var(--dasformat-links, var(--dasformat-x));
    border-width: var(--dasformat-staerke) 0 0 var(--dasformat-staerke);
}

.dasformat--unten-rechts::after,
.dasformat--beide::after {
    display: block;
    right:  var(--dasformat-rechts, var(--dasformat-x));
    bottom: var(--dasformat-unten,  var(--dasformat-y));
    border-width: 0 var(--dasformat-staerke) var(--dasformat-staerke) 0;
}

/* Klammern temporär abschalten */
.dasformat--aus::before,
.dasformat--aus::after {
    display: none !important;
}


/* --- Größen ----------------------------------------------------------- */

/* Große Klammer um die gesamte Slide-Fläche */
.dasformat--hero {
    --dasformat-breite:  clamp(62px, 6vw, 96px);
    --dasformat-hoehe:   clamp(62px, 6vw, 96px);
    --dasformat-staerke: clamp(7px, 0.65vw, 11px);
    --dasformat-x:       clamp(18px, 2.5vw, 38px);
    --dasformat-y:       clamp(18px, 2.5vw, 38px);
}

/* Klammer direkt um eine Headline */
.dasformat--headline {
    --dasformat-breite:  clamp(28px, 2.6vw, 40px);
    --dasformat-hoehe:   clamp(28px, 2.6vw, 40px);
    --dasformat-staerke: clamp(4px, 0.4vw, 6px);
    --dasformat-x:       -16px;
    --dasformat-y:       -12px;

    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    overflow: visible;
}

/* Kleine Klammer für Karten, Chips, Labels */
.dasformat--klein {
    --dasformat-breite:  24px;
    --dasformat-hoehe:   24px;
    --dasformat-staerke: 4px;
    --dasformat-x:       -8px;
    --dasformat-y:       -8px;

    width: fit-content;
    max-width: 100%;
    overflow: visible;
}


/* --- Farben (vererbbar) ------------------------------------------------ */

.dasformat-farbe--lime    { --dasformat-farbe: var(--dpi-lime); }
.dasformat-farbe--blau    { --dasformat-farbe: var(--dpi-blau); }
.dasformat-farbe--orange  { --dasformat-farbe: var(--dpi-orange); }
.dasformat-farbe--weiss   { --dasformat-farbe: var(--dpi-weiss); }
.dasformat-farbe--schwarz { --dasformat-farbe: var(--dpi-schwarz); }


/* =========================================================================
   3 — STAGE + CAROUSEL
   ========================================================================= */

.hero-stage {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: var(--dpi-schwarz);
}

/* Elementor gibt Containern global ein Padding. Im Hero muss das weg,
   sonst hängen die grossen Klammern nicht am Rand der Bildfläche. */
.hero-stage,
.hero-carousel,
.hero-slide {
    --padding-block-start: 0px;
    --padding-block-end: 0px;
    --padding-inline-start: 0px;
    --padding-inline-end: 0px;
}

.hero-carousel .swiper,
.hero-carousel .swiper-wrapper,
.hero-carousel .swiper-slide {
    min-height: var(--hero-hoehe, clamp(560px, 56vw, 820px));
}

.hero-carousel .swiper-slide {
    height: auto;
    overflow: hidden;
}

/* Elementor legt um den Slide-Inhalt einen eigenen Wrapper.
   Der muss die volle Fläche durchreichen, sonst hängt die
   große Klammer nicht am Slide-Rand. */
.hero-carousel .swiper-slide > .e-con,
.hero-carousel .swiper-slide > .elementor-element {
    flex: 1 1 auto;
    width: 100%;
}


/* =========================================================================
   4 — HERO-SLIDE
   ========================================================================= */

.hero-slide {
    --hero-hoehe: clamp(560px, 56vw, 820px);

    position: relative;
    width: 100%;
    min-height: var(--hero-hoehe);
    overflow: hidden;

    background-color: var(--dpi-schwarz);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Inhaltsebene über Bild und Overlay */
.hero-inner {
    position: relative;
    z-index: 2;

    width: min(calc(100% - 128px), 1240px);
    min-height: var(--hero-hoehe);
    margin-inline: auto;
    padding-block: clamp(72px, 7vw, 104px);

    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
}


/* --- Linke Spalte: Headline, Subline, Buttons -------------------------- */

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    width: auto;
    max-width: 60%;
    gap: clamp(14px, 1.4vw, 22px);
}

/* Wrapper um die Headline — Träger der Headline-Klammer.
   Muss so breit sein wie der Text, nicht wie die Spalte. */
.hero-title-shell {
    width: fit-content;
    max-width: 100%;
    padding: 4px 10px;
}

.hero-title .elementor-heading-title,
.hero-title-shell .elementor-heading-title {
    margin: 0;
    color: var(--dpi-lime);
    font-weight: 800;
    font-size: clamp(2.6rem, 4.6vw, 4.4rem);
    line-height: 0.94;
    letter-spacing: -0.03em;
}

.hero-sub {
    color: var(--dpi-weiss);
    font-weight: 700;
    font-size: clamp(0.85rem, 0.95vw, 1rem);
    line-height: 1.35;
}

.hero-sub p { margin: 0; }


/* --- Buttons ----------------------------------------------------------- */

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;

    width: min(100%, 330px);
    margin-block-start: clamp(8px, 1vw, 16px);
}

.hero-actions .elementor-button {
    display: flex;
    width: 100%;

    padding: 9px 14px;
    border-radius: 3px;

    background-color: var(--dasformat-farbe, var(--dpi-lime));
    color: var(--dpi-schwarz);

    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.2;
    text-decoration: none;
}

.hero-actions .elementor-button:hover,
.hero-actions .elementor-button:focus-visible {
    filter: brightness(1.12);
    color: var(--dpi-schwarz);
}

/* Text links, Pfeil ganz rechts */
.hero-actions .elementor-button-content-wrapper {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-actions .elementor-button-icon {
    flex: 0 0 auto;
    margin: 0;
}

/* Unterstrichenes Schlüsselwort im Button */
.hero-actions .elementor-button u,
.hero-actions .elementor-button strong {
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* --- Rechte Spalte: Credit --------------------------------------------- */

.hero-credit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;

    width: auto;
    max-width: 26%;
    margin-inline-start: auto;

    color: var(--dpi-weiss);
    text-align: right;
    font-size: clamp(0.68rem, 0.75vw, 0.8rem);
    line-height: 1.45;
}

.hero-credit p { margin: 0; }

.hero-credit strong { font-weight: 800; }

.hero-credit a,
.hero-credit u {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* =========================================================================
   5 — MOBIL
   ========================================================================= */

@media (max-width: 1024px) {
    .hero-copy   { max-width: 52%; }
    .hero-credit { max-width: 32%; }
}

@media (max-width: 767px) {

    .hero-slide {
        --hero-hoehe: clamp(600px, 92svh, 760px);
    }

    .hero-inner {
        width: calc(100% - 40px);
        flex-direction: column;
        justify-content: flex-end;
        padding-block: 96px 32px;
        gap: 20px;
    }

    .hero-copy,
    .hero-credit {
        max-width: 100%;
        width: 100%;
    }

    .hero-credit {
        align-items: flex-start;
        text-align: left;
        margin-inline-start: 0;
    }

    .hero-actions {
        width: 100%;
    }

    .dasformat {
        --dasformat-breite:  37px;
        --dasformat-hoehe:   37px;
        --dasformat-staerke: 6px;
        --dasformat-x:       -17.5px;
        --dasformat-y:       -13.5px;
    }

    .dasformat--hero {
        --dasformat-breite:  46px;
        --dasformat-hoehe:   46px;
        --dasformat-staerke: 7px;
        --dasformat-x:       16px;
        --dasformat-y:       16px;
    }

    .dasformat--headline {
        --dasformat-breite:  26px;
        --dasformat-hoehe:   26px;
        --dasformat-staerke: 4px;
        --dasformat-x:       -11px;
        --dasformat-y:       -9px;
    }
}


/* =========================================================================
   6 — BARRIEREFREIHEIT
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    .hero-carousel .swiper-wrapper {
        transition-duration: 1ms !important;
    }
}

.hero-actions .elementor-button:focus-visible,
.hero-credit a:focus-visible {
    outline: 3px solid var(--dpi-weiss);
    outline-offset: 3px;
}
