﻿@import url("https://fonts.googleapis.com/css?family=Mountains of Christmas");

@font-face {
    font-family: 'Christmas'; /* Name der Schriftart */
    src: url('../fonts/Christmas.ttf') format('truetype'); /* Pfad zur Schriftartdatei */
}
@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shake {
    animation: shake 0.5s;
    animation-iteration-count: 1;
}


#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Damit die Schneeflocken keine Interaktion blockieren */
    overflow: hidden; /* Verhindert Überlauf */
    z-index: 999; /* Hoch genug, um über anderen Inhalten zu sein */
}

.snowflake {
    position: absolute;
    top: -10px; /* Startposition über dem sichtbaren Bereich */
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: fall linear infinite; /* Animation für das Fallen */
}

@keyframes fall {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100vh); /* Fällt bis zum unteren Rand des Bildschirms */
    }
}


#background-image {
    position: fixed; /* Fixiert das Element */
    top: 0; /* Setzt es an den oberen Rand */
    left: 0; /* Setzt es an den linken Rand */
    width: 100%; /* Deckt die gesamte Breite ab */
    height: 100%; /* Deckt die gesamte Höhe ab */
    background: url('../img/advent/adventbackground.jpg') no-repeat center center; /* Hintergrundbild hinzufügen */
    background-size: cover; /* Bild so skalieren, dass es den gesamten Bereich abdeckt */
    z-index: -1; /* Setzt das Element hinter alle anderen Inhalte */
}



#advent {
    width: 80px;
    height: 100px;
    position: absolute;
    top: var(--bbtop);
    left: var(--bbleft);
    z-index: 1000;
    cursor: pointer;
    background-image: url('../img/advent/santa-hat.png');
    background-size: 80px 100px; /* Exakte Größe angeben */
    background-repeat: no-repeat;
    background-position: center;
    transform-origin: center center;
    transform: scale(var(--scale-factor, 1));
    will-change: transform; /* Optimiert Transformationen */
    -webkit-backface-visibility: hidden; /* Performance-Optimierung */
    backface-visibility: hidden;
}




#advent-calendar.hidden {
    display: none !important; /* !important stellt sicher, dass es wirklich versteckt bleibt */
}

/* Zuerst den Container anpassen */
#advent-calendar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: rgba(255, 0, 0, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    width: 82vw;
    height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Verhindert Überlauf */
}

/* Grid-Layout optimieren */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr); /* Mehr Spalten für flexiblere Anordnung */
    grid-auto-rows: 1fr;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 15px;
}
/* Individuelle Größen für alle Türchen */
.calendar-door[data-door="24"] {
    grid-area: 1 / 1 / 3 / 3;
}
/* 2x2 */
.calendar-door[data-door="1"] {
    grid-area: 1 / 3 / 2 / 5;
}
/* 1x2 */
.calendar-door[data-door="12"] {
    grid-area: 1 / 5 / 3 / 6;
}
/* 2x1 */
.calendar-door[data-door="7"] {
    grid-area: 1 / 6 / 2 / 8;
}
/* 1x2 */
.calendar-door[data-door="15"] {
    grid-area: 1 / 8 / 3 / 9;
}
/* 2x1 */
.calendar-door[data-door="3"] {
    grid-area: 1 / 9 / 2 / 11;
}
/* 1x2 */

.calendar-door[data-door="5"] {
    grid-area: 2 / 3 / 3 / 4;
}

.calendar-door[data-door="8"] {
    grid-area: 2 / 4 / 3 / 5;
}

.calendar-door[data-door="2"] {
    grid-area: 2 / 6 / 3 / 7;
}

.calendar-door[data-door="11"] {
    grid-area: 2 / 7 / 3 / 8;
}

.calendar-door[data-door="16"] {
    grid-area: 2 / 9 / 3 / 11;
}
/* 1x2 */

.calendar-door[data-door="4"] {
    grid-area: 3 / 1 / 4 / 3;
}
/* 1x2 */
.calendar-door[data-door="13"] {
    grid-area: 3 / 3 / 5 / 4;
}
/* 2x1 */
.calendar-door[data-door="6"] {
    grid-area: 3 / 4 / 4 / 6;
}
/* 1x2 */
.calendar-door[data-door="17"] {
    grid-area: 3 / 6 / 5 / 7;
}
/* 2x1 */
.calendar-door[data-door="9"] {
    grid-area: 3 / 7 / 4 / 8;
}
/* 1x1 */
.calendar-door[data-door="21"] {
    grid-area: 3 / 8 / 4 / 9;
}
/* 1x1 */

.calendar-door[data-door="10"] {
    grid-area: 3 / 9 / 4 / 11;
}
/* 1x2 */

.calendar-door[data-door="14"] {
    grid-area: 4 / 1 / 5 / 2;
}

.calendar-door[data-door="18"] {
    grid-area: 4 / 2 / 5 / 3;
}

.calendar-door[data-door="22"] {
    grid-area: 4 / 4 / 5 / 6;
}
/* 1x2 */
.calendar-door[data-door="20"] {
    grid-area: 4 / 7 / 5 / 9;
}
/* 1x2 */
.calendar-door[data-door="23"] {
    grid-area: 4 / 9 / 5 / 10;
}
/* 1x1 */
.calendar-door[data-door="19"] {
    grid-area: 4 / 10 / 5 / 11;
}
/* 1x1 */

/* Schriftgrößen anpassen */
.door-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    transform: rotateY(0deg);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow: hidden;
}

    /* Bild in der Vorderseite */
    .door-front img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 10px;
        transition: transform 0.3s ease;
    }

    .door-front:hover img {
        transform: scale(1.05);
    }


/* Größere Schrift für große Türchen */
.calendar-door[data-door="24"] .door-front {
    font-size: clamp(2em, 4vw, 4em);
}

.door-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
}

/* Bestehende Türchen-Styles anpassen */
.calendar-door {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    cursor: pointer;
    transform-style: preserve-3d; /* Wichtig für 3D-Effekt */
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

    /* Flip-Animation wenn Türchen geöffnet */
    .calendar-door.open .door-front {
        transform: rotateY(180deg);
    }

    .calendar-door.open .door-back {
        transform: rotateY(0deg);
    }

/* Optional: Hover-Effekt für die Türchen 

.door-front:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
*/

/* Größenanpassungen für verschiedene Türchen */
.calendar-door[data-door="24"] .door-front img {
    font-size: clamp(2em, 4vw, 4em);
}

/* Fallback für Türchen ohne Bilder */
.door-number {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5em, 3vw, 2.5em);
    font-weight: bold;
    color: white;
    background: linear-gradient(145deg, #c41e3a, #8b0000);
    z-index: 2;
}
.door-number-top-left {
    position: absolute;
    top: 0px;
    left: 5%;
    font-family: 'Christmas';
    font-size: clamp(1.5em, 3vw, 2.5em);
    font-weight: normal;
    color: white;
    z-index: 2;
}
.door-number-top-right {
    position: absolute;
    top: 0px;
    right: 10%;
    font-family: 'Christmas';
    font-size: clamp(1.5em, 3vw, 2.5em);
    font-weight: normal;
    color: white;
    z-index: 2;
}
.door-number-bottom-left {
    position: absolute;
    bottom: 0.5rem;
    left: 10%;
    font-family: 'Christmas';
    font-size: clamp(1.5em, 3vw, 2.5em);
    font-weight: normal;
    color: white;
    z-index: 2;
}
.door-number-bottom-right {
    position: absolute;
    bottom: 0.5rem;
    right: 10%;
    font-family: 'Christmas';
    font-size: clamp(1.5em, 3vw, 2.5em);
    font-weight: normal;
    color: white;
    z-index: 2;
}
.door-number-center {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: 'Christmas';
    font-size: clamp(1.5em, 3vw, 2.5em);
    font-weight: normal;
    color: white;
    z-index: 2;
}

.door-number-middle-left {
    position: absolute;
    top: 43%; /* Positioniere die Zahl in der Mitte vertikal */
    left: 10%; /* Positioniere die Zahl etwas von der linken Seite */
    transform: translateY(-50%); /* Verschiebe die Zahl um die Hälfte ihrer Höhe nach oben, um sie zu zentrieren */
    font-family: 'Christmas'; /* Verwende die gewünschte Schriftart */
    font-size: clamp(1.5em, 3vw, 2.5em); /* Schriftgröße anpassen */
    font-weight: normal; /* Schriftstärke anpassen */
    color: white; /* Setze die Farbe auf weiß */
    z-index: 2;
}

.door-number-middle-top {
    position: absolute;
    top: 1%; /* Positioniere die Zahl etwas von der oberen Seite */
    left: 50%; /* Positioniere die Zahl in der Mitte horizontal */
    transform: translateX(-50%); /* Verschiebe die Zahl um die Hälfte ihrer Breite nach links, um sie zu zentrieren */
    font-family: 'Christmas'; /* Verwende die gewünschte Schriftart */
    font-size: clamp(1.5em, 3vw, 2.5em); /* Schriftgröße anpassen */
    font-weight: normal; /* Schriftstärke anpassen */
    color: white; /* Setze die Farbe auf weiß */
    z-index: 2;
}

@media screen and (max-width: 1200px) {
    #advent {
        --scale-factor: 0.8;
    }
}

@media screen and (max-width: 768px) {
    #advent {
        --scale-factor: 0.6;
    }
}



.carousel-control-prev .carousel-control-inverted {
    filter: invert(100%);
}

.carousel-control-next .carousel-control-inverted {
    filter: invert(100%);
}

#carouselDoor1 .carousel-control-prev-icon,
#carouselDoor1 .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.7); /* dunkler, sichtbarer Kreis */
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    background-size: 50% 50%;
    filter: drop-shadow(0 0 3px #000);
}

#carouselDoor1 .carousel-control-prev,
#carouselDoor1 .carousel-control-next {
    width: 8%; /* Pfeile etwas nach innen holen */
}
