/* ==========================================================================
   1. LOKALE SCHRIFTARTEN (Variable Fonts .ttf)
   ========================================================================== */
@font-face {
    font-family: 'Grand Hotel';
    src: url('fonts/GrandHotel-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Bree Serif';
    src: url('fonts/BreeSerif-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Oswald';
    src: url('fonts/Oswald-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 200 900;
    font-style: normal;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('fonts/SourceSans3-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 200 900;
    font-style: normal;
}

/* ==========================================================================
   2. ALLGEMEINES STYLING & SEITEN-HINTERGRUND
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    background-color: #2F4F46; /* Dunkelgrün */
    color: #5A3922; /* Kaffeebraun */
    font-family: 'Source Sans 3', sans-serif;
    line-height: 1.6;
}

/* ==========================================================================
   3. FIXED STICKY HEADER (Mobil-optimierte Live-Variante)
   ========================================================================== */
header {
    background-color: #F4E8D2; /* Hintergrund Creme */
    text-align: center;
    padding: 25px 20px 10px 20px; 
    border-bottom: 4px solid #8B2C2C; /* Trennstrich in Retro-Rot */
    
    position: sticky;
    top: 0;
    z-index: 100; 
    
    transition: padding 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
}

.logo-image {
    width: 100%;
    max-width: 340px; /* Perfekte wuchtige Startgröße am PC */
    height: auto;
    display: inline-block;
    transform-origin: top center; 
    margin-bottom: -45px; 
    position: relative;
    z-index: 120;
    
    transition: max-width 0.4s ease-in-out, margin-bottom 0.4s ease-in-out;
}

/* Startgröße auf dem Smartphone (wenn man ganz oben auf der Seite ist) */
@media (max-width: 480px) {
    .logo-image {
        max-width: 220px;
        margin-bottom: -30px;
    }
}

/* ==========================================================================
   DIE DYNAMISCHEN SCHRUNPF-ZUSTÄNDE (Jetzt mit extra Handy-Schrumpfung)
   ========================================================================== */

/* Wenn gescrollt wird, zieht sich der cremefarbene Kasten flach zusammen */
header.shrink {
    padding: 8px 20px 5px 20px; 
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.45); 
}

/* 1. DER SCHRUNPF-EFFEKT FÜR DEN PC-BILDSCHIRM */
header.shrink .logo-image {
    max-width: 170px;
    margin-bottom: -22px; 
}

/* 2. NEU: DER EXTRA STARKE SCHRUNPF-EFFEKT FÜR DAS HANDY (-40% kompakter!) */
@media (max-width: 480px) {
    header.shrink {
        padding: 4px 20px 2px 20px; /* Zieht den Cremebalken auf dem Handy extrem flach */
    }
    header.shrink .logo-image {
        max-width: 110px; /* Das Logo schrumpft unübersehbar zusammen */
        margin-bottom: -15px; /* Passt den roten Linienüberhang perfekt an */
    }
}


/* ==========================================================================
   4. DER HAUPTCONTAINER (Fängt alle Boxen bei jeder Auflösung bombenfest ein)
   ========================================================================== */
.container {
    width: 100%;
    max-width: 940px; /* Erhöht auf 940px, um Platz für die inneren Polster zu machen */
    margin: 0 auto;   /* Zentriert das gesamte Paket perfekt in der Bildschirmmitte */
    padding: 0 20px;  /* Garantiert den Mindestabstand zum Bildschirmrand bei Handys */
    box-sizing: border-box; /* Sichert die exakte Breitenberechnung */
}

/* ==========================================================================
   5. FÖRDERTURM-BILD (Perfekt innerhalb des Containers eingepasst)
   ========================================================================== */
.mining-divider {
    width: 100%;
    max-width: 900px; /* Passt jetzt haargenau auf die Außenkante der weißen Karten */
    margin: 50px auto 40px auto; /* 50px Platz fürs Logo, 40px Lücke nach unten */
    padding: 0;
    text-align: center;
    box-sizing: border-box; 
    
    /* Gelsenkirchener Barock: Doppelrahmung */
    border: 4px double #5A3922; 
    border-radius: 16px; 
    background-color: #5A3922; 
    overflow: hidden;
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.55);
}

.mining-divider img {
    width: 100%;
    height: 580px; /* Ihre imposante Wunschhöhe bleibt stabil */
    display: block;
    object-fit: cover; 
    filter: sepia(0.60) saturate(1.0) contrast(1.1) brightness(0.95);
}

@media (max-width: 768px) {
    .mining-divider img {
        height: 260px; /* Mobil schön kompakt */
    }
}


/* DER NEUE TEXT-EFFEKT: Schwebend, barock & 30% transparent */
.mining-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Zentriert den Text mathematisch exakt */
    
    font-family: 'Oswald', sans-serif;
    font-weight: 700; /* Oswald Bold */
    font-size: 6.5rem; /* Schön groß und wuchtig */
    text-transform: uppercase;
    letter-spacing: 4px;
    
    /* Weiß mit genau 30% Deckkraft (0.3) */
    color: rgba(255, 255, 255, 0.5); 
    
    /* Ein hauchdünner, dunkler Schatten sorgt dafür, dass man die Schrift auch auf hellem Wolkenhintergrund lesen kann */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); 
    
    width: 100%;
    pointer-events: none; /* Verhindert, dass der Text beim Klicken stört */
}

/* Auf Smartphones wird die Schrift automatisch kleiner, damit sie nicht übersteht */
@media (max-width: 768px) {
    .mining-divider img {
        height: 260px; 
    }
    .mining-text {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
}


/* ==========================================================================
   6. INHALTS-BOXEN & RAHMEN (Gelsenkirchener Barock)
   ========================================================================== */
.section-card {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.55); /* Dunklerer Retro-Schatten */
    box-sizing: border-box;
    
    border: 4px double #5A3922;
    border-radius: 16px; /* Abgerundete Ecken */
    position: relative;
}

/* Die barocken Schnörkel-Zierpunkte in den Ecken */
.section-card::before, .section-card::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #8B2C2C; 
    border-radius: 50%;
    opacity: 0.8;
}
.section-card::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.section-card::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

h2 {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    color: #8B2C2C;
    border-bottom: 3px double #F4E8D2; /* Wellen-Zierlinie */
    padding-bottom: 12px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sektion für das nackte Öffnungszeiten-Schild */
.opening-hours-section {
    margin-bottom: 40px;
    text-align: center;
}

.opening-hours-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    display: inline-block;
    margin-bottom: 10px;
    filter: drop-shadow(6px 6px 12px rgba(0, 0, 0, 0.55));
}

.friendly-note {
    font-family: 'Bree Serif', serif;
    background-color: #8B2C2C;
    color: #F4E8D2;
    padding: 15px 20px;
    border-radius: 4px;
    text-align: center;
    font-size: 1.1rem;
    margin-top: 20px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #F4E8D2;
}

/* ==========================================================================
   7. PRODUKT CARDS (Symmetrisch & Fehlersicher)
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.product-card {
    background: #ffffff;
    border: 3px double #5A3922;
    border-radius: 12px; /* Abgerundete Ecken für Produktkarten */
    overflow: hidden; /* Beschneidet die Bilder oben passend zur Rundung */
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 7px 7px 14px rgba(0, 0, 0, 0.55);
    border-color: #8B2C2C;
}

/* Erzwingt exakt identische Höhen für alle echten Produktbilder */
.product-card img {
    width: 100% !important;
    height: 180px !important;
    max-height: 180px !important;
    object-fit: cover !important;
    display: block !important;
    border-bottom: 3px double #5A3922;
}

/* Erzwingt exakt identische Höhen für alle Platzhalter-Boxen */
.product-image-placeholder {
    width: 100%;
    height: 180px;
    background-color: #F4E8D2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5A3922;
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    border-bottom: 3px double #5A3922;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    color: #2F4F46;
}

.product-description {
    font-size: 0.95rem;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.product-price {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #8B2C2C;
    text-align: right;
    margin: auto 0 0 0; /* Drückt den Preis bündig an das Kartenende */
}

/* ==========================================================================
   8. RECHTLICHER BEREICH & RECHTLICHE BOXEN
   ========================================================================== */
.legal-section {
    font-size: 0.85rem;
    border-top: 2px solid #F4E8D2;
    margin-top: 60px;
    padding-top: 30px;
}

.legal-box {
    background: #ffffff;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #5A3922;
}

footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
    color: #F4E8D2;
}

/* ==========================================================================
   9. LADEN-ANIMATIONEN (Einflug & Schild-Pendeln)
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shieldSwing {
    0% { transform: rotate(0deg); filter: drop-shadow(4px 10px 6px rgba(0, 0, 0, 0.55)); }
    15% { transform: rotate(15deg); filter: drop-shadow(-10px 14px 8px rgba(0, 0, 0, 0.45)); }
    30% { transform: rotate(-12deg); filter: drop-shadow(14px 13px 8px rgba(0, 0, 0, 0.45)); }
    45% { transform: rotate(8deg); filter: drop-shadow(-6px 12px 7px rgba(0, 0, 0, 0.48)); }
    60% { transform: rotate(-5deg); filter: drop-shadow(10px 11px 7px rgba(0, 0, 0, 0.48)); }
    75% { transform: rotate(2deg); filter: drop-shadow(3px 10px 6px rgba(0, 0, 0, 0.55)); }
    90% { transform: rotate(-1deg); filter: drop-shadow(6px 10px 6px rgba(0, 0, 0, 0.55)); }
    100% { transform: rotate(0deg); filter: drop-shadow(4px 10px 6px rgba(0, 0, 0, 0.55)); }
}

@keyframes pureFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards, shieldSwing 1.8s cubic-bezier(0.25, 0.8, 0.25, 1) 0.2s forwards;
}

.animate-fade-only {
    opacity: 0;
    animation: pureFadeIn 1.2s ease-in-out forwards;
    animation-delay: 0.2s;}
    
.animate-slide-up {
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Präzises Nacheinander-Erscheinen der einzelnen Boxen im Container */
.container > div:nth-child(2) { 
    animation-delay: 0.4s; 
    opacity: 0; 
}

.container > div:nth-child(3) { 
    animation-delay: 0.6s; 
    opacity: 0; 
}
    
.opening-hours-section { 
    animation-delay: 0.8s; 
    opacity: 0; 
}

.legal-section { 
    animation-delay: 1.0s; opacity: 0; 
}
