/**
 * Holzmann & Sedlmayer Brand Tokens
 *
 * Aus Figma extrahiert (Holzmann-Sedlmayer_WebRelaunch).
 */

:root {
    /* Farben */
    --hs-gold:        #ab8f50;
    --hs-gold-dark:   #8d7440;
    --hs-dark:        #2f3a46;
    --hs-dark-deep:   #1d1d1b;
    --hs-bg:          #f7f7f7; /* Standard-Seitenhintergrund (aus Figma 1:1106) */
    /* Parent-Theme nutzt --background_color in project.css fuer html/body BG.
       Wir mappen es auf unseren Brand-BG, damit es nicht transparent bleibt
       (Default war "" und liess Hero-V-Cuts in white durchscheinen). */
    --background_color: #f7f7f7;
    --hs-bg-cream:    #f6f3ec;
    --hs-text:        #1d1d1b;
    --hs-text-light:  #ffffff;
    --hs-text-muted:  rgba(29, 29, 27, 0.3);

    /* Typografie — Typekit-Kit svi4klc liefert lowercase Familiennamen */
    --hs-font-display: "le-monde-livre-std", "Cormorant Garamond", "Times New Roman", serif;
    --hs-font-body:    "soleil", "Inter", "Helvetica Neue", Arial, sans-serif;

    /* Spacing */
    --hs-section-py:   clamp(60px, 8vw, 120px);
    /* Container-Padding: Figma-Referenz hat Content bei x=222 (1920vw).
       Bei max-width 1726 ergibt sich Margin 97 → Padding 125 = Content-Start 222. */
    --hs-container-px: clamp(20px, 6.51vw, 125px);

    /* Container-Varianten: alle ausser "schmal" haben max-width 1726px.
       Mit padding-x 125 = Content-Area 1476 = Figma-Referenz. */
    --hs-container-schmal:      1280px;
    --hs-container-normal:      1726px;
    --hs-container-semi-breit:  1726px;
    --hs-container-breit:       1726px;
    --hs-container-max:         var(--hs-container-breit);

    /* Sonstiges */
    --hs-shadow-card: 0 30px 60px -30px rgba(47, 58, 70, 0.25);
    --hs-header-height: 148px;
    --hs-jump-nav-height: 100px;
}

/* Globaler Schutz vor langen unbrechbaren Strings (Emails/URLs) bei schmalen Viewports */
body { overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6, p, li, a, span { overflow-wrap: anywhere; }

/* Smooth-Scroll fuer alle Anker-Links + Offset fuer fixed Header (+ Jump-Nav)
   !important weil Parent project.css 'scroll-behavior: unset' setzt. */
html,
:root {
    scroll-behavior: smooth !important;
}
:target,
section[id],
[data-anchor] {
    scroll-margin-top: calc(var(--hs-header-height) + var(--hs-jump-nav-height) + 30px);
}
@media (prefers-reduced-motion: reduce) {
    html, :root { scroll-behavior: auto !important; }
}

/* Le Monde Livre Fallback (Google: Cormorant Garamond ist visuell sehr aehnlich) */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== Globale Defaults =====
   Body-Background fuer alle Templates (Pages, CPT leistung Singles, etc.),
   damit V-Cuts der Hero-Sektionen (m25/m33) nahtlos in den nachfolgenden
   hellen Bereich uebergehen. */
body {
    background: var(--hs-bg);
    color: var(--hs-text);
    font-family: var(--hs-font-body);
}

/* Defensiver Schutz gegen horizontalen Page-Overflow auf sehr kleinen Viewports
   (280-360). Einzelelemente werden visuell geclippt, aber kein horizontaler
   Page-Scroll. Vertikales Scrollen bleibt unberuehrt. */
body { overflow-x: hidden; }

body section[class^="m2"], body section[class^="m3"] {
    /* Parent default overrides (z.B. wenn neue Sektionen zwischen alte gemixt werden) */
}

/* ===== Module-Titel + Untertitel (vom Parent via get_title_html_structure injiziert) =====
   Parent rendert pro Modul:
     <div class="mXX_titel_container"><h{hierarchie} class="mXX_titel">Titel</h{...}></div>
     <div class="mXX_untertitel_container"><p class="mXX_untertitel">Topline</p></div>
   Reihenfolge wird ueber das `titel_reihenfolge` ACF-Feld gesteuert.

   Selektoren matchen H&S-Module (m25-m44) ueber den layout-class Praefix auf der Section. */
.hs_module_titel {
    /* gemeinsame Klasse die jedes Modul via .hs_module_titel an .mXX_titel haengt
       (per CSS-Variable: setze auf das Modul-eigene Headline-Element). Wird hier
       NICHT verwendet — siehe folgende Direkt-Selektoren. */
}

/* Titel: greift NUR auf das h1-h6 mit Klasse ".mXX_titel" innerhalb einer m25-m44 Section.
   Figma-Werte (Le Monde Livre Std Demi, letter-spacing 1.8px):
     h1 (Hero):   60px / 60px line-height (= 1.0)
     h2 (default): 40px / 45px line-height (= 1.125) */
section[class*="m25_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m26_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m27_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m28_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m29_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m30_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m31_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m32_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m33_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m34_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m36_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m37_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m38_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m39_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m40_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m41_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m42_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m43_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6),
section[class*="m44_"] [class$="_titel"]:is(h1, h2, h3, h4, h5, h6) {
    color: var(--hs-dark);
    font-family: var(--hs-font-display);
    font-weight: 600;
    /* h2-Default: bis 40px, responsive runter bis 28px */
    font-size: clamp(28px, 2.6vw, 40px);
    line-height: 1.125;
    letter-spacing: 1.8px;
    margin: 0 0 24px;
}

/* h1-Override: Hero-Headline (groesser, tighter line-height) */
section[class*="m25_"] h1[class$="_titel"],
section[class*="m33_"] h1[class$="_titel"] {
    /* Figma: 60px / 60px line-height — responsive runter bis 36px */
    font-size: clamp(36px, 4vw, 60px);
    line-height: 1;
}
section[class*="m25_"] [class$="_titel"] em, section[class*="m25_"] [class$="_titel"] i,
section[class*="m26_"] [class$="_titel"] em, section[class*="m26_"] [class$="_titel"] i,
section[class*="m27_"] [class$="_titel"] em, section[class*="m27_"] [class$="_titel"] i,
section[class*="m28_"] [class$="_titel"] em, section[class*="m28_"] [class$="_titel"] i,
section[class*="m29_"] [class$="_titel"] em, section[class*="m29_"] [class$="_titel"] i,
section[class*="m30_"] [class$="_titel"] em, section[class*="m30_"] [class$="_titel"] i,
section[class*="m31_"] [class$="_titel"] em, section[class*="m31_"] [class$="_titel"] i,
section[class*="m32_"] [class$="_titel"] em, section[class*="m32_"] [class$="_titel"] i,
section[class*="m33_"] [class$="_titel"] em, section[class*="m33_"] [class$="_titel"] i,
section[class*="m34_"] [class$="_titel"] em, section[class*="m34_"] [class$="_titel"] i,
section[class*="m36_"] [class$="_titel"] em, section[class*="m36_"] [class$="_titel"] i,
section[class*="m40_"] [class$="_titel"] em, section[class*="m40_"] [class$="_titel"] i {
    font-style: italic;
    font-family: var(--hs-font-display);
    font-weight: 600;
}

/* Untertitel (= Gold-Pill-Topline) */
section[class*="m25_"] [class$="_untertitel"],
section[class*="m26_"] [class$="_untertitel"],
section[class*="m27_"] [class$="_untertitel"],
section[class*="m28_"] [class$="_untertitel"],
section[class*="m29_"] [class$="_untertitel"],
section[class*="m30_"] [class$="_untertitel"],
section[class*="m31_"] [class$="_untertitel"],
section[class*="m32_"] [class$="_untertitel"],
section[class*="m33_"] [class$="_untertitel"],
section[class*="m34_"] [class$="_untertitel"],
section[class*="m36_"] [class$="_untertitel"],
section[class*="m37_"] [class$="_untertitel"],
section[class*="m38_"] [class$="_untertitel"],
section[class*="m39_"] [class$="_untertitel"],
section[class*="m40_"] [class$="_untertitel"],
section[class*="m41_"] [class$="_untertitel"],
section[class*="m42_"] [class$="_untertitel"],
section[class*="m43_"] [class$="_untertitel"],
section[class*="m44_"] [class$="_untertitel"] {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: var(--hs-gold);
    margin: 0 0 16px;
}
section[class*="m25_"] [class$="_untertitel"]::before,
section[class*="m26_"] [class$="_untertitel"]::before,
section[class*="m27_"] [class$="_untertitel"]::before,
section[class*="m28_"] [class$="_untertitel"]::before,
section[class*="m29_"] [class$="_untertitel"]::before,
section[class*="m30_"] [class$="_untertitel"]::before,
section[class*="m31_"] [class$="_untertitel"]::before,
section[class*="m32_"] [class$="_untertitel"]::before,
section[class*="m33_"] [class$="_untertitel"]::before,
section[class*="m34_"] [class$="_untertitel"]::before,
section[class*="m36_"] [class$="_untertitel"]::before,
section[class*="m37_"] [class$="_untertitel"]::before,
section[class*="m38_"] [class$="_untertitel"]::before,
section[class*="m39_"] [class$="_untertitel"]::before,
section[class*="m40_"] [class$="_untertitel"]::before,
section[class*="m41_"] [class$="_untertitel"]::before,
section[class*="m42_"] [class$="_untertitel"]::before,
section[class*="m43_"] [class$="_untertitel"]::before,
section[class*="m44_"] [class$="_untertitel"]::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--hs-gold);
    flex-shrink: 0;
}

/* Dark-BG-Module: Headline weiss — Sections setzen `hs_inverse` (manuell
   oder via Variant-Logik). Untertitel bleibt GOLD (Figma 112:16 — Topline
   in #AB8F50 auf dark BG, nicht weiss). */
section.hs_inverse [class$="_titel"]:is(h1,h2,h3,h4,h5,h6) {
    color: #ffffff;
}

/* ===== Helpers: Button (border + underline mark, sliding-fill Hover) ===== */
.hs_btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-height: 73px;
    padding: 24px 48px;
    border: 1px solid var(--hs-dark);
    color: var(--hs-dark-deep);
    background: transparent;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease;
}
.hs_btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hs-dark);
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}
.hs_btn:hover::before { transform: translateX(0); }
.hs_btn:hover { color: #fff; }
/* Strich-Effekt via scaleX (kein Layout-Shift, kein Label-Sprung) */
.hs_btn_mark {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 2px;
    flex: 0 0 40px;
    background: transparent;
}
.hs_btn_mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hs-gold);
    transform-origin: left center;
    transform: scaleX(0.75); /* 30/40 = 75% initial */
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
}
.hs_btn:hover .hs_btn_mark::before { transform: scaleX(1); }
.hs_btn_light {
    border-color: rgba(255,255,255,0.6);
    color: #ffffff;
    justify-content: center;
}
.hs_btn_light::before { background: rgba(255,255,255,0.18); }
.hs_btn_light:hover { color: #fff; border-color: #fff; }
.hs_btn_gold { border-color: var(--hs-gold); color: var(--hs-gold); }
.hs_btn_gold::before { background: var(--hs-gold); }
.hs_btn_gold:hover { color: #fff; }
.hs_btn_gold:hover .hs_btn_mark::before { background: #fff; }
/* Solid Gold-Variante (wie Hero "Immobilie bewerten lassen") */
.hs_btn_gold_solid {
    background: var(--hs-gold);
    border-color: var(--hs-gold);
    color: #fff;
}
.hs_btn_gold_solid::before { background: var(--hs-gold-dark); }
.hs_btn_gold_solid .hs_btn_mark::before { background: #fff; }
.hs_btn_gold_solid:hover { border-color: var(--hs-gold-dark); color: #fff; }
.hs_btn_gold_solid:hover .hs_btn_mark::before { background: #fff; }

/* Ghost-Variante: schmaler outline mit zentriertem Text, ohne Mark-Strich */
.hs_btn_ghost {
    border-color: rgba(47, 58, 70, 0.3);
    color: var(--hs-dark);
    justify-content: center;
    text-align: center;
    padding: 24px 36px;
    gap: 0;
}
.hs_btn_ghost::before { background: var(--hs-dark); }
.hs_btn_ghost:hover { color: #fff; border-color: var(--hs-dark); }

/* ===== Headlines (Le Monde Livre Std Demi mit Italic Teilen) ===== */
.hs_h1,
.hs_h2 {
    font-family: var(--hs-font-display);
    color: var(--hs-text);
    letter-spacing: 0.03em;
    margin: 0 0 24px;
    font-weight: 600;
}
.hs_h1 {
    font-size: clamp(40px, 4.5vw, 60px);
    line-height: 1.0;
    letter-spacing: 0.03em;
}
.hs_h2 { font-size: clamp(32px, 3vw, 40px); line-height: 1.15; }
.hs_h1 em,
.hs_h2 em {
    font-style: italic;
    font-weight: 600;
    font-family: var(--hs-font-display);
}

.hs_lead {
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.03em;
    margin: 0;
}

.hs_inverse { color: #ffffff; }
.hs_inverse .hs_h1, .hs_inverse .hs_h2 { color: #fff; }
.hs_inverse .hs_lead { color: rgba(255,255,255,0.85); }

/* ===== Layout-Container =====
   Standardmaessig auf var(--hs-container-max) (=semi-breit, 1620px).
   Module koennen via ACF 'wrapper_attribute.container' eine andere Variante waehlen.
   Das Parent-Theme injiziert dann data-container="container_breit" etc. auf den Inner.
   =========================================== */
.hs_container {
    width: 100%;
    max-width: var(--hs-container-max);
    margin: 0 auto;
    padding: 0 var(--hs-container-px);
}
.hs_container[data-container="container_schmal"]      { max-width: var(--hs-container-schmal); }
.hs_container[data-container="container"]             { max-width: var(--hs-container-normal); }
.hs_container[data-container="container_semi_breit"]  { max-width: var(--hs-container-semi-breit); }
.hs_container[data-container="container_breit"]       { max-width: var(--hs-container-breit); }
.hs_container[data-container="container_full"]        { max-width: none; padding: 0; }

/* Wrapper-Ausrichtung "zentriert_ausfuellung_rechts": rechte Kante => Viewport-Rechts */
.hs_container[data-ausrichtung="zentriert_ausfuellung_rechts"] {
    max-width: none;
    width: calc(100% - max(0px, (100vw - var(--hs-container-max)) / 2));
    margin-left: auto;
    margin-right: 0;
    padding-right: 0;
}

/* Wrapper-Ausrichtung "zentriert_ausfuellung_links": linke Kante => Viewport-Links */
.hs_container[data-ausrichtung="zentriert_ausfuellung_links"] {
    max-width: none;
    width: calc(100% - max(0px, (100vw - var(--hs-container-max)) / 2));
    margin-left: 0;
    margin-right: auto;
    padding-left: 0;
}
.hs_grid_2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.hs_grid_2_text_image { grid-template-columns: 1.05fr 1fr; }
@media (max-width: 900px) {
    .hs_grid_2 { grid-template-columns: 1fr; gap: 40px; }
}

/* === Buttons: mobile Anpassung (kein 2-zeiliger Text bis 280px) === */
@media (max-width: 575.98px) {
    .hs_btn {
        padding: 18px 22px;
        font-size: 14px;
        letter-spacing: 0.05em;
        gap: 12px;
        min-height: 56px;
    }
    .hs_btn_mark { width: 32px; flex: 0 0 32px; }
    .hs_btn_ghost { padding: 18px 22px; }
}
@media (max-width: 380px) {
    .hs_btn {
        padding: 16px 16px;
        font-size: 13px;
        letter-spacing: 0.04em;
        gap: 0;
    }
    .hs_btn_mark { display: none; }
}
