/* 1. VARIABLEN & BASIS */
:root {
  --green-dark: #2e6258;
  --green-text: #213b37;
  --green-soft: #48635d;
  --beige-bg: #f4f1e8;
  --beige-card: #f8f5ea;
  --beige-line: #d9d0bc;
  --beige-accent: #efe2ad;
  --beige-hover: #efe7d4;
  --link-blue: #224b76;
  --gold: #d9b65d;
  --gold-dark: #bf9b30;
  --white-soft: rgba(255, 255, 255, 0.9);
  --shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Arial', sans-serif; background: var(--beige-bg); color: var(--green-text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }

/* 2. HERO & HEADER */
.hero { position: relative; background: var(--green-dark); border-bottom: 1px solid var(--beige-line); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-image: url("http://www.sv-medizin-altenburg.de/tischtennis/Bilder/Halle2.jpg"); background-size: cover; background-position: center; opacity: 0.35; }
.hero-inner { position: relative; padding: 40px 0; }
.title-bar { background: var(--white-soft); backdrop-filter: blur(4px); border-radius: 15px; padding: 20px 30px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12); display: flex; align-items: center; gap: 30px; }
.logo-box { flex: 0 0 150px; }
.main-title { font-family: 'Cinzel', serif; font-size: clamp(24px, 4vw, 60px); font-weight: 700; color: #243b5a; line-height: 1.1; text-align: center; }
.tt-line { display: flex; align-items: center; gap: 15px; margin-top: 10px; }
.tt-line span:first-child, .tt-line span:last-child { flex: 1; height: 2px; background: var(--gold); }
.tt-text { font-family: 'Montserrat', sans-serif; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); font-size: clamp(16px, 1.6vw, 20px); }
.hero-copy { color: white; padding: 40px 0 20px; max-width: 800px; }
.hero-copy h2 { margin: 0; font-size: clamp(32px, 5vw, 52px); }

/* 3. NAVIGATION */
.main-nav { position: sticky; top: 0; z-index: 100; background: #f5f1e5; border-bottom: 1px solid var(--beige-line); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); }
.nav-list { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 0; justify-content: center; }
.nav-link { padding: 10px 18px; border-radius: 6px; font-size: 17px; font-weight: 600; transition: all 0.2s ease; }
.nav-link:hover { background: var(--beige-hover); }
.nav-link.active { background: var(--gold); color: #223a36; }

/* 4. CONTENT & CARDS */
main { margin-top: -20px; position: relative; z-index: 10; min-height: 50vh; }
.section-title, .section-subtitle { display: none !important; }
.page-section { padding: 40px 20px; }
.card { background: var(--beige-card); border: 1px solid var(--beige-line); border-radius: 20px; padding: 25px; box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.card::after { content: ""; display: table; clear: both; }

/* 5. NEWS & FILTER */
.category-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0 auto 30px auto; width: 100%; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; }
.news-link-btn, .back-btn, .filter-btn { display: inline-block; background: var(--beige-accent) !important; border: 1px solid var(--beige-line) !important; color: var(--green-text) !important; padding: 6px 16px !important; border-radius: 50px !important; font-weight: 700 !important; font-family: 'Montserrat', sans-serif !important; cursor: pointer; font-size: 12px !important; transition: all 0.3s ease !important; text-decoration: none !important; text-transform: uppercase; }
.news-link-btn { float: right; margin-top: 15px; }
.category-tag { display: inline-block; background: var(--green-dark); color: white; font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 3px 12px; border-radius: 20px; margin-bottom: 12px; }

/* 6. SPIELERPROFILE */
.profile-layout { display: flex; gap: 40px; align-items: flex-start; margin-bottom: 40px; }
.profile-image-box { flex: 0 0 280px; max-width: 280px; position: relative; }
.profile-img { width: 100%; border-radius: 15px; border: 4px solid white; box-shadow: var(--shadow); }
.profile-name-tag { margin-top: -25px; margin-left: 15px; background: var(--green-dark); color: white; padding: 12px 20px; border-radius: 8px; position: relative; display: inline-block; z-index: 2; }
.profile-details { flex: 1; }
.gold-title { color: var(--green-dark); border-bottom: 2px solid var(--gold); padding-bottom: 10px; margin-bottom: 20px; font-family: 'Montserrat', sans-serif; font-size: 24px; }
.profile-table { width: 100%; border-collapse: collapse; }
.profile-table td { padding: 12px 5px; border-bottom: 1px solid var(--beige-line); }

/* 7. TRAININGSCENTER & GRIDS */
.team-grid, .results-grid, .info-grid, .video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-bottom: 40px; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,0.05); position: relative; padding-left: 20px; }
.mini-list li::before { content: "•"; position: absolute; left: 0; color: var(--gold); font-weight: bold; }
.player-link { color: var(--link-blue); font-weight: 600; }
.player-link:hover { color: var(--gold-dark); text-decoration: underline; }

/* 8. ERGEBNISSE & ERFOLGE */
.mini-result-card { background: #fff; border-top: 3px solid var(--green-dark); border-radius: 4px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); display: flex; flex-direction: column; }
.match-info { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.score-box { font-weight: 700; padding: 4px 10px; border-radius: 2px; min-width: 50px; text-align: center; }
.score-box.win { background: var(--green-dark); color: white; }
.score-box.loss { background: #873939; color: #ffffff; }

.success-grid { display: flex; flex-direction: column; gap: 30px; }
.success-item { display: flex; gap: 30px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--beige-line); }
.success-year { flex: 0 0 150px; font-family: 'Cinzel', serif; font-size: 60px; font-weight: 700; color: var(--gold); text-align: right; }
.success-list { list-style: none; padding: 0; }
.success-list li::before { content: "🏆"; margin-right: 10px; }

/* 9. FOOTER & MOBILE FIXES */
footer { background: var(--green-dark) !important; color: white !important; margin-top: 80px; padding: 50px 0; }
.footer-inner { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }

@media (max-width: 768px) {
  /* NAVIGATION FIX */
  .main-nav { position: relative !important; }
  .nav-list { flex-direction: column; align-items: center; }
  .nav-link { width: 100%; text-align: center; border-bottom: 1px solid var(--beige-line); border-radius: 0; }
  
  /* HEADER FIX MOBILE */
  .title-bar { 
    flex-direction: column; 
    text-align: center; 
    padding: 20px 15px;
    gap: 15px;
  }
  .logo-box { flex: 0 0 auto; width: 80px; margin: 0 auto; }
  .site-title { width: 100%; }
  .tt-line { justify-content: center; }
  .hero-inner { padding: 20px 0; }
  .hero-copy { text-align: center; padding: 15px 10px; }

  /* PROFILE & GRIDS FIX */
  .profile-layout { flex-direction: column; align-items: center; }
  .profile-image-box { flex: 0 0 auto; width: 100%; max-width: 280px; }
  .profile-name-tag { margin-left: 0; left: 50%; transform: translateX(-50%); width: 90%; text-align: center; }
  .success-item { flex-direction: column; text-align: center; }
  .success-year { flex: 0 0 auto; text-align: center; width: 100%; font-size: 50px; }
  .news-grid, .team-grid, .results-grid, .video-grid { grid-template-columns: 1fr; }
}