/*
 * Kruidenloket Kruid Template Styling
 *
 * Bestand: kruidenloket-kruid.css
 * Locatie: /wp-content/themes/Divi-child/kruidenloket-kruid.css
 *
 * Versie 1.2 - teal banner header (schone versie zonder dubbele definities)
 *
 * Stijl-uitgangspunten:
 * - Teal hoofdkleur #2a7c76
 * - Playfair Display voor titels
 * - Source Sans 3 voor body
 * - Print-vriendelijk (A4)
 * - Mobile breakpoints: 600px, 480px, 400px
 */

/* ============================================
   GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS VARIABELEN
   ============================================ */
:root {
    --kl-teal: #2a7c76;
    --kl-teal-donker: #1f5e59;
    --kl-teal-licht: #4aa8a0;
    --kl-teal-zacht: rgba(42, 124, 118, 0.08);
    --kl-tekst: #2d3e3c;
    --kl-tekst-licht: #5a6b69;
    --kl-achtergrond: #fafaf7;
    --kl-rand: #e8e6df;
    --kl-warm: #c97a4a;
    --kl-koud: #4a7fc9;
    --kl-droog: #c9a04a;
    --kl-vocht: #4ac9a8;
    --kl-neutraal: #888888;
}

/* ============================================
   ALGEMENE KRUID ARTICLE STYLING
   ============================================ */
.kl-kruid-article {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--kl-tekst);
    line-height: 1.65;
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 24px;
    background: #ffffff;
}

.kl-kruid-article p {
    font-size: 1.05rem;
    margin: 0 0 1em 0;
    color: var(--kl-tekst);
}

.kl-kruid-article strong {
    color: var(--kl-teal);
    font-weight: 600;
}

.kl-kruid-article em {
    font-style: italic;
}

/* ============================================
   TEAL BANNER HEADER
   ============================================ */
.kl-header-banner {
    position: relative;
    background: linear-gradient(135deg, var(--kl-teal) 0%, var(--kl-teal-donker) 100%);
    color: white;
    padding: 60px 24px 64px 24px;
    margin: -40px -24px 48px -24px;
    overflow: hidden;
    text-align: center;
    border-radius: 0 0 4px 4px;
}

.kl-header-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
}

.kl-header-decoration {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 160px;
    opacity: 0.6;
    pointer-events: none;
}

.kl-header-decoration-left {
    left: 20px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.kl-header-decoration-right {
    right: 20px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.kl-header-inner {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
}

.kl-header-eyebrow {
    font-family: 'Source Sans 3', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin: 0 0 16px 0;
}

.kl-kruid-article .kl-titel {
    font-family: 'Playfair Display', serif;
    font-size: 3.6rem;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.kl-kruid-article .kl-latijn {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: rgba(255,255,255,0.92);
    margin: 0 0 16px 0;
    font-weight: 400;
}

.kl-kruid-article .kl-familie {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display: inline-block;
    padding-left: 24px;
    padding-right: 24px;
}

/* ============================================
   INTRO BLOK: illustratie + tekst
   ============================================ */
.kl-intro {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 48px;
    padding: 24px;
    background: var(--kl-teal-zacht);
    border-radius: 4px;
}

.kl-illustratie img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.kl-korte-intro {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--kl-tekst);
    margin-bottom: 16px;
}

.kl-indicaties-tags {
    margin-top: 16px;
    font-size: 0.95rem;
}

.kl-indicaties-tags strong {
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--kl-teal);
}

.kl-tag {
    display: inline-block;
    background: white;
    color: var(--kl-teal);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.88rem;
    margin: 2px 4px 2px 0;
    border: 1px solid var(--kl-teal-licht);
    font-weight: 500;
}

/* ============================================
   NATUURKWALITEITEN BLOK
   ============================================ */
.kl-natuurkwaliteiten-blok {
    background: white;
    padding: 32px;
    margin: 32px 0;
    border: 1px solid var(--kl-rand);
    border-radius: 4px;
}

.kl-nk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 24px 0;
}

.kl-nk-kaart {
    background: var(--kl-achtergrond);
    padding: 24px;
    border-radius: 4px;
    border-left: 4px solid var(--kl-teal);
}

.kl-nk-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--kl-teal);
    font-weight: 600;
    margin-bottom: 4px;
}

.kl-nk-label-sub {
    font-size: 0.85rem;
    color: var(--kl-tekst-licht);
    font-style: italic;
    margin-bottom: 12px;
}

.kl-nk-waarde {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.kl-nk-warm { color: var(--kl-warm); }
.kl-nk-koud { color: var(--kl-koud); }
.kl-nk-droog { color: var(--kl-droog); }
.kl-nk-vocht { color: var(--kl-vocht); }
.kl-nk-neutraal { color: var(--kl-neutraal); }

.kl-nk-toelichting {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--kl-tekst);
}

.kl-nk-diagram {
    text-align: center;
    margin-top: 24px;
}

.kl-nk-diagram svg {
    max-width: 280px;
    height: auto;
}

/* ============================================
   SECTIES (de 13 secties)
   ============================================ */
.kl-section {
    margin: 40px 0;
    padding: 24px 0;
    border-top: 1px solid var(--kl-rand);
}

.kl-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--kl-teal);
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--kl-teal-zacht);
}

.kl-section-content {
    font-size: 1.05rem;
    line-height: 1.7;
}

.kl-section-content p {
    margin-bottom: 1em;
}

/* ============================================
   LIJSTEN: inhoudsstoffen en eigenschappen
   ============================================ */
.kl-stoffen-lijst,
.kl-eigenschappen-lijst {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kl-stoffen-lijst li,
.kl-eigenschappen-lijst li {
    padding: 12px 0 12px 24px;
    border-bottom: 1px solid var(--kl-rand);
    position: relative;
    line-height: 1.55;
}

.kl-stoffen-lijst li::before,
.kl-eigenschappen-lijst li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--kl-teal);
    font-size: 1.3rem;
    line-height: 1;
    top: 14px;
}

.kl-stoffen-lijst li:last-child,
.kl-eigenschappen-lijst li:last-child {
    border-bottom: none;
}

.kl-stoffen-lijst li strong,
.kl-eigenschappen-lijst li strong {
    color: var(--kl-teal);
    font-weight: 600;
}

/* ============================================
   TABEL: gebruikte delen
   ============================================ */
.kl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.98rem;
}

.kl-table thead {
    background: var(--kl-teal);
    color: white;
}

.kl-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kl-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--kl-rand);
    vertical-align: top;
}

.kl-table tbody tr:nth-child(even) {
    background: var(--kl-achtergrond);
}

.kl-table tbody tr:hover {
    background: var(--kl-teal-zacht);
}

/* ============================================
   FOOTER van het kruidenbestand
   ============================================ */
.kl-kruid-footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 2px solid var(--kl-teal);
    text-align: center;
    color: var(--kl-tekst-licht);
    font-size: 0.92rem;
}

.kl-kruid-footer a {
    color: var(--kl-teal);
    text-decoration: none;
    font-weight: 500;
}

.kl-kruid-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .kl-kruid-article {
        padding: 24px 16px;
    }

    .kl-header-banner {
        padding: 40px 16px 48px 16px;
        margin: -24px -16px 32px -16px;
    }

    .kl-kruid-article .kl-titel {
        font-size: 2.4rem;
    }

    .kl-kruid-article .kl-latijn {
        font-size: 1.2rem;
    }

    .kl-header-eyebrow {
        font-size: 0.72rem;
    }

    .kl-header-decoration {
        display: none;
    }

    .kl-intro {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }

    .kl-illustratie {
        max-width: 240px;
        margin: 0 auto;
    }

    .kl-nk-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .kl-natuurkwaliteiten-blok {
        padding: 20px;
    }

    .kl-section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .kl-kruid-article .kl-titel {
        font-size: 2rem;
    }

    .kl-nk-waarde {
        font-size: 1.6rem;
    }

    .kl-table {
        font-size: 0.88rem;
    }

    .kl-table th,
    .kl-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 400px) {
    .kl-kruid-article {
        padding: 16px 12px;
    }

    .kl-kruid-article .kl-titel {
        font-size: 1.8rem;
    }

    .kl-stoffen-lijst li,
    .kl-eigenschappen-lijst li {
        padding-left: 20px;
        font-size: 0.95rem;
    }
}

/* ============================================
   PRINT STYLING
   ============================================ */
@media print {
    .kl-kruid-article {
        max-width: 100%;
        padding: 0;
        background: white;
    }

    .kl-header-banner {
        background: white;
        color: black;
        margin: 0;
        padding: 20px 0;
        border-bottom: 2px solid var(--kl-teal);
    }

    .kl-kruid-article .kl-titel,
    .kl-kruid-article .kl-latijn,
    .kl-kruid-article .kl-familie,
    .kl-header-eyebrow {
        color: black;
        text-shadow: none;
    }

    .kl-header-decoration,
    .kl-header-banner::before {
        display: none;
    }

    .kl-section {
        break-inside: avoid;
    }

    .kl-table {
        break-inside: avoid;
    }

    .kl-nk-kaart {
        break-inside: avoid;
    }

    .kl-tag {
        border: 1px solid #999;
        background: white;
    }
}

/* ============================================
   DIVI OVERRIDE FIXES (toegevoegd onderaan)
   Reden: Divi 4.x heeft hoge-specificity selectors
   die de banner-kleuren en margins overrulen.
   Toevoegen onderaan = wint in cascade.
   ============================================ */

/* Body-scope verhoogt specificity, !important garandeert override */
body.single-kruid .kl-header-banner {
    background: linear-gradient(135deg, #2a7c76 0%, #1f5e59 100%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 8px !important;
}

body.single-kruid .kl-header-banner .kl-header-eyebrow {
    color: rgba(255, 255, 255, 0.85) !important;
}

body.single-kruid .kl-header-banner h1.kl-titel,
body.single-kruid .kl-header-banner .kl-titel,
body.single-kruid .entry-content h1.kl-titel,
body.single-kruid #main-content h1.kl-titel {
    color: #ffffff !important;
    background: transparent !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

body.single-kruid .kl-header-banner .kl-latijn,
body.single-kruid .kl-header-banner p.kl-latijn,
body.single-kruid .kl-header-banner .kl-latijn em {
    color: rgba(255, 255, 255, 0.95) !important;
    font-style: italic !important;
}

body.single-kruid .kl-header-banner .kl-familie,
body.single-kruid .kl-header-banner p.kl-familie {
    color: rgba(255, 255, 255, 0.85) !important;
    border-top-color: rgba(255, 255, 255, 0.3) !important;
}

/* Mobile aanpassingen voor de overrides */
@media (max-width: 600px) {
    body.single-kruid .kl-header-banner {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}