/* ==========================================================================
   PADDOCK 360 - GLOBAL AUTOMOTIVE HUB
   Diseño de ingeniería automotriz de alta gama (Dark Mode Técnico & Artesanal)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Inter:wght@300;400;500;600;700&family=Rajdhani:wght@600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-deep: #07080b;
  --bg-surface: #0e0f15;
  --bg-card: #12131b;
  --bg-card-hover: #171822;
  
  --border-subtle: rgba(255, 255, 255, 0.065);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-active: #e11d48;
  
  /* Acentos de Competición */
  --carrera-red: #e11d48;
  --telemetry-amber: #f59e0b;
  --tech-cyan: #06b6d4;
  --gold-accent: #d97706;
  
  --font-racing: 'Rajdhani', sans-serif;
  --font-tech: 'Chakra Petch', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   FONDO GLOBAL: CUADRÍCULA DE TELEMETRÍA / PADDOCK CON LUZ CENITAL
   ========================================================================== */
body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse 90% 45% at 50% -10%, rgba(225, 29, 72, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 70% 35% at 90% 75%, rgba(245, 158, 11, 0.035) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 10% 45%, rgba(6, 182, 212, 0.03) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
  color: #e2e8f0;
  font-family: var(--font-body);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

.font-racing { font-family: var(--font-racing); }
.font-tech { font-family: var(--font-tech); }
.font-mono { font-family: var(--font-mono); }

/* ==========================================================================
   TARJETAS Y SUPERFICIES (ESTILO FIBRA / ALUMINIO SATINADO)
   ========================================================================== */
.metal-brushed {
  background: #0e0f16;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.metal-brushed:hover {
  border-color: var(--border-medium);
  box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.metal-brushed-pro {
  background: #111016;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 12px;
  box-shadow: 0 4px 22px -2px rgba(0, 0, 0, 0.6), 0 0 16px -4px rgba(217, 119, 6, 0.15);
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.metal-brushed-pro:hover {
  border-color: rgba(217, 119, 6, 0.6);
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.7), 0 0 24px -4px rgba(217, 119, 6, 0.25);
}

.metal-brushed-pro::after {
  content: '';
  position: absolute;
  top: 0; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.7), transparent);
  pointer-events: none;
}

/* Header con acabado de cristal ahumado de telemetría */
header {
  background: rgba(10, 11, 16, 0.84) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Bisel de botón táctil de competición */
.bevel-cut {
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.bevel-cut-sm {
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

/* ==========================================================================
   BOTONES Y ELEMENTOS DE CONTROL TÁCTILES
   ========================================================================== */
.btn-race-primary {
  background: linear-gradient(180deg, #e11d48 0%, #be123c 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35);
  transition: all 0.15s ease;
}
.btn-race-primary:hover {
  background: linear-gradient(180deg, #f43f5e 0%, #e11d48 100%);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.5);
  transform: translateY(-1px);
}
.btn-race-primary:active {
  transform: translateY(1px);
}

/* Pestañas de Navegación */
.nav-tab {
  position: relative;
  transition: all 0.2s ease;
}
.nav-tab.active {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}
.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 8px; right: 8px; height: 2px;
  background: #e11d48;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 -1px 6px rgba(225, 29, 72, 0.6);
}

/* ==========================================================================
   CHAPAS PATENTES INTERNACIONALES (AUTÉNTICAS Y FIDELIGNAS)
   ========================================================================== */
.plate-mercosur-ar {
  background: #ffffff;
  color: #000000;
  border-radius: 4px;
  border: 2px solid #003399;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.25), 0 3px 10px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.plate-mercosur-ar .plate-banner {
  background: #003399;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 2px;
  padding: 1.5px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.plate-us-california {
  background: #f8fafc;
  color: #1e3a8a;
  border-radius: 4px;
  border: 2px solid #64748b;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.2), 0 3px 10px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.plate-us-california .plate-banner {
  background: transparent;
  color: #dc2626;
  font-family: 'Brush Script MT', cursive, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
}

.plate-jp-daikoku {
  background: #f1f5f9;
  color: #047857;
  border-radius: 4px;
  border: 2px solid #94a3b8;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.2), 0 3px 10px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.plate-jp-daikoku .plate-banner {
  background: transparent;
  color: #047857;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  display: flex;
  justify-content: space-around;
  padding-top: 1px;
}

.plate-es-euro {
  background: #ffffff;
  color: #000000;
  border-radius: 4px;
  border: 2px solid #000000;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.2), 0 3px 10px rgba(0,0,0,0.5);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.plate-es-euro .plate-euro-band {
  background: #003399;
  color: #ffffff;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.75rem;
}

.plate-mx-cdmx {
  background: #ffffff;
  color: #111827;
  border-radius: 4px;
  border: 2px solid #475569;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.25), 0 3px 10px rgba(0,0,0,0.5);
  overflow: hidden;
}
.plate-mx-cdmx .plate-banner {
  background: #047857;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-align: center;
  padding: 1.5px;
}

.plate-br-mercosul {
  background: #ffffff;
  color: #000000;
  border-radius: 4px;
  border: 2px solid #003399;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.25), 0 3px 10px rgba(0,0,0,0.5);
  overflow: hidden;
}
.plate-br-mercosul .plate-banner {
  background: #003399;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 2px;
  padding: 1.5px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Marca de Agua Spotters */
.spotter-watermark {
  background: repeating-linear-gradient(
    -45deg,
    rgba(225, 29, 72, 0.08),
    rgba(225, 29, 72, 0.08) 12px,
    transparent 12px,
    transparent 36px
  );
  pointer-events: none;
}

.spotter-stamp {
  font-family: var(--font-tech);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 700;
  transform: rotate(-22deg);
  text-shadow: 0 0 8px rgba(0,0,0,0.9);
  border: 2px dashed rgba(225, 29, 72, 0.65);
  padding: 4px 12px;
}

/* ==========================================================================
   SCROLLBAR & ANIMACIONES
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #232533;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #e11d48;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-module {
  animation: fadeInSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   MEMBRESÍAS VIP & BENEFICIOS
   ========================================================================== */
.vip-gold-glow {
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.35), inset 0 0 8px rgba(217, 119, 6, 0.15);
  border-color: #d97706 !important;
}

.vip-silver-glow {
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.35), inset 0 0 8px rgba(148, 163, 184, 0.15);
  border-color: #94a3b8 !important;
}

.vip-badge-shimmer {
  background: linear-gradient(90deg, #d97706 0%, #fef08a 50%, #d97706 100%);
  background-size: 200% auto;
  color: #0a0a0d;
  animation: shimmerVip 3s infinite linear;
}

@keyframes shimmerVip {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Sticker de Luneta */
.calco-luneta-preview {
  position: relative;
  background: #0d0f17;
  border: 1px solid rgba(6, 182, 212, 0.5);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.7);
}

.calco-luneta-preview::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: skewX(-25deg);
  animation: calcoSheen 5s infinite ease-in-out;
}

@keyframes calcoSheen {
  0%, 75% { left: -100%; }
  100% { left: 200%; }
}

/* Podio Auto del Año */
.podium-first {
  border: 1px solid rgba(245, 158, 11, 0.6);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, #0e0f16 100%);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.15);
}
.podium-second {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.06) 0%, #0e0f16 100%);
}
.podium-third {
  border: 1px solid rgba(180, 83, 9, 0.4);
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.06) 0%, #0e0f16 100%);
}

/* Botones de Medalla */
.medal-btn {
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.medal-btn:hover {
  transform: translateY(-2px);
}
.medal-btn:active {
  transform: scale(0.96);
}
.medal-pop {
  animation: medalPopAnim 0.3s ease-out;
}
@keyframes medalPopAnim {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   STORIES & RED SOCIAL
   ========================================================================== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.story-ring-gold {
  background: linear-gradient(45deg, #d97706, #f59e0b, #ef4444);
  padding: 2px;
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

.story-ring-standard {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px;
  border-radius: 9999px;
}

.story-progress-segment {
  height: 2.5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  flex: 1;
}

.story-progress-fill {
  height: 100%;
  background: #ffffff;
  width: 0%;
  transition: width 0.1s linear;
}

.like-rev-btn {
  transition: transform 0.15s ease-in-out;
}
.like-rev-btn:active {
  transform: scale(1.2);
}

/* ==========================================================================
   HOMOGENEIZACIÓN DE SUPERFICIES Y BORDES (ZERO AI TEMPLATE LOOK)
   ========================================================================== */
.bg-\[\#141419\] {
  background-color: #0e0f16 !important;
}
.bg-\[\#1b1b22\] {
  background-color: #13141f !important;
}
.bg-\[\#0a0a0d\] {
  background-color: #07080b !important;
}
.border-\[\#262630\] {
  border-color: rgba(255, 255, 255, 0.075) !important;
}


/* ==========================================================================
   CELULAR: evita que la página se pueda "correr para el costado"
   (overflow-x: clip no rompe el header fijo, a diferencia de hidden)
   ========================================================================== */
html, body {
  max-width: 100%;
  overflow-x: clip;
}
img, video, canvas, iframe {
  max-width: 100%;
}


/* ==========================================================================
   FONDO DEL SPONSOR PRINCIPAL ("piel" de la página)
   La imagen va detrás de todo, oscurecida para que el contenido se lea bien.
   En pantallas anchas, los costados se ven más claros y se pueden tocar.
   ========================================================================== */
#sponsor-skin {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #08080c;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
#sponsor-skin::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 12, 0.78);
  pointer-events: none;
}
#sponsor-skin.hidden { display: none; }
.sponsor-skin-side, .sponsor-skin-tag { display: none; }

@media (min-width: 1024px) {
  #sponsor-skin::before {
    background: linear-gradient(to right,
      rgba(8, 8, 12, 0.25) 0%,
      rgba(8, 8, 12, 0.86) calc(50% - 34rem),
      rgba(8, 8, 12, 0.86) calc(50% + 34rem),
      rgba(8, 8, 12, 0.25) 100%);
  }
}
@media (min-width: 1360px) {
  .sponsor-skin-side {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc((100vw - 72rem) / 2);
    cursor: pointer;
  }
  .sponsor-skin-left { left: 0; }
  .sponsor-skin-right { right: 0; }
  .sponsor-skin-side[href=""], .sponsor-skin-side:not([href]) { cursor: default; }
  .sponsor-skin-tag {
    display: block;
    position: absolute;
    left: 12px;
    bottom: 12px;
    max-width: calc((100vw - 72rem) / 2 - 24px);
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fbbf24;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
  }
}
