/*
Theme Name: onlinebanken24
Theme URI: https://www.onlinebanken24.com/
Author: onlinebanken24
Description: Vergleichsportal-Theme für onlinebanken24.com nach dem klarbank-Entwurf: Salbei, Mint, Creme, Inter (lokal eingebunden). Benötigt das Plugin „onlinebanken24 Core“ für Vergleichstabellen und Bankprofile.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onlinebanken24
*/

/* onlinebanken24.com — Stylesheet
   Basis: klarbank-Prototyp (Salbei/Mint/Creme, Inter). Erweitert um
   Vergleichstabelle, Bankprofile, Ratgeber-Langtexte und Rechtsseiten.
   Schrift lokal eingebunden (kein Google-Fonts-Aufruf). */

@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #16251f;
  --sage: #315b4c;
  --sage-deep: #244639;
  --mint: #dcefe7;
  --mint-line: #a9d5c5;
  --cream: #f7f8f5;
  --white: #ffffff;
  --muted: #68756f;
  --muted-2: #4c5c55;
  --line: #e1e7e3;
  --accent: #e9b949;
  --amber-bg: #fff8e8;
  --amber-line: #f0dfae;
  --amber-ink: #6e5a25;
  --ok: #167052;
  --no: #b0473a;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 9px; --r-md: 13px; --r-lg: 18px;
  --shadow: 0 20px 45px rgba(30, 55, 45, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 4px;
}
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); letter-spacing: -.045em; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); letter-spacing: -.03em; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; color: var(--sage); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--sage); color: #fff; padding: .5rem .9rem; border-radius: var(--r-sm); z-index: 99; }
.skip:focus { left: 8px; }

/* --- Header ---------------------------------------------------------- */
header.site {
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { font-size: 21px; font-weight: 850; letter-spacing: -.7px; white-space: nowrap; }
.brand i { font-style: normal; color: var(--sage); }
.nav nav { display: flex; gap: 25px; font-size: 14px; font-weight: 650; color: var(--muted-2); }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--sage); }
.navbtn { background: var(--sage); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 750; font-size: 14px; white-space: nowrap; }
.navbtn:hover { background: var(--sage-deep); }
.nav__toggle { display: none; }
@media (max-width: 800px) {
  .nav { padding-block: 12px; }
  .nav__toggle { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 650; color: var(--muted-2); cursor: pointer; }
  .nav nav { display: none; width: 100%; flex-direction: column; gap: 0; order: 3; }
  .nav[data-open="true"] nav { display: flex; }
  .nav nav a { padding: 12px 0; border-top: 1px solid var(--line); }
  .navbtn { display: none; }
}

/* --- Hero (Startseite) ----------------------------------------------- */
.hero { padding: 76px 0 66px; background: linear-gradient(135deg, #f5f9f6, #e9f3ee); }
.grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 { margin: 13px 0 20px; max-width: 14ch; }
.lead { font-size: 18px; color: #53635c; max-width: 610px; }
.hero-actions { display: flex; gap: 10px; margin-top: 25px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: var(--r-sm); padding: 12px 18px; font-weight: 800; font-size: 15px; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--sage); color: #fff; }
.btn.primary:hover { background: var(--sage-deep); }
.btn.light { background: #fff; color: var(--sage); border: 1px solid var(--line); }
.btn.light:hover { border-color: var(--mint-line); background: var(--mint); }
.btn.sm { padding: 8px 12px; font-size: 13px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 25px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 9px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--ink); }
.chip:hover { border-color: var(--mint-line); }
.chip.active, .chip[aria-pressed="true"] { background: var(--mint); border-color: var(--mint-line); color: var(--sage); font-weight: 750; }

/* --- Sections -------------------------------------------------------- */
section.block { padding: 56px 0; }
section.block + section.block { padding-top: 8px; }
.sectiontop { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 23px; flex-wrap: wrap; }
.sectiontop p { margin: 4px 0 0; }
.sectiontop > a { font-weight: 700; color: var(--sage); white-space: nowrap; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.cards--4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 21px; display: flex; flex-direction: column; }
.bankhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bankname { display: flex; gap: 12px; align-items: center; min-width: 0; }
.bankname b { font-size: 15px; }
.bankname .small { display: block; font-weight: 500; }
.logo { width: 44px; height: 44px; flex: none; border-radius: 11px; background: #edf3ef; display: grid; place-items: center; font-weight: 850; color: var(--sage); font-size: 13px; letter-spacing: -.02em; }
.logo--lg { width: 64px; height: 64px; border-radius: 15px; font-size: 17px; }
.pill { font-size: 11px; background: var(--mint); color: var(--sage); padding: 5px 8px; border-radius: 999px; font-weight: 800; white-space: nowrap; }
.pill--neutral { background: #eef1ef; color: var(--muted-2); }
.price { font-size: 29px; font-weight: 850; margin-top: 18px; letter-spacing: -.03em; }
.price small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
ul.clean { list-style: none; padding: 0; margin: 15px 0; }
ul.clean li { padding: 7px 0; border-bottom: 1px solid #eef1ef; font-size: 14px; }
ul.clean li:last-child { border: 0; }
.card .actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.check { color: var(--ok); font-weight: 800; }
.cross { color: var(--no); font-weight: 800; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 24px; border-radius: 14px; }
.stat b { font-size: 28px; letter-spacing: -.03em; display: block; }

.articlegrid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.article { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 22px; min-height: 155px; display: flex; flex-direction: column; gap: 6px; }
.article .eyebrow { margin-bottom: 4px; }
.article h3 { font-size: 1.1rem; }
.article p { margin: 0; font-size: 14px; color: var(--muted); }
.article--lead { background: var(--sage); color: #fff; }
.article--lead .eyebrow { color: #cfe4da; }
.article--lead p { color: #d7e7e1; }
.articlegrid--all { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* --- Seitenkopf ------------------------------------------------------ */
.pagehead { padding: 52px 0 32px; }
.pagehead h1 { margin: 10px 0 12px; max-width: 22ch; }
.pagehead .lead { margin-bottom: 0; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--sage); text-decoration: underline; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.meta-row strong { color: var(--muted-2); font-weight: 650; }

/* --- Vergleich (Filter + Ergebnisliste) ------------------------------ */
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin: 20px 0; align-items: center; }
.select { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; color: var(--muted-2); font: inherit; font-size: 14px; }
.toggle { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 13px; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--sage); margin: 0; }
.toggle:has(input:checked) { background: var(--mint); border-color: var(--mint-line); color: var(--sage); font-weight: 700; }
.results-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 10px; }

.results { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.result { display: grid; grid-template-columns: 2.1fr 1fr 1fr 1fr 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.result:last-child { border: 0; }
.result__name { display: flex; gap: 12px; align-items: center; min-width: 0; }
.result__name b { display: block; font-size: 15px; }
.result__name .small { display: block; }
.metric b { display: block; font-size: 17px; letter-spacing: -.02em; }
.metric span { font-size: 12px; color: var(--muted); display: block; line-height: 1.35; }
.metric--ok b { color: var(--ok); }
.results__empty { padding: 28px 20px; color: var(--muted); }
.results__head { display: grid; grid-template-columns: 2.1fr 1fr 1fr 1fr 1fr auto; gap: 18px; padding: 10px 20px; background: #f3f6f4; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
@media (max-width: 800px) {
  .result, .results__head { grid-template-columns: 1fr 1fr; }
  .results__head { display: none; }
  .result__name { grid-column: 1 / -1; }
  .result .actions { grid-column: 1 / -1; }
}
.stand-note { background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 12px; padding: 14px 16px; color: var(--amber-ink); font-size: 13px; margin: 16px 0 0; }

/* --- Bankprofil ------------------------------------------------------ */
.detailbox { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.twocol { display: grid; grid-template-columns: 1.5fr .8fr; gap: 18px; align-items: start; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.facts--4 { grid-template-columns: repeat(4, 1fr); }
.fact { border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: #fff; }
.fact b { display: block; font-size: 17px; letter-spacing: -.02em; }
.fact span { font-size: 12px; color: var(--muted); }
.prosncons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.prosncons .card h3 { margin-bottom: 6px; }
.prosncons ul { margin: 0; padding-left: 0; list-style: none; }
.prosncons li { padding: 7px 0 7px 22px; border-bottom: 1px solid #eef1ef; font-size: 14px; position: relative; }
.prosncons li:last-child { border: 0; }
.prosncons li::before { position: absolute; left: 0; top: 7px; font-weight: 800; }
.prosncons .pro li::before { content: "✓"; color: var(--ok); }
.prosncons .con li::before { content: "–"; color: var(--no); }
.fazit { border-left: 4px solid var(--sage); background: var(--mint); border-radius: 0 12px 12px 0; padding: 16px 18px; margin: 18px 0; }
.fazit p { margin: 0; }
.fazit .eyebrow { margin-bottom: 6px; display: block; }
.sources { font-size: 13px; color: var(--muted); }
.sources a { color: var(--sage); text-decoration: underline; text-decoration-color: rgba(49, 91, 76, .35); word-break: break-all; }
.tagline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* --- Fließtext (Ratgeber, Rechtsseiten, Textabschnitte) --------------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; padding-bottom: 60px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.prose { max-width: 720px; min-width: 0; font-size: 17px; line-height: 1.65; }
.prose > p.lede { display: none; }
.prose h2 { margin: 2.4rem 0 .8rem; scroll-margin-top: 90px; }
.prose h3 { margin: 1.6rem 0 .5rem; font-size: 1.12rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--sage); font-weight: 700; }
.prose a { color: var(--sage); text-decoration: underline; text-decoration-color: rgba(49, 91, 76, .35); text-underline-offset: .15em; }
.prose a:hover { text-decoration-color: var(--sage); }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: #eef1ef; padding: .1em .35em; border-radius: 4px; }
.prose strong { font-weight: 700; }

.table-wrap { margin: 1.4rem 0 1.8rem; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.prose table, .detailbox table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 14px; line-height: 1.45; }
.prose thead th, .detailbox thead th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: #f3f6f4; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose tbody td, .detailbox tbody td { padding: 10px 14px; border-bottom: 1px solid #eef1ef; vertical-align: top; }
.prose tbody tr:last-child td, .detailbox tbody tr:last-child td { border-bottom: 0; }
.prose tbody td:first-child { font-weight: 600; }
.detailbox .table-wrap { border: 0; border-radius: 0; margin: 0; }
.detailbox table { min-width: 0; }
.detailbox tbody td:first-child { color: var(--muted); width: 38%; }

.hinweis { margin: 1.5rem 0; padding: 14px 16px; border-radius: 12px; font-size: 15px; border: 1px solid var(--line); background: #fff; }
.hinweis p { margin: 0; }
.hinweis--info { background: var(--mint); border-color: var(--mint-line); }
.hinweis--achtung { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }
.hinweis--tipp { background: #fff; border-color: var(--mint-line); }
.hinweis strong { font-weight: 800; }

.faq { margin-top: 2.5rem; }
.faq h3 { font-size: 1.02rem; margin: 1.3rem 0 .3rem; padding-left: 1.5rem; position: relative; }
.faq h3::before { content: "?"; position: absolute; left: 0; top: 0; color: var(--sage); font-weight: 900; }
.faq p { color: var(--muted-2); font-size: 15px; }

/* Seitenleiste */
.side { display: grid; gap: 16px; }
@media (min-width: 901px) { .side { position: sticky; top: 90px; } }
.side .card h3 { margin-bottom: 8px; font-size: .95rem; }
.side ul.clean { margin: 0; }
.side ul.clean li a:hover { color: var(--sage); }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li a { display: block; padding: 6px 0 6px 10px; border-left: 2px solid var(--line); font-size: 13px; color: var(--muted-2); }
.toc li a:hover, .toc li a.is-active { border-left-color: var(--sage); color: var(--sage); }

/* --- Footer ---------------------------------------------------------- */
.notice { background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 12px; padding: 15px; color: var(--amber-ink); font-size: 13px; }
footer.site { border-top: 1px solid var(--line); padding: 36px 0 28px; color: var(--muted); font-size: 13px; background: #fff; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot h2 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.foot a:hover { color: var(--sage); text-decoration: underline; }
.foot .brand { font-size: 18px; color: var(--ink); }
.foot p { margin: 8px 0 0; line-height: 1.5; }
.colophon { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 800px) {
  .grid, .twocol, .prosncons { grid-template-columns: 1fr; }
  .grid { gap: 28px; }
  .hero { padding: 48px 0 40px; }
  .cards, .stats, .articlegrid { grid-template-columns: 1fr; }
  .facts--4 { grid-template-columns: 1fr 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .pagehead { padding: 36px 0 24px; }
}
@media (max-width: 480px) { .facts, .facts--4, .foot { grid-template-columns: 1fr; } }

/* --- WordPress-Anpassungen ------------------------------------------ */
.prose > *:first-child { margin-top: 0; }
.prose figure.wp-block-table { margin: 1.4rem 0 1.8rem; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.prose figure.wp-block-table table { border: 0; }
.prose .wp-block-group.hinweis { margin: 1.5rem 0; }
.prose .wp-block-group.faq { margin-top: 2.5rem; }
.prose ul.wp-block-list, .prose ol.wp-block-list { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose p:empty { display: none; }
.prose img, .prose figure img { max-width: 100%; height: auto; }
.prose figure { margin-inline: 0; }
body.admin-bar header.site { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.site { top: 46px; } }
