/* =====================================================
   La Secta Running — Estilos globales
   ===================================================== */

/* Variables de marca — Colores del logo La Secta Running */
:root {
  --rojo:        #CC2200;
  --rojo-dark:   #A81B00;
  --rojo-bright: #E53000;
  --negro:       #0A0A0A;
  --gris-oscuro: #141414;
  --gris-medio:  #222222;
  --gris-claro:  #333333;
  --gris-texto:  #9CA3AF;
  --blanco:      #FFFFFF;
  --crema:       #F5F0E8;
  --radius:      0.75rem;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);

  /* Alias para no romper referencias existentes */
  --naranja:     #CC2200;
  --naranja-dark:#A81B00;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--negro);
  color: var(--blanco);
  line-height: 1.6;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a { color: var(--naranja); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--naranja-dark); }

/* ---- NAVBAR ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(204,34,0,0.15);
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blanco);
  letter-spacing: -0.03em;
}

.navbar-logo span { color: var(--naranja); }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.navbar-nav a {
  color: var(--gris-texto);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--blanco);
  background: var(--gris-medio);
}

.navbar-cta {
  background: var(--naranja) !important;
  color: var(--blanco) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 2rem !important;
  font-weight: 600 !important;
}
.navbar-cta:hover { background: var(--naranja-dark) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanco);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0A0A0A 0%, #1a0800 50%, #0A0A0A 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(204,34,0,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(204,34,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,34,0,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; padding: 2rem; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(204,34,0,0.12);
  border: 1px solid rgba(204,34,0,0.3);
  color: var(--naranja);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

.hero-title .highlight { color: var(--naranja); }

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--gris-texto);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--naranja);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--gris-texto);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- BOTONES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 3rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--naranja);
  color: var(--blanco);
}
.btn-primary:hover {
  background: var(--naranja-dark);
  color: var(--blanco);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204,34,0,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--blanco);
  border: 1.5px solid rgba(255,255,255,0.2);
}
.btn-outline:hover {
  border-color: var(--naranja);
  color: var(--naranja);
  transform: translateY(-2px);
}

.btn-sm { padding: 0.55rem 1.25rem; font-size: 0.875rem; }

/* ---- SECCIONES ---- */
.section { padding: 5rem 2rem; }
.section-dark { background: var(--negro); }
.section-gray { background: var(--gris-oscuro); }

.container { max-width: 1200px; margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
  display: inline-block;
  color: var(--naranja);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 0.75rem; }
.section-desc { color: var(--gris-texto); max-width: 540px; margin: 0 auto; }

/* ---- TARJETAS ---- */
.card {
  background: var(--gris-oscuro);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}
.card:hover {
  border-color: rgba(204,34,0,0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-body { padding: 1.5rem; }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-text { color: var(--gris-texto); font-size: 0.9rem; }

/* ---- GRID ---- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-orange { background: rgba(204,34,0,0.15); color: var(--naranja); }
.badge-green  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.badge-blue   { background: rgba(59,130,246,0.15);  color: #3b82f6; }
.badge-gray   { background: rgba(156,163,175,0.15); color: var(--gris-texto); }

/* ---- FORMS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gris-texto);
  margin-bottom: 0.5rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--gris-medio);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 0.6rem;
  color: var(--blanco);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}
.form-control:focus { border-color: var(--naranja); }
.form-control::placeholder { color: var(--gris-claro); }

select.form-control { appearance: none; cursor: pointer; }

/* ---- TABLA ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.07); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--gris-medio); }
thead th {
  padding: 1rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gris-texto);
  text-align: left;
}
tbody tr { border-top: 1px solid rgba(255,255,255,0.05); transition: background 0.15s; }
tbody tr:hover { background: rgba(204,34,0,0.04); }
tbody td { padding: 1rem 1.25rem; font-size: 0.9rem; }

/* ---- AVATAR ---- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  background: var(--naranja);
  color: var(--blanco);
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-sm  { width: 36px; height: 36px; font-size: 0.8rem; }
.avatar-md  { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg  { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar-xl  { width: 96px; height: 96px; font-size: 2rem; }

/* ---- POSICION RANKING ---- */
.rank-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
}
.rank-1 { background: #FFD700; color: #000; }
.rank-2 { background: #C0C0C0; color: #000; }
.rank-3 { background: #CD7F32; color: #fff; }
.rank-default { background: var(--gris-medio); color: var(--gris-texto); }

/* ---- FOOTER ---- */
.footer {
  background: var(--gris-oscuro);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.footer-logo span { color: var(--naranja); }

.footer-desc { color: var(--gris-texto); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; }

.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gris-medio);
  color: var(--gris-texto);
  font-size: 1rem;
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--naranja); color: var(--blanco); }

.footer-heading { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris-texto); margin-bottom: 1.25rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { color: var(--gris-texto); font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--naranja); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--gris-texto);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- ALERTS ---- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid;
}
.alert-success { background: rgba(34,197,94,0.1);  border-color: #22c55e; color: #4ade80; }
.alert-error   { background: rgba(239,68,68,0.1);  border-color: #ef4444; color: #f87171; }
.alert-info    { background: rgba(59,130,246,0.1);  border-color: #3b82f6; color: #93c5fd; }

/* ---- SPINNER ---- */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(204,34,0,0.2);
  border-top-color: var(--naranja);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- UTILIDADES ---- */
.text-naranja { color: var(--naranja); }
.text-muted   { color: var(--gris-texto); }
.text-center  { text-align: center; }
.fw-bold      { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-1        { gap: 0.5rem; }
.gap-2        { gap: 1rem; }
.gap-3        { gap: 1.5rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--gris-oscuro); padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .navbar-nav.open { display: flex; }
  .hamburger { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .section { padding: 3.5rem 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.4rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
