/* ============================================
   IV LIGA THADER CHESS - Unified Styles
   Theme: Dark Chess Luxury with Gold Accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-elevated: #1e1e2a;
  --bg-input: #12121a;

  --gold-100: #ffc278;
  --gold-200: #ffae4b;
  --gold-300: #ff8b00;
  --gold-400: #d4a82a;
  --gold-500: #b8941e;
  --gold-600: #9a7b16;

  --blue-400: #4a9eff;
  --blue-500: #2d7fe0;
  --blue-600: #1a5fb0;
  --blue-glow: rgba(74, 158, 255, 0.15);

  --text-primary: #eaeaf0;
  --text-secondary: #9595a8;
  --text-muted: #5e5e72;
  --text-gold: var(--gold-300);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-gold: rgba(232, 197, 71, 0.2);
  --border-hover: rgba(232, 197, 71, 0.4);

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow-gold: 0 0 30px rgba(232, 197, 71, 0.08);
  --shadow-glow-blue: 0 0 30px rgba(74, 158, 255, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-display: 'Poppins';
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --nav-height: 64px;
  --max-width: 1280px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(232, 197, 71, 0.03) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(74, 158, 255, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Chess board subtle pattern */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.008) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.008) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.008) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.008) 75%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

a {
  color: var(--gold-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--gold-200);
}

img {
  max-width: 100%;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0.8rem;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: background var(--transition-smooth);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-300);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-logo-text span {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 1.2rem;
  display: block;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--gold-400);
  border-radius: 1px;
  transition: transform var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-300);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 1001;
}

/* Mobile menu */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 5rem 1.5rem 2rem;
    gap: 0.25rem;
    transition: right var(--transition-smooth);
    overflow-y: auto;
    border-left: 1px solid var(--border-subtle);
    z-index: 1000;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-mobile-overlay.open {
    display: block;
  }

  .nav-links a {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .nav-links a::after { display: none; }

  .nav-links a.active {
    background: rgba(232, 197, 71, 0.08);
    border-radius: var(--radius-md);
  }
}

/* --- Main Content --- */
.main-content {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* --- Page Header --- */
.page-header {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  position: relative;
}

.page-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  margin: 1.5rem auto 0;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.page-title .accent {
  color: var(--gold-300);
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-weight: 300;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-gold);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 197, 71, 0.08);
  border: 1px solid rgba(232, 197, 71, 0.12);
  border-radius: var(--radius-md);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-200);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Bases/Normas Document --- */
.document-container {
  max-width: 800px;
  margin: 0 auto;
}

.doc-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.25rem;
  transition: border-color var(--transition-fast);
}

.doc-section:hover {
  border-color: var(--border-gold);
}

.doc-section-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-500);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.25rem;
}

.doc-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-200);
  margin-bottom: 1rem;
}

.doc-section p,
.doc-section li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.doc-section ul, .doc-section ol {
  padding-left: 1.5rem;
}

.doc-section li {
  margin-bottom: 0.4rem;
}

.doc-section li::marker {
  color: var(--gold-500);
}

.doc-highlight {
  color: var(--gold-300);
  font-weight: 500;
}

/* --- Calendar --- */
.calendar-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.calendar-month {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.calendar-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(232, 197, 71, 0.04);
  border-bottom: 1px solid var(--border-subtle);
}

.calendar-month-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-200);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-subtle);
}

.calendar-day-header {
  padding: 0.6rem 0.25rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--bg-card);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  position: relative;
  cursor: default;
  transition: all var(--transition-fast);
  min-height: 48px;
  padding: 0.25rem;
}

.calendar-day.empty {
  background: var(--bg-secondary);
}

.calendar-day.has-event {
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 500;
}

.calendar-day.has-event:hover {
  background: rgba(232, 197, 71, 0.08);
}

.calendar-day.default-day {
  background: rgba(232, 197, 71, 0.06);
}

.calendar-day.default-day::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-400);
}

.calendar-day.event-week {
  background: rgba(74, 158, 255, 0.04);
}

.calendar-day.event-week::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-400);
  opacity: 0.6;
}

.calendar-day.today {
  outline: 2px solid var(--gold-400);
  outline-offset: -2px;
  border-radius: 4px;
}

/* Calendar Tooltip */
.calendar-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  min-width: 220px;
  z-index: 100;
  box-shadow: var(--shadow-card);
  pointer-events: none;
}

.calendar-day:hover .calendar-tooltip {
  display: block;
}

.calendar-tooltip-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-300);
  margin-bottom: 0.25rem;
}

.calendar-tooltip-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Event detail panel (mobile) */
.event-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  display: none;
}

.event-detail-panel.visible {
  display: block;
  animation: fadeSlideUp 0.3s ease;
}

.event-detail-panel h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-300);
  margin-bottom: 0.4rem;
}

.event-detail-panel p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Calendar Legend */
.calendar-legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.gold { background: var(--gold-400); }
.legend-dot.blue { background: var(--blue-400); opacity: 0.6; }
.legend-dot.outline {
  background: transparent;
  border: 2px solid var(--gold-400);
}

/* --- Groups Phase --- */
.groups-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .groups-container {
    grid-template-columns: 1fr;
  }
}

.group-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.group-header {
  padding: 1.25rem 1.5rem;
  background: rgba(232, 197, 71, 0.04);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.group-badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--bg-primary);
}

.group-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-200);
}

.group-header span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.player-list {
  list-style: none;
  padding: 0.5rem 0;
}

.player-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.5rem;
  gap: 0.75rem;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-subtle);
}

.player-item:last-child {
  border-bottom: none;
}

.player-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.player-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  flex-shrink: 0;
}

.player-item.qualified .player-rank {
  background: rgba(232, 197, 71, 0.1);
  color: var(--gold-400);
}

.player-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.player-elo {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.player-item.qualified .player-name {
  color: var(--gold-200);
  font-weight: 500;
}

/* Chess Results iframe container */
.iframe-container {
  margin: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: flex-start;
  justify-content: left;
}

.iframe-container iframe {
  width: 100%;
  height: 900px;
  border: none;
}

.iframe-placeholder {
  text-align: center;
  padding: 0.1rem;
  color: var(--text-muted);
}

.iframe-placeholder .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.iframe-placeholder p {
  font-size: 0.85rem;
}

/* --- Bracket (Phase Final) --- */
.bracket-container {
  overflow-x: auto;
  padding: 1rem 0 2rem;
  -webkit-overflow-scrolling: touch;
}

.bracket {
  display: flex;
  gap: 2rem;
  min-width: 900px;
  align-items: stretch;
  padding: 1rem;
}

.bracket-round {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 200px;
}

.bracket-round-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-400);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.5rem;
}

.bracket-matches {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 1rem;
}

.bracket-match {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.bracket-match:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-glow-gold);
}

.bracket-player {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.85rem;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

.bracket-player:last-child {
  border-bottom: none;
}

.bracket-player.winner {
  color: var(--gold-200);
  font-weight: 600;
  background: rgba(232, 197, 71, 0.04);
}

.bracket-seed {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  width: 18px;
  text-align: center;
}

.bracket-player-name {
  flex: 1;
}

.bracket-score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  padding: 0.15rem 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.bracket-player.winner .bracket-score {
  background: rgba(232, 197, 71, 0.12);
  color: var(--gold-300);
}

/* Third place match */
.third-place-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.third-place-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1rem;
}

.third-place-match {
  max-width: 280px;
  margin: 0 auto;
}

/* --- Directos (Streams) --- */
.streams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.25rem;
}

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

.stream-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.stream-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-glow-gold);
}

.stream-embed {
  aspect-ratio: 16 / 9;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.stream-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.stream-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.stream-placeholder .icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.3;
}

.stream-placeholder p {
  font-size: 0.82rem;
}

.stream-info {
  padding: 1rem 1.25rem;
}

.stream-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stream-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stream-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.stream-badge.live {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.stream-badge.youtube {
  background: rgba(255, 0, 0, 0.1);
  color: #ff4444;
  border: 1px solid rgba(255, 0, 0, 0.2);
}

.stream-badge.twitch {
  background: rgba(145, 70, 255, 0.1);
  color: #9146ff;
  border: 1px solid rgba(145, 70, 255, 0.2);
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(10, 10, 15, 0.6);
}

.footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--gold-500);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold-300);
}

/* --- Animations --- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  animation: fadeSlideUp 0.5s ease both;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }
.animate-in:nth-child(7) { animation-delay: 0.35s; }
.animate-in:nth-child(8) { animation-delay: 0.4s; }
.animate-in:nth-child(9) { animation-delay: 0.45s; }
.animate-in:nth-child(10) { animation-delay: 0.5s; }
.animate-in:nth-child(11) { animation-delay: 0.55s; }
.animate-in:nth-child(12) { animation-delay: 0.6s; }

/* --- Info Banner --- */
.info-banner {
  background: rgba(74, 158, 255, 0.06);
  border: 1px solid rgba(74, 158, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.info-banner .icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.info-banner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Tabs for sub-sections --- */
.tab-bar {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.3rem;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: rgba(232, 197, 71, 0.1);
  color: var(--gold-300);
}

/* --- Desempate rules --- */
.tiebreak-flow {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tiebreak-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.tiebreak-step:hover {
  border-color: var(--border-gold);
}

.tiebreak-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.tiebreak-content h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.tiebreak-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Scroll indicator --- */
.scroll-hint {
  text-align: center;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: none;
}

@media (max-width: 960px) {
  .scroll-hint { display: block; }
}

/* --- Utility --- */
.text-gold { color: var(--gold-300); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }


/* --- FOOTER STYLES --- */
.main-footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    padding-top: 4rem;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Sección de Patrocinadores */
.sponsors-section {
    margin-bottom: 4rem;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.divider-line {
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 42, 0.3), transparent);
}

.section-label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    white-space: nowrap;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .sponsors-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .sponsors-grid { grid-template-columns: repeat(6, 1fr); }
}

.sponsor-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    transition: transform var(--transition-fast);
    opacity: 0.85;
}

.sponsor-item:hover {
    transform: scale(1.05);
    opacity: 1;
}

.sponsor-logo {
    max-height: 45px;
    max-width: 100%;
    object-fit: contain;
}

/* Parrilla principal de información */
.footer-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-main-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .footer-main-grid { grid-template-columns: 1.2fr 0.8fr 1fr; }
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col h4::before {
    content: '';
    width: 4px;
    height: 14px;
    background-color: var(--gold-300);
    border-radius: 2px;
}

/* Branding Col */
.brand-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-box {
    width: 50pxx;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-300);
    font-weight: bold;
    font-size: 1.2rem;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.brand-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 300px;
}

/* Listas de Enlaces */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--gold-300);
}

/* Contacto */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    color: var(--gold-300);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-text p {
    margin: 0;
    font-size: 0.85rem;
}

.contact-text .label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.contact-text .value {
    color: var(--text-secondary);
}

.contact-text a {
    color: var(--text-secondary);
    text-decoration: none;
}

/* Barra Inferior */
.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom { flex-direction: row; }
}

.copyright {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.social-link {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.social-link:hover {
    color: var(--gold-300);
}