/*
Theme Name: Adventsfenster Theme
Description: Weihnächtliches Theme für den Adventskalender
Version: 1.0
*/

/* Grundlegendes Design */
body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5937 50%, #1a472a 100%);
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Header */
.site-header {
    background: rgba(139, 0, 0, 0.9);
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.site-title {
    font-size: 3em;
    color: #ffd700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    margin: 0;
    font-weight: bold;
}

/* Content Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Content Bereiche */
.content-area {
    background: rgba(255,255,255,0.95);
    color: #333;
    padding: 40px;
    border-radius: 20px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.content-area h1, .content-area h2 {
    color: #8b0000;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}


/* Programm-Tabelle */
.programm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    color: #333;
    border-radius: 10px;
    overflow: hidden;
}

.programm-table th,
.programm-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.programm-table th {
    background: #8b0000;
    color: #333;
    font-weight: bold;
}

.programm-table tr:hover {
    background: #f5f5f5;
}

.programm-table td.status-besetzt {
    color: #cc0000;
    font-weight: bold;
}

.programm-table td.status-frei {
    color: #228b22;
    font-weight: bold;
}

#programm-table-container {
    margin: 20px 0;
}



/* Schneeflocken Animation */
.snowflake {
    position: fixed;
    top: -10px;
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px #000;
    z-index: 9999;
    pointer-events: none;
    animation: snowfall linear infinite;
}

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}



/* Lightbox Popup */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 45%;
    max-height: 45%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #333;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}



/* Bilderrahmen */
.bilderrahmen-container {
    text-align: center;
    margin: 15px 0;
    padding: 20px;
}

.bilderrahmen {
    max-width: 100%;
    height: auto;
    max-height: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}



/* Hover Text im Bilderrahmen */
.bilderrahmen-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.bilderrahmen-hover-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    color: #333;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 20px;
    text-align: center;
    display: block;
    width: 60%;
}

.door-hover-active .bilderrahmen-wrapper .bilderrahmen-hover-text {
    display: block;
}



/* Kultur Dielsdorf Bild Rahmen */
img[src*="kultur-dielsdorf"] {
    border: 4px solid #FFD700;
    border-radius: 15px;
    padding: 5px;
}
/* Desktop Spaltenbreiten für Programm-Tabelle */
@media (min-width: 769px) {
    .programm-table th:nth-child(1),
    .programm-table td:nth-child(1) {
        width: 8%;
    }
    .programm-table th:nth-child(2),
    .programm-table td:nth-child(2) {
        width: 8%;
    }
    .programm-table th:nth-child(3),
    .programm-table td:nth-child(3) {
        width: 8%;
    }
    .programm-table th:nth-child(4),
    .programm-table td:nth-child(4) {
        width: 8%;
    }
    .programm-table th:nth-child(5),
    .programm-table td:nth-child(5) {
        width: 8%;
    }
    .programm-table th:nth-child(6),
    .programm-table td:nth-child(6) {
        width: 30%;
    }
    .programm-table th:nth-child(7),
    .programm-table td:nth-child(7) {
        width: 30%;
    }
}



/* Mobile Anpassungen für Programm-Tabelle */
@media (max-width: 768px) {
    .programm-table {
        font-size: 10px;
        min-width: unset;
        width: 100%;
    }
    .programm-table th,
    .programm-table td {
        padding: 4px 6px;
        white-space: nowrap;
    }
    #programm {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    #programm .section-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Bilderrahmen 20% größer auf Mobile */
    .bilderrahmen-container {
        transform: scale(1.2);
        transform-origin: top center;
    }
}



/* Mobile Anpassungen - schmalere Spalten */
@media (max-width: 768px) {
    .programm-table th:nth-child(1),
    .programm-table td:nth-child(1) {
        min-width: 25px;
        width: 25px;
        font-size: 9px;
    }
    .programm-table th:nth-child(2),
    .programm-table td:nth-child(2) {
        min-width: 30px;
        width: 30px;
        font-size: 9px;
    }
    .programm-table th:nth-child(3),
    .programm-table td:nth-child(3) {
        min-width: 35px;
        width: 35px;
        font-size: 9px;
    }
    .programm-table th:nth-child(4),
    .programm-table td:nth-child(4) {
        min-width: 45px;
        width: 45px;
        font-size: 9px;
    }
    .programm-table th:nth-child(5),
    .programm-table td:nth-child(5) {
        min-width: 40px;
        width: 40px;
        font-size: 9px;
    }
    .programm-table th:nth-child(6),
    .programm-table td:nth-child(6) {
        min-width: 30px;
        width: 30px;
        font-size: 9px;
    }
    .programm-table th:nth-child(7),
    .programm-table td:nth-child(7) {
        min-width: 30px;
        width: 30px;
        font-size: 9px;
    }
}


/* Mobile Anpassungen für Bilderrahmen Text */
@media (max-width: 768px) {
    .bilderrahmen-hover-text {
        font-size: 8px;
        padding: 8px 12px;
        width: 80%;
    }
}


/* Mobile Header-Text */
.programm-table th.mobile-header span.mobile {
    display: inline;
}
.programm-table th.mobile-header span.desktop {
    display: none;
}
@media (min-width: 769px) {
    .programm-table th.mobile-header span.mobile {
        display: none;
    }
    .programm-table th.mobile-header span.desktop {
        display: inline;
    }
}

/* Vorjahre / Fotogalerie */
.vorjahre-jahr {
    margin: 25px 0 10px;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 4px;
}
.vorjahre-show {
    container-type: inline-size;   /* cqw bezieht sich auf die Bandbreite */
    overflow: hidden;
    height: clamp(150px, 26vh, 320px);  /* ~3 Baender passen uebereinander */
    margin-bottom: 14px;
}
.vorjahre-track {
    display: flex;
    width: max-content;
    height: 100%;
    animation: vorjahre-scroll linear infinite;   /* Dauer inline je nach Bilderzahl */
}
.vorjahre-show:hover .vorjahre-track {
    animation-play-state: paused;
}
.vorjahre-slide {
    flex: 0 0 calc(25cqw - 12px);   /* 4 Bilder gleichzeitig sichtbar */
    height: 100%;
    margin-right: 12px;
}
.vorjahre-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    display: block;
}
@keyframes vorjahre-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }   /* genau ein Bildersatz -> nahtlos */
}
.vorjahre-empty {
    font-style: italic;
    opacity: 0.8;
}
@media (max-width: 768px) {
    .vorjahre-show {
        height: clamp(110px, 20vh, 240px);
    }
}
