/* ============================================
   Fortuna Untersiebenbrunn – Haupt-Stylesheet
   Fully Responsive / Fluid Design
   ============================================ */

:root {
  --bg: #f5f5f5;
  --bg2: #ffffff;
  --text: #1a1a1a;
  --text-muted: #555;
  --primary: #712722;
  --primary-light: #8a3230;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --border: #e0e0e0;
  --nav-bg: #712722;
  --nav-text: #ffffff;
  --footer-bg: #1a1a1a;
  --footer-text: #ccc;
  --tag-in: #27ae60;
  --tag-out: #e74c3c;
  --hero-overlay: rgba(113,39,34,0.90);
}

[data-theme="dark"] {
  --bg: #121212;
  --bg2: #1e1e1e;
  --text: #f0f0f0;
  --text-muted: #aaa;
  --primary: #712722;
  --primary-light: #8a3230;
  --card-bg: #242424;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.4);
  --border: #333;
  --nav-bg: #712722;
  --footer-bg: #0a0a0a;
  --footer-text: #888;
  --hero-overlay: rgba(113,39,34,0.92);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* ── NAV ── */
nav {
  background: var(--nav-bg);
  color: var(--nav-text);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem clamp(0.75rem, 2vw, 1.5rem) 0.25rem;
  min-height: 64px;
  gap: 0.1rem 0.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 700;
  text-decoration: none;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
  order: 1;
}
.nav-brand img { height: 40px; width: auto; }
/* Menüzeile wird per order+flex-basis auf eine eigene, volle Zeile unter
   Logo/Toggles gesetzt -- kein Hamburger mehr nötig auf Desktop-Breiten,
   egal wie viele Menüpunkte dazukommen. */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  order: 3;
  flex-basis: 100%;
  justify-content: center;
  padding-top: 0.15rem;
}
.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.18); }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; order: 2; }
/* ── TOGGLE SWITCHES (Theme + Lang) ── */
.toggle-switch {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 3px;
  gap: 0;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
.toggle-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}
.toggle-option.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
/* Keep old class for JS compat */
.theme-btn { display: none; }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.hamburger:hover { background: rgba(255,255,255,0.25); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
}
/* X animation when open */
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--nav-bg);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 0.3rem 0 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: white;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.mobile-nav a:hover, .mobile-nav a.active {
  background: rgba(255,255,255,0.12);
  padding-left: 1.8rem;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(var(--hero-overlay), var(--hero-overlay)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 400"><rect fill="%23712722" width="800" height="400"/><circle cx="400" cy="200" r="150" fill="none" stroke="%23fff" stroke-width="2" opacity="0.08"/><line x1="400" y1="0" x2="400" y2="400" stroke="%23fff" stroke-width="1" opacity="0.06"/></svg>');
  background-size: cover;
  background-position: center;
  min-height: clamp(120px, 12vw, 170px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: clamp(1.2rem, 3vw, 2.5rem) 1rem;
}
.hero-content { max-width: 680px; width: 100%; }
.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 2vw, 1rem);
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.hero-title-row img {
  height: clamp(36px, 5vw, 56px);
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.hero h1 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  letter-spacing: 1px;
}
.hero p { font-size: clamp(0.9rem, 2.5vw, 1.05rem); opacity: 0.9; margin-bottom: 0.8rem; }
.hero-badges { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
.badge {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: clamp(0.75rem, 2vw, 0.83rem);
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* ── MINI HERO (Unterseiten) ── */
.page-hero {
  background: var(--nav-bg);
  color: white;
  padding: clamp(1.2rem, 4vw, 2rem) 1rem;
  text-align: center;
}
.page-hero h1 { font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 800; margin-bottom: 0.4rem; }
.page-hero p { opacity: 0.8; font-size: clamp(0.85rem, 2vw, 0.95rem); }

/* ── SECTIONS ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(0.8rem, 2vw, 1.8rem) clamp(0.75rem, 3vw, 1.5rem) clamp(1.5rem, 4vw, 3rem);
}
.section-title {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.4rem;
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  padding-left: 1.25rem;
  font-size: 0.92rem;
}
.section-alt { background: var(--bg); }
.section-alt .section { padding: clamp(1.5rem, 4vw, 3rem) clamp(0.75rem, 3vw, 1.5rem); }

/* ── CARDS ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(0.75rem, 2vw, 1.2rem);
  align-items: stretch;
}
.card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.card-header {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.2rem;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.card-body {
  flex: 1;
  padding: clamp(0.9rem, 2vw, 1.2rem);
  text-align: center;
}
.card-body h3 { font-size: clamp(0.95rem, 2vw, 1.05rem); margin-bottom: 0.5rem; }
.card-body p { font-size: clamp(0.85rem, 1.8vw, 0.9rem); color: var(--text-muted); line-height: 1.6; }

/* ── PERSON CARDS ── */
.grid-persons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  gap: clamp(0.75rem, 2vw, 1.2rem);
}
.person-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: clamp(1rem, 2.5vw, 1.4rem);
  text-align: center;
  transition: transform 0.2s;
}
.person-card:hover { transform: translateY(-3px); }
.person-avatar {
  width: clamp(54px, 8vw, 68px);
  height: clamp(54px, 8vw, 68px);
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 3px 10px rgba(139,0,0,0.3);
}
.person-name { font-weight: 700; font-size: clamp(0.88rem, 2vw, 1rem); margin-bottom: 0.3rem; }
.person-role { color: var(--primary); font-size: 0.83rem; font-weight: 600; }
.person-info { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.5rem; line-height: 1.6; }

/* ── STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: clamp(1rem, 2.5vw, 1.4rem) 1rem;
  text-align: center;
}
.stat-number {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-label {
  font-size: clamp(0.7rem, 1.5vw, 0.78rem);
  color: var(--text-muted);
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── TABLE ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: clamp(0.78rem, 1.8vw, 0.88rem); }
th {
  background: var(--primary);
  color: white;
  padding: clamp(0.4rem, 1.5vw, 0.65rem) clamp(0.4rem, 1.5vw, 1rem);
  text-align: left;
  font-size: clamp(0.7rem, 1.5vw, 0.78rem);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
td {
  padding: clamp(0.4rem, 1.5vw, 0.65rem) clamp(0.4rem, 1.5vw, 1rem);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(139,0,0,0.04); }
.row-highlight td { background: rgba(139,0,0,0.07); font-weight: 600; }

/* ── NOEFV LINK BOX ── */
.info-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: clamp(1rem, 2.5vw, 1.4rem);
  margin-bottom: 2rem;
}
.info-box h3 { color: var(--primary); font-size: 1.05rem; margin-bottom: 0.8rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: clamp(0.82rem, 2vw, 0.87rem);
  font-weight: 600;
  transition: background 0.2s;
  margin-top: 0.5rem;
  min-height: 44px;
  justify-content: center;
}
.btn:hover { background: var(--primary-light); }
.btn-fb { background: #1877f2; }
.btn-fb:hover { background: #1565c2; }
.btn-dark { background: #2c3e50; }
.btn-dark:hover { background: #1a252f; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1877f2;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1rem;
  transition: opacity 0.2s;
}
.social-link:hover { opacity: 0.9; }

/* ── COLORS ── */
.colors-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.8rem; justify-content: center; }
.color-chip { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; font-weight: 600; }
.color-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); }

/* ── TRANSFER HEADINGS ── */
.transfer-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-left: 0.8rem;
  border-left: 3px solid currentColor;
}
.transfer-heading.in  { color: #27ae60; }
.transfer-heading.out { color: #e74c3c; }

/* ── FOOTER ── */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 1.2rem clamp(0.75rem, 3vw, 1.5rem) 0;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 3rem;
  align-items: start;
  padding-bottom: 1rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.footer-logo img { height: 40px; opacity: 0.85; flex-shrink: 0; }
.footer-logo p { font-size: 0.78rem; opacity: 0.55; line-height: 1.4; margin: 0; }

/* Nav links – 2 columns, inline */
.footer-links-nav h4,
.footer-links-ext h4,
.footer-links h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .45rem;
  opacity: 0.5;
  color: #fff;
  font-weight: 700;
}
.footer-links-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .8rem;
}
.footer-links-nav h4 { flex: 0 0 100%; }
.footer-links-nav a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color .2s;
  white-space: nowrap;
}
.footer-links-nav a:hover { color: white; }

/* External links – single column */
.footer-links-ext a,
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.82rem;
  margin-bottom: .2rem;
  transition: color .2s;
  white-space: nowrap;
}
.footer-links-ext a:hover,
.footer-links a:hover { color: white; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: .55rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 0.74rem;
  opacity: 0.4;
  text-align: center;
}
.footer-bottom a { color: inherit; }

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-logo { grid-column: 1 / -1; }
}
@media (max-width: 500px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ── RESPONSIVE ──
   Menü läuft jetzt zweizeilig (Logo+Toggles oben, Menüpunkte darunter),
   das passt auf Desktop und Tablet ohne Hamburger. Nur auf echten
   Handy-Breiten wird auf das Hamburger-Menü umgeschaltet. */
@media (max-width: 700px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  /* Vereinsname ausblenden (nur Logo bleibt) -- sichert genug Platz für
     Toggles+Hamburger in Zeile 1, auch wenn Browser (z.B. Firefox vs.
     Chrome) den Text unterschiedlich breit rendern */
  .nav-brand span { display: none; }
}

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  .grid-persons { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 380px) {
  .grid-persons { grid-template-columns: 1fr; }
}

/* ── HEIMSPIEL BADGE ── */
.heimspiel-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.3);
  max-width: 100%;
  word-break: break-word;
  line-height: 1.6;
  text-align: center;
}

/* ── TRANSFERS TABELLE gleichmäßig ── */
.table-wrap table th,
.table-wrap table td {
  width: 25%;
}

@media (max-width: 600px) {
  .table-wrap table th,
  .table-wrap table td {
    width: auto;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }
  .table-wrap table {
    font-size: 0.75rem;
  }
}

/* ── BUTTON AUSRICHTUNG ── */
.card-body .btn {
  display: inline-flex;
  width: auto;
  align-self: center;
}
.card-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.card-body h3,
.card-body p,
.card-body div,
.card-body a:not(.btn) {
  text-align: center;
}
/* Buttons in card-body immer zentriert */
.card-body > .btn,
.card-body > div > .btn {
  align-self: center;
}

/* ── JUGEND MOBILE ── */
@media (max-width: 768px) {
  .jugend-cards {
    grid-template-columns: 1fr !important;
  }
}

/* ── LANGUAGE SWITCHER (hidden - replaced by toggle) ── */
.lang-btn { display: none; }
