/*
 * Flyer & Informationsmaterial
 * Ergänzt die Bücher-Karten (.wp-block-media-text.buch) um die Variante .flyer.
 * Wird über template-parts/functions/load-css-js-files.php geladen.
 */

/* Desktop: Flyer sind schmaler und höher als Buchcover → schmalere Bildspalte */
.wp-block-media-text.buch.flyer {
    --width-figure: 240px;
}

/* Vorschaubild ist ein Link aufs PDF */
.wp-block-media-text.buch.flyer figure a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-top-left-radius: var(--border-radius-medium);
    border-bottom-left-radius: var(--border-radius-medium);
}

.wp-block-media-text.buch.flyer figure img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.wp-block-media-text.buch.flyer figure a:hover img,
.wp-block-media-text.buch.flyer figure a:focus-visible img {
    transform: scale(1.03);
    opacity: 0.9;
}

.wp-block-media-text.buch.flyer figure a:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: -3px;
}

/* Button „PDF herunterladen“ gut sichtbar: gefüllt, größer, mit Download-Icon */
.wp-block-media-text.buch.flyer .wp-block-media-text__content .wp-block-buttons a {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 1em;
    padding: 0.7em 1.3em;
}

.wp-block-media-text.buch.flyer .wp-block-media-text__content .wp-block-buttons a:before {
    content: "\f019";
    font: var(--fa-font-solid);
    margin-right: 8px;
}

.wp-block-media-text.buch.flyer .wp-block-media-text__content .wp-block-buttons a:hover,
.wp-block-media-text.buch.flyer .wp-block-media-text__content .wp-block-buttons a:focus-visible {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* Mobil (WordPress stapelt Medien & Text bis 600px): Bild kleiner und mittig */
@media (max-width: 600px) {
    .wp-block-media-text.buch.flyer figure {
        width: 180px;
        height: auto;
        justify-self: center;
        margin-top: 1.5em;
    }

    .wp-block-media-text.buch.flyer figure a,
    .wp-block-media-text.buch.flyer figure img {
        border-radius: var(--border-radius-medium);
        height: auto;
    }

    .wp-block-media-text.buch.flyer figure img {
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    }

    .wp-block-media-text.buch.flyer .wp-block-media-text__content {
        padding: 1.5em;
        text-align: center;
    }

    .wp-block-media-text.buch.flyer .wp-block-media-text__content .wp-block-buttons {
        justify-content: center;
    }
}
