/* Weilandt IT-Dienstleistungen — Design-System V2: Grundgestaltung der bisherigen Standardbloecke.
   Gilt global (body.wv2) fuer alle Inhalte, die noch nicht aus V2-Bloecken bestehen: dunkler Grund,
   helle Schrift, Glas-Karten, Gold-Buttons. Inhalte bleiben unveraendert, nur die Optik wird umgesetzt. */

:root {
  --wv2-legacy-text: rgba(238, 245, 245, 0.86);
  --wv2-glass-bg: rgba(10, 74, 84, 0.22);
}

/* ---------- Abstand unter dem fixierten Header (Seiten ohne V2-Hero) ---------- */
body.wv2:not(.wv2-blocks) .wp-site-blocks { padding-top: 6.5rem !important; }
body.admin-bar.wv2:not(.wv2-blocks) .wp-site-blocks { padding-top: calc(6.5rem + 32px) !important; }
/* Mobil ist der Header hoeher (Logo, Menue-Symbol und Icons umbrechen) */
@media (max-width: 781px) {
  body.wv2:not(.wv2-blocks) .wp-site-blocks { padding-top: 10rem !important; }
  body.admin-bar.wv2:not(.wv2-blocks) .wp-site-blocks { padding-top: calc(10rem + 46px) !important; }
}

/* Inhaltsbereich immer transparent (auch wenn er direkt unter .wp-site-blocks liegt) */
body.wv2 :is(.entry-content, .wp-block-post-content) { background: transparent !important; }

/* ---------- Seitenraster: Inhalt zentriert mit seitlichem Abstand (wie .wv2-container) ---------- */
body.wv2:not(.wv2-blocks) .wp-site-blocks > :not(header):not(footer) {
  box-sizing: border-box; width: 100%; max-width: calc(var(--wv2-max-width) + 4.4rem);
  margin-left: auto !important; margin-right: auto !important; padding-left: 2.2rem; padding-right: 2.2rem;
}

/* ---------- Header-Navigation wie auf der Startseite (helle Schrift, keine Unterstreichung) ---------- */
body.wv2 header.wp-block-template-part :is(.wp-block-navigation a, .wp-block-site-title a) {
  color: #eef5f5 !important; text-decoration: none !important;
}
body.wv2 header.wp-block-template-part :is(.wp-block-navigation a, .wp-block-site-title a):hover { color: var(--wv2-accent-light) !important; }
body.wv2 header.wp-block-template-part .wp-block-social-links a { text-decoration: none !important; }

/* ---------- Theme-Huellen: weisse Flaechen/Schatten aus ---------- */
body.wv2 .wp-site-blocks > :not(header):not(footer) { color: var(--wv2-legacy-text); hyphens: manual; -webkit-hyphens: manual; }
body.wv2 .wp-site-blocks > :not(header):not(footer) * { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(.has-custom-weiss-background-color, .has-base-background-color, .has-base-2-background-color, .has-white-background-color):has(> .wp-block-post-content),
body.wv2 .wp-site-blocks > .wp-block-group {
  background: transparent !important; box-shadow: none !important;
}
body.wv2 .wp-site-blocks > :not(header):not(footer) .wp-block-post-content,
body.wv2 .wp-site-blocks > :not(header):not(footer) .entry-content { color: var(--wv2-legacy-text); background: transparent !important; }

/* ---------- Ueberschriften ---------- */
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(h1, h2, h3, h4, h5, h6):not(.has-text-color):not([class*="wv2-"]) {
  color: #fff; font-family: var(--wv2-font-display); letter-spacing: -0.02em;
}
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(h1, h2, h3, h4, h5, h6):not([class*="wv2-"]) { font-family: var(--wv2-font-display); }

/* ---------- Dunkle Textfarben aus dem alten Design -> hell (Gold-Toene bleiben) ---------- */
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(.has-custom-text-hg-basis-2-color, .has-custom-text-hg-basis-color, .has-custom-text-hg-gr-n-color,
       .has-custom-primary-color, .has-custom-braun-color, .has-contrast-color, .has-black-color) {
  color: var(--wv2-legacy-text) !important;
}
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(h1, h2, h3, h4, h5, h6):is(.has-custom-text-hg-basis-2-color, .has-custom-text-hg-basis-color, .has-custom-text-hg-gr-n-color,
       .has-custom-primary-color, .has-custom-braun-color, .has-contrast-color, .has-black-color) { color: #fff !important; }
body.wv2 .wp-site-blocks > :not(header):not(footer) [style*="color:#000000"], body.wv2 .wp-site-blocks > :not(header):not(footer) [style*="color:#6e433d"], body.wv2 .wp-site-blocks > :not(header):not(footer) [style*="color: #000000"] { color: var(--wv2-legacy-text) !important; }

/* ---------- Flaechen: alte helle Hintergruende -> Glas ---------- */
body.wv2 .wp-site-blocks > :not(header):not(footer) .has-background:not([class*="wv2-"]):not(.has-custom-accent-background-color):not(.wp-block-button__link):not(.wp-element-button):not(.wp-block-cover):not(.wp-block-navigation) {
  background: var(--wv2-glass-bg) !important;
  border: 1px solid var(--wv2-border-glass);
  border-radius: 18px;
  box-shadow: none !important;
}
/* Huellen, die nur Layout sind (enthalten den Seiteninhalt), bekommen keine Karte */
body.wv2 .wp-site-blocks > :not(header):not(footer) .has-background.has-background.has-background.has-background:has(.wp-block-post-content) { background: transparent !important; border: 0 !important; border-radius: 0; box-shadow: none !important; }
body.wv2 .wp-site-blocks > :not(header):not(footer) .has-custom-accent-background-color:not(.wp-element-button):not(.wp-block-button__link),
body.wv2 .wp-site-blocks > :not(header):not(footer) .has-custom-accent-background-color:not(.wp-element-button):not(.wp-block-button__link) :is(h1, h2, h3, h4, h5, h6, p, li, span, strong):not(.wp-block-button__link) {
  color: var(--wv2-primary-dark, #041f24) !important;
}

/* ---------- Links im Inhalt ---------- */
body.wv2 .wp-site-blocks > :not(header):not(footer) a:not(.wp-block-button__link):not(.wp-element-button):not([class*="wv2-"]):not(.wp-block-post-title a) {
  color: var(--wv2-accent-light); text-decoration: underline; text-decoration-color: rgba(241, 171, 24, 0.45); text-underline-offset: 3px;
}
body.wv2 .wp-site-blocks > :not(header):not(footer) a:not(.wp-block-button__link):not(.wp-element-button):not([class*="wv2-"]):hover { color: var(--wv2-accent); }

/* ---------- Buttons ---------- */
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(.wp-block-button__link, .wp-element-button):not([class*="wv2-"]) {
  background: linear-gradient(135deg, var(--wv2-accent-light), var(--wv2-accent) 65%) !important;
  color: var(--wv2-primary-dark) !important;
  border: 0 !important; border-radius: 999px !important; font-weight: 600; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(241, 171, 24, 0.3), 0 12px 40px -10px rgba(241, 171, 24, 0.65);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(.wp-block-button__link, .wp-element-button):not([class*="wv2-"]):hover { transform: translateY(-3px); }

/* ---------- Listen, Zitate, Trenner, Bilder, Tabellen ---------- */
body.wv2 .wp-site-blocks > :not(header):not(footer) li::marker { color: var(--wv2-accent); }
body.wv2 .wp-site-blocks > :not(header):not(footer) .wp-block-quote {
  background: var(--wv2-glass-bg) !important; border: 1px solid var(--wv2-border-glass) !important; border-left: 3px solid var(--wv2-accent) !important;
  border-radius: 14px; padding: 1.4rem 1.6rem !important; color: var(--wv2-legacy-text) !important;
}
body.wv2 .wp-site-blocks > :not(header):not(footer) .wp-block-quote :is(p, cite, span, li) { color: var(--wv2-legacy-text) !important; }
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(video, iframe, embed):not([class*="wv2-"]) { max-width: 100%; height: auto; }
body.wv2 .wp-site-blocks > :not(header):not(footer) iframe:not([class*="wv2-"]) { aspect-ratio: 16 / 9; }

/* Complianz (Cookie-Richtlinie): eigene graue Kaesten im Glas-Look */
body.wv2 .cookies-per-purpose, body.wv2 .cmplz-document :is(.cookies-per-purpose, table) {
  background: var(--wv2-glass-bg) !important; color: var(--wv2-legacy-text) !important;
  border: 1px solid var(--wv2-border-glass) !important; border-radius: 14px;
}
body.wv2 .cookies-per-purpose :is(p, span, div, td, th, li, h1, h2, h3, h4, h5, h6, strong) { color: var(--wv2-legacy-text) !important; }
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(hr, .wp-block-separator) { border-color: var(--wv2-border-glass) !important; background-color: var(--wv2-border-glass) !important; }
body.wv2 .wp-site-blocks > :not(header):not(footer) .wp-block-image img { border-radius: 16px; }
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(table, th, td) { border-color: var(--wv2-border-glass) !important; color: var(--wv2-legacy-text); }

/* ---------- Formulare (Forminator, WPForms, Standard) ---------- */
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), textarea, select) {
  background: rgba(255, 255, 255, 0.06) !important; color: #eef5f5 !important;
  border: 1px solid var(--wv2-border-glass) !important; border-radius: 12px !important;
}
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(label, .forminator-label, .wpforms-field-label, legend) { color: var(--wv2-legacy-text) !important; }
body.wv2 .wp-site-blocks > :not(header):not(footer) :is(input[type="submit"], button[type="submit"], .forminator-button-submit, .wpforms-submit) {
  background: linear-gradient(135deg, var(--wv2-accent-light), var(--wv2-accent) 65%) !important;
  color: var(--wv2-primary-dark) !important; border: 0 !important; border-radius: 999px !important; font-weight: 600;
}
