/* ===================================================
   VARIABLES GLOBALES & RESET
   =================================================== */
   
/* =========================================================
   FADE-IN LIMPIO Y FLUIDO (CERO PARPADEO)
   ========================================================= */

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 
   Animar directamente el contenedor principal 'main' solo en opacidad pura.
   Al no mover la posición (sin translateY ni 3D), la GPU no tiene que 
   calcular capas transparentes superpuestas ni borrar fondos negros.
*/
main,
.admin-container {
  animation: pageFadeIn 0.6s ease-out forwards;
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  main,
  .admin-container {
    animation: none !important;
  }
}

   
   
:root {
  --bg-color: #09090b;
  --surface-color: #121215;
  --surface-border: rgba(255, 255, 255, 0.08);
  --primary-red: #e30613;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===================================================
   HEADER & NAVEGACIÓN
   =================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
  width: 100%;
}

.header-top {
  max-width: 1400px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: relative;
}

/* Control estricto de tamaño del Logo */
.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  max-width: 65%;
  height: 100%;
}

.site-logo {
  height: 70px;
  max-height: 70px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Enlaces en Computadora */
.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 1.5rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
}

.btn-admin-nav {
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(227, 6, 19, 0.5);
  background: rgba(227, 6, 19, 0.15);
  border-radius: 4px;
  color: #fff !important;
}

/* Botón Hamburguesa */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn .bar {
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

/* Transformación de barras a cruz cuando se activa */
.mobile-menu-btn.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active .bar:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===================================================
   TABS DE CATEGORÍAS (ESTILO ACTC)
   =================================================== */
.category-tabs-container {
  border-top: 1px solid var(--surface-border);
  background: #000;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.category-tabs-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.category-tabs {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
}

.category-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  height: 40px;
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: transparent;
  border-bottom: 3px solid var(--cat-color);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.category-tab:hover,
.category-tab.active {
  background: var(--cat-color);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  -webkit-clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

/* ===================================================
   ESTRUCTURA GENERAL
   =================================================== */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ===================================================
   CARRUSEL DE NOTICIAS
   =================================================== */
.carousel-container {
  position: relative;
  height: 480px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  margin-bottom: 2rem;
  background: #000;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  background-size: cover;
  background-position: center;
}

.carousel-slide.active {
  opacity: 1;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.65) 45%, transparent 100%);
  display: flex;
  align-items: center;
  padding: 2.5rem;
}

.slide-content {
  max-width: 600px;
}

.badge {
  display: inline-block;
  background: var(--primary-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.slide-content h2 {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.slide-content p {
  color: #d4d4d8;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ===================================================
   TARJETA PRÓXIMA CARRERA & CONTADOR
   =================================================== */
.race-card {
  position: relative;
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 0px 20px rgba(245, 42, 7, 0.7);
}

.race-info h3 {
  font-size: 1.35rem;
  font-weight: 900;
  margin-top: 0.25rem;
  text-transform: uppercase;
}

.race-info span.location {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: block;
  margin-top: 0.2rem;
}

.countdown-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.digit-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.digit-boxes {
  display: flex;
  gap: 3px;
}

.digit-box {
  background: #000;
  border: 1px solid var(--surface-border);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0.35rem 0.5rem;
  border-radius: 3px;
  transform: skewX(-6deg);
  min-width: 28px;
  text-align: center;
  box-shadow: inset 0 -2px 0 0 rgba(255, 255, 255, 0.08);
}

.digit-box.red {
  color: var(--primary-red);
}

.digit-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 5px;
}

.timer-sep {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.race-actions {
  display: flex;
  gap: 0.75rem;
}

.btn {
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--primary-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(227, 6, 19, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid var(--surface-border);
}

.btn:hover {
  opacity: 0.88;
}

/* ===================================================
   SECCIÓN DE VIDEO EN VIVO (YOUTUBE)
   =================================================== */
.section-title {
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--primary-red);
  border-radius: 1px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Relación 16:9 */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  margin-bottom: 3rem;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===================================================
   SPONSORS
   =================================================== */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  margin-bottom: 3rem;
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

.sponsor-item {
  display: flex;
  justify-content: center;
  align-items: center;
  filter: grayscale(100%);
  opacity: 0.45;
  transition: all 0.3s ease;
}

.sponsor-item:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.sponsor-item img {
  max-width: 100%;
  height: 48px;
  object-fit: contain;
}

/* ===================================================
   RESPONSIVE MÓVIL (PANTALLAS <= 768px)
   =================================================== */
@media (max-width: 768px) {
  .header-top {
    height: 60px;
    padding: 0 1rem;
  }

  /* Ajuste de escala estricto para el logo */
  .brand-link {
    max-width: 70%;
  }

  .site-logo {
    height: 50px;
    max-height: 50px;
  }

  /* Mostrar botón hamburguesa */
  .mobile-menu-btn {
    display: flex;
  }

  /* Menú desplegable */
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #09090b;
    border-bottom: 2px solid var(--primary-red);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.75rem;
    gap: 0.25rem;
    z-index: 99;
  }

  .nav-links.open {
    display: flex !important;
  }

  .nav-links a {
    margin-left: 0;
    font-size: 0.95rem;
    padding: 0.85rem 0.5rem;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .btn-admin-nav {
    margin-top: 0.75rem;
    text-align: center;
  }

  /* Adaptación de contenidos en móvil */
  .main-container {
    padding: 1rem;
  }

  .carousel-container {
    height: 360px;
  }

  .slide-overlay {
    padding: 1.5rem;
  }

  .slide-content h2 {
    font-size: 1.4rem;
  }

  .slide-content p {
    font-size: 0.85rem;
  }

  .race-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .race-info span.location {
    font-size: 0.8rem;
  }

  .countdown-timer {
    justify-content: center;
  }

  .race-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .race-actions .btn {
    flex: 1;
    min-width: 140px;
  }
}

/* ===================================================
   PORTADA: BANNER PRINCIPAL (CORREGIDO)
   =================================================== */
.hero-news-card {
  position: relative;
  height: 480px;
  border-radius: 14px;
  overflow: hidden; /* Recorta imagen y overlays */
  border: 1.5px solid #009BF5; /* Borde celeste solicitado */
  margin-bottom: 2rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 155, 245, 0.15); /* Resplandor suave a tono */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  /* Evita artefactos de renderizado en esquinas redondeadas */
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.hero-news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 155, 245, 0.3);
}

.hero-news-overlay {
  position: absolute;
  inset: 0;
  /* El degradado cubre completamente desde el borde izquierdo */
  background: linear-gradient(90deg, rgba(9, 9, 11, 0.94) 0%, rgba(9, 9, 11, 0.65) 50%, transparent 100%);
  display: flex;
  align-items: center;
  padding: 3rem;
}

.hero-news-overlay h2 {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.hero-news-overlay p {
  color: #d4d4d8;
  font-size: 1rem;
  line-height: 1.45;
}

/* Grilla inferior de noticias */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.news-card-item {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.news-card-item:hover {
  transform: translateY(-4px);
  border-color: rgba(227, 6, 19, 0.5);
}

.news-card-thumb {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--surface-border);
}

.news-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-body h4 {
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.news-card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
  flex: 1;
}

.news-card-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-red);
  text-transform: uppercase;
}

/* ===================================================
   VISTA DE NOTICIA INDIVIDUAL (CORREGIDA)
   =================================================== */
.article-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 60vh;
  min-height: 440px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  /* Borde inferior del mismo color celeste */
  border-bottom: 2px solid #009BF5;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  /* Se funde al 100% con #09090b en el fondo para que no quede corte duro */
  background: linear-gradient(
    180deg, 
    rgba(9, 9, 11, 0.3) 0%, 
    rgba(9, 9, 11, 0.8) 70%, 
    #09090b 100%
  );
}

.article-hero-content {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem 2.5rem;
  z-index: 10;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.16);
}

.article-hero-content h1 {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.article-hero-content .article-dek {
  font-size: 1.15rem;
  color: #e4e4e7;
  line-height: 1.5;
  max-width: 850px;
  margin-bottom: 1rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.article-body-container {
  max-width: 850px;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
}

.article-body-text {
  font-size: 1.15rem;
  line-height: 1.85;
  color: #d4d4d8;
  white-space: pre-line;
}

/* Letra Capital ACTC */
.article-body-text::first-letter {
  font-size: 4.5rem;
  float: left;
  line-height: 0.8;
  margin-right: 0.85rem;
  margin-top: 0.25rem;
  font-weight: 900;
  color: var(--primary-red);
}


/* ===================================================
   PÁGINA CAMPEONATOS: ACORDEÓN EXPANDIBLE (ESTILO ACTC)
   =================================================== */
.championship-header {
  margin: 1.5rem 0 3rem;
  max-width: 800px;
}

.championship-header h1 {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0.5rem 0;
}

.championship-header p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.championship-group {
  margin-bottom: 3.5rem;
}

.group-title {
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.group-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #009BF5;
  border-radius: 1px;
}

/* Galería de cards expandibles */
.accordion-gallery {
  display: flex;
  gap: 0.85rem;
  height: 440px;
  width: 100%;
}

.accordion-card {
  position: relative;
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-decoration: none;
  color: #fff;
  border: 1px solid var(--surface-border);
  cursor: pointer;
  transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease;
  transform: translateZ(0);
}

/* Expansión al pasar el mouse */
.accordion-gallery:hover .accordion-card.active:not(:hover) {
  flex: 1;
}

.accordion-card:hover,
.accordion-card.active {
  flex: 4.5;
  border-color: var(--accent-cat);
}

.card-glass-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,9,11,0.2) 0%, rgba(9,9,11,0.85) 75%, #09090b 100%);
  transition: opacity 0.3s ease;
}

.accordion-card:hover .card-glass-overlay,
.accordion-card.active .card-glass-overlay {
  background: linear-gradient(180deg, rgba(9,9,11,0.1) 0%, rgba(9,9,11,0.7) 60%, rgba(9,9,11,0.95) 100%);
}

.card-top-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
}

.cat-pill {
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Título vertical en tarjetas colapsadas */
.card-vertical-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.card-vertical-title span {
  transform: rotate(-90deg);
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.accordion-card:hover .card-vertical-title,
.accordion-card.active .card-vertical-title {
  opacity: 0;
}

/* Contenido cuando la tarjeta se abre */
.card-expanded-content {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
  pointer-events: none;
}

.accordion-card:hover .card-expanded-content,
.accordion-card.active .card-expanded-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cat-lead {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-cat);
  margin-bottom: 0.25rem;
  display: block;
}

.card-expanded-content h2 {
  font-size: 1.85rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.card-expanded-content p {
  color: #d4d4d8;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
  max-width: 450px;
}

.btn-view-ranking {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 2px solid var(--accent-cat);
  padding-bottom: 0.2rem;
  transition: gap 0.2s ease;
}

.accordion-card:hover .btn-view-ranking {
  gap: 0.75rem;
}

.card-bottom-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 15;
}

/* Responsive Móvil */
@media (max-width: 850px) {
  .accordion-gallery {
    height: auto;
    flex-direction: column;
    gap: 1rem;
  }

  .accordion-card {
    height: 220px;
    flex: none !important;
  }

  .card-vertical-title {
    display: none;
  }

  .card-expanded-content {
    opacity: 1;
    transform: none;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }

  .card-expanded-content h2 {
    font-size: 1.35rem;
  }

  .card-expanded-content p {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }
}



/* Responsive */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr; }
  .article-hero { height: auto; padding-top: 5rem; }
  .article-hero-content h1 { font-size: 1.85rem; }
  .article-hero-content .article-dek { font-size: 1rem; }
}










/* ===================================================
   VISTA CAMPEONATO: PODIO Y TABLA ACTC
   =================================================== */
.table-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.table-title-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-cat-badge {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.85rem;
}

.table-season-badge {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.table-right-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Podio Destacado */
.podium-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.podium-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.podium-card.pos-1 {
  border-color: #ffd200;
  padding-top: 2rem;
  background: linear-gradient(180deg, #1c1808 0%, var(--surface-color) 100%);
  transform: translateY(-10px);
}

.podium-card.pos-2 { border-color: rgba(255, 255, 255, 0.3); }
.podium-card.pos-3 { border-color: #cd7f32; }

.podium-place {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}
.pos-1 .podium-place { color: #ffd200; font-size: 2.2rem; }
.pos-2 .podium-place { color: #e4e4e7; }
.pos-3 .podium-place { color: #cd7f32; }

.podium-avatar-wrap {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  margin-bottom: 0.75rem;
  display: block;
}
.pos-1 .podium-avatar-wrap {
  width: 104px;
  height: 104px;
  border-color: #ffd200;
}

.podium-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-name {
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.podium-pts {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}
.pos-1 .podium-pts { color: #ffd200; }

.podium-badge-car {
  background: #000;
  border: 1px solid var(--surface-border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 0.5rem;
  color: var(--text-muted);
}

/* Tabla de Posiciones Scrollable */
.standings-box {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.standings-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-border);
}
.standings-header h4 { font-weight: 900; text-transform: uppercase; }
.pilot-count { font-size: 0.8rem; color: var(--text-muted); font-weight: 700; }

.table-scroll-wrapper {
  overflow-x: auto;
  width: 100%;
}

.actc-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.actc-table th {
  background: #0a0a0d;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--surface-border);
  text-align: center;
}

.actc-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--surface-border);
  font-size: 0.9rem;
  text-align: center;
}

.col-pos { width: 50px; }
.col-num { width: 60px; }
.col-pilot { text-align: left !important; min-width: 220px; }
.col-team { text-align: left !important; min-width: 160px; }
.col-total { font-weight: 900; min-width: 90px; }
.col-round { min-width: 110px; font-size: 0.85rem; }

.pos-number { font-weight: 800; color: var(--text-muted); }
.pos-number.top-three { color: #ffd200; font-size: 1.05rem; }

.car-pill {
  background: #000;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 800;
  border: 1px solid var(--surface-border);
}

.pilot-table-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
}
.pilot-table-link:hover { color: #009BF5; }

.pilot-mini-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.total-pts-box {
  background: rgba(255, 210, 0, 0.15);
  color: #ffd200;
  border: 1px solid rgba(255, 210, 0, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.win-trophy { font-size: 0.75rem; margin-left: 0.25rem; }
.pts-empty { color: #52525b; }

/* ===================================================
   VISTA PERFIL PILOTO (FICHA ESTILO OTTO FRITZLER)
   =================================================== */
.pilot-profile-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.pilot-left-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.pilot-cat-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cat-badge-link {
  background: #000;
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}
.cat-badge-link.active {
  border-color: #009BF5;
  color: #fff;
  background: rgba(0, 155, 245, 0.15);
}

.pilot-portrait-wrap {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--surface-border);
  margin-bottom: 1.5rem;
}
.pilot-full-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.pilot-left-info .first-name {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pilot-left-info .last-name {
  font-size: 2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 1.25rem;
}

.pilot-details-list div {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}
.pilot-details-list div span { color: var(--text-muted); }

/* Panel Derecho */
.pilot-right-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stats-box {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
}

.stats-box-title {
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: #fff;
}

.stats-grid-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: #09090b;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
}

.stat-card.highlight { border-color: rgba(255, 210, 0, 0.4); }

.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: #fff;
}
.stat-card.highlight .stat-num { color: #ffd200; }

.stat-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tech-sheet div {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}
.tech-sheet div span { color: var(--text-muted); margin-right: 0.5rem; }

/* Responsive */
@media (max-width: 900px) {
  .podium-container { grid-template-columns: 1fr; }
  .pos-1 { order: -1; transform: none; }
  .pilot-profile-layout { grid-template-columns: 1fr; }
  .stats-grid-cards { grid-template-columns: repeat(2, 1fr); }
}