/* ==========================================================
   PULLDOWN-NAVIGATION / 2. EBENE
   ========================================================== */

.nav-list > li {
    position: relative;
}

/* Untermenü zunächst verstecken */
.nav-list .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: var(--primary-color);
    z-index: 2000;
    box-shadow: 0 5px 12px rgba(0,0,0,0.18);
}

/* Wird durch JavaScript geöffnet */
.nav-list li.submenu-open > .submenu {
    display: block;
}

.nav-list .submenu li {
    width: 100%;
    text-align: left;
}

.nav-list .submenu a {
    display: block;
    padding: 12px 18px;
    white-space: nowrap;
}

.submenu-arrow {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.7em;
    transition: transform 0.2s ease;
}

.submenu-open > a .submenu-arrow {
    transform: rotate(180deg);
}


/* Smartphone */
@media (max-width: 768px) {

    .nav-list .submenu {
        position: static;
        width: 100%;
        min-width: 0;
        box-shadow: none;
    }

    .nav-list .submenu a {
        padding-left: 40px;
    }
}

/* ==========================================================================
   1. GLOBAL STYLES & VARIABLES (Modern & Clean CSS Reset)
   ========================================================================== */
:root {
    --primary-color: #1a365d;
    --secondary-color: #2b6cb0;
    --accent-color: #3182ce;
    --light-bg: #f7fafc;
    --dark-text: #2d3748;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background-color: #f0f4f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. TYPOGRAPHY & HEADINGS
   ========================================================================== */
h1, h2, h3 {
    margin-block: 1.5em 0.8em; 
}

h1 { font-size: 2.5rem; margin-block: 1.8em 0.8em; color: var(--primary-color); }
h2 { font-size: 2rem;   margin-block: 1.6em 0.7em; }
h3 { font-size: 1.5rem; margin-block: 1.4em 0.6em; }

/* ==========================================================================
   3. ISOLATED LISTS (Speziell nur für die Inhaltsübersicht .toc-box)
   ========================================================================== */
.toc-box ul {
    list-style-type: square; 
    margin-left: 25px;       
}

.toc-box ul li {
    color: green;            
    font-size: 1.5em;        
}

.toc-box ul li a {
    font-size: 0.66em;       
    vertical-align: 0.15em;  
    display: inline-block;   
}

.toc-box ul li a:link { color: lightgrey; text-decoration: none; }
.toc-box ul li a:visited { color: darkgrey; }
.toc-box ul li a:focus { color: red; outline: 2px solid red; }
toc-box ul li a:hover { color: red; }
.toc-box ul li a:active { color: orange; }

/* ==========================================================================
   4. HEADER & NAVIGATION (Desktop First)
   ========================================================================== */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/bilder/header-unterseiten.jpg') center/cover no-repeat;
    padding: 80px 0; 
    color: var(--white);
}

.header-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.header-btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 220px;
}

.header-btn:hover {
    background-color: var(--accent-color);
}

.logo-container {
    text-align: center;
    flex: 1;
}

.logo {
    max-height: 180px; 
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

nav {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-toggle {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;       
    padding: 15px;  
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white); 
    transition: 0.3s ease;
}

.nav-list {
    display: flex;
    list-style: none;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.nav-list li {
    flex: 1;
    text-align: center;
}

.nav-list a {
    display: block;
    color: var(--white);
    padding: 15px 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-list a:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

/* ==========================================================================
   5. MAIN CONTENT LAYOUT & TEASERS
   ========================================================================== */
main {
    background-color: var(--white);
    padding: 40px 0;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.main-teaser {
    font-size: 1.25rem;
    color: #4a5568;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.teaser-image {
    width: 100%;          
    aspect-ratio: 1 / 1;  
    object-fit: cover;    
    border-radius: 8px;   
    margin-bottom: 15px;  
}

.teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.teaser-card {
    background-color: var(--light-bg);
    padding: 25px;
    border-radius: 6px;
    border-top: 4px solid var(--secondary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.teaser-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ==========================================================================
   6. FOOTER & CONTACT FORMS
   ========================================================================== */
footer {
    background-color: #1a202c;
    color: #e2e8f0;
    padding: 50px 0 20px 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #4a5568;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.25rem;
}

/* Formspree Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group input, .form-group textarea {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #4a5568;
    background-color: #2d3748;
    color: var(--white);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--accent-color);
}

/* Copyright & Legal Row */
.copyright-bar {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #a0aec0;
}

.copyright-bar a {
    color: #a0aec0;
    text-decoration: none;
    margin-left: 15px;
}

.copyright-bar a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* ==========================================================================
   7. RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; 
    }

    .nav-list {
        display: none; 
        flex-direction: column;
        background-color: var(--primary-color); 
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-list li {
        width: 100%;
        text-align: left;
    }

    .nav-list.active {
        display: flex;
    }
  
    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .header-grid {
        flex-direction: column;
        text-align: center;
    }

    .logo-container {
        order: -1;
    }
}

/* ==========================================================================
   8. KANZLEI-INFOBOX
   ========================================================================== */

.kanzlei-infobox {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    margin: 40px auto;
    padding: 30px;
    background: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kanzlei-infobox .infobox-text {
    flex: 1;
    min-width: 0;
}

.kanzlei-infobox .infobox-text h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
}

.kanzlei-infobox .infobox-text p {
    margin-bottom: 15px;
}

/* Liste in der Kanzlei-Infobox:
   - sichtbare runde Aufzählungspunkte
   - Aufzählungspunkte grün
   - Linktext behält seine eigene Farbe */
.kanzlei-infobox .infobox-text ul {
    margin: 20px 0 0 0;
    padding-left: 0;
    list-style: none;
}

.kanzlei-infobox .infobox-text ul li {
    position: relative;
    margin-bottom: 8px;
    padding-left: 20px;
}

.kanzlei-infobox .infobox-text ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.62em;
    width: 7px;
    height: 7px;
    background-color: green;
    transform: translateY(-50%);
}

.kanzlei-infobox .infobox-image-wrapper {
    flex: 0 0 300px;
}

.kanzlei-infobox .infobox-image-wrapper img {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
}

.kanzlei-infobox a {
    color: var(--secondary-color);
}

.kanzlei-infobox a:hover {
    color: var(--accent-color);
}

/* Mobil */
@media (max-width: 768px) {
    .kanzlei-infobox {
        flex-direction: column;
        align-items: stretch;
        gap: 25px;
        margin: 30px 20px;
        padding: 20px;
    }

    .kanzlei-infobox .infobox-image-wrapper {
        flex: none;
        text-align: center;
    }

    .kanzlei-infobox .infobox-image-wrapper img {
        margin: 0 auto;
    }
}


/* ==========================================================
   CMS-NAVIGATION: Hauptpunkt mit Untermenü als Button
   ========================================================== */
.nav-list .submenu-toggle,
.nav-list .nav-label {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--white);
    padding: 15px 20px;
    font: inherit;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
}

.nav-list .submenu-toggle:hover,
.nav-list .submenu-toggle:focus-visible {
    background-color: var(--accent-color);
    color: var(--white);
}

.submenu-open > .submenu-toggle .submenu-arrow {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .nav-list .submenu-toggle,
    .nav-list .nav-label {
        text-align: left;
    }
}

/* Startseite: Hauptteaser und Teaserkarten sauber voneinander trennen */
.startseite-hauptteaser { display: flow-root; width: 100%; margin-bottom: 32px; }
.startseite-teaserblock { display: flow-root; clear: both; width: 100%; }
.startseite-teaserblock .teaser-grid { margin-top: 0; }

/* Version 11: Kein doppelter oberer Abstand der Block-Ueberschrift. */
.startseite-zusatzbloecke .cms-inhaltsblock > h2 { margin-top: 0; }

/* Version 13: sichtbare Leerzeile zwischen Absätzen in CMS-Inhaltsblöcken.
   Nur Textabsätze, nicht Überschriften oder Bilder, werden beeinflusst. */
.cms-inhaltsblock > div > p { margin: 0 0 1.15em; }
.cms-inhaltsblock > div > p:last-child { margin-bottom: 0; }

/* Mobile Header-Anpassung: KI-Layout – Desktop bleibt unverändert */
@media (max-width: 768px) {
    header {
        padding: 28px 0;
    }
    header .header-grid {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
    header .logo-container {
        order: -1;
        flex: 0 0 auto;
        width: 100%;
        text-align: center;
    }
    header .logo {
        display: block;
        width: auto;
        height: auto;
        max-width: min(160px, 65vw);
        max-height: 75px;
        object-fit: contain;
        margin: 0 auto;
    }
    header .header-btn {
        width: min(100%, 300px);
        min-width: 0;
    }
}


/* Version 0.16 – Konsolidierte Teaserkarten-Regeln.
   Auch CMS-eingefuegte Bilder und Bild-Wrapper bleiben innerhalb der Karte. */
@media (min-width: 901px) {
  .startseite-teaserblock .teaser-grid,
  .teaser-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}
.teaser-grid > *,
.teaser-grid .teaser-card,
.teaser-grid .teaser-card > *,
.teaser-grid .teaser-card figure,
.teaser-grid .teaser-card picture {
  min-width: 0;
  max-width: 100%;
}
.teaser-grid .teaser-card img,
.teaser-grid img.teaser-image,
.teaser-grid .teaser-card picture img,
.teaser-grid .teaser-card figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 320px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  box-sizing: border-box;
}
@media (max-width: 900px) and (min-width: 641px) {
  .startseite-teaserblock .teaser-grid,
  .teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .startseite-teaserblock .teaser-grid,
  .teaser-grid { grid-template-columns: minmax(0, 1fr); }
}


/* ============================================================
   Brennholz-Deutschland: Startseiten-Header v2 (nur .bh-*)
   Alte CMS-, Navigations- und Inhaltsregeln bleiben erhalten.
   ============================================================ */
:root { --bh-green:#183e24; --bh-brown:#81251e; --bh-cream:#fbf9f4; }
.bh-topbar { background:var(--bh-cream); color:#16291b; padding:18px 0; }
.bh-topbar .bh-header-layout {display:grid;grid-template-columns:minmax(240px,1fr) minmax(340px,1.15fr) auto;align-items:center;gap:22px;}
.bh-brand {display:flex;align-items:center;gap:12px;min-width:0;text-decoration:none;color:var(--bh-brown);}
.bh-brand img {width:68px;height:93px;object-fit:contain;flex:none;}
.bh-brand-text {display:block;font-weight:800;font-size:clamp(1.25rem,2.1vw,2.15rem);line-height:1.05;letter-spacing:-.025em;}
.bh-brand-first,.bh-brand-second {display:block;}
.bh-brand-first {color:#8c1e18;}
.bh-brand-second {color:#124025;}
.bh-brand-text small {display:block;color:var(--bh-green);font-size:.52em;font-weight:500;letter-spacing:0;margin-top:7px;}
.bh-search label {display:block;font-weight:750;margin-bottom:7px;}
.bh-search-controls {display:flex;gap:8px;}
.bh-search input {min-width:0;flex:1;border:1px solid #c9c6bd;border-radius:7px;padding:13px 14px;background:#fff;color:#202920;font:inherit;}
.bh-search button {border:0;border-radius:7px;padding:12px 20px;background:var(--bh-green);color:#fff;font:inherit;font-weight:750;cursor:pointer;white-space:nowrap;}
.bh-search button:hover,.bh-search button:focus-visible {background:#285a35;}
.bh-partner {display:block;max-width:215px;padding:15px 17px;background:#9d261c;color:#fff;text-align:center;font-weight:800;line-height:1.3;text-decoration:none;border:2px solid #fff;border-radius:9px;box-shadow:0 4px 13px #0003;transform:rotate(8deg);transition:transform .2s;}
.bh-partner:hover,.bh-partner:focus-visible {transform:rotate(8deg) scale(1.035);color:#fff;}
.bh-search-note {background:#fff4db;border-left:4px solid #a86718;padding:12px 18px;margin:12px auto;max-width:1200px;color:#50320e;}
.bh-hero {background:linear-gradient(90deg,rgba(255,246,221,.97) 0%,rgba(255,242,208,.86) 38%,rgba(255,245,219,.08) 70%),url('/bilder/brennholz-hero.jpg') right center/cover no-repeat;min-height:350px;display:flex;align-items:center;}
.bh-hero-inner {width:100%;padding-top:58px;padding-bottom:58px;}
.bh-hero h1 {color:#0b2e19;font-size:clamp(2.5rem,5vw,4.7rem);line-height:1.05;margin:0 0 16px;max-width:680px;}
.bh-hero p {font-size:clamp(1.1rem,2vw,1.6rem);color:#17271a;max-width:520px;line-height:1.35;}
.bh-benefits {background:var(--bh-cream);padding:25px 0;border-bottom:1px solid #e8e2d9;}
.bh-benefits-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;}
.bh-benefit {display:flex;align-items:center;gap:12px;min-width:0;}
.bh-benefit-icon {width:55px;height:55px;border:2px solid var(--bh-green);border-radius:50%;display:grid;place-items:center;font-size:1.6rem;flex:none;color:var(--bh-green);}
.bh-benefit:nth-child(even) .bh-benefit-icon {border-color:var(--bh-brown);color:var(--bh-brown);}
.bh-benefit strong {display:block;color:#15271a;line-height:1.2;}
.bh-benefit span {display:block;color:#62635c;font-size:.92rem;line-height:1.3;margin-top:3px;}
@media(max-width:1080px){.bh-topbar .bh-header-layout {grid-template-columns:1fr 1.1fr;}.bh-partner {grid-column:2;justify-self:end;}.bh-benefits-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:700px){.bh-topbar .bh-header-layout {grid-template-columns:1fr;gap:17px;}.bh-brand img{width:54px;height:76px;}.bh-partner{grid-column:1;justify-self:center;}.bh-search-controls{flex-direction:column;}.bh-search button{width:100%;}.bh-hero{min-height:300px;background-position:65% center;}.bh-hero-inner{padding-top:42px;padding-bottom:42px;}.bh-benefits-grid{grid-template-columns:1fr 1fr;gap:20px 10px;}.bh-benefit{align-items:flex-start;}.bh-benefit-icon{width:42px;height:42px;font-size:1.15rem;}}
@media(max-width:420px){.bh-benefits-grid{grid-template-columns:1fr;}}

/* Gemeinsame vollstaendige Wort-Bild-Marke – Startseite */
.bh-brand img.bh-logo-complete{display:block;width:min(100%,420px);height:auto;max-height:none;object-fit:contain;flex:none;}
@media(max-width:700px){.bh-brand img.bh-logo-complete{width:min(100%,340px);height:auto;}}
