/* ==========================================================================
   baufi-nord.de — YOOtheme Pro Child-Theme
   --------------------------------------------------------------------------
   Detail-CSS ausserhalb des Customizer-Style-Systems.
   Update-sicher: liegt im Child-Theme und wird von YOOtheme Pro automatisch
   geladen (templates/yootheme_child/css/custom.css). YOOtheme-Updates fassen
   das Child-Theme nicht an.
   Aktivierung: Customizer -> Settings -> Advanced -> Child-Theme = "child".
   ========================================================================== */


/* ==========================================================================
   1. Schrift "Nunito" — lokal gehostet (DSGVO: KEIN Google-CDN)
   Quelle: Google Fonts (SIL OFL 1.1), Subset latin, via google-webfonts-helper.
   Dateien: templates/yootheme_child/fonts/nunito-*.woff2
   ========================================================================== */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/nunito-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/nunito-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/nunito-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/nunito-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/nunito-800.woff2') format('woff2');
}


/* ==========================================================================
   2. Uebernommen aus der bisherigen Parent-custom.css
   (templates/yootheme/css/custom.css, Stand 12.05.2026) — damit beim
   Umzug ins Child-Theme nichts verloren geht.
   ========================================================================== */

/* CTA-Leistungen: zentrierte Button-Reihe */
.cta-leistungen {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-leistungen a {
  margin-right: 20px;
  margin-left: 20px;
}

/* Header-Bar oben: Innenabstand */
.tm-headerbar-top {
  padding-top: 20px;
  padding-bottom: 20px;
}


/* ==========================================================================
   3. Design-Angleichung an Referenz "Perfect" — Detailebene
   --------------------------------------------------------------------------
   Schrift (Nunito), Farben (Primaer #0f6895, Headings #1A1A1A, Text #3C4654),
   Header und Toolbar laufen ueber den Customizer-Import
   (_design_work/customizer-export-WORKING.json). Hier nur die Feinheiten,
   die das Customizer-System nicht sauber abdeckt: Render-Qualitaet,
   Headline-Rhythmus, Lesbarkeit. Bewusst zurueckhaltend, damit Olafs
   bestehende, getunte Layouts nicht brechen.
   ========================================================================== */

/* --- 3.1 Schrift-Rendering: Nunito sauber & gleichmaessig darstellen ----- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- 3.2 Fliesstext: angenehmere Zeilenhoehe fuer ruhigeres Lesen -------- */
body,
p,
li {
  line-height: 1.6;
}

/* --- 3.3 Headline-Rhythmus wie im Mockup --------------------------------
   Nunito wird ueber den Import global gesetzt; Gewicht bewusst normal (400,
   auf Kundenwunsch), hier nur Laufweite und Zeilenhoehe fuer ruhigen Rhythmus.
   Farbe (Schwarz #1A1A1A) kommt aus @global-emphasis-color im Import.       */
h1, h2, h3, h4, h5, h6,
.uk-h1, .uk-h2, .uk-h3, .uk-h4, .uk-h5, .uk-h6,
.el-title {
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
/* Kleinere Ebenen duerfen wieder etwas luftiger laufen */
h4, h5, h6,
.uk-h4, .uk-h5, .uk-h6 {
  line-height: 1.25;
}

/* --- 3.4 Navigation: Hauptpunkte (echte Struktur = .uk-subnav im Header!) ----
   Das Hauptmenue ist KEIN .uk-navbar-nav, sondern <ul class="uk-subnav">. Das
   Theme faerbt es ueber  .tm-headerbar .uk-subnav > * > :first-child
   (grau #7b7b7b, 15px) — genau diese Regel ueberschreiben wir hier (update-sicher
   im Child, statt in der kompilierten theme.css zu loeschen).
   Toolbar (.tm-toolbar .uk-subnav) und Dropdown-Submenue (.uk-navbar-dropdown-nav,
   liegt im body) bleiben unberuehrt. */
.tm-headerbar .uk-subnav > * > :first-child {
  color: #0c5278 !important;
  font-weight: 400 !important;
  font-size: 17px !important;
}
.tm-headerbar .uk-subnav > * > :first-child:hover,
.tm-headerbar .uk-subnav > .uk-active > :first-child {
  color: #0c5278 !important;
}

/* --- 3.5 Primaer-Buttons: weichere Ecken wie im Mockup (7px) ------------- */
.uk-button-primary,
.uk-button-secondary {
  border-radius: 7px;
  font-weight: 700;
}


/* ==========================================================================
   4. Optionale Feinheiten — bei Bedarf aktivieren
   --------------------------------------------------------------------------
   Auskommentiert gelassen, damit der Umstieg risikofrei bleibt. Nach dem
   ersten Live-Abgleich kann Robert einzelne Bloecke gezielt einschalten.
   ========================================================================== */

/* 4.1 Karten: dezenter Hover-Lift fuer mehr Tiefe
.uk-card-default {
  transition: transform .2s ease, box-shadow .2s ease;
}
.uk-card-default:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px rgba(15, 40, 70, .12);
}
*/

/* 4.2 Eyebrow/Label oberhalb der H1 (falls als .eyebrow ausgezeichnet)
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  font-size: .8rem;
  color: #0f6895;
}
*/


/* ==========================================================================
   5. Startseiten-Boxen (Beitragslisten) — 4 Karten im 2x2-Raster
   HTML liegt im Joomla-Artikel (.bn-boxes). Klassen gescoped (.bn-*).
   ========================================================================== */
.bn-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin: 10px 0;
}
.bn-box {
  background: #fff;
  border: 1px solid #e7eaef;
  border-radius: 7px;
  box-shadow: 0 6px 22px rgba(15, 40, 70, .06);
  padding: 26px 30px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.bn-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(15, 40, 70, .10);
}
.bn-box__title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  color: #1A1A1A;
  border-bottom: 3px solid #0f6895;
}
.bn-box__list { list-style: none; margin: 0; padding: 0; }
.bn-box__list li { margin: 0; }
.bn-box__list li + li { border-top: 1px solid #eef1f4; }
.bn-box__list a {
  position: relative;
  display: block;
  padding: 10px 0 10px 22px;
  color: #0f6895;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s ease;
}
.bn-box__list a::before {
  content: "\203A";
  position: absolute;
  left: 2px; top: 10px;
  font-weight: 800;
  color: #0f6895;
  transition: transform .15s ease, color .15s ease;
}
.bn-box__list a:hover { color: #1A1A1A; }
.bn-box__list a:hover::before { color: #1A1A1A; transform: translateX(3px); }

@media (max-width: 959px) {
  .bn-boxes { grid-template-columns: 1fr; gap: 20px; }
}


/* ==========================================================================
   6. Startseite: KI-Wiki Feature-Panel + "Warum Baufi-Nord" (3 Saeulen)
   HTML im Joomla-Artikel (.bn-feature / .bn-pillars). Klassen gescoped.
   ========================================================================== */
.bn-feature {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 36px;
  align-items: center;
  background: #eef5fa;
  border: 1px solid #dce8f1;
  border-radius: 10px;
  padding: 34px 38px;
  margin: 0 0 56px;
}
.bn-badge {
  display: inline-block;
  background: #0f6895;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.bn-feature h2 {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 400;
  color: #1A1A1A;
  line-height: 1.2;
}
.bn-feature__lead {
  font-weight: 700;
  color: #1A1A1A;
  margin: 0 0 12px;
  font-size: 18px;
}
.bn-feature p { margin: 0 0 18px; }
.bn-btn {
  display: inline-block;
  background: #0f6895;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 7px;
  transition: background .15s ease;
}
.bn-btn:hover { background: #0c5278; }
.bn-feature__media { text-align: center; }
.bn-feature__media img {
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 6px 22px rgba(15, 40, 70, .10);
}

.bn-section-title {
  font-size: 28px;
  font-weight: 400;
  color: #1A1A1A;
  margin: 0 0 28px;
  text-align: center;
}
.bn-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.bn-pillar {
  background: #fff;
  border: 1px solid #e7eaef;
  border-radius: 7px;
  padding: 26px 28px;
  box-shadow: 0 6px 22px rgba(15, 40, 70, .06);
}
.bn-pillar__num {
  font-size: 15px;
  font-weight: 800;
  color: #0f6895;
  letter-spacing: .05em;
}
.bn-pillar h3 {
  margin: 6px 0 10px;
  font-size: 19px;
  font-weight: 600;
  color: #1A1A1A;
  line-height: 1.25;
}
.bn-pillar p { margin: 0; font-size: 15px; }
.bn-pillar a { color: #0f6895; font-weight: 700; text-decoration: none; }
.bn-pillar a:hover { text-decoration: underline; }

@media (max-width: 959px) {
  .bn-feature { grid-template-columns: 1fr; gap: 24px; }
  .bn-feature__media { order: -1; }
  .bn-pillars { grid-template-columns: 1fr; }
}


/* ==========================================================================
   7. STARTSEITE: Posts-Grid kompakt + aufklappen
   JS (custom.js) setzt .bn-clamp + Button nur auf body.home und nur an
   wirklich langen .el-content. Inhalt bleibt komplett im DOM (SEO),
   nur per overflow geklappt. Ohne JS = voller Inhalt.
   ========================================================================== */
/* uk-grid-match neutralisieren: Kacheln natuerlich hoch -> beim Aufklappen
   kein Leerraum in der Nachbarkachel. */
.home .el-item.uk-card { min-height: 0 !important; }

.home .el-content.bn-clamp {
  max-height: 150px;            /* ~6 Zeilen, passt zu COLLAPSED in custom.js */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
          mask-image: linear-gradient(180deg, #000 72%, transparent);
}
.home .el-content.bn-clamp.is-open {
  max-height: none;
  -webkit-mask-image: none;
          mask-image: none;
}
.home .bn-more {
  display: inline-block;
  margin-top: 14px;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: #0f6895;
  cursor: pointer;
}
.home .bn-more::after { content: " \25BE"; }                        /* ▾ */
.home .bn-more[aria-expanded="true"]::after { content: " \25B4"; }  /* ▴ */
.home .bn-more:hover { text-decoration: underline; }
