/* ============================================================
   ETSE Modern – Facelift-Schicht über dem Theme "etse" (2017)
   Stufe 1: Typografie, Farben, Nav, Buttons, Accordion, Footer.
   Kein Layout-Umbau; das Theme-Grundgerüst bleibt unangetastet.
   Farbanker aus dem Logo: Blau #00355d, Amber #f9b200.
   Geladen nur bei ?modern=1 (siehe etse-modern.php).
   ============================================================ */

:root {
  --etse-blau: #00355d;
  --etse-blau-dunkel: #00263f;
  --etse-blau-flaeche: #eef3f8;
  --etse-amber: #f9b200;
  --etse-amber-dunkel: #c98f00;
  --etse-text: #2c3947;
  --etse-text-leise: #5c6b7a;
  --etse-linie: #dbe3ea;
  --etse-radius: 12px;
  --etse-schatten: 0 1px 2px rgba(0, 38, 63, 0.06), 0 8px 24px rgba(0, 38, 63, 0.08);
}

/* ---------- Grundtypografie ---------- */

body {
  font-family: Roboto, "Segoe UI", sans-serif;
  font-weight: 400;
  /* Fliessend 17 px (mobil) bis 18 px (Desktop). */
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
  line-height: 1.7;
  color: var(--etse-text);
  border-top: 0;
}

.entry-content {
  max-width: 46rem;
}

.entry-content p,
.entry-content li {
  color: var(--etse-text);
}

h1, h2, h3, h4 {
  color: var(--etse-blau);
  line-height: 1.25;
  overflow-wrap: break-word;
}

.entry-content h1 {
  /* ~30 px mobil bis 40 px Desktop. */
  font-size: clamp(1.875rem, 1.5rem + 1.9vw, 2.5rem);
  margin-bottom: 0.15em;
}

.entry-content h1 + h2 {
  font-size: 1.3rem;
  font-family: Roboto, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--etse-text-leise);
  margin-bottom: 1.4em;
}

.entry-content h2 {
  /* ~23 px mobil bis 27 px Desktop. */
  font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.7rem);
  margin-top: 1.8em;
}

/* Die alten h5-Zwischentitel ("Unsere Markenzeichen") als ruhige Überzeile. */
.entry-content h5 {
  font-family: Roboto, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--etse-blau);
  border-bottom: 2px solid var(--etse-amber);
  display: inline-block;
  padding-bottom: 0.3em;
  margin: 2em 0 0.8em;
}

/* ---------- Links ---------- */

.entry-content a {
  color: var(--etse-blau);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--etse-amber);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.entry-content a:hover {
  color: var(--etse-amber-dunkel);
}

a:focus-visible {
  outline: 3px solid var(--etse-amber);
  outline-offset: 2px;
  border-radius: 3px;
}

/* VdS-Verifikationslinks als ruhige Nachweis-Chips. */
.entry-content a[href*="vds.de/zertifikate"] {
  display: inline-block;
  line-height: 1.5;
  padding: 0.15em 0.65em;
  margin: 0.15em 0;
  border: 1px solid var(--etse-linie);
  border-radius: 999px;
  background: var(--etse-blau-flaeche);
  text-decoration: none;
  font-size: 0.95em;
  transition: border-color 200ms ease, background 200ms ease;
}

.entry-content a[href*="vds.de/zertifikate"]::after {
  content: " ↗";
  color: var(--etse-amber-dunkel);
  font-size: 0.85em;
}

.entry-content a[href*="vds.de/zertifikate"]:hover {
  border-color: var(--etse-amber);
  background: #fff;
  color: var(--etse-blau);
}

/* ---------- Listen ---------- */

.entry-content ul {
  padding-left: 1.2rem;
}

.entry-content ul li,
.entry-content ol li {
  /* Theme setzt 14px/20px auf Listen – zu klein, und umbrechende Chips
     kollidieren. Gleicher clamp wie der Fliesstext (inherit greift nicht,
     das Theme nagelt schon das ul auf 14px fest). */
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
  line-height: 1.6;
}

.entry-content ul > li {
  margin-bottom: 0.45em;
}

.entry-content ul > li::marker {
  color: var(--etse-amber);
}

/* ---------- Kopfbereich und Navigation ---------- */

.topbar {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}

/* Der Home-Knopf doppelt nur den Logo-Link und hing frei im Kopfbereich –
   Armins Entscheid: weg damit (das Logo führt zur Startseite). */
.btn_home {
  display: none !important;
}

.wrapper-navbar {
  border-bottom: 1px solid var(--etse-linie);
  box-shadow: 0 1px 12px rgba(0, 38, 63, 0.06);
  background: #fff;
}

/* Das Theme zieht die Nav mit margin-top: -115px über den Slider – die
   alten dunklen Kästen waren der Lesbarkeits-Trick dafür. Ohne Kästen
   gehört die Leiste als eigener weißer Balken unter das Header-Bild. */
nav.navbar {
  margin-top: 0 !important;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  background: #fff !important;
  border-bottom: 1px solid var(--etse-linie);
}

/* Bootstrap-Negativmargins im Nav-Grid liefen 32px über den Viewport –
   der letzte Menüpunkt wurde rechts abgeschnitten. */
nav.navbar .row {
  margin-left: 0;
  margin-right: 0;
}

nav.navbar [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

/* Flexbox-Falle: .row ist Flex-Kind mit min-width:auto und schrumpft
   nicht unter ihre Max-Content-Breite – die Leiste lief 32px über den
   Container und der letzte Menüpunkt wurde abgeschnitten. */
nav.navbar .row,
nav.navbar [class*="col-"],
nav.navbar .navbar-collapse {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Die 126px-Kastenhöhe der Overlay-Optik aufheben. */
#main-menu > li,
#main-menu .nav-link {
  height: auto !important;
  min-height: 0 !important;
}

#main-menu > li {
  display: flex;
  align-items: center;
  /* Theme gibt jedem Punkt fixe 244,5px – zusammen breiter als der
     Container, der letzte Punkt wurde abgeschnitten. */
  width: auto !important;
  flex: 0 1 auto !important;
}

/* Menü mittig als Chip-Reihe statt Blocksatz bis an den Rand. */
#main-menu {
  justify-content: center !important;
  gap: 0.4rem;
}

/* Der Menütitel "Wieso? Weshalb?<br/> Warum?" bricht per hartem <br>
   zweizeilig – als Chip einzeilig. */
#main-menu > li > .nav-link br {
  display: none;
}

/* Das alte Theme erzwingt dunkelblaue Nav-Kästen mit hoher Spezifität –
   hier bewusst mit !important auf helle Chip-Optik. */
#main-menu .nav-link {
  font-family: Roboto, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--etse-blau) !important;
  background: transparent !important;
  /* Theme gibt den Links eine Festbreite (~208px) – Chips richten sich
     nach ihrem Inhalt. */
  width: auto !important;
  white-space: nowrap;
  padding: 0.55rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

#main-menu > li > .nav-link:hover {
  background: var(--etse-blau-flaeche) !important;
  color: var(--etse-blau-dunkel) !important;
}

#main-menu .current-menu-item > .nav-link,
#main-menu .current_page_item > .nav-link,
#main-menu .current-menu-ancestor > .nav-link {
  background: var(--etse-blau-flaeche) !important;
  border-color: var(--etse-amber);
  color: var(--etse-blau-dunkel) !important;
}

#main-menu .dropdown-menu {
  background: #fff !important;
  border: 1px solid var(--etse-linie);
  border-radius: var(--etse-radius);
  box-shadow: var(--etse-schatten);
  padding: 0.4rem 0.4rem;
  margin-top: 0.25rem;
}

/* Theme färbt die Dropdown-Zeilen dunkelblau mit Trennlinien – zurück auf hell. */
#main-menu .dropdown-menu li {
  background: transparent !important;
  border: 0 !important;
  width: 100% !important;
}

#main-menu .dropdown-menu .nav-link {
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 1.1rem;
}

/* Mobil: gestapelte Punkte in voller Breite statt schmaler Chips. */
@media (max-width: 767px) {
  #main-menu {
    gap: 0.15rem;
  }

  #main-menu > li,
  #main-menu > li > .nav-link {
    width: 100% !important;
  }

  #main-menu .nav-link {
    white-space: normal;
  }

  #main-menu > li > .nav-link {
    border-radius: 12px;
    padding: 0.7rem 1rem;
  }
}

#main-menu .dropdown-menu .nav-link:hover {
  background: var(--etse-blau-flaeche) !important;
}

/* ---------- Slider und Bilder ---------- */

.metaslider,
.metaslider img {
  border-radius: var(--etse-radius);
}

.entry-content img {
  border-radius: 10px;
  max-width: 100%;
  height: auto;
}

/* ---------- Buttons ---------- */

.btn,
.btn-custom,
input[type="submit"],
button[type="submit"] {
  background: var(--etse-amber);
  color: var(--etse-blau);
  font-weight: 600;
  border: 0;
  border-radius: 8px !important;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.btn:hover,
.btn-custom:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: #ffc233;
  color: var(--etse-blau-dunkel);
  box-shadow: 0 4px 14px rgba(249, 178, 0, 0.35);
  transform: translateY(-1px);
}

.btn:active,
.btn-custom:active {
  transform: translateY(0);
}

/* ---------- Accordion (Plugin "Accordion Shortcodes") ---------- */

.accordion {
  margin-top: 1.5rem;
}

.accordion-title {
  font-size: 1.2rem !important;
  /* Das Theme setzt line-height: 8px – bei zweizeiligen Titeln
     überlappen sich die Zeilen. */
  line-height: 1.35 !important;
  text-decoration: none !important;
  margin: 0.6rem 0 0 !important;
  padding: 0.9rem 3rem 0.9rem 1.1rem !important;
  border: 1px solid var(--etse-linie);
  border-radius: var(--etse-radius);
  background: #fff;
  color: var(--etse-blau);
  cursor: pointer;
  position: relative;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.accordion-title:hover {
  border-color: var(--etse-amber);
  box-shadow: var(--etse-schatten);
}

/* Altes Dreieck-Icon des Themes ausblenden – der +/×-Indikator übernimmt. */
.accordion-title::before {
  display: none !important;
}

.accordion-title::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--etse-amber-dunkel);
  transition: transform 250ms ease;
}

.accordion-title.open::after {
  transform: translateY(-50%) rotate(45deg);
}

.accordion-title.open {
  border-color: var(--etse-amber);
  background: var(--etse-blau-flaeche);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.accordion-content {
  border: 1px solid var(--etse-linie);
  border-top: 0;
  border-radius: 0 0 var(--etse-radius) var(--etse-radius);
  padding: 1.1rem 1.1rem 0.6rem;
  background: #fff;
}

/* ---------- Bausteine für Stufe 2 (per Classic-Editor-HTML nutzbar) ---------- */

.etse-kacheln {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  padding-left: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .etse-kacheln {
    grid-template-columns: repeat(3, 1fr);
  }
}

.etse-kachel {
  border: 1px solid var(--etse-linie);
  border-radius: var(--etse-radius);
  padding: 1.2rem;
  background: #fff;
  box-shadow: var(--etse-schatten);
}

.etse-nachweise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-left: 0;
  list-style: none;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--etse-blau);
  color: #cfdce8;
  font-size: 1.0625rem;
  padding-top: 2.2rem;
  padding-bottom: 2.2rem;
  margin-top: 3rem;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  color: #ffc233;
}

/* ---------- Mobil ---------- */

@media (max-width: 767px) {
  /* Bootstrap-Negativmargins im Footer erzeugen 5px Quer-Scroll (Altbestand). */
  .footer .row {
    margin-left: 0;
    margin-right: 0;
  }

  .entry-content h1,
  .entry-content h2 {
    hyphens: auto;
  }

  #content {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
