/* =================================================================
   enerix-blog-styles.css — Blog & Advice Styles for enerix.de

   Sections:
     1. Typography (H1–H3, body text) — scoped to .enerix-blog-content
     2. Hint Boxes (Tipp, Wissen, Achtung)
     3. Summary Box ("Das Wichtigste in Kuerze")
     4. List Spacing
     5. Table Scroll Wrapper + 5 Table Variants + Utilities
     6. YouTube Embed (GDPR-compliant lazy load)

   Load via wp_enqueue_style() — see enerix-blog-styles-includes.php.
   ================================================================= */


/* =================================================================
   1. TYPOGRAPHY
   ================================================================= */

.enerix-blog-content {
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

.enerix-blog-content h1 {
    font-family: inherit;
    font-size: 2.25rem;
    line-height: 1.25;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.enerix-blog-content h2 {
    font-family: inherit;
    font-size: 1.55rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    letter-spacing: -0.01em;
    color: #4d4b49;
    border-bottom: 3px solid #1a5c2e;
}

.enerix-blog-content h3 {
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: #4d4b49;
}

.wp-caption-text {
    font-size: 0.75em;
}


/* =================================================================
   2. HINT BOXES (Tipp / Wissen / Achtung)

   Applied via TinyMCE format dropdown in Classic Editor.
   For Gutenberg: would need custom block styles instead.

   HTML:
   <div class="enerix-hint enerix-hint--tipp">
     <p><strong>Tipp:</strong> Content here.</p>
   </div>
   ================================================================= */

.enerix-hint {
    border-left: 4px solid #0D7C3D;
    background: #F4F9E8;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
    font-size: 1em;
    line-height: 1.7;
}
.enerix-hint p { margin: 0; }
.enerix-hint p + p { margin-top: 8px; }
.enerix-hint strong { color: #094A23; }

/* Tipp (green) — default */
.enerix-hint--tipp {
    border-left-color: #0D7C3D;
    background: #F4F9E8;
}

/* Wusstest du? (orange) */
.enerix-hint--wissen {
    border-left-color: #F39200;
    background: #FFF8ED;
}
.enerix-hint--wissen strong { color: #B36800; }

/* Achtung! (red) */
.enerix-hint--achtung {
    border-left-color: #DC0000;
    background: #FFF5F5;
}
.enerix-hint--achtung strong { color: #A30000; }


/* =================================================================
   3. SUMMARY BOX "Das Wichtigste in Kuerze" (V3)

   HTML:
   <div class="enerix-summary enerix-summary--v3">
     <div class="enerix-summary__header">Das Wichtigste in K&uuml;rze</div>
     <div class="enerix-summary__body">
       <ul>
         <li>Point 1</li>
         <li>Point 2</li>
       </ul>
     </div>
   </div>
   ================================================================= */

.enerix-summary--v3 {
    border-radius: 0.625em;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin: 2em 0;
    font-size: inherit;
    line-height: inherit;
}

.enerix-summary--v3 .enerix-summary__header {
    background: linear-gradient(135deg, #094A23 0%, #0D7C3D 60%, #94BF22 100%);
    color: #fff;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1em 1.75em;
}

.enerix-summary--v3 .enerix-summary__body {
    background: #fff;
    padding: 1.5em 1.75em;
}

.enerix-summary--v3 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.enerix-summary--v3 ul li {
    position: relative;
    padding-left: 1.75em;
    margin-bottom: 0.6em;
    font-size: inherit;
    line-height: inherit;
}
.enerix-summary--v3 ul li:last-child {
    margin-bottom: 0;
}
.enerix-summary--v3 ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 0;
    color: #0D7C3D;
    font-weight: 700;
}

@media (max-width: 600px) {
    .enerix-summary--v3 .enerix-summary__header {
        padding: 0.875em 1.25em;
    }
    .enerix-summary--v3 .enerix-summary__body {
        padding: 1.25em 1.25em;
    }
}


/* =================================================================
   4. LIST SPACING

   Targets .single-post and .single-advice
   ================================================================= */

.single-post ul li,
.single-post ol li,
.single-advice ul li,
.single-advice ol li {
    padding-bottom: 0.6rem;
}


/* =================================================================
   5. TABLES — Scroll Wrapper + 5 Variants + Utilities

   All tables should be wrapped in .enerix-table-scroll for
   horizontal scrolling on mobile. The PHP content filter does
   this automatically for <table> elements in post content.
   ================================================================= */

/* -----------------------------------------------------------------
   5.0 Scroll Wrapper (applies to all variants)
   ----------------------------------------------------------------- */

.enerix-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fff;
    margin: 24px 0;
}

.enerix-table-scroll::-webkit-scrollbar {
    height: 6px;
}
.enerix-table-scroll::-webkit-scrollbar-track {
    background: #EDEDEA;
}
.enerix-table-scroll::-webkit-scrollbar-thumb {
    background: #0D7C3D;
    border-radius: 3px;
}
.enerix-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #094A23;
}

/* Scroll hint — visible on mobile only */
.enerix-scroll-hint {
    display: none;
    font-size: 11px;
    color: #8A8A85;
    text-align: right;
    margin-top: 6px;
    padding-right: 4px;
}
@media (max-width: 768px) {
    .enerix-scroll-hint {
        display: block;
    }
}

/* -----------------------------------------------------------------
   5.1 Variant 1 — Clean Striped

   Dark green header, zebra stripes, hover effect.
   Use for: solar fact sheets, key metrics overviews.

   <div class="enerix-table-scroll">
     <table class="enerix-t1">
       <thead><tr><th>...</th></tr></thead>
       <tbody><tr><td>...</td></tr></tbody>
     </table>
   </div>
   ----------------------------------------------------------------- */

.enerix-t1 {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 14px;
}
.enerix-t1 thead th {
    background: #094A23;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 14px 20px;
    text-align: left;
    white-space: nowrap;
}
.enerix-t1 tbody td {
    padding: 13px 20px;
    border-bottom: 1px solid #EDEDEA;
    color: #333231;
}
.enerix-t1 tbody tr:nth-child(even) {
    background: #FFFCF5;
}
.enerix-t1 tbody tr:last-child td {
    border-bottom: none;
}
.enerix-t1 tbody tr {
    transition: background 0.15s ease;
}
.enerix-t1 tbody tr:hover {
    background: #F4F9E8;
}

/* -----------------------------------------------------------------
   5.2 Variant 2 — Card with Accent Border

   Green left border, highlighted column.
   Use for: location comparisons, multi-column data.

   <div class="enerix-t2-wrapper">
     <div class="enerix-table-scroll" style="box-shadow:none;border-radius:0;">
       <table class="enerix-t2">...</table>
     </div>
   </div>
   ----------------------------------------------------------------- */

.enerix-t2-wrapper {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 4px solid #0D7C3D;
}
.enerix-t2 {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 14px;
}
.enerix-t2 thead th {
    background: #F4F9E8;
    color: #094A23;
    font-weight: 700;
    font-size: 13px;
    padding: 14px 20px;
    text-align: left;
    border-bottom: 2px solid #E8F3D1;
}
.enerix-t2 thead th:nth-child(2) {
    background: #E8F3D1;
    color: #094A23;
}
.enerix-t2 tbody td {
    padding: 12px 20px;
    border-bottom: 1px solid #EDEDEA;
    color: #5A5A55;
}
.enerix-t2 tbody td:first-child {
    font-weight: 600;
    color: #333231;
}
.enerix-t2 tbody td:nth-child(2) {
    font-weight: 700;
    color: #0D7C3D;
    background: rgba(148,191,34,0.04);
}
.enerix-t2 tbody tr:last-child td {
    border-bottom: none;
}

/* -----------------------------------------------------------------
   5.3 Variant 3 — Gradient Header

   Green gradient at top, key-value layout, footer.
   Use for: sample calculations, cost breakdowns.

   <div class="enerix-t3-wrapper">
     <div class="enerix-t3-header">
       <h3>Title</h3>
       <p>Subtitle</p>
     </div>
     <div class="enerix-table-scroll" style="box-shadow:none;border-radius:0;">
       <table class="enerix-t3">...</table>
     </div>
     <div class="enerix-t3-footer">Footnote</div>
   </div>
   ----------------------------------------------------------------- */

.enerix-t3-wrapper {
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fff;
}
.enerix-t3-header {
    background: linear-gradient(135deg, #094A23 0%, #0D7C3D 60%, #94BF22 100%);
    padding: 20px 24px;
    color: #fff;
}
.enerix-t3-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}
.enerix-t3-header p {
    font-size: 12px;
    opacity: 0.7;
    margin: 0;
}
.enerix-t3 {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    font-size: 14px;
}
.enerix-t3 tbody td {
    padding: 14px 24px;
    border-bottom: 1px solid #EDEDEA;
}
.enerix-t3 tbody td:first-child {
    color: #5A5A55;
    font-weight: 500;
    width: 60%;
}
.enerix-t3 tbody td:last-child {
    text-align: right;
    font-weight: 700;
    color: #333231;
}
.enerix-t3 tbody tr:last-child td {
    border-bottom: none;
}
.enerix-t3-footer {
    padding: 12px 24px 16px;
    background: #F4F9E8;
    border-top: 1px solid #E8F3D1;
    font-size: 12px;
    color: #5A5A55;
}

/* -----------------------------------------------------------------
   5.4 Variant 4 — Compact Data Grid

   Dark header, status indicators, progress bars.
   Use for: reference overviews, technical comparisons.

   <div class="enerix-table-scroll">
     <table class="enerix-t4">...</table>
   </div>
   ----------------------------------------------------------------- */

.enerix-t4 {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 13px;
}
.enerix-t4 thead th {
    background: #333231;
    color: #fff;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 11px 16px;
    text-align: left;
    white-space: nowrap;
}
.enerix-t4 tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #EDEDEA;
    color: #5A5A55;
    vertical-align: middle;
}
.enerix-t4 tbody td:first-child {
    font-weight: 600;
    color: #333231;
}
.enerix-t4 tbody tr:last-child td {
    border-bottom: none;
}
.enerix-t4 tbody tr {
    transition: background 0.15s ease;
}
.enerix-t4 tbody tr:hover {
    background: #FFFCF5;
}

/* -----------------------------------------------------------------
   5.5 Variant 5 — Highlight Row

   Slim table with a highlighted recommended row.
   Use for: package comparisons, product overviews.

   <div class="enerix-t5-wrapper">
     <div class="enerix-table-scroll" style="box-shadow:none;border-radius:0;">
       <table class="enerix-t5">
         <tr class="enerix-row-highlight">...</tr>
       </table>
     </div>
   </div>
   ----------------------------------------------------------------- */

.enerix-t5-wrapper {
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fff;
}
.enerix-t5 {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 14px;
}
.enerix-t5 thead th {
    background: #fff;
    color: #8A8A85;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 20px 10px;
    text-align: left;
    border-bottom: 2px solid #D5D5D0;
}
.enerix-t5 tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid #EDEDEA;
    color: #333231;
}
.enerix-t5 tbody tr:last-child td {
    border-bottom: none;
}
.enerix-t5 tbody tr.enerix-row-highlight {
    background: linear-gradient(90deg, #F4F9E8, #E8F3D1);
    position: relative;
}
.enerix-t5 tbody tr.enerix-row-highlight td {
    font-weight: 700;
    color: #094A23;
    border-bottom-color: #E8F3D1;
}
.enerix-t5 tbody tr.enerix-row-highlight td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #0D7C3D, #94BF22);
}
.enerix-t5 tbody tr {
    transition: background 0.15s ease;
}
.enerix-t5 tbody tr:not(.enerix-row-highlight):hover {
    background: #FFFCF5;
}

/* -----------------------------------------------------------------
   5.6 Table Utility Classes (all variants)
   ----------------------------------------------------------------- */

/* Green highlighted value */
.enerix-val-highlight {
    font-weight: 700;
    color: #0D7C3D;
}

/* Large green value (Variant 3) */
.enerix-val-big {
    font-size: 18px;
    font-weight: 800;
    color: #0D7C3D;
}

/* Muted value */
.enerix-val-muted {
    color: #8A8A85;
    font-size: 13px;
}

/* Small subtext in cells */
.enerix-val-small {
    font-size: 12px;
    color: #8A8A85;
    font-weight: 400;
}

/* Badge "better than average" (Variant 2) */
.enerix-badge-better {
    display: inline-block;
    background: #F4F9E8;
    color: #0D7C3D;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Badge "Recommended" (Variant 5) */
.enerix-tag-best {
    display: inline-block;
    background: #0D7C3D;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Status dot (Variant 4) */
.enerix-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.enerix-status-dot.green  { background: #0D7C3D; }
.enerix-status-dot.orange { background: #F39200; }
.enerix-status-dot.grey   { background: #8A8A85; }

/* Progress bar (Variant 4) */
.enerix-bar-track {
    height: 6px;
    background: #EDEDEA;
    border-radius: 3px;
    overflow: hidden;
    min-width: 120px;
}
.enerix-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #0D7C3D, #94BF22);
}

.small {
    font-size: 0.8em;
}


/* =================================================================
   6. YOUTUBE EMBED — GDPR-compliant Lazy Load

   Shortcode: [enerix_video id="VIDEO_ID"]

   No iframe loaded until user clicks. Uses youtube-nocookie.com.
   Responsive 16:9. Play button in enerix green.
   ================================================================= */

.enerix-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 0.625em;
    overflow: hidden;
    background: #000;
    margin: 2em 0;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Thumbnail */
.enerix-video__thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}
.enerix-video:hover .enerix-video__thumb {
    opacity: 0.85;
}

/* Play button (circle, enerix green) */
.enerix-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(9, 74, 35, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}
.enerix-video:hover .enerix-video__play {
    background: rgba(13, 124, 61, 0.95);
    transform: translate(-50%, -50%) scale(1.08);
}
.enerix-video__play::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 22px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

/* GDPR consent bar */
.enerix-video__consent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.8);
    font-size: 0.6875em;
    padding: 0.6em 1em;
    text-align: center;
    z-index: 2;
}
.enerix-video__consent a {
    color: #94BF22;
    text-decoration: underline;
}
.enerix-video__consent a:hover {
    color: #C9DF90;
}

/* iframe slot (hidden until click) */
.enerix-video__slot {
    display: none;
}
.enerix-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Playing state */
.enerix-video.is-playing .enerix-video__thumb,
.enerix-video.is-playing .enerix-video__play,
.enerix-video.is-playing .enerix-video__consent {
    display: none;
}
.enerix-video.is-playing .enerix-video__slot {
    display: block;
}

/* Responsive — smaller play button on mobile */
@media (max-width: 600px) {
    .enerix-video__play {
        width: 56px;
        height: 56px;
    }
    .enerix-video__play::after {
        border-width: 9px 0 9px 16px;
        margin-left: 3px;
    }
}
