/* ==========================================================
   Design-Tokens  (Farben aus dem Figma-Entwurf übernommen)
   Handschrift-Schrift: bitte durch die Figma-Schrift ersetzen
   ========================================================== */
:root {
  --bg: #fbfbfb;
  --ink: #111;
  --blue: #cad7f9;
  --yellow: #ffe100;
  --white: #fff;

  --font-ui: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-hand: "Shadows Into Light", "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", cursive;
  --font-lato: "Lato", "Helvetica Neue", Arial, sans-serif;
  --hl-hand-scale: 1.1;   /* Handschrift im Hero leicht größer, damit beide Hälften optisch gleich hoch wirken */

  --gutter: clamp(20px, 4.5vw, 64px);
  --maxw: 1440px;
  --header-h: 84px;
  --adminbar: 0px;
  --radius: 0;

  /* Einheitliche Typo-Skala */
  --fs-body: 18px;      /* Fließtext, Teaser, Beschreibungen */
  --fs-small: 16px;     /* Meta, Orte, Checkbox */
  --fs-nav: 17px;       /* Navigation */
  --fs-card: clamp(22px, 2.1vw, 28px);   /* Titel: News, Termine, Projekte */
  --fs-h2: clamp(46px, 6vw, 84px);       /* Handschrift-Überschriften */
}

.admin-bar { --adminbar: 32px; }
@media (max-width: 782px) { .admin-bar { --adminbar: 46px; } }
@media (max-width: 600px) { .admin-bar { --adminbar: 0px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--adminbar) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #1a3cff; outline-offset: 3px; border-radius: 4px; }
.sr-only, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ==========================================================
   HEADER  – Struktur wie international-institute.de
   Logo · Hauptnavigation (Aktuell … Kontakt) · DE|EN · Social
   ========================================================== */
.site-header {
  position: sticky; top: var(--adminbar); z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.header-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
}
.logo { flex: none; display: block; }
.logo img { height: 40px; width: auto; }

.main-nav { margin-left: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(10px, 1.2vw, 24px); }
.nav-list a {
  display: block; padding: 8px 2px; white-space: nowrap;
  font-size: var(--fs-nav); text-decoration: none; letter-spacing: .01em;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--ink); }
.nav-list a[aria-current="page"],
.nav-list .current-menu-item > a,
.nav-list .current-menu-ancestor > a { border-bottom-color: var(--ink); font-weight: 500; }

.header-tools { display: flex; align-items: center; gap: 18px; flex: none; }
.lang { font-size: var(--fs-small); display: flex; gap: 6px; align-items: center; }
.lang a { text-decoration: none; opacity: .55; }
.lang a[aria-current="true"] { opacity: 1; font-weight: 700; }
.lang span { opacity: .4; }

.search-toggle, .burger {
  appearance: none; background: none; border: 0; padding: 6px; cursor: pointer;
  font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 8px;
}
.search-toggle .label { font-size: var(--fs-nav); }
.socials { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; }
.socials a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.socials a:hover { background: rgba(0,0,0,.08); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }

.burger { display: none; }
.header-tools .socials { display: none; }
@media (min-width: 1760px) { .header-tools .socials { display: flex; } }
@media (max-width: 1499px) { .search-toggle .label { display: none; } }
.burger-lines { width: 30px; height: 20px; position: relative; display: block; }
.burger-lines::before, .burger-lines::after, .burger-lines i {
  content: ""; position: absolute; left: 0; right: 0; height: 3px; background: currentColor; border-radius: 2px;
  transition: transform .25s, opacity .2s, top .25s;
}
.burger-lines::before { top: 0; }
.burger-lines i { top: 8.5px; }
.burger-lines::after { top: 17px; }
.burger[aria-expanded="true"] .burger-lines::before { top: 8.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger-lines::after { top: 8.5px; transform: rotate(-45deg); }
.burger[aria-expanded="true"] .burger-lines i { opacity: 0; }

/* Suchleiste */
.search-bar { display: none; border-top: 1px solid rgba(0,0,0,.08); background: var(--white); }
.search-bar.is-open { display: block; }
.search-bar .search-form { max-width: var(--maxw); margin-inline: auto; padding: 14px var(--gutter); display: flex; gap: 12px; }
.search-form input[type="search"] {
  flex: 1; font: inherit; font-size: var(--fs-body); padding: 10px 14px; border: 2px solid var(--ink); border-radius: 10px; background: #fff;
}
.search-form button {
  font: inherit; font-size: var(--fs-body); padding: 10px 22px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; cursor: pointer;
}

/* Tablet & Mobil: Navigation wird zum Vollbild-Menü */
@media (max-width: 1339px) {
  .burger { display: inline-flex; }
  .main-nav {
    position: fixed; inset: calc(var(--header-h) + var(--adminbar)) 0 0 0; margin: 0;
    background: var(--bg);
    padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
    overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .main-nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav-list { flex-direction: column; gap: 0; }
  .main-nav, .main-nav a, .main-nav .nav-list a { font-family: var(--font-lato); }
  .nav-list a {
    font-weight: 400; font-size: clamp(28px, 7vw, 44px); line-height: 1.15;
    padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.1);
  }
  .nav-list a:hover { border-bottom-color: rgba(0,0,0,.1); background: var(--blue); }
  .nav-socials { display: flex; margin-top: 28px; }
}
.nav-socials { display: none; }
body.menu-open { overflow: hidden; }
@media (max-width: 520px) {
  .search-toggle .label { display: none; }
  .header-inner { gap: 8px; }
  .header-tools { gap: 8px; }
  .lang { font-size: 14px; }
  .logo { flex: 0 1 190px; min-width: 110px; }
  .logo img { width: 100%; height: auto; }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero { padding-block: clamp(28px, 5vw, 70px) clamp(40px, 6vw, 90px); overflow: hidden; }
.collage {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(28px, 4.4vw, 64px);
  gap: 0;
  position: relative;
}
.collage h1 {
  grid-column: 2 / 10; grid-row: 1 / 3;
  margin: 0 0 -.14em; z-index: 3; align-self: end; white-space: nowrap;
  font-family: var(--font-lato); font-weight: 400;
  font-size: clamp(30px, 5.6vw, 84px); line-height: .95; letter-spacing: .01em;
  text-transform: uppercase;
}
.collage figure { margin: 0; overflow: hidden; }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.c1 { grid-column: 2 / 8;  grid-row: 3 / 10;  z-index: 2; }
.c2 { grid-column: 9 / 13; grid-row: 1 / 8;  z-index: 1; }
.c3 { grid-column: 7 / 11; grid-row: 9 / 14; z-index: 3; outline: 8px solid var(--bg); }

@media (max-width: 720px) {
  .collage { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 15vw; }
  .collage h1 { grid-column: 1 / 7; grid-row: 1 / 2; font-size: clamp(24px, 8vw, 60px); }
  .c1 { grid-column: 1 / 6; grid-row: 2 / 6; }
  .c2 { grid-column: 3 / 7; grid-row: 6 / 9; }
  .c3 { grid-column: 1 / 5; grid-row: 8 / 11; outline: 0; }
}

/* ==========================================================
   Gemeinsame Bausteine
   ========================================================== */
.section-title {
  font-family: var(--font-lato); font-weight: 400;
  font-size: var(--fs-h2); line-height: 1; margin: 0;
}
/* Überschriften-Mix: erste Hälfte Lato, Ende Shadows Into Light */
.hl-sans { font-family: var(--font-lato); font-weight: 400; }
.hl-hand { font-family: var(--font-hand); font-weight: 400; font-size: calc(1em * var(--hl-hand-scale)); }
.bubble-btn {
  display: inline-block; font-family: var(--font-hand); font-size: 26px; line-height: 1;
  text-decoration: none; padding: 16px 30px;
  border: 2.5px solid var(--ink);
  border-radius: 58% 42% 55% 45% / 60% 52% 48% 40%;
  transition: background .2s, transform .2s;
}
.bubble-btn:hover { background: var(--ink); color: #fff; transform: rotate(-2deg); }
.more-link { text-decoration: none; font-size: var(--fs-body); border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.more-link:hover { border-bottom-width: 3px; }

.thumb-ph { display: block; width: 100%; height: 100%; min-height: 60px; background: rgba(0,0,0,.08); }

/* ==========================================================
   NEWS
   ========================================================== */
.news { background: var(--blue); padding-block: clamp(36px, 5vw, 64px) clamp(40px, 5vw, 70px); }
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.pagination { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination button {
  appearance: none; border: 0; background: none; cursor: pointer; font: inherit; font-size: var(--fs-body); color: inherit;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
}
.pagination button:hover { background: rgba(0,0,0,.1); }
.pagination button[aria-current="page"] { background: var(--ink); color: #fff; }
.news-grid[hidden], .news-card[hidden] { display: none !important; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); list-style: none; margin: 0; padding: 0; }
.news-card { display: flex; flex-direction: column; }
.news-card .thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .thumb img { transform: scale(1.03); }
.news-meta { margin: 16px 0 6px; font-size: var(--fs-small); opacity: .75; }
.news-card h3 {
  font-weight: 500; font-size: var(--fs-card); line-height: 1.2; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card h3 a { text-decoration: none; }
.news-card h3 a:hover { text-decoration: underline; }
.news-card p { font-size: var(--fs-body); margin: 0 0 18px; }
.news-card .more-link { margin-top: auto; align-self: flex-start; }
.news-foot { margin-top: 40px; }

@media (max-width: 860px) {
  .news-grid { grid-template-columns: 1fr; }
  .news-card { display: grid; grid-template-columns: 38% 1fr; column-gap: 18px; align-items: start; }
  .news-card .thumb { grid-row: 1 / 5; }
  .news-meta { margin-top: 0; }
}
@media (max-width: 720px) {
  /* Handy: ein Beitrag mit großem Bild; die Zahlen stehen rechts neben "News" */
  .news-card { display: flex; }
  .news-meta { margin-top: 16px; }
  .news-pagination .pagination { gap: 8px; }
  .news-pagination .pagination button { width: 44px; height: 44px; font-size: 19px; border: 1.5px solid var(--ink); }
  .news-pagination .pagination button[aria-current="page"] { background: var(--ink); color: #fff; }
}

/* ==========================================================
   TERMINE  (mit kleinen Fotos je Eintrag)
   ========================================================== */
.events { padding-block: clamp(50px, 7vw, 100px) 0; }
.events-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 20px; margin-bottom: 26px; }
.events-foot { margin-top: 34px; }
.event-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.event {
  display: grid; grid-template-columns: 96px 150px 1fr auto; align-items: center; gap: 24px;
  padding: 18px 0; border-bottom: 1px solid rgba(0,0,0,.2);
}
.event-thumb { display: block; width: 96px; height: 96px; overflow: hidden; }
.event-thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-date { font-size: var(--fs-body); font-weight: 500; }
.event-title { font-weight: 500; font-size: var(--fs-card); line-height: 1.2; margin: 0; }
.event-title a { text-decoration: none; }
.event-title a:hover { text-decoration: underline; }
.event-place { font-size: var(--fs-small); opacity: .7; margin: 4px 0 0; }
.event .more-link { justify-self: end; white-space: nowrap; }
@media (max-width: 720px) {
  .event { grid-template-columns: 72px 1fr; gap: 6px 16px; }
  .event-thumb { width: 72px; height: 72px; grid-row: 1 / 4; }
  .event:nth-child(n+4) { display: none; }   /* Handy: maximal 3 Termine */
  .event-date, .event-title, .event .more-link { grid-column: 2; justify-self: start; }
}

/* ==========================================================
   PROJEKTE
   ========================================================== */
.projects { padding-block: clamp(50px, 7vw, 100px) clamp(50px, 7vw, 100px); }
.projects .section-title { margin-bottom: 28px; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3.5vw, 56px); list-style: none; margin: 0 0 44px; padding: 0; }
.project .img { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.project .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project:hover .img img { transform: scale(1.03); }
.project h3 { font-weight: 500; font-size: var(--fs-card); line-height: 1.2; margin: 18px 0 8px; }
.project h3 a { text-decoration: none; }
.project h3 a:hover { text-decoration: underline; }
.project p { margin: 0; font-size: var(--fs-body); max-width: 52ch; }
.project blockquote { margin: 10px 0 0; font-size: var(--fs-body); max-width: 52ch; opacity: .8; padding-left: 14px; border-left: 3px solid var(--ink); }
@media (max-width: 720px) { .project-grid { grid-template-columns: 1fr; } }

.thumb-ph { display: block; width: 100%; height: 100%; min-height: 60px; background: rgba(0,0,0,.08); }

/* ==========================================================
   NEWSLETTER + FOOTER
   ========================================================== */
.yellow-zone {
  background-color: var(--yellow);
  background-image: radial-gradient(rgba(0,0,0,.14) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
.newsletter { padding-block: clamp(44px, 6vw, 84px) 0; }
.newsletter .section-title { margin-bottom: 26px; }
.nl-form { max-width: 720px; margin-left: clamp(0px, 8vw, 120px); }
.nl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nl-form label.field { display: block; font-size: var(--fs-body); margin-bottom: 8px; }
.nl-form input[type="email"] {
  flex: 1 1 280px; font: inherit; font-size: var(--fs-body); padding: 14px 16px;
  border: 2px solid var(--ink); border-radius: 10px; background: #fff;
}
.nl-form button {
  font: inherit; font-size: var(--fs-body); padding: 14px 28px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; border-radius: 10px; cursor: pointer;
}
.nl-form button:hover { background: #fff; color: var(--ink); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: var(--fs-small); max-width: 60ch; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ink); }

.site-footer { padding-block: clamp(60px, 10vw, 140px) clamp(30px, 4vw, 50px); display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: flex-end; justify-content: space-between; }
.site-footer .footer-logo { width: 64px; height: auto; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: var(--fs-body); }
.footer-links a { text-decoration: none; border-bottom: 1.5px solid transparent; }
.footer-links a:hover { border-bottom-color: currentColor; }
.copy { font-size: var(--fs-body); margin: 0; }

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

/* ==========================================================
   Innenseiten (page.php, single.php, index.php, 404)
   ========================================================== */
.page-wrap { padding-block: clamp(36px, 6vw, 90px) clamp(50px, 7vw, 100px); }
.page-title { margin-bottom: 28px; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.08; overflow-wrap: break-word; }
.entry-image { margin: 0 0 32px; }
.entry-image img { width: 100%; height: auto; }

.entry-content { font-size: var(--fs-body); }
.entry-content > * { max-width: 72ch; margin-inline: auto; }
.entry-content > .alignwide, .entry-content > .alignfull { max-width: none; }
.entry-content h2, .entry-content h3 { font-weight: 500; line-height: 1.2; margin: 1.8em auto .6em; }
.entry-content h2 { font-size: clamp(26px, 3vw, 38px); }
.entry-content h3 { font-size: var(--fs-card); }
.entry-content a { text-underline-offset: 3px; }
.entry-content img, .entry-content video, .entry-content iframe { max-width: 100%; height: auto; }
.entry-content blockquote { margin-block: 1.6em; padding-left: 18px; border-left: 3px solid var(--ink); }
.entry-content figcaption, .wp-caption-text { font-size: var(--fs-small); opacity: .75; margin-top: 6px; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-inline: auto; }
.landing-intro { padding-block: 0 clamp(30px, 5vw, 60px); }

.post-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 34px; }
.post-item { display: grid; grid-template-columns: minmax(0, 280px) 1fr; gap: 26px; align-items: start; }
.post-item-thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.post-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-item-title { font-weight: 500; font-size: var(--fs-card); line-height: 1.2; margin: 0 0 8px; }
.post-item-title a { text-decoration: none; }
.post-item-title a:hover { text-decoration: underline; }
@media (max-width: 640px) { .post-item { grid-template-columns: 1fr; } }

.navigation.pagination { display: block; }
.navigation .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.navigation .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding-inline: 8px; border-radius: 20px; text-decoration: none; }
.navigation .page-numbers.current { background: var(--ink); color: #fff; }
.navigation a.page-numbers:hover { background: rgba(0,0,0,.1); }

.page-wrap .search-form { display: flex; gap: 12px; max-width: 560px; margin-block: 20px; }
.page-wrap .search-form input[type="search"] { flex: 1; }
