/* ==========================================================================
   single-objekte.css — Single-Post-Template für den CPT "objekte"

   Voraussetzungen (via wp_enqueue_style dependencies):
     - brand.css          (CSS-Variablen, .hs_container, .hs_btn, etc.)
     - m33_page_hero.css  (.m33_page_hero, .m33_hero_*)
     - m32_team_cta.css   (.m32_team_cta, .m32_*)
     - page-objekte.css   (.m45_card, .m45_grid, etc.)
   ========================================================================== */

/* --------------------------------------------------------------------------
   HERO — Single-Page-Overrides
   Figma node 55-1201: 1920×823px, triple gradient overlay, content top-aligned
   -------------------------------------------------------------------------- */

/* Höhe: Figma 823px (43vw @ 1920px) */
.so_hero {
    min-height: clamp(600px, 43vw, 823px);
}

/* Figma: 3 gestapelte Gradienten — abdunkeln links (270deg × 2) + oben (0deg) */
.so_hero .m33_hero_overlay {
    background:
        linear-gradient(270deg, transparent 0%, rgba(47,58,70,0.50) 80%),
        linear-gradient(270deg, transparent 0%, rgba(47,58,70,0.70) 80%),
        linear-gradient(0deg,   transparent 0%, rgba(47,58,70,0.50) 100%);
}

/* Content nach unten drängen (näher an weißer Stats-Leiste) */
.so_hero .m33_hero_inner {
    align-items: flex-end;
    padding-top: var(--hs-header-height, 148px);
    padding-bottom: clamp(60px, 6vw, 100px);
}
@media (min-width: 769px) {
    .so_hero .m33_hero_inner { padding-left: max(var(--hs-container-px), 120px); }
}

/* --------------------------------------------------------------------------
   HERO-ERGÄNZUNGEN
   Nur Klassen, die NICHT bereits in m33_page_hero.css definiert sind.
   -------------------------------------------------------------------------- */

/* Fixed Back-Link — via wp_footer außerhalb des Hero-Stacking-Contexts.
   Gleicher Container-Aufbau wie .hs_header_inner für exakte X-Flucht. */
.so_back_wrap {
    position: absolute;
    top: calc(var(--hs-header-height, 148px) + 24px);
    left: clamp(20px, 6.51vw, 125px);
    right: 0;
    z-index: 3;
    pointer-events: none;
}
.so_hero_back {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    color: rgba(255,255,255,0.6) !important;
    font-family: var(--hs-font-body);
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.03em;
    text-decoration: none !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    transition: color 0.2s;
}
.so_hero_back:hover { color: rgba(255,255,255,0.85) !important; }
.so_hero_back svg {
    flex-shrink: 0;
    width: 16px !important;
    height: 16px !important;
    display: block;
}

/* Badge + Location — gemeinsame Zeile im Hero */
.so_hero_meta {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 22px;
}

/* Badge: position:absolute aus .m45_card_badge überschreiben, Text zentrieren */
.so_hero_badge_inline {
    position: static;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

/* Location: gold statt weiß, kein eigener margin (Spacing über so_hero_meta) */
.so_hero_location {
    color: var(--hs-gold);
    margin: 0;
    font-size: 15px;
}
.so_hero_location .m45_card_location_mark {
    background: var(--hs-gold);
}

/* Headline: Le Monde Livre Std, 40px, nicht italic */
.so_hero .m33_hero_headline {
    font-family: var(--hs-font-display);
    font-size: clamp(28px, 2.5vw, 40px);
    font-weight: 600;
    font-style: normal;
    line-height: 1.125;
    letter-spacing: 0.045em;
}

/* Content-Breite an Figma anpassen (720px statt 620px) */
.so_hero .m33_hero_content {
    max-width: 720px;
}

/* --------------------------------------------------------------------------
   m34_stats_bar — Figma node 63-132: 234px, weiss, 4 gleiche Spalten
   Horizontale Linien oben/unten am Stats-Grid, vertikale zwischen Items.
   Negative margin-top überlappt den V-Cut des m33 Hero.
   -------------------------------------------------------------------------- */
.m34_stats_bar {
    position: relative;
    z-index: 10;
    margin-top: clamp(-48px, -4vw, -64px);
}

/* Weiss + Spacing auf dem Wrapper — Flucht mit Hero-Titel via hs_container-Padding */
.so_stats_wrap {
    background: #fff;
    padding: clamp(28px, 3.75vw, 72px) 0 clamp(28px, 3.9vw, 75px);
}

.so_stats_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0 clamp(20px, 6.51vw, 125px);
    border-top: 1px solid #E1E2E3;
    border-bottom: 1px solid #E1E2E3;
}

.so_stat_item {
    position: relative;
    padding: 18px clamp(16px, 2.5vw, 40px);
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.so_stat_item:first-child { padding-left: 0; }
.so_stat_item:last-child  { padding-right: 0; }

/* Vertikale Trennlinien zwischen den 4 Spalten */
.so_stat_item + .so_stat_item {
    border-left: 1px solid #E1E2E3;
}

.so_stat_label {
    display: block;
    color: rgba(47, 58, 70, 0.50);
    font-family: var(--hs-font-body);
    font-size: 16px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.075em;
    line-height: 1;
}

.so_stat_value {
    display: block;
    color: #1D1D1B;
    font-family: var(--hs-font-body);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.09;
    letter-spacing: 0.022em;
}

@media (max-width: 768px) {
    .so_stats_grid { grid-template-columns: repeat(2, 1fr); }
    .so_stat_item:nth-child(n+3) { border-top: 1px solid #E1E2E3; }
    .so_stat_item:nth-child(odd) { border-left: none; padding-left: 0; }
    .so_stat_item:nth-child(even) { padding-right: 0; }
}

@media (max-width: 374.98px) {
    .so_stats_grid { grid-template-columns: 1fr; }
    .so_stat_item + .so_stat_item {
        border-left: none;
        border-top: 1px solid #E1E2E3;
    }
}

/* --------------------------------------------------------------------------
   HAUPT-GRID: 2 Spalten (Content + Sidebar)
   -------------------------------------------------------------------------- */
.so_main_grid_wrap {
    padding-top: clamp(40px, 4vw, 72px);
    padding-bottom: clamp(60px, 6vw, 100px);
}

.so_main_grid {
    display: grid;
    grid-template-columns: 1fr 463px;
    gap: clamp(40px, 5vw, 80px);
    align-items: start;
}

.so_content_col {
    min-width: 0;
}

/* --------------------------------------------------------------------------
   INHALT — linke Spalte
   -------------------------------------------------------------------------- */
.so_text_section {
    margin-bottom: clamp(40px, 4vw, 64px);
}
.so_text_section:last-child {
    margin-bottom: 0;
}
.so_text_section--after-map {
    border-top: 1px solid #E1E2E3;
    padding-top: clamp(40px, 4vw, 64px);
}

.so_section_headline {
    font-family: var(--hs-font-display);
    font-size: clamp(26px, 2.5vw, 40px);
    font-weight: 400;
    line-height: 1.125;
    letter-spacing: 1.2px;
    color: var(--hs-dark);
    margin: 0 0 24px;
}

.so_text_body {
    font-family: var(--hs-font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.65;
    letter-spacing: 0.03em;
    color: var(--hs-text);
}
.so_text_body p {
    margin: 0 0 14px;
}
.so_text_body p:last-child {
    margin-bottom: 0;
}

/* Ausstattung: 2-spaltige Liste mit Gold-+ Präfix */
/* Ausstattung — weißer Block mit 2 Spalten, gold "+" Präfix */
.so_text_section--ausstattung {
    background: #fff;
    padding: clamp(40px, 4.5vw, 63px) clamp(28px, 6vw, 85px) clamp(40px, 4.5vw, 63px);
}
.so_text_section--ausstattung .so_section_headline {
    margin-bottom: clamp(28px, 3vw, 48px);
}

.so_ausstattung_list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(24px, 4vw, 56px);
    row-gap: 0;
}

.so_ausstattung_list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--hs-font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: 0.03em;
    color: var(--hs-text);
    padding: 0;
}

/* Gold "+" als Inline-Span — identisch zum Figma-Design */
.so_ausstattung_list li::before {
    content: '+';
    color: var(--hs-gold);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    flex-shrink: 0;
}

@media (max-width: 1199.98px) {
    .so_ausstattung_list { grid-template-columns: 1fr; }
}

/* Google Maps Wrapper — Figma: 840×381px, direkt unter Lage-Text */
.so_map {
    width: 100%;
    aspect-ratio: 840 / 381;
    overflow: hidden;
    background: #e1e2e3;
    margin-top: clamp(28px, 3vw, 48px);  /* Abstand zum Lage-Text */
}

.so_map iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Energie-Tabelle — Zebra-Streifen */
.so_energie_table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--hs-font-body);
    font-size: 16px;
    line-height: 1.5;
}

.so_energie_table .so_tr_odd {
    background: #f7f7f7;
}
.so_energie_table .so_tr_even {
    background: #fff;
}

.so_energie_table td {
    padding: 16px 18px;
    vertical-align: top;
}

.so_td_label {
    color: var(--hs-dark);
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 16px;
    width: 42%;
    white-space: nowrap;
}

.so_td_value {
    color: var(--hs-dark);
    font-weight: 300;
}

/* --------------------------------------------------------------------------
   SIDEBAR — rechte Spalte
   -------------------------------------------------------------------------- */
.so_sidebar_col {
}

.so_contact_card {
    background: #303A46;
    padding: clamp(32px, 3vw, 48px) clamp(28px, 3vw, 48px) 35px;
    color: #fff;
}

/* Topline (Gold, mit Strich) */
.so_contact_topline {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--hs-gold);
    font-family: var(--hs-font-body);
    font-size: 14px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.075em;
    line-height: 1;
    margin: 0 0 16px;
}

.so_contact_topline_mark {
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--hs-gold);
    flex-shrink: 0;
}

/* Headline der Sidebar */
.so_contact_headline {
    font-family: var(--hs-font-display);
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 1.2px;
    color: #fff;
    margin: 0 0 32px;
}

/* Ansprechpartner-Block */
.so_contact_person {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}

.so_contact_person_img_wrap {
    flex-shrink: 0;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--hs-gold);
}

.so_contact_person_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.so_contact_person_name {
    font-family: var(--hs-font-body);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}

.so_contact_person_tel {
    font-family: var(--hs-font-body);
    font-size: 16px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   KONTAKTFORMULAR
   -------------------------------------------------------------------------- */
.so_contact_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.so_form_field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.so_form_label {
    font-family: var(--hs-font-body);
    font-size: 13px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.075em;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1;
}

.so_required {
    color: var(--hs-gold);
}

.so_form_input,
.so_form_textarea {
    width: 100%;
    background: rgba(250, 250, 250, 0.10);
    border: 1px solid rgba(209, 213, 215, 0.50);
    color: #fff;
    font-family: var(--hs-font-body);
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.03em;
    padding: 0 28px;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.so_form_input {
    height: 57px;
}

.so_form_input::placeholder,
.so_form_textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.so_form_input:focus,
.so_form_textarea:focus {
    border-color: var(--hs-gold);
    background: rgba(255, 255, 255, 0.14);
}

.so_form_textarea {
    resize: vertical;
    min-height: 114px;
    padding-top: 18px;
    padding-bottom: 18px;
    line-height: 1.5;
}

/* Footer: Button + Pflichtfeld-Hinweis */
.so_form_footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.so_form_submit {
    width: 100%;
    background: var(--hs-gold);
    border: 1px solid var(--hs-gold);
    color: #fff;
    font-family: var(--hs-font-body);
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    min-height: 73px;
    padding: 0 24px;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s;
    border-radius: 0;
    line-height: 1;
}

.so_form_submit:hover {
    background: var(--hs-gold-dark);
    border-color: var(--hs-gold-dark);
}

.so_form_label--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.03em;
    line-height: 1.5;
    text-transform: none;
}

.so_form_checkbox {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--hs-gold);
    cursor: pointer;
}

.so_form_link {
    color: var(--hs-gold);
    text-decoration: underline;
}
.so_form_link:hover {
    color: #fff;
}

.so_form_pflicht {
    text-align: right;
    font-family: var(--hs-font-body);
    font-size: 14.5px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
    margin: 0 0 16px;
}

/* --------------------------------------------------------------------------
   WEITERE BAUPROJEKTE
   -------------------------------------------------------------------------- */
.so_weitere {
    background: #fff;
    padding-top: clamp(50px, 5vw, 80px);
    padding-bottom: clamp(50px, 5vw, 80px);
}

.so_weitere .m45_card {
    border: 1px solid #E1E2E3;
}

.so_weitere_header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.so_weitere_headline {
    margin-bottom: 0;
}

/* .hs_btn_ghost passt – kein eigenes Override nötig */

/* --------------------------------------------------------------------------
   m32 TEAM-CTA Topline-Override
   Die .m32_untertitel Klasse (aus brand.css section[class*="m32_"] Selektor)
   matcht hier nicht direkt auf .m32_team_cta — daher eigene Klasse.
   -------------------------------------------------------------------------- */
.so_weitere + .m32_team_cta {
    /* Kein extra margin-top nötig — m32_team_cta hat negativen margin-top eingebaut */
}

/* --------------------------------------------------------------------------
   RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Tablet: Sidebar unter Content */
@media (max-width: 1199.98px) {
    .so_main_grid {
        grid-template-columns: 1fr;
    }

    .so_sidebar_col {
        position: static;
    }

    .so_contact_card {
        max-width: 100%;
    }
}

@media (max-width: 460px) {
    .so_hero_meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Mobile Hero-Back */
@media (max-width: 768px) {
    .so_hero_back {
        top: calc(var(--hs-header-height, 80px) + 12px);
        font-size: 13px;
    }

    .so_weitere_header {
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (max-width: 480px) {
    .so_stats_grid { grid-template-columns: 1fr; }
    .so_stat_item + .so_stat_item { border-left: none; border-top: 1px solid #E1E2E3; }
    .so_stat_item { padding-left: 0; padding-right: 0; }
    .so_ausstattung_list { grid-template-columns: 1fr; }
}
