/* ==========================================================================
   ZUKUNFT-KINDER e.V. – moderner, responsiver Relaunch
   Originales Buntstift-Menü (PNG), Grid-Layout, Hamburger-Drawer
   ========================================================================== */

:root {
  --blue: #0e6fc2;
  --blue-dark: #0a4f8a;
  --text: #2b2f36;
  --muted: #5a6672;
  --bg: #f3f8fd;
  --card: #ffffff;
  --border: #dfeaf4;
  --shadow: 0 2px 14px rgba(16, 42, 68, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", Verdana, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: #cfe5f7;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
}

.skip-link:focus {
  left: 0;
}

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "header"
    "main"
    "footer";
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

.site-header {
  grid-area: header;
}

.brand-home {
  display: block;
  line-height: 0;
}

.teaser-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 972 / 206;
  object-fit: cover;
}

.site-main {
  grid-area: main;
  padding: 28px clamp(16px, 4vw, 44px) 52px;
  min-width: 0;
}

.site-footer {
  grid-area: footer;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 18px clamp(16px, 4vw, 44px);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-brand {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 18px;
}

/* -------------------------------------------------------------------------
   Mobile: Navigation als Drawer
   ------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(330px, 88vw);
  background: #fff;
  z-index: 70;
  overflow-y: auto;
  transform: translateX(-104%);
  transition: transform 0.28s ease;
  box-shadow: none;
  padding: 22px 16px 34px;
}

.site-nav.is-open {
  transform: translateX(0);
  box-shadow: 0 0 46px rgba(10, 25, 40, 0.35);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 28, 44, 0.52);
  z-index: 60;
}

.nav-backdrop[hidden] {
  display: none;
}

.nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 12px;
  border-bottom: 2px dashed var(--border);
  margin-bottom: 16px;
}

.nav-title {
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.nav-close {
  border: 0;
  background: #eef4fa;
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.nav-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 80;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 42, 68, 0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger {
  position: relative;
  width: 22px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: transform 0.25s;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

.nav-toggle.is-open .hamburger {
  background: transparent;
}

.nav-toggle.is-open .hamburger::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .hamburger::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* -------------------------------------------------------------------------
   Navigation: Original Buntstift-PNGs
   ------------------------------------------------------------------------- */
.nav-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-pencil {
  display: block;
}

.nav-pencil-img {
  display: block;
  width: 100%;
  max-width: 270px;
  height: auto;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.nav-pencil:hover .nav-pencil-img {
  opacity: 0.85;
  transform: translateX(2px);
}

.nav-pencil.is-active .nav-pencil-img {
  opacity: 1;
}

.nav-sub {
  list-style: none;
  margin: 8px 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-sub-link {
  display: block;
  padding: 6px 10px 6px 16px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-sub-link:hover {
  background: #eef5fb;
  color: var(--blue);
}

.nav-sub-link.is-active {
  background: #e0edf9;
  color: var(--blue-dark);
}

.nav-waslos {
  display: block;
  margin-top: 8px;
}

.nav-waslos-img {
  display: block;
  width: 100%;
  max-width: 264px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(31, 140, 200, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-waslos:hover .nav-waslos-img {
  transform: translateY(-2px);
  box-shadow: 0 7px 18px rgba(31, 140, 200, 0.4);
}

.nav-waslos.is-active .nav-waslos-img {
  box-shadow: 0 0 0 3px var(--blue), 0 4px 12px rgba(31, 140, 200, 0.3);
}

/* -------------------------------------------------------------------------
   Inhalt
   ------------------------------------------------------------------------- */
.site-main h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  color: var(--blue);
  margin: 0 0 0.7em;
  line-height: 1.2;
}

.site-main h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  color: var(--blue);
  margin: 1.5em 0 0.5em;
  line-height: 1.25;
}

.site-main h3 {
  font-size: clamp(1.15rem, 2.1vw, 1.35rem);
  color: var(--blue-dark);
  margin: 1.3em 0 0.4em;
  line-height: 1.3;
}

.site-main h4 {
  font-size: 1.1rem;
  color: var(--blue-dark);
  margin: 1.1em 0 0.35em;
}

.site-main p {
  margin: 0 0 1em;
}

.site-main .center {
  text-align: center;
}

.org {
  color: var(--blue);
  font-weight: 700;
}

.important {
  color: #c62828;
  font-weight: 800;
}

.csc-list {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.csc-list li {
  margin-bottom: 0.35em;
}

/* Bilder, Galerien, Text-Bild-Mix */
.figure {
  margin: 1.4em 0;
  text-align: center;
}

.figure img {
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin: 1.4em 0;
}

.gallery .figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  box-shadow: var(--shadow);
}

a.lightbox img {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.lightbox:hover img {
  transform: scale(1.02);
  box-shadow: 0 10px 22px rgba(20, 50, 80, 0.22);
}

figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.45em;
}

.media {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin: 1.6em 0;
}

.media-figure {
  flex: none;
  margin: 0.4em 0 0;
}

.media-body {
  min-width: 0;
}

/* Tabellen */
.table-scroll {
  overflow-x: auto;
  margin: 1.2em 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table td,
.table th {
  border: 1px solid var(--border);
  padding: 10px 13px;
  vertical-align: top;
  text-align: left;
}

.table tr:nth-child(even) td {
  background: #f7fafd;
}

.table .table-title {
  color: var(--blue);
  font-size: 1.12rem;
}

.table img {
  max-width: 200px;
  border-radius: 8px;
}

/* Downloads */
a.download::after {
  content: "\2193";
  margin-left: 6px;
  opacity: 0.7;
}

/* -------------------------------------------------------------------------
   Lightbox
   ------------------------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 18, 32, 0.9);
  padding: 28px;
}

.lightbox-modal.is-open {
  display: flex;
}

.lightbox-modal img {
  max-width: 100%;
  max-height: 86vh;
  border-radius: 8px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* -------------------------------------------------------------------------
   Desktop ab 992px
   ------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .page {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-areas:
      "header header"
      "nav    main"
      "nav    footer";
  }

  .site-nav {
    grid-area: nav;
    position: sticky;
    top: 0;
    align-self: start;
    transform: none;
    background: transparent;
    box-shadow: none;
    padding: 28px 8px 40px 28px;
  }

  .nav-head {
    display: none;
  }

  .nav-toggle,
  .nav-backdrop {
    display: none !important;
  }

  .site-footer {
    align-self: end;
  }
}

/* -------------------------------------------------------------------------
   Kleine Geräte
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .site-main {
    padding-top: 20px;
  }

  .media {
    flex-direction: column;
  }

  .media-figure {
    align-self: center;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}

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