/* =========================================================
   MOD_WERBUNG – FRONTEND
   ========================================================= */

.st-ads {
    width: 100%;
}

.st-ad {
    width: 100%;
}

.st-ad--dark {
    background: #18395f;
    color: #ffffff;
}

.st-ad--light {
    background: #f4f4f2;
    color: #252525;
}


/* ---------------------------------------------------------
   Grundlayout
   --------------------------------------------------------- */

.st-ad__inner {
    min-height: 360px;

    display: grid;
    grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
    align-items: center;

    gap: 56px;

    padding-top: 60px;
    padding-bottom: 60px;
}


/* Nur Bild */
.st-ad__inner--image {
    display: block;
    min-height: 0;
}

/* Nur Text ohne Logo */
.st-ad__inner--text:not(:has(.st-ad__brand)) {
    display: block;
    min-height: 0;
}


/* ---------------------------------------------------------
   Herstellerlogo
   --------------------------------------------------------- */

.st-ad__brand {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.st-ad__logo {
    display: block;

    width: auto;
    height: auto;

    object-fit: contain;

    padding: 14px;

    background: #ffffff;

    border-radius: 14px;

    box-shadow: 0 12px 28px rgba(0, 0, 0, .10);
}

.st-ad__logo--small {
    max-width: 120px;
    max-height: 80px;
}

.st-ad__logo--medium {
    max-width: 190px;
    max-height: 150px;
}

.st-ad__logo--large {
    max-width: 240px;
    max-height: 220px;
}


/* ---------------------------------------------------------
   Text
   --------------------------------------------------------- */

.st-ad__content {
    min-width: 0;
}

.st-ad__kicker {
    margin: 0 0 10px;

    color: var(--st-orange, #ef7d00);

    font-size: .92rem;
    font-weight: 800;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.st-ad__content h2 {
    margin: 0 0 18px;

    color: #252525;

    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
}

.st-ad--dark .st-ad__content h2 {
    color: #ffffff;
}

.st-ad__text {
    max-width: 780px;

    color: #444444;

    font-size: 1.08rem;
    line-height: 1.7;
}

.st-ad--dark .st-ad__text {
    color: rgba(255, 255, 255, .90);
}

.st-ad__text > :first-child {
    margin-top: 0;
}

.st-ad__text > :last-child {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   Button
   --------------------------------------------------------- */

.st-ad__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 22px;
    padding: 13px 23px;

    border-radius: 7px;

    background: var(--st-orange, #ef7d00);
    color: #ffffff !important;

    font-weight: 800;
    text-decoration: none;
}

.st-ad__button:hover,
.st-ad__button:focus {
    background: var(--st-orange-dark, #d96f00);
}


/* ---------------------------------------------------------
   Werbebild
   --------------------------------------------------------- */

.st-ad__media {
    min-width: 0;
}

.st-ad__media img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 430px;

    object-fit: cover;

    border-radius: 16px;

    box-shadow: 0 16px 38px rgba(0, 0, 0, .15);
}


/* ---------------------------------------------------------
   Bild + Text
   --------------------------------------------------------- */

.st-ad__inner--image_text {
    grid-template-columns:
        minmax(160px, 220px)
        minmax(0, .9fr)
        minmax(320px, 1.1fr);
}

/* Bei der hellen zweiten Werbung Bild nach links */
.st-ad--reverse .st-ad__brand {
    order: 3;
}

.st-ad--reverse .st-ad__content {
    order: 2;
}

.st-ad--reverse .st-ad__media {
    order: 1;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .st-ad__inner,
    .st-ad__inner--image_text {
        grid-template-columns: 1fr;

        min-height: 0;

        gap: 28px;

        padding-top: 46px;
        padding-bottom: 46px;
    }

    .st-ad__brand {
        justify-content: flex-start;
    }

    .st-ad__logo--large {
        max-width: min(260px, 80%);
    }

    .st-ad--reverse .st-ad__brand,
    .st-ad--reverse .st-ad__content,
    .st-ad--reverse .st-ad__media {
        order: initial;
    }
}

@media (max-width: 620px) {

    .st-ad__content h2 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .st-ad__logo {
        max-width: min(220px, 78%);
    }
}


/* =========================================================
   WERBEBILD ALS HINTERGRUND
   ========================================================= */

.st-ad {
    position: relative;
    overflow: hidden;
}

.st-ad--has-background {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    color: #ffffff;
}

/* Overlay liegt ÜBER dem Hintergrundbild, aber UNTER dem Inhalt */
.st-ad--has-background::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;

    background:
        linear-gradient(
            90deg,
            rgba(10, 27, 45, .84) 0%,
            rgba(10, 27, 45, .70) 48%,
            rgba(10, 27, 45, .48) 100%
        );

    pointer-events: none;
}

.st-ad--has-background .st-ad__inner {
    position: relative;
    z-index: 1;
}

/* Mit Hintergrund bleiben Überschrift und Text hell */
.st-ad--has-background .st-ad__content h2 {
    color: #ffffff;
}

.st-ad--has-background .st-ad__text {
    color: rgba(255, 255, 255, .93);
}

/* Herstellerlogo links, Text rechts */
.st-ad--has-background .st-ad__inner,
.st-ad--has-background .st-ad__inner--image_text,
.st-ad--has-background .st-ad__inner--text {
    display: grid;
    grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
}

/* Werbebild wird niemals als separates Bild gerendert */
.st-ad__media {
    display: none !important;
}

@media (max-width: 900px) {
    .st-ad--has-background::before {
        background: rgba(10, 27, 45, .72);
    }

    .st-ad--has-background .st-ad__inner,
    .st-ad--has-background .st-ad__inner--image_text,
    .st-ad--has-background .st-ad__inner--text {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
