/*
Theme Name: SVC Starter
Theme URI: https://sv-cannstatt.de
Author: SV Cannstatt 1898 e.V.
Description: Schlankes WordPress-Theme mit nativen Gutenberg-Blöcken für den Schwimmverein Cannstatt. Vereinsfarben Weiß & Rot.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: svc-starter
License: GPL-2.0-or-later
*/

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
  /* Vereinsfarben: Rot */
  --c-red-900: #4A0404;
  --c-red-800: #7F1D1D;
  --c-red-700: #991B1B;
  --c-red-600: #B91C1C;
  --c-red-500: #DC2626;
  --c-red-400: #EF4444;
  --c-red-300: #FCA5A5;
  --c-red-200: #FECACA;
  --c-red-100: #FEE2E2;
  --c-red-50:  #FEF2F2;

  /* Dark accents */
  --c-dark-900: #0C0A14;
  --c-dark-800: #1A1726;
  --c-dark-700: #2D2940;

  /* Neutrals */
  --c-white: #FFFFFF;
  --c-gray-50:  #F9FAFB;
  --c-gray-100: #F3F4F6;
  --c-gray-200: #E5E7EB;
  --c-gray-300: #D1D5DB;
  --c-gray-400: #9CA3AF;
  --c-gray-500: #6B7280;
  --c-gray-600: #4B5563;
  --c-gray-700: #374151;
  --c-gray-800: #1F2937;
  --c-gray-900: #111827;

  /* Typography */
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 6px 16px rgba(0,0,0,0.03);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.07), 0 12px 32px rgba(0,0,0,0.05);
  --shadow-red: 0 4px 16px rgba(185,28,28,0.25);
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--c-gray-800);
  background: var(--c-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ================================================================
   LAYOUT
   ================================================================ */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ================================================================
   SECTION HEADERS (reusable)
   ================================================================ */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header--left { text-align: left; }

.section-tag {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--c-red-500);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.02em;
  color: var(--c-gray-900); line-height: 1.15;
}
.section-sub {
  font-size: 1rem; color: var(--c-gray-400);
  margin-top: 10px; max-width: 520px;
}
.section-header .section-sub { margin-left: auto; margin-right: auto; }

/* ================================================================
   BUTTONS (global)
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 100px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.85rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-red-600); color: white;
  box-shadow: 0 2px 8px rgba(185,28,28,0.25);
}
.btn--primary:hover {
  background: var(--c-red-500);
  box-shadow: var(--shadow-red); transform: translateY(-1px);
}
.btn--white {
  background: white; color: var(--c-red-700);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn--white:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); transform: translateY(-1px); }
.btn--outline {
  background: transparent; color: var(--c-gray-700);
  border: 1.5px solid var(--c-gray-200);
}
.btn--outline:hover { border-color: var(--c-red-400); color: var(--c-red-600); }
.btn--ghost {
  background: rgba(255,255,255,0.12); color: white;
  border: 1.5px solid rgba(255,255,255,0.2);
}
.btn--ghost:hover { background: rgba(255,255,255,0.22); }
.btn--dark {
  background: var(--c-gray-900); color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn--dark:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.2); transform: translateY(-1px); }
.btn--lg { padding: 14px 28px; font-size: 0.95rem; }
.btn--sm { padding: 8px 16px; font-size: 0.8rem; }
.btn--block { width: 100%; justify-content: center; }

/* ================================================================
   HEADER / NAVIGATION
   ================================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.07); }

.site-header__inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 110px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--c-gray-900); }
.site-logo img { height: 90px; width: auto; }
.site-logo__mark {
  width: 90px; height: 90px; background: var(--c-red-600);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 1.1rem;
  letter-spacing: 0.04em; position: relative; overflow: hidden; flex-shrink: 0;
}
.site-logo__mark::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,0.35);
}
.site-logo__text { font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.site-logo__text small {
  display: block; font-weight: 500; font-size: 0.8rem;
  color: var(--c-gray-400); letter-spacing: 0.02em;
}

/* Main nav */
.main-nav ul { display: flex; align-items: center; gap: 2px; list-style: none; }
.main-nav > ul > li > a {
  text-decoration: none; color: var(--c-gray-600);
  font-size: 0.875rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.main-nav > ul > li > a:hover { color: var(--c-red-600); background: var(--c-red-50); }

/* Dropdown */
.has-children { position: relative; }
.has-children > a::after {
  content: ''; display: inline-block; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid currentColor; margin-left: 5px;
  vertical-align: middle; opacity: 0.4;
}
.has-children > .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: white; border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 8px; min-width: 230px;
  opacity: 0; pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
}
.has-children:hover > .sub-menu {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.sub-menu a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-size: 0.85rem; color: var(--c-gray-700); text-decoration: none;
}
.sub-menu a:hover { background: var(--c-red-50); color: var(--c-red-600); }

/* Header CTAs */
.site-header__ctas { display: flex; gap: 8px; align-items: center; }

/* Mobile toggle */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--c-gray-700);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer { background: var(--c-gray-900); color: white; padding: 80px 32px 40px; }
.site-footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 48px; max-width: 1280px; margin-left: auto; margin-right: auto;
}
.footer-brand h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 12px; }
.footer-brand p { font-size: 0.84rem; color: rgba(255,255,255,0.4); line-height: 1.7; margin-bottom: 16px; }
.footer-addr { font-size: 0.8rem; color: rgba(255,255,255,0.35); line-height: 1.8; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 0.85rem; color: rgba(255,255,255,0.5);
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--c-red-600); color: white; }

.footer-col h4 {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.3); margin-bottom: 16px;
}
.footer-col a {
  display: block; text-decoration: none;
  color: rgba(255,255,255,0.55); font-size: 0.86rem;
  padding: 5px 0; transition: color 0.2s;
}
.footer-col a:hover { color: white; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 28px; display: flex;
  justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: rgba(255,255,255,0.25);
  max-width: 1280px; margin: 0 auto;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { color: rgba(255,255,255,0.3); text-decoration: none; }
.footer-legal a:hover { color: rgba(255,255,255,0.5); }

/* ================================================================
   CONTENT AREA (for page.php, single.php etc.)
   ================================================================ */
.site-content { padding-top: 110px; }
.entry-content { max-width: 780px; margin: 0 auto; padding: 60px 32px; }
.entry-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.entry-content p { margin-bottom: 1em; }

/* Full-width blocks bypass the max-width */
.entry-content .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
}
.entry-content .alignwide {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================================================
   NEWS CARD (template-part, reused in block + archive)
   ================================================================ */
.news-card {
  background: white; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--c-gray-100);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.news-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.news-card--static { cursor: default; }
.news-card--static:hover { box-shadow: none; transform: none; }
.news-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.news-card__tag {
  display: inline-flex; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 100px;
  margin-bottom: 12px; width: fit-content;
}
.news-card__tag--verein     { background: var(--c-red-100); color: var(--c-red-700); }
.news-card__tag--schule     { background: #FEF3C7; color: #92400E; }
.news-card__tag--freizeitsport { background: #ECFDF5; color: #065F46; }
.news-card__tag--wasserball { background: #EFF6FF; color: #1E40AF; }
.news-card__tag--schwimmen  { background: #F0F9FF; color: #0C4A6E; }
.news-card__tag--para       { background: #F5F3FF; color: #5B21B6; }
.news-card h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; color: var(--c-gray-900); }
.news-card p { font-size: 0.84rem; color: var(--c-gray-500); line-height: 1.6; flex: 1; }
.news-card__date {
  font-size: 0.73rem; color: var(--c-gray-400);
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--c-gray-100);
}

/* News grid on archive pages */
.news-grid--archive {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 1280px; margin: 0 auto; padding: 60px 32px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .news-grid--archive { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .main-nav.is-open {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    background: white; padding: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  }
  .main-nav.is-open ul { flex-direction: column; gap: 4px; }
  .main-nav.is-open .sub-menu {
    position: static; transform: none; opacity: 1; pointer-events: auto;
    box-shadow: none; padding-left: 16px;
  }
  .menu-toggle { display: flex; }
  .site-header__ctas .btn--outline { display: none; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .news-grid--archive { grid-template-columns: 1fr; }
}
