/* ==========================================================================
   1. FONTS & DESIGN TOKENS
   ========================================================================== */
@font-face {
  font-family: 'Fontin';
  src: url('./fonts/Fontin-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fontin';
  src: url('./fonts/Fontin-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fontin';
  src: url('./fonts/Fontin-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Farben */
  --c-copper: #724021;
  --c-gold-dark: #a0892c;
  --c-gold-light: #d8b457; /* NUR FÜR LINKS UND DEN HERO-HEADER */
  --c-bg-earth: #2d0e05;
  --c-fabric-grey: #737373;
  
  /* Texturen & Oberflächen */
  --c-bg-surface: #1e0903;
  --c-bg-card: rgba(36, 14, 8, 0.92);
  --c-text-primary: #ffffff; /* Reines Weiß für Primärtexte */
  --c-text-muted: #b8a28d;   /* Gedämpftes Muted für Sekundärtexte */
  
  --font-serif: 'Fontin', Georgia, 'Times New Roman', serif;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --max-w: 1180px;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--c-bg-earth);
  color: var(--c-text-primary);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  filter: url(#leather-fabric-grain);
  opacity: 0.75;
}

.is-hidden {
  display: none !important;
}

/* Alle Überschriften standardmäßig Weiß */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-text-primary);
}

/* ==========================================================================
   3. LINKS: EXKLUSIV GELB-GOLD, KURSIV & GESTRICHELT / GEPUNKTET
   ========================================================================== */
a.link-stitched, 
p a:not(.badge-btn) {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--c-gold-light);
  text-decoration: none;
  border-bottom: 1.5px dotted var(--c-gold-light);
  padding-bottom: 1px;
  display: inline-block;
  transition: transform 0.2s ease, text-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

a.link-stitched:hover, 
p a:not(.badge-btn):hover,
a.link-stitched:focus-visible {
  color: #ffffff;
  border-bottom-color: #ffffff;
  transform: scale(1.04);
  text-shadow: 0 0 10px rgba(216, 180, 87, 0.85);
}

.muted-link {
  color: var(--c-text-muted) !important;
  border-bottom-color: var(--c-text-muted) !important;
}
.muted-link:hover {
  color: #ffffff !important;
  border-bottom-color: #ffffff !important;
}

/* ==========================================================================
   4. HERO BANNER & TEXT (Zentriert über dem Tennisfeld im rechten Quadranten)
   ========================================================================== */
.hero-section {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  padding: 0 1rem;
}

.hero-frame-container {
  position: relative;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  border: none;
  background: transparent;
  line-height: 0;
}

.hero-canvas {
  position: relative;
  width: 100%;
}

.hero-bg-img {
  width: 100%;
  height: auto;
  display: block;
}

/* 
  hero-content-right: 
  - top: 58% senkt den Block tiefer in das Tennisfeld ab (Richtung Tennisball).
*/
.hero-content-right {
  position: absolute;
  top: 58%;
  left: 54%;
  right: 6%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

/* Titel: font-size angehoben */
.hero-title {
  font-size: clamp(2.1rem, 3.4vw, 3.2rem);
  color: var(--c-gold-light);
  line-height: 1.05;
  margin-bottom: 0.35rem;
}

/* Subtitle: Minimal angepasst für harmonische Proportionen */
.hero-subtitle {
  font-size: clamp(0.98rem, 1.3vw, 1.22rem);
  font-style: normal;
  color: var(--c-text-muted);
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

/* Buttons: Font-Size und Padding vergrößert */
.badge-btn {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  padding: 0.45rem 0.95rem;
  border-radius: 3px;
  display: inline-block;
  line-height: 1.3;
}

/* U12 Category: Weiß, Neutral */
.badge-static {
  font-weight: 700;
  font-style: normal;
  color: var(--c-text-primary);
  background: rgba(30, 9, 3, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* FITP Registered: Link in Gold, Kursiv mit gestrichelter Unterkante */
.badge-interactive-link {
  font-style: italic;
  font-weight: 600;
  color: var(--c-gold-light);
  background: rgba(30, 9, 3, 0.9);
  border: 1px dashed rgba(160, 137, 44, 0.4);
  border-bottom: 2px dashed var(--c-gold-light);
  text-decoration: none;
  transition: transform 0.2s ease, text-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.badge-interactive-link:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
  text-shadow: 0 0 10px rgba(216, 180, 87, 0.85);
  transform: translateY(-2px) scale(1.02);
}

/* ==========================================================================
   5. MOTTO RIBBON (Balken-Effekt entfernt, reine Textzeile)
   ========================================================================== */
.motto-ribbon-wrapper {
  max-width: var(--max-w);
  margin: 1.25rem auto 2.5rem;
  padding: 0 1rem;
}

.motto-ribbon {
  background: none; /* Balken-Hintergrund entfernt */
  border: none;     /* Gestrichelte Linien oben/unten entfernt */
  padding: 0;
  text-align: center;
}

.motto-ribbon p {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-text-muted); /* Muted statt grell, erzeugt keine Balkenoptik */
}

/* ==========================================================================
   6. TRACK RECORD & RESULTS
   ========================================================================== */
.page-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.section {
  margin-bottom: 4.5rem;
}

.section-header {
  margin-bottom: 2rem;
  border-bottom: 1px dashed rgba(160, 137, 44, 0.3);
  padding-bottom: 0.75rem;
}

.section-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-text-muted); /* Muted, kein Gold */
  display: block;
}

.section-title {
  font-size: 2rem;
  color: var(--c-text-primary);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.5rem;
}

.stitched-card {
  background-color: var(--c-bg-card);
  border: 1.5px dashed var(--c-gold-dark);
  border-radius: 4px;
  padding: 1.75rem;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7), 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.stitched-card:hover,
.stitched-card.center-focus {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--c-gold-light);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7), 0 12px 30px rgba(0, 0, 0, 0.8);
}

/*
  Harmonisierte Status-Badges:
  - Identische Hintergrundfarbe bei allen drei
  - Schrift Weiß
  - KEINE gestrichelte Linie unten, da kein Link
*/
.card-status-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0.45rem 0.95rem;
  border-radius: 3px;
  margin-bottom: 0.85rem;
  background-color: rgba(114, 64, 33, 0.6); /* Harmonisierter Hintergrund */
  color: var(--c-text-primary);             /* Harmonisierte Textfarbe Weiß */
  border: 1.5px dashed rgba(184, 162, 141, 0.35);
  border-bottom: none;                      /* Gestrichelte Linie unten entfernt */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.card-date {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--c-fabric-grey);
  margin-bottom: 0.35rem;
}

.card-tournament-title {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
  color: var(--c-text-primary);
}

.match-opponent-highlight {
  background: rgba(18, 4, 1, 0.85);
  border-left: 3px solid var(--c-copper);
  padding: 0.6rem 0.85rem;
  font-size: 1rem;
  color: var(--c-text-primary);
  margin-bottom: 0.5rem;
}

.match-score-panel {
  background: rgba(18, 4, 1, 0.95);
  border: 1px solid rgba(160, 137, 44, 0.2);
  padding: 0.75rem 1rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}

/* Match Digits in Weiß (kein Gold) */
.match-digits {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 1px;
  color: var(--c-text-primary);
}

.tournament-context-box {
  font-size: 0.92rem;
  color: var(--c-text-muted);
  background: rgba(18, 4, 1, 0.6);
  padding: 0.75rem 0.9rem;
  border-radius: 3px;
  border-left: 2px solid var(--c-copper);
  margin-bottom: 1.25rem;
}

.match-path-list {
  list-style: none;
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
}

/* Titles Listing */
.titles-listing {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.title-entry {
  background: rgba(18, 4, 1, 0.6);
  padding: 0.65rem 0.85rem;
  border-radius: 3px;
  border-left: 2px solid var(--c-copper);
}

.title-meta {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c-text-muted); /* Muted, kein Gold */
}

.title-final {
  font-size: 0.98rem;
  color: var(--c-text-primary);
}

.score-pill {
  color: var(--c-text-primary); /* Weiß, kein Gold */
  font-family: var(--font-ui);
  letter-spacing: 0.5px;
  margin-left: 0.25rem;
}

/* ==========================================================================
   7. DNA & PROFILE SECTION
   ========================================================================== */
.profile-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.block-title {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
  color: var(--c-text-primary);
}

.block-intro {
  font-size: 0.95rem;
  color: var(--c-text-muted);
  margin-bottom: 1.5rem;
}

.dna-indicators {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dna-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dna-label {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-primary);
}

.dna-meter {
  height: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--c-copper);
  border-radius: 4px;
  overflow: hidden;
}

.dna-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--c-copper), var(--c-gold-dark));
}

.roadmap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.roadmap-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.96rem;
}

.roadmap-list li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: var(--c-copper);
  font-size: 1.2rem;
  line-height: 1;
}

/* ==========================================================================
   8. MEDIA GALLERY
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.video-feature-card {
  grid-column: 1 / -1;
  padding: 1rem;
}

.video-container-16-9 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #120401;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--c-copper);
}

.video-container-16-9 video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-caption {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  text-align: center;
  margin-top: 0.6rem;
}

.gallery-card {
  padding: 0.75rem;
  cursor: pointer;
}

.gallery-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #120401;
  border: 1px solid rgba(160, 137, 44, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-thumb-wrap img, .placeholder-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-thumb-wrap img,
.gallery-card:hover .placeholder-svg {
  transform: scale(1.05);
}

.gallery-caption {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-top: 0.6rem;
  text-align: center;
}

/* ==========================================================================
   9. CONTACT & ACADEMY
   ========================================================================== */
.contact-card {
  padding: 2.25rem;
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px dashed rgba(160, 137, 44, 0.3);
  padding-bottom: 1rem;
}

.contact-badge-img {
  width: 55px;
  height: 55px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.contact-col h3 {
  font-size: 1.15rem;
  color: var(--c-text-primary);
  margin-bottom: 0.5rem;
}

.staff-list {
  color: var(--c-text-muted);
  margin: 0.3rem 0 0.85rem;
  font-size: 0.95rem;
}

.contact-subhead {
  font-size: 0.85rem;
  font-family: var(--font-ui);
  text-transform: uppercase;
  color: var(--c-text-muted);
  font-weight: 700;
  margin-top: 0.75rem;
}

.whatsapp-box {
  margin-top: 0.75rem;
}

.whatsapp-link {
  color: #25d366 !important;
  border-bottom-color: #25d366 !important;
}

/* ==========================================================================
   10. SPONSORS MARQUEE (Links in Gold)
   ========================================================================== */
.marquee-wrapper {
  overflow: hidden;
  padding: 1.25rem 0;
  user-select: none;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-list {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  padding: 0 1.25rem;
}

/* Sponsoren-Links in Gold */
.marquee-list li a {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 700;
  font-style: normal !important;
  text-decoration: none !important;
  border-bottom: none !important;
  letter-spacing: 1px;
  color: var(--c-gold-light);
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.marquee-list li a:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.and-more-pill {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--c-fabric-grey);
  white-space: nowrap;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   11. FOOTER & DIALOG
   ========================================================================== */
.site-footer {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--c-fabric-grey);
  padding: 2.5rem 1rem;
  border-top: 1px dashed rgba(160, 137, 44, 0.2);
}

.photo-dialog {
  margin: auto;
  border: 2px dashed var(--c-gold-dark);
  border-radius: 4px;
  background-color: var(--c-bg-earth);
  color: var(--c-text-primary);
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.95);
  padding: 0;
  overflow: hidden;
}

.photo-dialog::backdrop {
  background-color: rgba(18, 4, 1, 0.88);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  position: relative;
}

.dialog-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--c-text-muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.dialog-close:hover { color: #ffffff; }

.dialog-media {
  max-width: 100%;
  max-height: 65vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0;
}

.dialog-media img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border: 1px solid var(--c-copper);
}

.dialog-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.nav-btn {
  background: var(--c-bg-surface);
  border: 1px dashed var(--c-gold-dark);
  color: var(--c-gold-light);
  font-family: var(--font-ui);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
}

.nav-btn:hover {
  background-color: var(--c-copper);
  color: #ffffff;
}

.dialog-caption {
  font-size: 0.95rem;
  text-align: center;
}

/* ==========================================================================
   12. MOBILE BREAKPOINT (Proportionaler Fix für 700px - 900px)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-canvas {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
  }

  /* 
    Garantiert 100% proportionale Skalierung ohne Stauchung oder Verzerrung.
    Kein starres max-height mehr.
  */
  .hero-bg-img {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1556 / 672;
    object-fit: contain;
    display: block;
  }

  .hero-content-right {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    padding: 1.5rem 1rem;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   13. DESKTOP 1920px+ SKALIERUNG (Erweiterung am Ende der style.css)
   ========================================================================== */
@media (min-width: 1600px) {
  :root {
    /* Nutzt 1920px Bildschirme voll aus, nähert sich der nativen Bildbreite 1556px */
    --max-w: 1520px;
  }

  body {
    font-size: 1.18rem; /* Skaliert Typografie und rem-basierte Grids proportional */
  }

  .section-title {
    font-size: 2.35rem;
  }

  .hero-title {
    font-size: 3.6rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .badge-btn {
    font-size: 1.02rem;
    padding: 0.5rem 1.05rem;
  }

  .stitched-card {
    padding: 2.25rem;
  }

  .cards-grid {
    gap: 2rem;
  }
}