/* ============================================
   ABP - Asociación de Bolichistas Poblanos
   Paleta oficial: Azul marino #0D2B5E, Rojo #CC1F1F, Azul cielo #4AADE8
   ============================================ */

:root {
  --azul: #0D2B5E;
  --azul-med: #1A4A8A;
  --azul-cielo: #4AADE8;
  --rojo: #CC1F1F;
  --blanco: #FFFFFF;
  --gris-claro: #F4F6FA;
  --gris-med: #E2E8F0;
  --gris-texto: #64748B;
  --negro-suave: #1E293B;
  --sombra: 0 4px 24px rgba(13,43,94,0.10);
  --sombra-hover: 0 8px 32px rgba(13,43,94,0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-display: 'Montserrat', 'Inter', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--negro-suave); background: var(--blanco); line-height: 1.6; }
img { max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ── TIPOGRAFÍA ── */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--azul-cielo); display: block; margin-bottom: 8px;
}
.section-title { font-size: clamp(24px,4vw,36px); color: var(--azul); margin-bottom: 12px; }
.section-sub { font-size: 16px; color: var(--gris-texto); max-width: 560px; }

/* ── HEADER ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--azul);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  height: 68px;
  display: flex; align-items: center;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 46px; width: 46px; object-fit: contain; }
.logo-text-group { display: flex; flex-direction: column; }
.logo-siglas { color: var(--blanco); font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1; }
.logo-full { color: rgba(255,255,255,0.6); font-size: 11px; letter-spacing: 0.5px; }
nav { display: flex; align-items: center; gap: 4px; }
nav a {
  color: rgba(255,255,255,0.75); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; transition: all 0.2s;
}
nav a:hover { color: var(--blanco); background: rgba(255,255,255,0.1); }
nav a.active { color: #fff; }
.nav-admin-btn {
  background: var(--rojo); color: #fff !important; padding: 8px 14px !important;
  border-radius: var(--radius-sm); font-weight: 600 !important;
  transition: background 0.2s !important;
}
.nav-admin-btn:hover { background: #a81818 !important; }
.hamburger { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 8px; }

/* ── HERO ── */
.hero {
  min-height: 100vh; padding-top: 68px;
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-med) 60%, #1A6AA8 100%);
  display: flex; align-items: center; justify-content: center; text-align: center;
  position: relative; overflow: hidden;
}
.hero-bg-circles {
  position: absolute; inset: 0; pointer-events: none;
}
.hero-bg-circles span {
  position: absolute; border-radius: 50%; opacity: 0.06; background: #fff;
}
.hero-bg-circles span:nth-child(1) { width: 500px; height: 500px; top: -150px; right: -100px; }
.hero-bg-circles span:nth-child(2) { width: 300px; height: 300px; bottom: -80px; left: -60px; }
.hero-bg-circles span:nth-child(3) { width: 180px; height: 180px; top: 40%; left: 10%; }
.hero-content { position: relative; z-index: 2; padding: 40px 24px; max-width: 700px; }
.hero-logo-big { width: 130px; height: 130px; object-fit: contain; margin-bottom: 24px; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3)); }
.hero h1 { font-size: clamp(28px,5vw,52px); color: #fff; margin-bottom: 16px; }
.hero p { font-size: clamp(15px,2vw,19px); color: rgba(255,255,255,0.8); margin-bottom: 32px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--rojo); color: #fff; padding: 14px 28px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; border: none; cursor: pointer; transition: all 0.2s;
  font-family: var(--font);
}
.btn-primary:hover { background: #a81818; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(204,31,31,0.4); }
.btn-outline {
  background: transparent; color: #fff; padding: 14px 28px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; border: 2px solid rgba(255,255,255,0.5); cursor: pointer;
  transition: all 0.2s; font-family: var(--font);
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.hero-stats { display: flex; gap: 32px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-num { font-family: var(--font-display); font-size: 36px; font-weight: 800; color: var(--azul-cielo); line-height: 1; }
.hero-stat-lbl { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

/* ── SECCIONES GENERALES ── */
section { padding: 80px 24px; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }
.section-header.center .section-sub { margin: 0 auto; }
.divider { width: 48px; height: 4px; background: var(--rojo); border-radius: 2px; margin: 16px 0 20px; }
.center .divider { margin: 16px auto 20px; }

/* ── NOTICIAS ── */
#noticias { background: var(--gris-claro); }
.noticias-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 24px; }
.noticia-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--sombra); transition: transform 0.2s, box-shadow 0.2s;
}
.noticia-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); }
.noticia-img {
  width: 100%; height: 200px; object-fit: cover;
  background: linear-gradient(135deg, var(--azul), var(--azul-cielo));
  display: flex; align-items: center; justify-content: center;
}
.noticia-img-placeholder { color: rgba(255,255,255,0.3); font-size: 48px; }
.noticia-body { padding: 20px; }
.noticia-cat {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--azul-cielo); background: rgba(74,173,232,0.1);
  padding: 3px 8px; border-radius: 4px; margin-bottom: 8px;
}
.noticia-titulo { font-size: 17px; font-weight: 700; color: var(--azul); margin-bottom: 8px; line-height: 1.3; }
.noticia-resumen { font-size: 14px; color: var(--gris-texto); line-height: 1.6; }
.noticia-fecha { font-size: 12px; color: var(--gris-texto); margin-top: 12px; opacity: 0.7; }

/* ── TORNEO ACTIVO ── */
#torneos { background: var(--blanco); }
.torneo-activo {
  background: var(--azul); border-radius: var(--radius); padding: 32px;
  margin-bottom: 32px; position: relative; overflow: hidden;
}
.torneo-activo::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.torneo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #27AE60; color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 16px;
}
.torneo-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
.torneo-activo h3 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.torneo-activo p { color: rgba(255,255,255,0.65); font-size: 14px; margin-bottom: 24px; }
.score-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.score-tab {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); border: none;
  padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer;
  font-family: var(--font); transition: all 0.2s;
}
.score-tab.active { background: var(--azul-cielo); color: #fff; }
.score-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); background: rgba(0,0,0,0.2); }
.score-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.score-table th { text-align: left; padding: 10px 14px; color: rgba(255,255,255,0.5); font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.score-table td { padding: 10px 14px; border-top: 1px solid rgba(255,255,255,0.06); color: #fff; }
.score-table tr:first-child td { border-top: none; }
.pos-gold { color: #F5C518; font-weight: 700; }
.pos-silver { color: #C0C0C0; font-weight: 700; }
.pos-bronze { color: #CD7F32; font-weight: 700; }
.score-total { font-family: 'Courier New', monospace; font-weight: 700; color: var(--azul-cielo); }

.torneos-proximos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 20px; margin-top: 32px; }
.torneo-card-sm {
  border: 1.5px solid var(--gris-med); border-radius: var(--radius); padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.torneo-card-sm:hover { border-color: var(--azul-cielo); box-shadow: var(--sombra); }
.torneo-card-sm .badge-estado {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; margin-bottom: 10px;
}
.badge-proximo { background: #FEF3C7; color: #92400E; }
.badge-finalizado { background: #F1F5F9; color: #64748B; }
.torneo-card-sm h4 { font-size: 16px; color: var(--azul); margin-bottom: 6px; }
.torneo-card-sm p { font-size: 13px; color: var(--gris-texto); }

/* ── GALERÍA / CARRUSEL ── */
#galeria { background: var(--gris-claro); }
.carousel-wrap { position: relative; overflow: hidden; border-radius: var(--radius); }
.carousel-track { display: flex; transition: transform 0.45s cubic-bezier(.4,0,.2,1); }
.carousel-slide {
  min-width: 100%; height: 420px; position: relative;
  background: linear-gradient(135deg, var(--azul), var(--azul-cielo));
  display: flex; align-items: flex-end;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.carousel-caption {
  position: relative; z-index: 2; padding: 24px 32px;
  background: linear-gradient(to top, rgba(13,43,94,0.85) 0%, transparent 100%);
  width: 100%;
}
.carousel-caption p { color: #fff; font-size: 18px; font-weight: 600; }
.carousel-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.2); font-size: 64px; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  background: rgba(13,43,94,0.7); border: none; color: #fff; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer; font-size: 20px; transition: background 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: var(--azul); }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gris-med); border: none; cursor: pointer; transition: all 0.2s; }
.carousel-dot.active { background: var(--azul); width: 24px; border-radius: 4px; }

/* ── JUGADORES ── */
#jugadores { background: var(--blanco); }
.jugadores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 20px; }
.jugador-card {
  background: var(--gris-claro); border-radius: var(--radius); padding: 24px 20px;
  text-align: center; cursor: pointer; transition: all 0.2s; border: 1.5px solid transparent;
}
.jugador-card:hover { border-color: var(--azul-cielo); transform: translateY(-4px); box-shadow: var(--sombra); }
.jugador-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--azul); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 24px; font-weight: 700; color: #fff;
  overflow: hidden;
}
.jugador-avatar img { width: 100%; height: 100%; object-fit: cover; }
.jugador-nombre { font-weight: 700; font-size: 15px; color: var(--azul); margin-bottom: 2px; }
.jugador-cat { font-size: 12px; color: var(--gris-texto); margin-bottom: 14px; }
.jugador-mini-stats { display: flex; justify-content: center; gap: 16px; }
.mini-stat-val { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--azul-med); }
.mini-stat-lbl { font-size: 10px; color: var(--gris-texto); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── MODAL JUGADOR ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius); max-width: 600px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}
.modal-header {
  background: var(--azul); padding: 28px; border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; gap: 20px; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,0.15);
  border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.25); }
.modal-avatar {
  width: 80px; height: 80px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.3);
  background: rgba(74,173,232,0.2); display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff; font-family: var(--font-display); overflow: hidden; flex-shrink: 0;
}
.modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.modal-nombre { color: #fff; font-size: 22px; }
.modal-sub { color: rgba(255,255,255,0.6); font-size: 14px; margin-top: 2px; }
.modal-stats-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.modal-stat { background: rgba(255,255,255,0.1); border-radius: 8px; padding: 8px 14px; text-align: center; }
.modal-stat-val { color: var(--azul-cielo); font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.modal-stat-lbl { color: rgba(255,255,255,0.5); font-size: 11px; }
.modal-body { padding: 24px; }
.modal-section-title { font-size: 14px; font-weight: 600; color: var(--azul); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.logros-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 8px; margin-bottom: 24px; }
.logro-item { background: var(--gris-claro); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.logro-icon { font-size: 22px; flex-shrink: 0; }
.logro-titulo { font-size: 12px; font-weight: 600; color: var(--azul); }
.logro-detalle { font-size: 11px; color: var(--gris-texto); }

/* ── PATROCINADORES ── */
#patrocinadores { background: var(--gris-claro); }
.sponsors-row { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: center; margin-top: 32px; }
.sponsor-item {
  background: #fff; border-radius: var(--radius-sm); padding: 16px 28px;
  border: 1.5px solid var(--gris-med); min-width: 150px; text-align: center;
  color: var(--gris-texto); font-weight: 600; font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sponsor-item:hover { border-color: var(--azul-cielo); box-shadow: var(--sombra); }

/* ── FOOTER ── */
footer { background: var(--azul); color: rgba(255,255,255,0.7); padding: 48px 24px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 40px; margin-bottom: 40px; }
.footer-brand .logo-siglas { color: #fff; font-size: 28px; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-contact p { font-size: 13px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.4); }
.social-links { display: flex; gap: 10px; margin-top: 14px; }
.social-link {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); font-size: 16px; transition: all 0.2s;
}
.social-link:hover { background: var(--azul-cielo); color: #fff; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #1E293B; color: #fff; padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 14px; z-index: 9999; transition: transform 0.3s; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── RESPONSIVE ── */
@media(max-width: 768px) {
  nav { display: none; }
  nav.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--azul); padding: 16px; gap: 4px; }
  .hamburger { display: flex; }
  header { position: relative; }
  .hero { min-height: auto; padding: 100px 24px 60px; }
  .hero-stats { gap: 20px; }
  .score-table { font-size: 12px; }
  .score-table th, .score-table td { padding: 8px 10px; }
}
