/*
Theme Name: AfD Karlsruhe
Theme URI: https://afd-ka.de
Author: AfD Kreisverband Karlsruhe
Description: Ruhiges, helles Design mit großer Typografie für den Kreisverband und die Fraktion. Systemschrift, Dunkelmodus, ohne externe Dienste und ohne Cookies.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: afd-karlsruhe
*/

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.12);
  --blue: #009ee0;
  --link: #0070a8;
  --navy: #0b1f3a;
  --navy-2: #12315a;
  --on-navy: #ffffff;
  --on-navy-muted: #b5c7df;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #161617;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, 0.16);
    --link: #4cc3f5;
    --navy: #0b1f3a;
    --navy-2: #12315a;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.bar { max-width: 1080px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand img { height: 28px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav a { color: var(--ink); font-size: 13px; opacity: .8; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav .cta { background: var(--blue); color: #06192f; opacity: 1; padding: 6px 14px; border-radius: 980px; font-weight: 600; }
.nav .cta:hover { filter: brightness(1.08); }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; color: var(--ink); cursor: pointer; }
.menu-btn span { display: block; width: 20px; height: 2px; background: currentColor; margin: 5px auto; border-radius: 2px; transition: transform .25s, opacity .25s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { text-align: center; padding: 112px 24px 72px; }
.hero h1 { font-size: clamp(44px, 8.5vw, 100px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; max-width: 12em; margin: 0 auto; }
.hero .lead { font-size: clamp(19px, 2.4vw, 28px); color: var(--muted); max-width: 26em; margin: 24px auto 0; line-height: 1.3; font-weight: 400; }
.hero-links { margin-top: 28px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; font-size: 19px; }
.hero-links a::after { content: " ›"; }
.hero-enter { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-enter.d2 { animation-delay: .12s; }
.hero-enter.d3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Feature card */
.feature { max-width: 1080px; margin: 0 auto 0; padding: 0 24px; }
.feature-card {
  background: radial-gradient(900px 420px at 85% 120%, rgba(0, 158, 224, .45), transparent 60%), var(--navy);
  color: var(--on-navy); border-radius: 32px; padding: clamp(36px, 7vw, 80px);
  display: grid; gap: 22px;
}
.feature-card small { font-size: 17px; font-weight: 600; color: var(--blue); }
.feature-card h2 { font-size: clamp(30px, 5vw, 56px); line-height: 1.07; letter-spacing: -0.025em; font-weight: 700; max-width: 17em; }
.feature-card p { font-size: clamp(17px, 1.9vw, 21px); color: var(--on-navy-muted); max-width: 34em; line-height: 1.4; }
.feature-card a { color: #6fd0ff; font-size: 19px; width: fit-content; }
.feature-card a::after { content: " ›"; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; }
.stat { background: rgba(255, 255, 255, .07); border-radius: 18px; padding: 20px 22px; }
.stat b { display: block; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -0.02em; line-height: 1.1; }
.stat span { display: block; margin-top: 6px; font-size: 15px; color: var(--on-navy-muted); line-height: 1.3; }

/* Sections */
.block { padding: 112px 24px; }
.block.alt { background: var(--bg-alt); }
.block.dark { background: var(--navy); color: var(--on-navy); }
.wrap { max-width: 1080px; margin: 0 auto; }
.block h2 { font-size: clamp(32px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; text-align: center; }
.block .sub { font-size: clamp(18px, 2.1vw, 24px); color: var(--muted); text-align: center; max-width: 30em; margin: 16px auto 0; line-height: 1.35; }
.block.dark .sub { color: var(--on-navy-muted); }
.block.dark a { color: #6fd0ff; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.card { background: var(--bg-alt); border-radius: 26px; padding: 32px; display: flex; flex-direction: column; gap: 12px; color: var(--ink); min-height: 280px; transition: transform .25s ease; }
.alt .card { background: var(--bg); }
a.card:hover { transform: translateY(-4px); text-decoration: none; }
.card .meta { font-size: 14px; color: var(--muted); }
.card h3 { font-size: 24px; line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; }
.card p { color: var(--muted); font-size: 17px; line-height: 1.4; }
.card .more { margin-top: auto; color: var(--link); font-size: 17px; }
.card .more::after { content: " ›"; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-top: 56px; }
.person { background: var(--bg-alt); border-radius: 26px; padding: 32px 20px 28px; text-align: center; }
.alt .person { background: var(--bg); }
.person img { width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 18px; object-fit: cover; background: var(--line); }
.person h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.person p { font-size: 15px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.person a { font-size: 15px; display: inline-block; margin-top: 10px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.panel { background: var(--bg-alt); border-radius: 26px; padding: clamp(28px, 4vw, 48px); }
.alt .panel { background: var(--bg); }
.panel h3 { font-size: 28px; letter-spacing: -0.02em; line-height: 1.12; margin-bottom: 12px; }
.panel p, .panel li { color: var(--muted); font-size: 18px; line-height: 1.45; }
.panel ul { padding-left: 20px; margin-top: 8px; }
.panel .btn { margin-top: 22px; }
.btn { display: inline-block; background: var(--blue); color: #06192f; padding: 12px 24px; border-radius: 980px; font-size: 17px; font-weight: 600; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1.5px currentColor; }

.podcast { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.podcast a { background: rgba(255, 255, 255, .1); color: #fff !important; padding: 12px 22px; border-radius: 980px; font-size: 17px; }
.podcast a:hover { background: rgba(255, 255, 255, .18); text-decoration: none; }

/* Subpages */
.page-head { text-align: center; padding: 96px 24px 40px; }
.page-head h1 { font-size: clamp(38px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700; max-width: 14em; margin: 0 auto; }
.page-head p { font-size: clamp(18px, 2.2vw, 24px); color: var(--muted); max-width: 28em; margin: 18px auto 0; line-height: 1.35; }
.page-body { padding: 24px 24px 112px; }
.page-body .wrap > .cards { margin-top: 24px; }
.article { max-width: 700px; margin: 0 auto; font-size: 19px; line-height: 1.6; }
.article p { margin-top: 1.1em; }
.article h2 { text-align: left; font-size: 30px; margin-top: 1.6em; letter-spacing: -0.02em; }
.article blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 5px solid var(--blue); font-size: 23px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }
.article blockquote cite { display: block; margin-top: 10px; font-size: 16px; font-weight: 500; font-style: normal; color: var(--muted); }
.article .byline { color: var(--muted); font-size: 16px; margin-top: 0; text-align: center; }
.todo { background: #fff4c2; color: #4a3b00; padding: 2px 6px; border-radius: 6px; }
.legal { max-width: 700px; margin: 0 auto; font-size: 17px; line-height: 1.6; }
.legal h2 { text-align: left; font-size: 24px; margin-top: 1.8em; letter-spacing: -0.015em; }
.legal p, .legal ul { margin-top: .8em; }
.legal ul { padding-left: 22px; }
.table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 17px; }
.table td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td:first-child { color: var(--muted); width: 38%; padding-right: 16px; }

/* Footer */
.site-footer { background: var(--bg-alt); color: var(--muted); font-size: 13px; padding: 48px 24px 40px; line-height: 1.6; }
.site-footer .wrap { display: grid; gap: 28px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.foot-cols b { color: var(--ink); display: block; margin-bottom: 8px; font-size: 13px; }
.foot-cols a { color: var(--muted); display: block; padding: 2px 0; }
.foot-cols a:hover { color: var(--ink); }
.foot-legal { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 860px) {
  .cards, .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .block { padding: 80px 20px; }
  .hero { padding: 72px 20px 56px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 56px 0 0 0; background: var(--bg); flex-direction: column; align-items: stretch;
    gap: 0; padding: 12px 24px 40px; overflow-y: auto; display: none;
  }
  .menu-open .nav { display: flex; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav a { display: block; font-size: 24px; font-weight: 600; padding: 14px 0; opacity: 1; }
  .nav .cta { margin-top: 18px; text-align: center; font-size: 20px; padding: 14px; }
  .nav li:has(.cta) { border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-enter { animation: none; }
  a.card:hover { transform: none; }
}

/* ===== WordPress-Ergänzungen ===== */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.brand-logo { height: 28px; width: auto; max-width: 168px; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Menü: Element mit CSS-Klasse "cta" wird zur Schaltfläche */
.nav li.cta > a { background: var(--blue); color: #06192f; opacity: 1; padding: 6px 14px; border-radius: 980px; font-weight: 600; }
.nav li.cta > a:hover { filter: brightness(1.08); }

/* Untermenüs */
.nav li { position: relative; }
.nav .sub-menu { list-style: none; position: absolute; top: 100%; left: -14px; min-width: 230px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: none; box-shadow: 0 12px 40px rgba(0, 0, 0, .14); }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: block; }
.nav .sub-menu a { display: block; padding: 8px 12px; border-radius: 10px; font-size: 14px; white-space: nowrap; }
.nav .sub-menu a:hover { background: var(--bg-alt); }

/* Karten mit Bild */
.card-img { width: calc(100% + 64px); max-width: none; margin: -32px -32px 8px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 26px 26px 0 0; }
.more-link { text-align: center; margin-top: 36px; font-size: 19px; }
.empty { text-align: center; color: var(--muted); font-size: 19px; margin-top: 24px; }

/* Suche */
.searchform { display: flex; gap: 8px; max-width: 420px; }
.searchform input[type="search"] { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 980px; padding: 9px 16px; }
.searchform button { font: inherit; font-size: 15px; font-weight: 600; color: #06192f; background: var(--blue); border: 0; border-radius: 980px; padding: 9px 18px; cursor: pointer; }
.head-search { display: flex; justify-content: center; margin-top: 24px; }
.head-search .searchform { width: 100%; }

/* Seitenzahlen */
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 16px; border-radius: 980px; background: var(--bg-alt); color: var(--ink); font-size: 16px; }
.pagination .page-numbers.current { background: var(--blue); color: #06192f; font-weight: 600; }
.pagination a.page-numbers:hover { text-decoration: none; filter: brightness(.96); }

/* Beitrag und Seiteninhalt aus dem Editor */
.post-image { margin: 28px -60px 8px; }
.post-image img { width: 100%; height: auto; border-radius: 26px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { height: auto; border-radius: 14px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }
.entry-content ul, .entry-content ol { margin: 1em 0 1em 1.4em; }
.entry-content li + li { margin-top: .3em; }
.entry-content h2, .entry-content h3, .entry-content h4 { text-align: left; letter-spacing: -0.02em; line-height: 1.15; margin-top: 1.6em; }
.entry-content h3 { font-size: 24px; }
.entry-content h4 { font-size: 20px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 17px; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content .wp-block-button__link { background: var(--blue); color: #06192f; border-radius: 980px; padding: 12px 24px; font-weight: 600; text-decoration: none; }
.entry-content .wp-block-quote, .entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 5px solid var(--blue); font-size: 23px; line-height: 1.4; font-weight: 600; }
.entry-content blockquote cite { display: block; margin-top: 10px; font-size: 16px; font-weight: 500; font-style: normal; color: var(--muted); }
.entry-content .alignleft { float: left; margin: 0 24px 12px 0; }
.entry-content .alignright { float: right; margin: 0 0 12px 24px; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.article .back { margin-top: 2.4em; }
.page-content { max-width: 860px; margin: 0 auto; font-size: 19px; line-height: 1.6; }
.page-content > p { margin-top: 1.1em; }
.page-content .people, .page-content .split, .page-content .cards { font-size: 16px; }
.page-blocks .people, .page-blocks .split { margin-top: 40px; }
.page-blocks h2 { text-align: center; }
.page-blocks .entry-content > p { text-align: center; color: var(--muted); font-size: 21px; max-width: 28em; margin: 14px auto 0; }
.full-width { width: 100%; }

/* Fußzeile */
.foot-top { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.foot-top b { color: var(--ink); display: block; font-size: 15px; margin-bottom: 4px; }
.foot-top a { color: var(--muted); }
.foot-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-menu a { color: var(--link); }

@media (max-width: 860px) {
  .nav li.cta > a { margin-top: 18px; text-align: center; font-size: 20px; padding: 14px; display: block; }
  .nav li.cta { border: 0; }
  .nav .sub-menu { display: block; position: static; border: 0; box-shadow: none; background: none; padding: 0 0 8px 16px; min-width: 0; }
  .nav .sub-menu a { font-size: 19px; font-weight: 500; padding: 10px 0; white-space: normal; }
  .nav .sub-menu a:hover { background: none; }
  .admin-bar .nav { top: 102px; }
  .post-image { margin: 24px 0 8px; }
  .card-img { width: calc(100% + 64px); }
}

/* Fußzeile auf kleinen Bildschirmen: nichts darf überstehen */
.site-footer .wrap > * { min-width: 0; }
.foot-search { flex: 1 1 260px; min-width: 0; max-width: 420px; }
.foot-search .searchform { max-width: none; }
.foot-legal > * { min-width: 0; }

/* Dunkle Karte bündig mit den Kartenreihen */
.feature { max-width: 1128px; }
