/*
Theme Name: Karate 76 Peine – Modern
Description: Modernes Redesign der Vereinsseite. Dojo-Ästhetik: ruhige Tatami-Flächen, dunkles Dojo-Grün, Vereinsgrün als Akzent, kondensierte Display-Typo, "76"-Wasserzeichen. Inhalte 1:1 vom Original.
Author: Dirk Gorisch
Version: 1.0
Text Domain: karate76-modern
*/

/* ---------- Schriften (selbst gehostet) ---------- */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/barlow-condensed-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/barlow-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/barlow-condensed-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 100 700;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-italic-var.woff2') format('woff2');
}

/* ---------- Token ---------- */
:root {
  --tatami: #f5f5f1;
  --gi: #ffffff;
  --dojo: #2c332d;
  --dojo-tief: #222822;
  --tinte: #1d221e;
  --text: #3a413b;
  --gruen: #0b7a41;
  --gruen-hell: #7fd6a4;
  --linie: #e3e5df;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --schatten: 0 2px 18px rgba(29, 34, 30, .07);
  --breite: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--tatami);
}

img { max-width: 100%; height: auto; }

a { color: var(--gruen); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--tinte); }

:focus-visible { outline: 2px solid var(--gruen); outline-offset: 2px; }

/* ---------- Demo-Leiste ---------- */
.demo-hinweis {
  background: var(--gruen);
  color: #fff;
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .3rem 1rem;
}

/* ---------- Kopf ---------- */
.site-header {
  background: var(--gi);
}
.site-header .inner {
  max-width: var(--breite);
  margin: 0 auto;
  padding: .8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-logo img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: block;
}
.site-name {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tinte);
  text-decoration: none;
  white-space: nowrap;
}
.site-name:hover { color: var(--gruen); }

/* ---------- Navigation (eigene Zeile, sticky) ---------- */
.hauptnav {
  background: var(--gi);
  border-top: 1px solid var(--linie);
  border-bottom: 3px solid var(--dojo);
  position: sticky;
  top: 0;
  z-index: 60;
}
.hauptnav .inner {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.hauptnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.hauptnav li a {
  display: block;
  padding: .6rem .8rem;
  color: var(--text);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}
.hauptnav li:first-child a { padding-left: 0; }
.hauptnav li a:hover { color: var(--gruen); }
.hauptnav li.current-menu-item > a,
.hauptnav li.current-menu-ancestor > a,
.hauptnav li.current_page_item > a,
.hauptnav li.current_page_ancestor > a {
  color: var(--gruen);
  border-bottom-color: var(--gruen);
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--tinte);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  padding: .6rem 0;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--dojo);
  color: #fff;
  overflow: hidden;
}
.hero-nummer {
  position: absolute;
  right: -.06em;
  bottom: -.28em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(14rem, 30vw, 24rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .09);
  pointer-events: none;
  user-select: none;
}
.hero .inner {
  position: relative;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 3.2rem 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}
.hero-eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gruen-hell);
  margin: 0 0 .4rem;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: .015em;
  text-transform: uppercase;
}
.hero-foto {
  margin: 0 0 -4.2rem;
  padding: 9px;
  background: var(--gi);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
  border-radius: 4px;
  flex-shrink: 0;
  align-self: flex-end;
  position: relative;
  z-index: 2;
}
.hero-foto img { display: block; border-radius: 2px; max-height: 230px; width: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero-text, .hero-foto { animation: hero-auf .5s ease-out backwards; }
  .hero-foto { animation-delay: .12s; }
  @keyframes hero-auf {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Layout ---------- */
.seite {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
}
.inhalt {
  background: var(--gi);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 2.4rem 2.6rem;
  min-width: 0;
}

/* Inhalts-Typografie */
.inhalt h1, .inhalt h2, .inhalt h3 {
  font-family: var(--display);
  color: var(--tinte);
  line-height: 1.2;
  letter-spacing: .01em;
}
.inhalt h2 {
  font-size: 1.55rem;
  font-weight: 600;
  margin: 1.7em 0 .45em;
  padding-left: .65rem;
  border-left: 4px solid var(--gruen);
}
.inhalt p { margin: .85em 0; }
.inhalt img { border-radius: 6px; }
.inhalt hr { border: 0; border-top: 1px solid var(--linie); margin: 1.6rem 0; }
.inhalt table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1rem 0;
  font-size: .95rem;
}
.inhalt td, .inhalt th {
  border: 1px solid var(--linie);
  padding: .55rem .75rem;
  text-align: left;
}
.inhalt th { font-family: var(--display); font-weight: 600; letter-spacing: .03em; }
.inhalt tr:nth-child(even) { background: var(--tatami); }

/* Galerien: Passepartout-Rahmen */
.inhalt .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: .9rem;
  margin: 1.3rem 0;
}
/* width/flex des Core-Flex-Layouts (is-layout-flex) aushebeln, wir rastern selbst */
.inhalt .wp-block-gallery figure.wp-block-image {
  margin: 0;
  width: 100% !important;
  flex: none !important;
}
.inhalt .wp-block-gallery img {
  width: 100% !important;
  height: 150px !important;
  object-fit: cover;
  border-radius: 2px;
  border: 6px solid var(--gi);
  outline: 1px solid var(--linie);
  box-shadow: 0 2px 10px rgba(29, 34, 30, .10);
  transition: transform .16s ease, box-shadow .16s ease;
}
.inhalt .wp-block-gallery a:hover img {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(29, 34, 30, .18);
}
@media (prefers-reduced-motion: reduce) {
  .inhalt .wp-block-gallery img { transition: none; }
}

/* Gästebuch-Archiv */
.gb-eintrag {
  border: 1px solid var(--linie);
  border-left: 4px solid var(--gruen);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1.1rem 0;
  background: var(--tatami);
}
.gb-eintrag p:first-child { margin-top: 0; font-size: .88rem; color: #6c736d; }
.gb-eintrag p:first-child strong {
  font-family: var(--display);
  font-size: 1.08rem;
  letter-spacing: .03em;
  color: var(--tinte);
}
.inhalt .gb-eintrag + hr { display: none; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 1.6rem; }
.box {
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  background: var(--gi);
  border: 1px solid var(--linie);
  box-shadow: var(--schatten);
}
.box h2 {
  margin: 0 0 .7rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tinte);
}
.box-kontakt { background: var(--dojo); border-color: var(--dojo); color: #e8ebe8; }
.box-kontakt h2 { color: var(--gruen-hell); }
.box-kontakt a { color: var(--gruen-hell); text-decoration: none; }
.box-kontakt a:hover { text-decoration: underline; color: #fff; }
.box-kontakt p { margin: .35em 0; font-size: .95rem; }
.box-presse p { font-size: .92rem; margin: .45em 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dojo-tief);
  color: rgba(255, 255, 255, .75);
  margin-top: 3rem;
}
.site-footer .inner {
  max-width: var(--breite);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
  font-size: .88rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gruen-hell); }

/* ---------- Lightbox ---------- */
.k76-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 20, .93);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}
.k76-lightbox.offen { display: flex; }
.k76-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.k76-lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.4rem;
  cursor: pointer;
}
.k76-lightbox button:hover { background: rgba(255, 255, 255, .25); }
.k76-lb-schliessen { top: 1rem; right: 1rem; }
.k76-lb-zurueck { left: 1rem; top: 50%; transform: translateY(-50%); }
.k76-lb-vor { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Responsiv ---------- */
@media (max-width: 980px) {
  .seite { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .hauptnav ul { display: none; flex-direction: column; padding-bottom: .5rem; }
  .hauptnav.offen ul { display: flex; }
  .hauptnav li a { padding: .7rem .2rem; border-bottom: 1px solid var(--linie); font-size: 1rem; }
  .hauptnav li:first-child a { padding-left: .2rem; }

  .hero .inner { flex-direction: column; align-items: flex-start; gap: 1.6rem; padding: 2.4rem 1.5rem 2.2rem; }
  .hero-foto { margin-bottom: -3.4rem; align-self: center; }
  .hero-foto img { max-height: 170px; }
  .hero-nummer { font-size: 15rem; }

  .seite { padding-top: 4.6rem; }
  .inhalt { padding: 1.6rem 1.3rem; }
}
