/* ==========================================================================
   GLOBAL CONFIGURATION (CSS VARIABLES)
   ========================================================================== */
:root {
    --color-primary: #4f7c4f;       /* Natürliches Kräuter-Grün (Header, Footer, Buttons) */
    --color-secondary: #fe6820;     /* Appetitliches Orange (Akzente, Hover, Links) */
    --color-bg-main: #faf6f0;       /* Warmes Beigeweiß für den Seitenhintergrund */
    --color-card-bg: #ffffff;       /* Reines Weiß für die schwebenden Blog-Karten */
    --color-text-main: #333d3e;     /* Dunkles Anthrazit für exzellente Lesbarkeit */
    --color-text-muted: #606d6e;    /* Mittleres Grau für sekundäre Texte */
    
    --font-headings: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.05); /* Sanfter, minimalistischer Schatten */
}

/* ==========================================================================
   GLOBAL STYLES & RESET
   ========================================================================== */
html, body {
    background-color: var(--color-bg-main) !important;
    font-family: var(--font-body);
    color: var(--color-text-main);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    font-weight: 100;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: #1a2223;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 100;
}

/* Pure.css Layout-Container transparent machen */
#layout, #main, .pure-g, .content, .main-content {
    background-color: transparent !important;
}

/* ==========================================================================
   HEADER & RESPONSIVE NAVIGATION (Flexbox, Dropdowns & Z-Index)
   ========================================================================== */

.header {
    background-color: var(--color-bg-main) !important;
    padding: 0.5rem 2rem;
    
    /* FIX: Z-Index sorgt dafür, dass der Header und seine Dropdowns 
       IMMER über allen Blog-Karten und dem Body-Content schweben */
    position: relative;
    z-index: 9999 !important;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Haupt-Navigations-Container */
.main-nav {
    /* FIX: Erlaubt dem Navigations-Container, Dropdowns anzuzeigen, 
       ohne sie an den Rändern abzuschneiden */
    overflow: visible !important; 
}

/* Die Menü-Liste (Große Bildschirme: nebeneinander) */
.main-nav .pure-menu-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav .pure-menu-item {
    position: relative; /* Absolut notwendige Basis für position:absolute der Kinder */
    display: inline-block !important;
}

.pure-menu-link {
    color: var(--color-text-main) !important;
    font-family: var(--font-body);
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.pure-menu-link:hover,
.pure-menu-selected > .pure-menu-link {
    color: var(--color-primary) !important;
    background: transparent !important;
}
body {
    --hr-line-offset: 25%;
    --hr-color: var(--color-primary);
}

:root hr {
    border-image-slice: 1;
    border-image-source: linear-gradient(
        to right,
        transparent,
        var(--hr-color) calc(50% - var(--hr-line-offset)),
        var(--hr-color) calc(50% + var(--hr-line-offset)),
        transparent
    );
}

/* ==========================================================================
   DROPDOWN FUNCTIONALITY (Ebenen-Korrektur)
   ========================================================================== */

.pure-menu-children {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    
    /* FIX: Höchste Priorität innerhalb des Headers, damit es über 
       die "beautiful line" und den Content bricht */
    z-index: 10000 !important; 
    
    background-color: var(--color-card-bg) !important;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: var(--shadow-card);
    padding: 0.5rem 0;
    list-style: none;
    min-width: 180px;
}

/* Zeigt das Untermenü beim Hovern an */
.pure-menu-has-children:hover .pure-menu-children {
    display: block !important;
}

.pure-menu-children .pure-menu-link {
    color: var(--color-text-main) !important;
    display: block;
    padding: 0.4rem 1rem !important;
    text-align: left;
}

.pure-menu-children .pure-menu-link:hover {
    background-color: var(--color-bg-main) !important;
    color: var(--color-primary) !important;
}

/* ==========================================================================
   SEARCH BUTTON
   ========================================================================== */
.search-btn {
    background-color: var(--color-primary);
    color: #faf6f0 !important;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.search-btn:hover {
    background-color: var(--color-secondary);
    transform: scale(1.03);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERY (Hamburger-Menü ohne JavaScript) - FIX
   ========================================================================== */

/* Standardmäßig verstecken wir den Hamburger-Trigger auf dem Mac/Desktop */
.menu-toggle, .hamburger-icon {
    display: none;
}

@media (max-width: 768px) {
    /* Header-Container anpassen */
    .header-container {
        display: grid;
        grid-template-columns: 1fr auto; /* Logo links, Hamburger rechts */
        align-items: center;
        padding: 0.5rem 0;
        position: relative;
    }
    
    /* Unsichtbare Checkbox */
    .menu-toggle {
        display: none !important;
    }
    
    /* Stylen des Hamburger-Icons (3 Striche) */
    .hamburger-icon {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 10001;
    }
    
    .hamburger-icon span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: var(--color-text-main);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    
    /* NAVIGATION: Mobil vor dem Klick absolut SICHER verstecken */
    .main-nav {
        grid-column: 1 / span 2;
        width: 100%;
        display: none !important; /* Zwingt das Menü, unsichtbar zu sein */
        overflow: hidden;
    }
    
    .main-nav .pure-menu-list {
        flex-direction: column !important;
        width: 100%;
        padding: 1rem 0 0 0;
    }
    
    .main-nav .pure-menu-item {
        display: block !important;
        width: 100%;
        text-align: left;
    }
    
    .pure-menu-link {
        padding: 0.8rem 1rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    /* SUCHE: Mobil vor dem Klick absolut sicher verstecken */
    .header-search {
        grid-column: 1 / span 2;
        justify-content: center;
        margin-top: 1rem;
        display: none !important; /* Zwingt die Suche, unsichtbar zu sein */
    }
    
    /* ==========================================
       DER TRICK: Wenn Hamburger GEKLICKT wird (:checked)
       ========================================== */
    
    /* Blendet das Hauptmenü ein, wenn geklickt */
    #menu-toggle:checked ~ .main-nav {
        display: flex !important;
        max-height: none !important; /* Verhindert, dass die Höhe auf 0 bleibt */
        visibility: visible !important;
    }
    
    /* Blendet die Suche ein, wenn geklickt */
    #menu-toggle:checked ~ .header-search {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* ==========================================
       SUB-MENÜS IM HAMBURGER (Unterpunkte)
       ========================================== */
    .pure-menu-children {
        display: block !important; /* Immer ausgerollt innerhalb des offenen Menüs */
        position: relative;
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--color-primary);
        background-color: rgba(0, 0, 0, 0.01) !important;
        padding-left: 1rem;
        margin-bottom: 0.5rem;
        top: 0;
    }
    
    .pure-menu-children .pure-menu-link {
        border-bottom: none;
        padding: 0.5rem 1rem !important;
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   BLOGSEITE:
   ========================================================================== */
.pure-button { font-size: 0.8em; padding: 5px 8px; margin-right: 4px; border-radius: 3px; background-color: var(--color-secondary); color: white; text-decoration: none;
}

/* ==========================================================================
   FOOTER & BUTTONS
   ========================================================================== */
.footer {
    background-color: var(--color-primary) !important;
    color: #faf6f0 !important;
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
}
.footer.text-center a{
    color: #faf6f0 !important;
    text-decoration: none;
}
.pure-button-primary, .button-custom {
    background-color: var(--color-primary) !important;
    color: #faf6f0 !important;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
}

.pure-button-primary:hover, .button-custom:hover {
    background-color: var(--color-secondary) !important;
}

.main-content a {
    color: var(--color-secondary);
    text-decoration: none;
}
/* Der Container für die social Icons */
.social-container {
    display: flex;             /* Aktiviert Flexbox für horizontale Ausrichtung */
    justify-content: center;   /* Zentriert die Icons horizontal */
    align-items: center;       /* Zentriert die Icons vertikal */
    gap: 20px;                 /* Definiert den Abstand zwischen den Icons (flexibler als margin) */
    padding: 15px;
}

/* Styling für die Links (die klickbare Fläche) */
.social-link {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease; /* Sanfter Effekt beim Drüberfahren */
    text-decoration: none;
}

/* Styling für die PNG-Bilder selbst */
.social-icon {
    width: 40px;               /* Gewünschte Breite der Icons */
    height: 40px;              /* Gewünschte Höhe der Icons */
    object-fit: contain;       /* Verhindert Verzerrungen der PNGs */
    display: block;
}

/* Hover-Effekt: Wenn man mit der Maus drüberfährt */
.social-link:hover {
    transform: translateY(-3px); /* Bewegt das Icon leicht nach oben */
    opacity: 0.8;                /* Macht das Icon leicht transparent */
}

/* Fokus-Effekt für Tastatur-Nutzer (wichtig für Barrierefreiheit) */
.social-link:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 4px;
    border-radius: 4px;
}
/* ==========================================================================
   REZEPT-EINZELSEITE: Bessere Lesbarkeit auf großen Bildschirmen
   ========================================================================== */

/* Tritt nur bei Bildschirmen ab 769px Breite in Kraft (Mac, Desktop, Laptop) */
@media (min-width: 769px) {
    
    /* Wir suchen den Hauptcontainer der Einzelseite. 
       Themes nutzen dafür meistens .item-page, .single-post oder .post-content */
    .item-page, 
    .post-content,
    article {
        max-width: 750px;       /* Macht den Textbereich angenehm schmal */
        margin: 0 auto;         /* Zentriert den schmalen Bereich perfekt in der Mitte */
        padding: 2rem 1.5rem;   /* Schafft eleganten Atemraum an den Seiten */
    }
}

/* Auf kleinen Bildschirmen (mobil) greift diese Regel automatisch NICHT, 
   sodass der Text dort wie gewünscht die volle Breite nutzt. */
/* ==========================================================================
   MINIMALISTISCHE REZEPT-EMPFEHLUNGEN (UNTER POSTS)
   ========================================================================== */

.recipe-suggestions-area {
    margin-top: 4rem; /* Deutlicher Abstand zum Rezept-Ende */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 2rem;
}

.suggestion-title {
    font-family: var(--font-headings);
    color: var(--color-text-main);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Container für Bild + Titel */
.minimal-recipe-card {
    margin-bottom: 1.5rem;
    padding: 0 10px; /* Abstand zwischen den Spalten */
}

.suggestion-image img {
    width: 100%;
    height: auto;
    border-radius: 6px; /* Sanft abgerundete Ecken für die Food-Bilder */
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: block;
}

/* Visuelles Feedback beim Hovern über das Bild */
.suggestion-image a:hover img {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Titel direkt unter dem Bild */
.suggestion-item-title {
    margin-top: 0.8rem;
    margin-bottom: 0;
    font-size: 1.2rem;
    font-family: var(--font-headings);
}

.suggestion-item-title a {
    color: var(--color-text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.suggestion-item-title a:hover {
    color: var(--color-primary); /* Wird beim Hovern kräutergrün */
}

/* Banner Anpassung */
.recipe-suggestions-area .banner-ads-placeholder {
    margin: 2.5rem 10px 1rem 10px;
}
/* Abstand zwischen den globalen Magazin-Blöcken */
.suggestion-section {
    margin-bottom: 4rem; /* Erzeugt einen sauberen Abstand, bevor die nächste Kategorie startet */
}

.suggestion-section:last-child {
    margin-bottom: 1rem; /* Verhindert zu viel Abstand ganz unten vorm Footer */
}
/* ==========================================================================
   Container für die gesamte Blog-Seite
   ========================================================================== */
.blog-main-container {
    max-width: 1400px; /* Schön breit für große Bildschirme */
    margin: 0 auto;
    padding: 2rem 1rem;
}

.blog-page-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
}

/* ==========================================================================
   DAS ECHTE, LÜCKENLOSE PINTEREST-LAYOUT (Columns statt Grid)
   ========================================================================== */
.pinterest-grid {
    /* Standard für Handys: 2 Spalten */
    column-count: 2;
    column-gap: 15px;
    width: 100%;
}

/* Für Tablets (ab 768px) -> 3 Spalten */
@media (min-width: 768px) {
    .pinterest-grid {
        column-count: 3;
        column-gap: 20px;
    }
}

/* Für normale Desktop-Bildschirme (ab 1024px) -> 4 Spalten */
@media (min-width: 1024px) {
    .pinterest-grid {
        column-count: 4;
        column-gap: 25px;
    }
}

/* Für sehr große Monitore (ab 1440px) -> 6 Spalten */
@media (min-width: 1440px) {
    .pinterest-grid {
        column-count: 6;
    }
}

/* WICHTIG: Die Karte muss sich innerhalb der Spalten richtig verhalten */
.pinterest-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block; /* Zwingt die Karte, als ein einzelner Block zu bleiben */
    width: 100%; /* Nutzt die volle Breite der jeweiligen Spalte */
    margin-bottom: 15px; /* Abstand nach unten zur nächsten Karte */
    break-inside: avoid; /* Verhindert, dass eine Karte unschön in der Mitte durchgeschnitten wird */
}

/* ==========================================================================
   DIE EINZELNE KARTE (Pinterest-Style)
   ========================================================================== */
.pinterest-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.pinterest-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* Bild-Anpassung: Folgt der originalen Proportion */
.pinterest-image-wrapper img {
    width: 100%;
    height: auto; /* Zwingt das Bild, seine originale Proportion zu behalten */
    display: block;
}

/* Text unter dem Bild */
.pinterest-content {
    padding: 12px;
    text-align: center;
}

.pinterest-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 200;
}

.pinterest-title a {
    text-decoration: none;
    color: #333;
}

.pinterest-title a:hover {
    color: #ff4a4a; /* Deine Theme-Highlight-Farbe, falls vorhanden */
}
/* ==========================================================================
   CUSTOM PAGINATION STYLING
   ========================================================================== */
.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 4rem 0 2rem 0;
    font-family: sans-serif;
}

.pagination-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #dddddd;
    border-radius: 25px; /* Schöne abgerundete Pillen-Form */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled) {
    background-color: #ff4a4a; /* Deine Theme-Highlightfarbe */
    color: #ffffff;
    border-color: #ff4a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Wenn man auf der ersten oder letzten Seite ist, wird der Button ausgegraut */
.pagination-btn.disabled {
    color: #bbbbbb;
    background-color: #f5f5f5;
    border-color: #eeeeee;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.95rem;
    color: #666666;
    font-weight: 500;
}
/* Zielt NUR auf das div innerhalb der Body-Section der Speisekammer-Seite */
body.speisekammer #body > div {
    max-width: 750px !important; /* !important bricht den harten 1200px Inline-Style im HTML */
    margin: 0 auto;             /* Hält die Box perfekt in der Mitte */
    padding: 0 20px;            /* Sicherheitsabstand für Handys */
}

/* ==========================================================================
   STYLEN (.forhome)
   ========================================================================== */
body.forhome #body > div {
    font-size: 1.5rem;
    text-align: center;
    margin: 0 auto;
    line-height: 1.6;}

/* Das große Banner-Bild nimmt 100% Breite */
body.forhome .banner-pic {
    width: 100%;
    height: auto;
    margin: 3rem 0;
    display: block;
}
