/* ==========================================================
   HKB KÄLTE- UND KLIMATECHNIK
   Zentrales Designsystem
   Diese Datei ersetzt die bisherige HKB-CSS vollständig.
   ========================================================== */


/* ----------------------------------------------------------
   1. DESIGNGRUNDLAGEN
   ---------------------------------------------------------- */

:root {
    --hkb-green: #5A9F48;
    --hkb-orange: #EF7D00;
    --hkb-orange-hover: #D96F00;

    --hkb-dark: #4E5B64;
    --hkb-dark-box: #36404B;
    --hkb-gray: #D9DDE0;
    --hkb-light-gray: #F2F3F4;
    --hkb-white: #FFFFFF;

    --hkb-content-width: 1180px;
    --hkb-text-width: 760px;

    --hkb-radius: 7px;
    --hkb-gap: 20px;

    --hkb-space-xs: 10px;
    --hkb-space-s: 20px;
    --hkb-space-m: 32px;
    --hkb-space-l: 56px;
    --hkb-space-xl: 80px;
}


/* Einheitliches Box-Modell für eigene Komponenten */

.hkb-section,
.hkb-section *,
.hkb-grid,
.hkb-grid *,
.hkb-contact,
.hkb-contact * {
    box-sizing: border-box;
}



/* ----------------------------------------------------------
   2. SEITENBREITE UND SEKTIONSABSTÄNDE
   ---------------------------------------------------------- */

/*
   Grundstruktur:
   .mod_article.hkb-section = äußerer Artikel
   .container               = zentrierter Layoutcontainer
   .ce_bgimage              = Hintergrundfläche
   .ce_bgimage-inside       = innerer Inhaltsbereich

   Nur direkt im Artikel liegende ce_bgimage-Elemente
   dürfen auf volle Bildschirmbreite ausbrechen.
*/

/* Äußerer Artikel */

.mod_article.hkb-section {
    width: 100%;
}

/* Zentrierter Layoutcontainer */

.mod_article.hkb-section > .container {
    width: calc(100% - 48px);
    max-width: 1240px;
    margin-inline: auto;
    padding: 0;
}

/* Direkte Hintergrundelemente dürfen Fullwidth sein */

.mod_article.hkb-section > .container > .ce_bgimage {
    /* width: 100vw; */
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

/* Äußere technische Wrapper */

.mod_article.hkb-section .ce_bgimage-outer {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Theme-Padding links und rechts entfernen.
   Vertikale pt-* und pb-* Klassen bleiben erhalten. */

.mod_article.hkb-section .ce_bgimage-inside {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Inhaltsbreite der direkten Hintergrundelemente */

.mod_article.hkb-section > .container > .ce_bgimage
.ce_bgimage-outer > .ce_bgimage-inside {
    width: calc(100% - 48px);
    max-width: var(--hkb-content-width);
    margin-inline: auto;
}

/* Allgemeine Inhaltsbreite für eigenständige Inhalte */

.hkb-content {
    width: min(calc(100% - 48px), var(--hkb-content-width));
    max-width: var(--hkb-content-width);
    margin-inline: auto;
}

/* Standardabstände zwischen Elementen in einem Inhaltsstapel */

.hkb-stack > * + * {
    margin-top: var(--hkb-space-s);
}

.hkb-stack-small > * + * {
    margin-top: var(--hkb-space-xs);
}

.hkb-stack-large > * + * {
    margin-top: var(--hkb-space-m);
}

/* Keine Theme-Margins an den äußeren Kindelementen addieren */

.hkb-stack > :first-child,
.hkb-stack-small > :first-child,
.hkb-stack-large > :first-child {
    margin-top: 0 !important;
}

.hkb-stack > :last-child,
.hkb-stack-small > :last-child,
.hkb-stack-large > :last-child {
    margin-bottom: 0;
}


/* ----------------------------------------------------------
   3. HINTERGRÜNDE UND TEXTFARBEN
   ---------------------------------------------------------- */

/*
   Diese Klassen kommen auf den äußeren Bereich
   (z. B. .ce_bgimage oder einen eigenen Abschnitt).
   Sie legen Hintergrund und Standard-Textfarbe fest.
*/

/* ==========================================================
   HKB – Hintergrundfarben
   ========================================================== */

.mod_article .ce_bgimage.hkb-bg-dark {
    background-color: var(--hkb-dark) !important;
    color: var(--hkb-white);
}

.mod_article .ce_bgimage.hkb-bg-dark-box {
    background-color: var(--hkb-dark-box) !important;
    color: var(--hkb-white);
}

.mod_article .ce_bgimage.hkb-bg-white {
    background-color: var(--hkb-white) !important;
    color: var(--hkb-dark);
}

.mod_article .ce_bgimage.hkb-bg-gray {
    background-color: var(--hkb-light-gray) !important;
    color: var(--hkb-dark);
}

.hkb-bg-transparent {
    background-color: transparent !important;
}

/* Textfarben als gezielte Ausnahmen */

.hkb-text-white  { color: var(--hkb-white) !important; }
.hkb-text-dark   { color: var(--hkb-dark) !important; }
.hkb-text-gray   { color: #747D83 !important; }
.hkb-text-green  { color: var(--hkb-green) !important; }
.hkb-text-orange { color: var(--hkb-orange) !important; }

/* Links innerhalb gestalteter Bereiche */

.hkb-bg-dark a,
.hkb-bg-dark-box a {
    color: var(--hkb-white);
}

.hkb-bg-white a,
.hkb-bg-gray a {
    color: var(--hkb-dark);
}

.hkb-bg-dark a:hover,
.hkb-bg-dark-box a:hover,
.hkb-bg-white a:hover,
.hkb-bg-gray a:hover {
    color: var(--hkb-orange);
}


/* ==========================================================
   HKB – ce_bgimage als neutraler Inhalts-Wrapper
   ========================================================== */

.hkb-bg-white .ce_bgimage.bg-nocolor {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* ==========================================================
   HKB – ce_bgimage-Wrapper neutralisieren
   ========================================================== */
   
/* Verschachtelte Contao-Hintergründe innerhalb von HKB-Flächen neutralisieren */
.hkb-bg-gray .ce_bgimage.bg-nocolor:not(.hkb-bg-dark):not(.hkb-bg-white):not(.hkb-bg-gray):not(.hkb-bg-dark-box) {
    background: transparent !important;
}   
   
/*
.mod_article[class*="hkb-"] .ce_bgimage {
    padding: 0 !important;
    margin: 0 !important;
}
.ce_bgimage.bg-nocolor {
	background: transparent !important;
}
*/
/* ----------------------------------------------------------
   4. TYPOGRAFIE
   ---------------------------------------------------------- */

/* Großbuchstaben mit ruhigem Zeichenabstand */

.hkb-caps {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Kicker / kleine Abschnittsüberschrift */

.hkb-kicker {
    color: var(--hkb-green);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 var(--hkb-space-s);
}

/* Standard-Textbreite für gut lesbare Absätze */

.hkb-copy {
    max-width: var(--hkb-text-width);
    line-height: 1.7;
}

/* Allgemeine Überschriften innerhalb eigener Bereiche */

.hkb-section h1,
.hkb-section h2,
.hkb-section h3,
.hkb-section h4 {
    margin-top: 0;
}

/* Explizite Textfarbe für helle/dunkle Überschriften
   über .hkb-text-* setzen, wenn die Standardfarbe nicht passt. */


/* ----------------------------------------------------------
   5. ABSTANDS-UTILITIES
   ---------------------------------------------------------- */

/* Vertikaler Innenabstand für einzelne Elemente */

.hkb-space-y-small {
    padding-block: 24px;
}

.hkb-space-y-medium {
    padding-block: clamp(36px, 5vw, 56px);
}

.hkb-space-y-large {
    padding-block: clamp(56px, 7vw, 88px);
}

/* Abstände zwischen Elementen */

.hkb-mt-0 { margin-top: 0 !important; }
.hkb-mt-s { margin-top: var(--hkb-space-s) !important; }
.hkb-mt-m { margin-top: var(--hkb-space-m) !important; }
.hkb-mt-l { margin-top: var(--hkb-space-l) !important; }

.hkb-mb-0 { margin-bottom: 0 !important; }
.hkb-mb-s { margin-bottom: var(--hkb-space-s) !important; }
.hkb-mb-m { margin-bottom: var(--hkb-space-m) !important; }
.hkb-mb-l { margin-bottom: var(--hkb-space-l) !important; }


/* ----------------------------------------------------------
   6. GRID-KOMPONENTE
   ---------------------------------------------------------- */

/*
   Für eigene HKB-Grids. Die Contao-Spaltenstruktur bleibt erhalten,
   die Darstellung wird durch CSS gesteuert.
*/

.hkb-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 !important;
    align-items: stretch;
}

.hkb-grid > .column {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    flex: none !important;
    margin: 0 !important;
    padding: 22px !important;
    border-radius: var(--hkb-radius);
    box-sizing: border-box;
}

/* Dunkle Kachelvariante */

.hkb-grid-dark > .column {
    background: var(--hkb-dark-box);
    color: var(--hkb-white);
}

.hkb-grid-dark h3,
.hkb-grid-dark h4 {
    color: var(--hkb-orange);
}

/* Helle Kachelvariante */

.hkb-grid-light > .column {
    background: var(--hkb-light-gray);
    color: var(--hkb-dark);
}

.hkb-grid-light h3,
.hkb-grid-light h4 {
    color: var(--hkb-green);
}

/* Überschriften und Texte in Kacheln */

.hkb-grid h3,
.hkb-grid h4 {
    font-size: clamp(17px, 1.5vw, 22px);
    line-height: 1.25;
    margin: 0 0 10px;
}

.hkb-grid .ce_text {
    line-height: 1.6;
}


/* Bestehende 4er-Grids als Übergang unterstützen.
   Die drei Leistungs-Linkboxen (.links-waehlen-ist-gut)
   sind ausdrücklich nicht betroffen. */

.autogrid_row.startseite-4grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 !important;
    align-items: stretch;
}

.autogrid_row.startseite-4grid > .column {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    flex: none !important;
    margin: 0 !important;
    padding: 22px !important;
    border-radius: var(--hkb-radius);
    box-sizing: border-box;
    background: var(--hkb-dark-box);
    color: var(--hkb-white);
}

.autogrid_row.startseite-4grid h4 {
    color: var(--hkb-orange);
    font-size: clamp(17px, 1.5vw, 22px);
    line-height: 1.25;
    margin: 0 0 10px;
}

.autogrid_row.startseite-4grid .ce_text {
    color: inherit;
    line-height: 1.6;
}

/* Wertebereich: helle Kacheln statt dunkler Fakten-Kacheln */

.hkb-about-values .autogrid_row.startseite-4grid > .column {
    background: var(--hkb-light-gray);
    color: var(--hkb-dark);
}

.hkb-about-values .autogrid_row.startseite-4grid h4 {
    color: var(--hkb-green);
}


/* ----------------------------------------------------------
   7. KONTAKT- / ANFRAGEBOX
   ---------------------------------------------------------- */

/*
   Wiederverwendbare Komponente für Startseite, About-us
   und weitere Seiten. Die Klasse hkb-contact kommt auf
   die mittlere Spalte / Box.
*/

.hkb-contact {
    background: var(--hkb-dark-box) !important;
    color: var(--hkb-white);
    padding: clamp(22px, 3vw, 32px) !important;
    border-radius: var(--hkb-radius);
}

.hkb-contact h2,
.hkb-contact h3,
.hkb-contact h4 {
    color: var(--hkb-orange);
    margin: 0 0 12px;
}

.hkb-contact .ce_text {
    color: var(--hkb-white);
    line-height: 1.6;
}

/* Bestehende Anfrage-Struktur mit drei PCT-Spalten */

.autogrid_row.startseite-anfrage {
    display: grid !important;
    grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
    gap: 14px;
    margin: 0 !important;
    align-items: stretch;
    background: transparent !important;
}

.autogrid_row.startseite-anfrage > .column {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-sizing: border-box;
}

/* Bestehende Klasse bleibt als Alias erhalten */

.autogrid_row.startseite-anfrage .startseite-anfrage-box {
    background: var(--hkb-dark-box) !important;
    color: var(--hkb-white);
    padding: clamp(22px, 3vw, 32px) !important;
    border-radius: var(--hkb-radius);
}

.autogrid_row.startseite-anfrage .startseite-anfrage-box h4 {
    color: var(--hkb-orange);
    font-size: clamp(18px, 1.5vw, 22px);
    line-height: 1.25;
    margin: 0 0 12px;
}

.autogrid_row.startseite-anfrage .startseite-anfrage-box .ce_text {
    color: var(--hkb-white);
    line-height: 1.6;
}

.autogrid_row.startseite-anfrage .hkb-anfrage-button {
    margin-top: 18px;
}

/* Button */

.hkb-button a,
.hkb-anfrage-button a {
    display: inline-block;
    padding: 12px 24px;
    background: var(--hkb-orange);
    color: var(--hkb-white) !important;
    border: 0;
    border-radius: var(--hkb-radius);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hkb-button a:hover,
.hkb-anfrage-button a:hover {
    background: var(--hkb-orange-hover);
    color: var(--hkb-white) !important;
    transform: translateY(-2px);
}


/* ----------------------------------------------------------
   8. ABOUT US – HERO
   Bestehendes Layout bewusst beibehalten.
   ---------------------------------------------------------- */

/* Fullwidth-Ausbruch aus dem Theme-Container */

.ce_bgimage.hkb-about-hero {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    background-color: var(--hkb-dark) !important;
    box-sizing: border-box;
}

/* Innerer Inhaltsbereich */

.hkb-about-hero .ce_bgimage-inside {
    width: calc(100% - 48px);
    max-width: var(--hkb-content-width);
    margin-inline: auto;
    padding-top: clamp(56px, 8vw, 100px) !important;
    padding-bottom: clamp(56px, 8vw, 100px) !important;
}

/* Einleitung */

.hkb-about-hero .hero-textblock {
    max-width: 850px;
    margin-bottom: 32px;
    color: var(--hkb-white);
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.65;
    font-weight: 400;
}

/* Hero-Titel */

.hkb-about-hero .about-us-h1 {
    color: var(--hkb-white);
    font-size: clamp(30px, 4.2vw, 54px);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin: 0 0 22px;
}

/* Orange Akzentlinie */
hr.orange-spacer, 
.hkb-about-hero hr.orange-spacer {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 1px;
    border: 0;
    background: var(--hkb-orange);
    opacity: 0.9;
    margin: 0 0 30px;
}

/* Jahreszahl und Zusatzinformationen */

.hkb-about-hero .hero-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: end;
    margin: 0 !important;
}

/* PCT-Spalten überschreiben */

.hkb-about-hero .hero-meta > .column {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    flex: none !important;
    margin: 0 !important;
    padding: 0;
    box-sizing: border-box;
}

/* Große Jahreszahl */

.hkb-about-hero .typo-header-jahreszahl {
    color: var(--hkb-green);
    font-size: clamp(76px, 11vw, 144px);
    line-height: 0.9;
    font-weight: 700;
    letter-spacing: -0.065em;
    margin: 0;
}

/* Kicker: Über fünf Jahrzehnte */

.hkb-about-hero .typo-header-text-upper {
    color: var(--hkb-orange);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.4;
    margin: 0;
}

/* Untere Zusatzzeile */

.hkb-about-hero .typo-header-text-lower {
    color: var(--hkb-white);
    font-size: clamp(19px, 2.2vw, 27px);
    line-height: 1.3;
    font-weight: 500;
    margin: 0 0 10px;
}

/* Theme-Padding am äußeren Artikel entfernen */

#article-14687 > .container {
    padding: 0 !important;
}


/* ----------------------------------------------------------
   9. ABOUT US – ZEITSTRAHL
   Gestaltung aus der bisherigen CSS übernommen.
   ---------------------------------------------------------- */

.hkb-timeline {
    --timeline-line: var(--hkb-orange);
    --timeline-green: var(--hkb-green);

    position: relative;
    max-width: 1000px;
    margin: 40px auto 20px;
}

/* Vertikale Verbindungslinie */

.hkb-timeline::before {
    content: "";
    position: absolute;
    top: 55px;
    bottom: 75px;
    left: 82px;
    width: 2px;
    background: var(--timeline-line);
}

/* Einzelne Station */

.hkb-timeline-item {
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 30px;
    position: relative;
    padding: 0 0 48px;
}

/* Letzte Station ohne zusätzlichen Abstand */

.hkb-timeline-item:last-child {
    padding-bottom: 0;
}

/* Jahreszahl */

.hkb-timeline-year {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    color: var(--timeline-green);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.1;
    font-weight: 700;
    text-align: right;
    padding-right: 25px;
}

/* Markierung auf der Linie */

.hkb-timeline-year::after {
    content: "";
    position: absolute;
    top: 55px;
    right: 73px;
    width: 12px;
    height: 12px;
    background: var(--hkb-white);
    border: 3px solid var(--timeline-line);
    border-radius: 50%;
    box-sizing: content-box;
}

/* Überschriften */

.hkb-timeline-content h3 {
    color: var(--timeline-green);
    font-size: clamp(20px, 2vw, 25px);
    line-height: 1.2;
    margin: 0 0 10px;
}

/* Fließtext */

.hkb-timeline-content p {
    margin: 0;
    max-width: 700px;
    line-height: 1.7;
}


/* ----------------------------------------------------------
   10. ABOUT US – WERTE-SEKTION
   ---------------------------------------------------------- */

.hkb-about-values .hkb-section-kicker,
.hkb-about-values .hkb-kicker {
    margin-bottom: 14px !important;
}

/* Bestehende Grid-Klasse als Übergang unterstützen */

.hkb-about-values .startseite-4grid {
    margin-top: 0 !important;
}

.hkb-bg-dark .hkb-section-kicker {
    color: var(--hkb-green);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.4;
    margin: 0 0 5px 20px;
}

.hkb-bg-gray .hkb-section-kicker {
    color: var(--hkb-orange);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.4;
    margin: 0 0 5px 20px;
}

/* ----------------------------------------------------------
   11. ÜBERGANGSKLASSEN FÜR BESTEHENDE ELEMENTE
   Diese Regeln halten bestehende Klassen funktionsfähig,
   bis sie im Contao-Backend auf das neue System umgestellt sind.
   ---------------------------------------------------------- */

.hkb-section-dark {
    color: var(--hkb-white);
}

.hkb-section-light {
    background-color: var(--hkb-white);
    color: var(--hkb-dark);
}

/* Bisherige Theme-Klassen aus dem About-Us-Aufbau */

.h3-jost-cap-white {
    margin: 0 !important;
}

.h3-jost-cap-gray {
    margin: 0 !important;
    color: #555555 !important;
}

/* Vertikale Zentrierung: Klasse nur verwenden,
   wenn die betreffende Sektion tatsächlich eine Mindesthöhe hat. */

.hkb-about-today .ce_bgimage-outer {
    display: flex;
    align-items: center;
    min-height: 420px;
}

.hkb-about-today .ce_bgimage-inside {
    width: 100%;
    max-width: var(--hkb-content-width);
    margin-inline: auto;
    padding-block: clamp(60px, 8vw, 100px) !important;
}


/* ----------------------------------------------------------
   12. RESPONSIVE
   ---------------------------------------------------------- */

/* Tablet */

@media (max-width: 900px) {
    .hkb-grid,
    .autogrid_row.startseite-4grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .autogrid_row.startseite-anfrage {
        grid-template-columns: 1fr;
    }

    .autogrid_row.startseite-anfrage > .column.col_3 {
        display: none;
    }

    .autogrid_row.startseite-anfrage .startseite-anfrage-box {
        grid-column: 1;
        width: 100%;
    }
}

/* Smartphone / kleinere Tablets */

@media (max-width: 767px) {
    .hkb-section > .container,
    .hkb-content,
    .hkb-section .ce_bgimage-inside {
        width: calc(100% - 40px);
    }

    /* About Hero */

    .hkb-about-hero .ce_bgimage-inside {
        width: calc(100% - 40px);
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    .hkb-about-hero .hero-textblock {
        margin-bottom: 26px;
    }

    .hkb-about-hero .about-us-h1 {
        font-size: clamp(30px, 8vw, 42px);
        margin-bottom: 16px;
    }

    .hkb-about-hero hr.orange-spacer {
        margin-bottom: 24px;
    }

    .hkb-about-hero .hero-meta {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .hkb-about-hero .typo-header-jahreszahl {
        font-size: clamp(80px, 20vw, 110px);
    }

    .hkb-about-hero .typo-header-text-upper {
        font-size: 11px;
    }

    .hkb-about-hero .typo-header-text-lower {
        font-size: 21px;
    }
}

/* Smartphone */

@media (max-width: 600px) {
    .hkb-grid,
    .autogrid_row.startseite-4grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hkb-grid > .column,
    .autogrid_row.startseite-4grid > .column {
        padding: 18px !important;
    }

    .autogrid_row.startseite-anfrage .startseite-anfrage-box {
        padding: 18px !important;
    }

    /* Zeitstrahl – bewährte mobile Darstellung */

    .hkb-timeline {
        margin-top: 30px;
    }

    .hkb-timeline::before {
        left: 8px;
        top: 12px;
        bottom: 25px;
    }

    .hkb-timeline-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 0 34px 35px;
    }

    .hkb-timeline-year {
        text-align: left;
        padding: 0;
        font-size: 30px;
    }

    .hkb-timeline-year::after {
        left: -33px;
        right: auto;
        top: 7px;
    }
}

/* Bewegungen reduzieren, wenn im Betriebssystem gewünscht */

@media (prefers-reduced-motion: reduce) {
    .hkb-button a,
    .hkb-anfrage-button a {
        transition: none;
    }
}
