/**
 * Styles für gekachelten Event-Flyer-Hintergrund
 * Zeigt Event-Flyer als schwarz-weiß Hintergrund im 4:5 Format (Social Media Standard)
 */

/* Container für den gekachelten Hintergrund */
.events-flyer-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

/* Events Section muss position: relative haben */
.events-section {
    position: relative;
    z-index: 1;
}
.event-flyer-tile {
    position: absolute;
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%);
    opacity: 0.1;
    transition: opacity 0.5s ease;
}

/* Animation für neue Kacheln */
@keyframes flyerTileFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-2deg);
    }
    to {
        opacity: 0.1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes flyerTileFadeOut {
    from {
        opacity: 0.1;
        transform: scale(1) rotate(0deg);
    }
    to {
        opacity: 0;
        transform: scale(0.8) rotate(2deg);
    }
}

.event-flyer-tile.fade-in {
    animation: flyerTileFadeIn 0.5s ease forwards;
}

.event-flyer-tile.fade-out {
    animation: flyerTileFadeOut 0.5s ease forwards;
}

/* Responsive Größen - A5 Ratio immer beibehalten (1:1.414) */
@media (min-width: 1025px) {
    .event-flyer-tile {
        width: 120px;
        height: 170px; /* 120 * 1.414 ≈ 170 */
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .event-flyer-tile {
        width: 85px;
        height: 120px; /* 85 * 1.414 ≈ 120 */
    }
}

@media (max-width: 767px) {
    .events-flyer-background {
        display: none;
    }
    
    .event-flyer-tile {
        width: 60px;
        height: 85px; /* 60 * 1.414 ≈ 85 */
    }
}
