/* =========================================================
   SECTIONS — page-level layout
   ========================================================= */

/* ── HERO ───────────────────────────────────────────────── */
#hero {
  margin-top: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-height));
}
.hero-left {
  background: var(--green);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem 5rem;
}
.hero-tag {
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-widest); text-transform: uppercase;
  color: var(--green-acc); margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-tag::before {
  content: ''; display: block;
  width: 30px; height: 1px; background: var(--green-acc);
}
.hero-left h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-black); color: var(--white);
  line-height: 1.0; margin-bottom: 1.5rem;
}
.hero-left h1 em {
  font-style: italic; font-family: var(--font-serif);
  font-weight: var(--fw-regular); display: block;
  font-size: 0.75em; color: rgba(255,255,255,.75);
}
.hero-left p {
  color: rgba(255,255,255,.7);
  font-size: var(--fs-base); line-height: 1.8;
  margin-bottom: 2.5rem; max-width: 400px;
  font-weight: var(--fw-light);
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-year-badge {
  margin-top: 4rem; padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
  display: flex; gap: 3rem;
}
.year-stat { color: var(--white); }
.year-num { font-size: 1.8rem; font-weight: var(--fw-black); }
.year-lbl {
  font-size: 0.72rem; color: rgba(255,255,255,.5);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.hero-right {
  position: relative; overflow: hidden;
  background: #1a1a1a;
}
.hero-right img,
.hero-right picture,
.hero-right picture img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 35%;
}

/* ── INSTAGRAM / SOCIAL FEED ────────────────────────────── */
#aktuelles { background: var(--white); border-bottom: 1px solid var(--border); }
.insta-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.insta-lead {
  color: var(--muted); font-size: 0.9rem;
  font-weight: var(--fw-light); margin-top: 0.5rem;
}
/* 3×3 grid, larger tiles. 9 posts → exactly fills 3 rows. */
.insta-feed {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
}
.insta-cell {
  position: relative;
  aspect-ratio: 1; overflow: hidden; border-radius: 5px;
  display: block; text-decoration: none; color: inherit;
  background: var(--off-white);
}
.insta-cell img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-med);
}
.insta-cell:hover img { transform: scale(1.07); }

/* Type badge (top-right) */
.insta-badge {
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  padding: 0.25rem 0.65rem;
  background: rgba(0, 0, 0, 0.65);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}

/* Caption overlay — visible on hover (desktop), always-on (mobile/touch) */
.insta-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1rem 0.85rem;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.6) 55%, rgba(0,0,0,0) 100%);
  color: var(--white);
  display: flex; flex-direction: column; gap: 0.25rem;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
  pointer-events: none;
}
.insta-cell:hover .insta-cap,
.insta-cell:focus-visible .insta-cap {
  opacity: 1;
}
.insta-cap-text {
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: var(--fw-medium);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.insta-cap-time {
  font-size: 0.7rem;
  font-weight: var(--fw-regular);
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.insta-meta {
  font-size: 0.75rem; color: var(--muted);
  text-align: right; margin-top: 0.75rem;
  font-weight: var(--fw-light);
}

/* ── VEREIN ─────────────────────────────────────────────── */
#verein { background: var(--off-white); }
#verein .section-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-10); align-items: center;
}
#verein picture { display: block; }
#verein img,
#verein picture img {
  display: block;
  width: 100%; max-width: 510px;
  aspect-ratio: 510 / 383;
  height: auto; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-image);
}

/* ── CHRONIK ────────────────────────────────────────────── */
#chronik { background: var(--white); }
#chronik .section-inner { max-width: 900px; }
.chronik-head { text-align: center; margin-bottom: 0.5rem; }
.tl-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem; margin-top: 2.5rem;
}
.tl-card {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  border-left: 4px solid var(--green);
  transition: box-shadow var(--dur-fast), transform var(--dur-fast);
}
.tl-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.tl-card-year {
  font-size: 0.75rem; font-weight: var(--fw-bold);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green); margin-bottom: 0.5rem;
}
.tl-card h3 { font-size: var(--fs-base); font-weight: var(--fw-bold); margin-bottom: 0.5rem; }
.tl-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* ── KONTAKT ────────────────────────────────────────────── */
#kontakt { background: var(--off-white); }
#kontakt .section-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-10); align-items: start;
}
.contact-block {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
}
.contact-row {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.contact-row:last-child { border-bottom: none; }
.contact-icon {
  width: 36px; height: 36px; background: var(--green-pale);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--green);
}
.contact-icon svg { width: 18px; height: 18px; stroke-width: 2; }
.contact-label {
  font-size: var(--fs-xs); color: var(--muted);
  font-weight: var(--fw-semi); letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.contact-value {
  font-size: 0.95rem; color: var(--text); font-weight: var(--fw-medium);
}
.contact-value a { color: var(--green); text-decoration: none; }

/* Map (Leaflet) */
#kontakt-map {
  height: 100%;
  min-height: 360px;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--green-pale);
}
.leaflet-container {
  font-family: var(--font-sans);
  border-radius: var(--radius-lg);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */

/* Tablet (601–900): keep 3×3, slightly tighter gap */
@media (min-width: 601px) and (max-width: 900px) {
  .insta-feed { gap: 0.55rem; }
}

/* Tablet & mobile (≤900) — single column, stacked hero */
@media (max-width: 900px) {
  /* Mobile hero: photo on top, then green text panel that fills the viewport */
  #hero {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 1fr;
    min-height: calc(100vh - var(--nav-height));
    min-height: calc(100dvh - var(--nav-height));
  }
  /* DOM order is hero-left then hero-right; we want the photo on top */
  .hero-right { display: block; height: 240px; grid-row: 1; }
  .hero-left { grid-row: 2; justify-content: center; }
  .hero-left { padding: 3rem 2rem; }
  .hero-left h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
  .hero-left p { max-width: none; }
  .hero-year-badge { gap: 1.5rem; flex-wrap: wrap; margin-top: 2.5rem; }

  #verein .section-inner,
  #kontakt .section-inner { grid-template-columns: 1fr; gap: var(--space-6); }
  /* Verein photo: fill the column on mobile (drop the 510px desktop cap) */
  #verein img,
  #verein picture img { max-width: 100%; }
  .tl-grid { grid-template-columns: 1fr; }
  .card-row { grid-template-columns: 1fr 1fr; }
  #kontakt-map { aspect-ratio: 16/10; min-height: 240px; }
}

/* Phone landscape & small tablets (≤600): keep 3×3, tighter gap */
@media (max-width: 600px) {
  .insta-feed { gap: 0.4rem; }
  section { padding: 3rem 1.5rem; }
  .insta-top { margin-bottom: 1.5rem; }
}

/* Touch / mobile: no hover, so overlay is always visible (compact form) */
@media (hover: none) {
  .insta-cap {
    opacity: 1;
    padding: 1.5rem 0.7rem 0.55rem;
  }
  .insta-cap-text {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 0.78rem;
  }
  .insta-cap-time { display: none; }
}

/* Very narrow phones: shrink caption further so text doesn't crowd small tiles */
@media (max-width: 480px) {
  .insta-cap-text { font-size: 0.7rem; -webkit-line-clamp: 2; line-clamp: 2; }
  .insta-badge { font-size: 0.6rem; padding: 0.18rem 0.5rem; top: 0.4rem; right: 0.4rem; }
}

/* Phones (≤480) */
@media (max-width: 480px) {
  section { padding: 2.25rem 1.1rem; }

  /* Hero: shorter photo, green panel still fills viewport (1fr inherited from ≤900) */
  #hero { grid-template-rows: 180px 1fr; }
  .hero-right { height: 180px; }
  .hero-right img,
  .hero-right picture img { object-position: center 30%; }

  .hero-left { padding: 2rem 1.25rem 2.5rem; }
  .hero-tag { font-size: 0.62rem; margin-bottom: 0.9rem; }
  .hero-tag::before { width: 20px; }
  .hero-left h1 {
    font-size: 1.85rem;
    line-height: 1.05;
    margin-bottom: 1rem;
  }
  .hero-left h1 em { font-size: 0.7em; }
  .hero-left p {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: none;
  }

  .hero-btns { gap: 0.6rem; }
  .btn-primary, .btn-ghost {
    padding: 0.75rem 1.2rem;
    font-size: 0.72rem;
  }

  .hero-year-badge {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    gap: 0.75rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
  }
  .year-num { font-size: 1.35rem; }
  .year-lbl { font-size: 0.6rem; line-height: 1.3; }

  /* Other sections */
  .card-row { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .card { padding: 0.9rem; }
  .card-num { font-size: 1.25rem; }
  .card-lbl { font-size: 0.68rem; }
  .tl-card { padding: 1.1rem; }
  .contact-block { padding: 1.25rem; }
  .insta-feed { gap: 0.25rem; }
  .insta-top { margin-bottom: 1.25rem; }
  .sec-lead { margin-bottom: 1.75rem; }
}

/* Small phones (≤400) — iPhone 12/13 mini, most Androids in portrait.
   Photo shrinks, buttons stack full-width, stats reflow to 2 cols. */
@media (max-width: 400px) {
  #hero { grid-template-rows: 150px 1fr; }
  .hero-right { height: 150px; }

  .hero-left { padding: 1.75rem 1.1rem 2.25rem; }
  .hero-left h1 { font-size: 1.65rem; }
  .hero-left p { font-size: 0.88rem; margin-bottom: 1.25rem; }

  /* Stack buttons full-width — both visible, both legible */
  .hero-btns { flex-direction: column; gap: 0.55rem; align-items: stretch; }
  .btn-primary, .btn-ghost {
    width: 100%;
    padding: 0.85rem 1rem;
    text-align: center;
    font-size: 0.7rem;
  }

  .hero-year-badge {
    margin-top: 1.5rem;
    padding-top: 1rem;
    grid-template-columns: 1fr 1fr;
    row-gap: 0.9rem;
    column-gap: 1rem;
  }
  .year-stat:last-child { grid-column: 1 / -1; }
  .year-num { font-size: 1.2rem; }

  .card-row { grid-template-columns: 1fr; }
}

/* Very narrow phones (≤340) — older / smallest devices */
@media (max-width: 340px) {
  nav.site-nav { padding: 0 0.75rem; }
  .hero-left h1 { font-size: 1.5rem; }
  .hero-left p { font-size: 0.85rem; }
}

/* Large desktops — give the centred container a bit more room */
@media (min-width: 1280px) {
  :root { --container-max: 1180px; }
}
@media (min-width: 1600px) {
  :root { --container-max: 1320px; }
  section { padding: 6rem 4rem; }
}
@media (min-width: 1920px) {
  .hero-left { padding: 8rem 7rem; }
}
