/**
 * H24 Banner Ads - Frontend Styles
 *
 * Adframe, Werbekennzeichnung und Responsive Design
 * für 300x250 Medium Rectangle Banner.
 */

/* ============================================
   Adframe / Banner-Slot Container
   ============================================ */

.h24-ad-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 300px;
    margin: 2rem auto;
    padding: 0;
    background-color: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.h24-ad-slot:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Werbekennzeichnung (Anzeige-Label)
   ============================================ */

.h24-ad-label {
    display: block;
    width: 100%;
    padding: 3px 8px;
    background-color: #f0f0f0;
    color: #888;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: right;
    line-height: 1.4;
    border-bottom: 1px solid #e8e8e8;
    box-sizing: border-box;
}

/* ============================================
   Banner-Link und Bild
   ============================================ */

.h24-ad-link {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.h24-ad-image {
    display: block;
    width: 300px;
    height: 250px;
    object-fit: contain;
    background-color: #fff;
}

/* ============================================
   Positionierungsvarianten
   ============================================ */

/* In-Content Banner (Ratgeber-Artikel) */
.h24-ad-pos-in-content-2,
.h24-ad-pos-in-content-5 {
    margin: 2.5rem auto;
    clear: both;
}

/* Startseite: zwischen Sektionen */
.h24-ad-pos-homepage-top,
.h24-ad-pos-homepage-middle,
.h24-ad-pos-homepage-bottom {
    margin: 3rem auto;
}

/* Kategorie-Seiten: zwischen Einträgen */
.h24-ad-pos-category-inline {
    margin: 2rem auto;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet (768px - 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .h24-ad-slot {
        margin: 2rem auto;
    }
}

/* Desktop (> 1024px) */
@media screen and (min-width: 1025px) {
    .h24-ad-slot {
        margin: 2.5rem auto;
    }

    /* Auf Desktop kann das Banner auch rechts floaten */
    .h24-ad-pos-float-right {
        float: right;
        margin: 0 0 1.5rem 2rem;
    }

    .h24-ad-pos-float-left {
        float: left;
        margin: 0 2rem 1.5rem 0;
    }
}

/* Mobile (< 768px) */
@media screen and (max-width: 767px) {
    .h24-ad-slot {
        max-width: 100%;
        margin: 1.5rem auto;
        border-radius: 4px;
    }

    .h24-ad-image {
        width: 100%;
        height: auto;
        max-width: 300px;
        aspect-ratio: 300 / 250;
    }

    .h24-ad-label {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* Sehr kleine Bildschirme (< 360px) */
@media screen and (max-width: 359px) {
    .h24-ad-slot {
        margin: 1rem auto;
    }

    .h24-ad-image {
        max-width: 280px;
    }
}

/* ============================================
   Druckansicht: Banner ausblenden
   ============================================ */

@media print {
    .h24-ad-slot {
        display: none !important;
    }
}

/* ============================================
   Accessibility & Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .h24-ad-slot {
        transition: none;
    }

    .h24-ad-image[src$=".gif"] {
        animation-play-state: paused;
    }
}

/* ============================================
   Dark Mode Support (optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .h24-ad-slot {
        background-color: #2a2a2a;
        border-color: #444;
    }

    .h24-ad-label {
        background-color: #333;
        color: #999;
        border-bottom-color: #444;
    }

    .h24-ad-image {
        background-color: #1a1a1a;
    }
}
