:root {
  --blue:   #1a4ba0;
  --blue-dark: #0f2f6a;
  --yellow: #f5c518;
  --white:  #ffffff;
  --gray-light: #f4f6fa;
  --gray:   #666;
  --text:   #1a1a2e;
  --radius: 8px;
}

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--gray-light);
}

/* ─── NAVBAR ─── */
nav {
  background: var(--blue-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  padding: .6rem 0;
  margin-right: 2rem;
}

.nav-brand img { height: 52px; filter: drop-shadow(0 1px 4px rgba(0,0,0,.3)); }

.nav-brand span {
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .5px;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  flex: 1;
}

.nav-links > li { position: relative; }

.nav-links > li > a,
.nav-links > li > button {
  display: block;
  padding: 1.1rem 1.2rem;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.nav-links > li > a:hover,
.nav-links > li > button:hover,
.nav-links > li.open > button {
  color: var(--yellow);
  background: rgba(255,255,255,.06);
}

/* dropdown arrow */
.nav-links > li > button::after {
  content: ' ▾';
  font-size: .75rem;
}

/* ─── DROPDOWN ─── */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--blue-dark);
  border-top: 3px solid var(--yellow);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  z-index: 999;
}

.nav-links > li.open .dropdown { display: block; }

.dropdown a {
  display: block;
  padding: .75rem 1.2rem;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: color .2s, background .2s, padding-left .2s;
}

.dropdown a:hover {
  color: var(--yellow);
  background: rgba(255,255,255,.07);
  padding-left: 1.6rem;
}

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, #1a6bc4 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-logo { width: 160px; margin-bottom: 1.5rem; filter: drop-shadow(0 4px 16px rgba(0,0,0,.4)); position: relative; }

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  position: relative;
}

.hero h1 span { color: var(--yellow); }

.hero p {
  margin-top: .75rem;
  font-size: 1.1rem;
  opacity: .8;
  position: relative;
}

/* ─── MAIN CONTENT ─── */
main { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }

section { margin-bottom: 3.5rem; }

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-dark);
  border-left: 5px solid var(--yellow);
  padding-left: .75rem;
  margin-bottom: 1.5rem;
}

/* ─── VENUE SECTION ─── */
.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.venue-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform .2s, box-shadow .2s;
}

.venue-card:hover { transform: translateY(-4px); box-shadow: 0 6px 24px rgba(0,0,0,.13); }

.venue-img-placeholder {
  background: linear-gradient(135deg, #c8d8f0 0%, #a0bfe0 100%);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--blue);
}

.venue-card-body { padding: 1.2rem 1.3rem 1.5rem; }

.venue-card-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; color: var(--blue-dark); }

.venue-card-body p { font-size: .88rem; color: var(--gray); line-height: 1.6; }

/* ─── TABLES ─── */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.table-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  overflow: hidden;
}

.table-header {
  background: var(--blue-dark);
  color: var(--white);
  padding: .9rem 1.2rem;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.table-header span { color: var(--yellow); }

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

thead tr { background: var(--blue); color: var(--white); }

thead th {
  padding: .55rem .6rem;
  text-align: center;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

thead th:first-child { text-align: left; padding-left: .8rem; width: 28px; }
thead th:nth-child(2) { text-align: left; }

tbody tr { border-bottom: 1px solid #eef0f5; transition: background .15s; }
tbody tr:hover { background: #f0f4fb; }

tbody td { padding: .5rem .6rem; text-align: center; color: #333; }
tbody td:first-child { text-align: center; font-weight: 600; color: #888; padding-left: .8rem; }
tbody td:nth-child(2) { text-align: left; font-weight: 500; }

/* highlight own team */
tbody tr.own-team { background: #fffbea; }
tbody tr.own-team td { color: var(--blue-dark); font-weight: 600; }
tbody tr.own-team td:first-child { color: var(--blue); }
tbody tr.own-team:hover { background: #fff5cc; }

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

/* promotion / relegation zones */
tbody tr.zone-up td:first-child { border-left: 3px solid #27ae60; }
tbody tr.zone-rel td:first-child { border-left: 3px solid #e74c3c; }
tbody tr.zone-play td:first-child { border-left: 3px solid #f39c12; }

/* legend */
.legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .6rem .8rem;
  font-size: .76rem;
  color: #666;
  border-top: 1px solid #eef0f5;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

/* ─── SUBPAGE HERO ─── */
.sub-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}

.sub-hero h1 { font-size: 2rem; font-weight: 800; }
.sub-hero p { opacity: .75; margin-top: .5rem; }

.empty-notice {
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  color: var(--gray);
}

.empty-notice .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-notice h2 { font-size: 1.3rem; color: var(--blue-dark); margin-bottom: .5rem; }

/* ─── FOOTER ─── */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 1.8rem 1rem;
  font-size: .85rem;
}

footer strong { color: var(--yellow); }

/* ─── MOBILE ─── */
@media (max-width: 640px) {
  /* Navbar: nur Logo + Hamburger rechts */
  .nav-brand span { display: none; }
  .nav-brand { margin-right: 0; }
  .nav-links { flex: 0 0 auto; margin-left: auto; }

  .btn-text { display: none; }

  .nav-links > li > button {
    padding: 1rem 1.1rem;
    font-size: 1.1rem;
    letter-spacing: 0;
  }

  .nav-links > li > button::after {
    content: '☰';
    font-size: 1.3rem;
    line-height: 1;
  }

  /* Dropdown relativ zur Nav ausrichten, nicht zum schmalen Button */
  .nav-links > li { position: static; }
  .dropdown {
    position: absolute;
    right: 0;
    left: auto;
    width: 200px;
    top: 100%;
  }

  /* Tabellen: nur #, Verein, Punkte */
  .table-card table thead th:nth-child(n+3):nth-child(-n+7),
  .table-card table tbody td:nth-child(n+3):nth-child(-n+7) {
    display: none;
  }

  .tables-grid {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero h1 { font-size: 1.7rem; }
  .hero-logo { width: 120px; }
}
