@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&display=swap');
/* Grid für die 24 Türchen */
.doors {
    display: grid;
    grid-template-columns: repeat(6, minmax(190px, 1fr)); /* 5 colunas */
    grid-template-rows: repeat(7, auto);
    gap: 10px 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
    justify-content: center;
    align-items: start;
}

/* Basislayout + 3D-Effekt */
.door {
    position: relative;
    perspective: 1200px;

    transition: box-shadow .3s ease, transform .25s ease;
    border-radius: 18px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.22), rgba(12,32,70,0.6));
    border: 1px solid rgba(255, 255, 255, 0.08);

    /* Dezenter Schatten um die Türchen */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

/* Klickbare Fläche der Tür */
.door-link {
    display: block;
    background-color: #222;
    width: 100%;
    aspect-ratio: 1 / 1;     /* quadratisches Türchen */
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.75);
    transform-style: preserve-3d;
    transition: box-shadow .3s ease, transform .25s ease;
    container-type: inline-size;

}

/* Vorderseite der Tür, die sich nach links aufklappt */
.door-front {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform-origin: left center;
    transform: rotateY(0deg);        /* Ausgangsposition */
    transition: transform .6s ease;
    will-change: transform;
}

/* Inhalt hinter der Tür – aktuell vollständig ausgeblendet */
.door-content {
    position: absolute;
    inset: 0;
    padding: 12px;
    /* Removemos o background fixo aqui para o JS colocar a imagem */
    color: #fff;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    opacity: 0;

    /* Adicione estas linhas para garantir que a imagem se comporte bem */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Isso cria uma camada escura suave sobre a imagem para o texto
   "schon geöffnet" ser sempre legível para os idosos */
.door-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7); /* Escurece a imagem levemente */
    z-index: 1;
}

/* Garante que o texto fique acima da camada escura */
.opened-label {
    position: relative;
    z-index: 2;
    font-family: 'Mountains of Christmas', cursive;
    font-weight: 700;

    /* Mágica da Automação: */
    /* O texto terá sempre 18% da largura da porta, não importa o tamanho dela */
    font-size: 18cqw;

    color: #ffffff;
    text-shadow: 0 0 15px rgba(0,0,0,1), 2px 2px 4px rgba(0,0,0,1);
    line-height: 1.1;
    display: block;
    width: 90%; /* Para não encostar nas bordas */
    margin: 0 auto;
}
/* für die Bilder wenn die Tür geöffnet sind*/
.door.is-open .door-content {
    display: flex;
    opacity: 1;
}


.door:not(.is-open):hover .door-front {
    transform: rotateY(-12deg);
}

.door:not(.is-open):hover .door-link {
    border: 2px solid rgba(255, 215, 130, 0.7);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.75);
    transform: translateY(-2px);
}


.door.is-open .door-front {
    transform: rotateY(-100deg);
    backface-visibility: hidden;
}


.door-link,
.door-front,
.door-content {
    border-radius: 15px;
}


.door-content h2,
.door-content h3,
.door-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.door-content strong {
    color: #ffdd99;
    font-weight: 700;
}


.door.is-open {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
}

.door:not(.is-open):hover .door-front::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,215,130,0.25), rgba(255,245,210,0.08), rgba(255,215,130,0.25));
    pointer-events: none;
}

/* Tür 24 bekommt ein spezielles goldiges Highlight */
.door.item_24 {
    border: 2px solid gold !important;
    background: radial-gradient(circle at center, rgba(255,223,128,0.6), rgba(255,180,0,0.4), rgba(180,0,0,0.4));
    box-shadow: 0 0 22px rgba(255,215,130,0.9), 0 0 45px rgba(255,200,100,0.55) !important;
}
.door.item_24 .door-front::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,215,130,0.35), rgba(255,230,180,0.1), rgba(255,215,130,0.35));
    pointer-events: none;
}


 .door::before {
    /* Helle, klare, goldene Zahl – jetzt seniorenfreundlicher (mehr Kontrast, größer, besser lesbar) */
    content: attr(data-number);
    position: absolute;
    top: 10px;
    left: 12px;

    font-family: "Cormorant Garamond", "Cinzel", "Bebas Neue", serif;
    font-size: 4.6rem;
    font-weight: 900;
    letter-spacing: 0.03em;

    /* Weihnachts-goldene Schrift – heller, klarer, eleganter */
    background: linear-gradient(
        180deg,
        #ffe9bf 0%,
        #f6cd78 35%,
        #e7a83f 70%,
        #b46d18 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    /* Extra Lesbarkeit: feiner dunkler Rand + stärkerer Schatten */
    -webkit-text-stroke: 1.15px rgba(65, 38, 6, 0.65);
    text-shadow:
        /* Kante für Lesbarkeit */
        0 2px 3px rgba(0, 0, 0, 0.50),

        /* „Gold-Kern“ */
        0 0 4px rgba(255, 236, 190, 0.70),
        0 0 10px rgba(255, 210, 125, 0.70),

        /* Weihnachts-Glow außen (wärmer + goldener) */
        0 0 18px rgba(255, 190, 95, 0.62),
        0 0 30px rgba(255, 170, 70, 0.48),
        0 0 52px rgba(255, 145, 45, 0.34),

        /* Mini „Sparkle“ */
        0 0 1px rgba(255, 252, 235, 0.90);

    filter:
        drop-shadow(0 0 12px rgba(255, 205, 120, 0.42))
        drop-shadow(0 0 28px rgba(255, 160, 60, 0.28));

    pointer-events: none;
    z-index: 25;
}

/* Minimal dunklere goldene Fläche hinter der Zahl, nur für Kontrast */
/* (Removed as per user request) */


.door[data-number="24"]::before {
    /* Heiligabend-Zahl – größer + extra klar */
    content: "24";
    position: absolute;
    top: 8px;
    left: 12px;

    font-family: "Cormorant Garamond", "Cinzel", "Bebas Neue", serif;
    font-size: 5.2rem;
    font-weight: 900;

    background: linear-gradient(
        180deg,
        #ffe9bf 0%,
        #ffd892 35%,
        #f0b957 70%,
        #c6771c 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    -webkit-text-stroke: 1.25px rgba(65, 38, 6, 0.70);
    text-shadow:
        /* Kante für Lesbarkeit */
        0 2px 4px rgba(0, 0, 0, 0.52),

        /* Gold-Kern */
        0 0 5px rgba(255, 244, 210, 0.85),
        0 0 12px rgba(255, 220, 150, 0.82),

        /* Heiligabend-Glow außen */
        0 0 24px rgba(255, 195, 105, 0.70),
        0 0 40px rgba(255, 170, 70, 0.55),
        0 0 66px rgba(255, 145, 45, 0.40),

        /* Mini „Sparkle“ */
        0 0 1px rgba(255, 252, 235, 0.95);

    filter:
        drop-shadow(0 0 14px rgba(255, 210, 135, 0.48))
        drop-shadow(0 0 34px rgba(255, 165, 65, 0.32));

    pointer-events: none;
    z-index: 25;
}

/* Leichter Schimmer nur für Tür 24 */
.door.item_24 {
    animation: starShimmer 8s infinite ease-in-out;
}

/* Schneeflocken laufen hinter dem Kalender */
.snowflake {
    z-index: -1 !important;
}

/* Höhere Ebene für interaktive Elemente */
.door, .calendar, header, footer {
    position: relative;
    z-index: 10;
}

.door-video {
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    object-fit: cover;
    display: block;
    border-radius: 15px; /* für gleiche Rundung wie die Tür */
}

/* door items */
/* nikolaus */
.door.item_6 {
    grid-column: 3 / span 2; /* belegt 2 Spalten ab colum 3 */
    grid-row: 1 / span 2;    /* belegt 2 Zeilen  ab row 1 */
}

/* gewährleistet Quadrat */
.door.item_6 .door-link {
    aspect-ratio: 1 / 1;
}

/* 23! */
.door.item_23 {
    grid-column: 5 / span 2; /* belegt 2 Spalten */
    grid-row: 6 / span 2;    /* belegt 2 Zeilen */
}

/* quadratische Form sicherstellen */
.door.item_23 .door-link {
    aspect-ratio: 1 / 1;
}

/* 24! */
.door.item_24 {
    grid-column: 2 / span 3;
    grid-row: 3 / span 2;
}

/* echte Höhe statt quadratischer Form */
.door.item_24 .door-link {
    aspect-ratio: auto;  /* nicht mehr quadratisch erzwingen */
    height: 390px;       /* anpassbare Höhe */
}

/* Inhalt soll Höhe ausfüllen */
.door.item_24 .door-front,
.door.item_24 .door-content,
.door.item_24 .has-video {
    height: 100%;
}

/* :::::::::: Slot_1 größere Tür über 2 Zeilen :::::::::::::*/
.slot_1{
    grid-column: 1 / span 1;
    grid-row: 3 / span 2;
}

/* echte Höhe */
.slot_1 .door-link {
    aspect-ratio: auto;
    height: 390px;
}

/* Inhalt passt sich an */
.slot_1 .door-front,
.slot_1 .door-content,
.slot_1 .has-video {
    height: 100%;
}

/* ::::::::::::: Slot_2 größere Tür über 2 Zeilen :::::::::::: */
.slot_2{
    grid-column: 5 / span 1;
    grid-row: 3 / span 2;
}

/* echte Höhe */
.slot_2 .door-link {
    aspect-ratio: auto;
    height: 390px;
}

/* Inhalt passt sich an */
.slot_2 .door-front,
.slot_2 .door-content,
.slot_2 .has-video {
    height: 100%;
}

/* ::::::::::::: slot_3 größere Tür über 2 Zeilen :::::::::::: */
.slot_3{
    grid-column: 5 / span 2;
    grid-row: 2 / span 1;
}

/* echte Höhe */
.slot_3 .door-link {
    aspect-ratio: auto;
    height: 190px;
}

/* Inhalt passt sich an */
.slot_3 .door-front,
.slot_3 .door-content,
.slot_3 .has-video {
    height: 100%;
}

/* ::::::::::::: slot_4 größere Tür über 2 Zeilen :::::::::::: */
.slot_4{
    grid-column: 1 / span 2;
    grid-row: 5 / span 1;
}

/* echte Höhe */
.slot_4 .door-link {
    aspect-ratio: auto;
    height: 190px;
}

/* Inhalt passt sich an */
.slot_4 .door-front,
.slot_4 .door-content,
.slot_4 .has-video {
    height: 100%;
}

/* ::::::::::::: slot_4 größere Tür über 2 Zeilen :::::::::::: */
.slot_4{
    grid-column: 1 / span 2;
    grid-row: 5 / span 1;
}

/* echte Höhe */
.slot_4 .door-link {
    aspect-ratio: auto;
    height: 190px;
}

/* Inhalt passt sich an */
.slot_4 .door-front,
.slot_4 .door-content,
.slot_4 .has-video {
    height: 100%;
}

/* ::::::::::::: slot_5 größere Tür über 2 Zeilen :::::::::::: */
.slot_5{
    grid-column: 5 / span 2;
    grid-row: 5 / span 1;
}

/* echte Höhe */
.slot_5 .door-link {
    aspect-ratio: auto;
    height: 190px;
}

/* Inhalt passt sich an */
.slot_5 .door-front,
.slot_5 .door-content,
.slot_5 .has-video {
    height: 100%;
}

/* ::::::::::::: slot_6 größere Tür über 2 Zeilen :::::::::::: */
.slot_6{
    grid-column: 3 / span 2;
    grid-row: 6 / span 1;
}

/* echte Höhe */
.slot_6 .door-link {
    aspect-ratio: auto;
    height: 190px;
}

/* Inhalt passt sich an */
.slot_6 .door-front,
.slot_6 .door-content,
.slot_6 .has-video {
    height: 100%;
}

/* ::::::::::::: slot_7 größere Tür über 2 Zeilen :::::::::::: */
.slot_7{
    grid-column: 3 / span 2;
    grid-row: 7 / span 1;
}

/* echte Höhe */
.slot_7 .door-link {
    aspect-ratio: auto;
    height: 190px;
}

/* Inhalt passt sich an */
.slot_7 .door-front,
.slot_7 .door-content,
.slot_7 .has-video {
    height: 100%;
}

/* Badge "Schon geöffnet" */
.door-content {
    padding: 0;          /* remove cut from padding */
}



/* Mobile-Anpassungen */

@media (max-width: 600px),
(max-height: 500px) and (orientation: landscape) {

    .door::before {
        font-size: 3.9rem;
        top: 8px;
        left: 10px;
    }

    .door[data-number="24"]::before {
        font-size: 4.4rem;
        top: 6px;
        left: 10px;
    }

    /* Mobile verwendet kein Grid-Layout */
    .doors {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 10px;
        max-width: 100%;
    }

    /* Alle Türen gleich groß */
    .door {
        flex: 0 0 140px;
        height: auto;
    }

    /* Quadratische Türchen */
    .door .door-link {
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
    }

    /* RESET für ALLE Spezialtüren (Slots + 6 + 23 + 24) */
    .door.slot_1,
    .door.slot_2,
    .door.slot_3,
    .door.slot_4,
    .door.slot_5,
    .door.slot_6,
    .door.slot_7,
    .door.item_6,
    .door.item_23,
    .door.item_24 {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    /* RESET für alle Höhen der Spezialtüren */
    .door.slot_1 .door-link,
    .door.slot_2 .door-link,
    .door.slot_3 .door-link,
    .door.slot_4 .door-link,
    .door.slot_5 .door-link,
    .door.slot_6 .door-link,
    .door.slot_7 .door-link,
    .door.item_6 .door-link,
    .door.item_23 .door-link,
    .door.item_24 .door-link {
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
    }

    /* Videos sollen das Quadrat korrekt füllen */
    .door-video {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Wichtig für quadratische Darstellung */
        pointer-events: none;
    }

    .opened-label {
        font-size: 1.5rem;
    }
}
