/*
Theme Name: ZuB 2026
Theme URI: https://zub.berlin/
Author: ZuB
Description: Schlankes, barrierebewusstes Theme für die ZuB-Website (Zusammen Bunter). Benötigt das Plugin "ZuB Core" für Leistungen, Standorte, Team und Geschichte.
Version: 2.1.0
Requires at least: 6.3
Requires PHP: 8.0
Text Domain: zub-2026
*/

/* ---------- Gestaltungswerte (eine Quelle für alle Farben) ---------- */
:root {
  --zub-gradient: linear-gradient(90deg, #98c8bf 0%, #e7cc44 28%, #e19239 52%, #9e3b37 78%, #556885 100%);
  --zub-ink: #222725;
  --zub-muted: #4d5a54;
  --zub-paper: #fff;
  --zub-line: #dde2df;
  --zub-soft: #f4f5f3;
  --zub-link: #236c94;
  --zub-link-hover: #9e3b37;
  --zub-focus: #236c94;
  --zub-action: #30483c;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--zub-ink); background: var(--zub-paper); font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--zub-link); text-underline-offset: .18em; }
a:hover { color: var(--zub-link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--zub-focus); outline-offset: 3px; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.2; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; margin: 0; padding: 12px 18px; clip: auto; clip-path: none; background: #fff; color: var(--zub-ink); z-index: 100000; box-shadow: 0 2px 12px #0003; }

/* ---------- Kopfbereich ---------- */
.site-header { border-bottom: 1px solid var(--zub-line); }
.site-header-inner, .site-main, .site-footer-inner { width: min(1160px, calc(100% - 40px)); margin: auto; }
.site-header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 12px 0; }
.site-title { font-size: 1.5rem; font-weight: 750; text-decoration: none; color: var(--zub-ink); }
.custom-logo { display: block; width: auto; max-height: 64px; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 6px 0; text-decoration: none; font-weight: 600; color: var(--zub-ink); }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .3em; }
.nav-toggle { display: none; padding: 10px 16px; border: 2px solid var(--zub-ink); border-radius: 8px; background: #fff; color: var(--zub-ink); font-weight: 600; }
.zub-gradient-line { height: 6px; background: var(--zub-gradient); }

/* ---------- Inhalt ---------- */
.site-main { min-height: 60vh; padding: 40px 0 72px; }
.entry-content { max-width: 850px; }
.entry-content--full { max-width: none; }
.entry-content img { max-width: 100%; height: auto; }
.note { font-size: .9rem; color: var(--zub-muted); }
.eyebrow { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .06em; color: var(--zub-muted); }

.hero { padding: clamp(32px, 8vw, 96px) 5%; background: linear-gradient(120deg, #edf6f2, #fff8df); border-radius: 18px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.05; margin: 12px 0; }
.hero-text { max-width: 760px; font-size: 1.15rem; color: var(--zub-muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin: 24px 0; }
.tile { overflow-wrap: anywhere; display: block; border: 1px solid var(--zub-line); border-top: 5px solid var(--c, #98c8bf); border-radius: 12px; padding: 20px; background: #fff; color: var(--zub-ink); text-decoration: none; }
a.tile:hover { background: #f6f8f6; color: var(--zub-ink); }
.tile h3 { margin: 0 0 8px; font-size: 1.15rem; }
.tile h3 a { color: inherit; }
.tile p { margin: 0 0 8px; }
.person-role { color: var(--zub-muted); }
.portrait, .portrait-img { display: block; width: 100%; height: 150px; margin-bottom: 12px; border-radius: 8px; object-fit: cover; }
.portrait { display: grid; place-items: center; background: #eceee9; color: var(--zub-muted); font-size: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; }
.chip { display: inline-block; padding: 10px 16px; border: 2px solid var(--c); background: var(--c); border-radius: 24px; text-decoration: none; font-weight: 600; }
.chip:hover { color: inherit; filter: brightness(.95); }

.social { margin-top: 36px; padding: 32px; text-align: center; background: var(--zub-soft); border-radius: 12px; }
.action { display: inline-block; margin: 5px; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--zub-action); color: #fff; text-decoration: none; }
.action:hover { color: #fff; background: #1f3329; }

.zub-address { font-style: normal; margin: 20px 0; }
.zub-address p { margin: 4px 0; }
.region-group h2 { margin-top: 40px; padding-bottom: 6px; border-bottom: 3px solid var(--zub-line); }
.region-name { margin: 24px 0 0; font-size: 1.1rem; color: var(--zub-muted); }

.service-detail h1 { padding-top: 14px; border-top: 8px solid var(--c, #98c8bf); }

/* ---------- Geschichte ---------- */
.history { max-width: 1000px; margin: auto; }
.history-head, .history-foot { padding: clamp(24px, 5vw, 64px); background: #edf4ef; border-radius: 16px; }
.history-head { border-top: 7px solid transparent; border-image: var(--zub-gradient) 1; }
.history h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 8px 0 16px; }
.timeline { margin: 32px 16px; padding: 0 0 0 24px; list-style: none; border-left: 3px solid #8acac1; }
.timeline li { position: relative; padding: 0 0 30px; }
.timeline li::before { content: ""; position: absolute; left: -33px; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: var(--zub-link); border: 2px solid #fff; }
.timeline-year { color: #386451; }
.timeline h2 { margin: 6px 0; font-size: 1.5rem; }

/* ---------- FAQ ---------- */
.zub-faq-item { border-bottom: 1px solid var(--zub-line); padding: 12px 0; }
.zub-faq-item summary { cursor: pointer; font-weight: 650; }

/* ---------- Suche, Pagination ---------- */
.search-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.search-form input[type=search] { flex: 1; min-width: 200px; padding: 10px 12px; border: 2px solid #789486; border-radius: 8px; font: inherit; }
.pagination .nav-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Fußbereich ---------- */
.site-footer { background: var(--zub-ink); color: #fff; padding: 36px 0 48px; }
.site-footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-title { margin: 0 0 8px; font-size: 1.5rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration-thickness: 3px; }
.site-footer a:focus-visible { outline-color: #fff; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .site-main { padding: 28px 0 48px; }
  .site-title { font-size: 1.2rem; }
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; flex-basis: 100%; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 10px 0; }
  .grid { grid-template-columns: 1fr; }
}

/* ---------- Ruhige Darstellung ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Editor-Blöcke in Seiten (Startseite, Geschichte, Kontakt) ---------- */
.entry-content .grid > *, .entry-content .hero > *, .entry-content .history-head > *, .entry-content .history-foot > *, .entry-content .social > *, .tile > * { margin-block-start: 0; }
.tile { position: relative; }
.tile:hover { background: #f6f8f6; }
.tile h3 a { text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; }
.hero > * + *, .history-head > * + * { margin-block-start: 12px; }
.social .wp-block-buttons { justify-content: center; }
.wp-block-button__link { display: inline-block; padding: 10px 18px; border-radius: 8px; background: var(--zub-action); color: #fff; text-decoration: none; }
.wp-block-button__link:hover { background: #1f3329; color: #fff; }
.history-foot .wp-block-buttons { margin-top: 12px; }

header,                     
.site-header {
    position: relative;      }

.site-header::after {
    content: "";
    position: fixed;
    left: 0;                 
    top: 150px;               
    width: clamp(260px, 20vw, 360px);  
    aspect-ratio: 1 / 2;               
    background: url("/wp-content/uploads/2026/11/zub_autismus_streifen.svg") no-repeat left top / contain;
    pointer-events: none;   
    z-index: 1;
}

@media (max-width: 600px) {
    .site-header::after { display: none; }   /* auf Mobil ausblenden, falls nötig */
}
