/* ============================================================
   SECTION-SPACING & MOBILE-LAYOUT-FIXES
   Reduziert den vertikalen Leerraum zwischen Sections und sorgt
   fuer sauberes Layout auf Smartphones. Desktop bleibt unveraendert.

   Hinweis: Fuer .cta-block.contact-section ist !important noetig,
   weil contact-form.css mit padding: 96px 0 !important; vorgibt.
   ============================================================ */

/* Globales Sicherheitsnetz: niemals horizontalen Scroll erlauben.
   WICHTIG: overflow-x: clip statt hidden — clip bricht position:sticky
   nicht, hidden wuerde den Sticky-Header (header-meta + primary-nav)
   beim Scrollen verschwinden lassen. */
html, body {
    overflow-x: clip;
}

/* --- Festpreis-Tabelle (info-table + price-info-table) ---
   Preisspalte schmal, rechtsbuendig, nicht umbrechen.
   Labelspalte bekommt rechtes Padding, damit Label und Preis nicht aneinanderkleben. */
.price-info-table th {
    width: auto;
    padding-right: 16px;
}
.price-info-table td {
    width: 1%;
    text-align: right;
    white-space: nowrap;
    color: var(--color-primary);
    font-weight: 500;
}

/* Tablet: 64px statt 70-110px */
@media (max-width: 900px) {
    .content-block {
        padding: 64px 0;
    }
    .cta-block,
    .contact-section,
    .cta-block.contact-section {
        padding: 64px 0 !important;
    }
    .process-block {
        padding: 64px 0;
    }
    .site-footer {
        padding: 56px 0 30px;
    }
    .footer-grid {
        margin-bottom: 40px;
    }
}

/* Smartphone: 40px universal */
@media (max-width: 600px) {
    section {
        padding: 40px 0;
    }
    .content-block {
        padding: 40px 0;
    }
    .cta-block,
    .contact-section,
    .cta-block.contact-section {
        padding: 40px 0 !important;
    }
    .process-block {
        padding: 40px 0;
    }
    .site-footer {
        padding: 40px 0 24px;
    }
    .footer-grid {
        margin-bottom: 32px;
    }

    /* --- Compare-Karten (Kurzgutachten / Verkehrswertgutachten) --- */
    /* Sicherheitsnetz: Karten respektieren strikt die Containerbreite.   */
    .compare-card {
        max-width: 100%;
        box-sizing: border-box;
        padding: 24px 18px;          /* statt 28px 24px - mehr Textbreite */
        overflow: hidden;            /* faengt Inhalts-Overflow ab        */
    }
    /* Lange deutsche Komposita sauber umbrechen */
    .compare-card-text,
    .compare-list span,
    .compare-list li,
    .price-table td {
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }
    /* Preistabelle strikt auf Karten-Innenbreite begrenzen */
    .price-table {
        table-layout: fixed;
        max-width: 100%;
    }
    .price-table td:first-child {
        width: auto;
        padding-right: 8px;
    }
    .price-table td:last-child {
        width: 80px;
        text-align: right;
        white-space: nowrap;
    }
    /* Reduzierter Karten-Abstand auf Smartphones */
    .compare-grid {
        gap: 32px;
    }
    /* "Vollgutachten"-Badge auf Smartphone ausblenden -
       ueberlappt sonst das Label "Belastbar - gerichtsfest" */
    .compare-badge {
        display: none;
    }

    /* --- Header-Meta-Bar auf Smartphone aufraeumen --- */
    /* BDSF-Mitglied und dazugehoerigen Divider verbergen */
    .site-header-v3 .header-meta-inner > span:nth-child(2),
    .site-header-v3 .header-meta-inner > span:nth-child(3) {
        display: none;
    }
    /* Spacer raus, damit Telefon und Email nicht so stark vom Cert-Block weggedrueckt werden */
    .site-header-v3 .header-meta-inner .meta-spacer {
        display: none;
    }
    /* Items zentriert in einer/zwei Zeilen, kompakter */
    .site-header-v3 .header-meta-inner {
        justify-content: center;
        gap: 8px;
        font-size: 10.5px;
    }
}
