/* =====================================================================
   Área 1 Color Games - Estilos públicos
   Diseño moderno tipo evento deportivo, juvenil y vibrante.
   Complementa a Bootstrap 5 (no lo reemplaza).
   ===================================================================== */

:root {
    --a1-rojo:     #e63946;
    --a1-azul:     #1d6fb8;
    --a1-verde:    #2a9d54;
    --a1-amarillo: #f4b400;

    --a1-dark:     #14152b;
    --a1-dark-2:   #1e2040;
    --a1-light:    #f5f7fb;
    --a1-primary:  #6c5ce7;
    --a1-accent:   #00d1b2;

    --a1-gradient: linear-gradient(120deg, #6c5ce7 0%, #00d1b2 100%);
    --a1-gradient-hot: linear-gradient(120deg, #e63946 0%, #f4b400 100%);
    --a1-shadow:   0 10px 30px rgba(20, 21, 43, .12);
    --a1-radius:   18px;
}

/* ------------------------------ Base ------------------------------ */
body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #2b2d42;
    background: var(--a1-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, .display-1, .display-2, .display-3, .display-4 {
    font-weight: 800;
    letter-spacing: -.5px;
}

.section {
    padding: 5rem 0;
}
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2.5rem;
    font-weight: 800;
}
.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 5px;
    border-radius: 5px;
    background: var(--a1-gradient);
}
.text-gradient {
    background: var(--a1-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --------------------------- Navbar ------------------------------ */
.navbar-a1 {
    background: rgba(20, 21, 43, .85);
    backdrop-filter: blur(10px);
    transition: background .3s ease, padding .3s ease;
}
.navbar-a1.scrolled {
    background: rgba(20, 21, 43, .98);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.navbar-a1 .nav-link {
    color: rgba(255, 255, 255, .85) !important;
    font-weight: 600;
    margin: 0 .35rem;
    transition: color .2s;
}
.navbar-a1 .nav-link:hover,
.navbar-a1 .nav-link.active {
    color: #fff !important;
}
.navbar-brand img { height: 42px; }

/* ----------------------------- Hero ------------------------------ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(230,57,70,.35), transparent 35%),
        radial-gradient(circle at 85% 25%, rgba(29,111,184,.35), transparent 35%),
        radial-gradient(circle at 75% 80%, rgba(244,180,0,.30), transparent 35%),
        radial-gradient(circle at 20% 85%, rgba(42,157,84,.30), transparent 35%),
        var(--a1-dark);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .6;
}
.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1.05; }
.hero .lead { font-size: 1.25rem; opacity: .92; }

/* Burbujas flotantes de colores */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .85;
    animation: float 6s ease-in-out infinite;
}
.blob.r { width: 90px;  height: 90px;  background: var(--a1-rojo);     top: 18%; left: 8%;  animation-delay: 0s; }
.blob.a { width: 60px;  height: 60px;  background: var(--a1-azul);     top: 65%; left: 14%; animation-delay: 1s; }
.blob.v { width: 110px; height: 110px; background: var(--a1-verde);    top: 25%; right: 10%; animation-delay: 2s; }
.blob.y { width: 70px;  height: 70px;  background: var(--a1-amarillo); top: 70%; right: 16%; animation-delay: 1.5s; }
@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-26px) scale(1.05); }
}

/* ------------------------ Contador regresivo --------------------- */
.countdown {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.countdown .box {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--a1-radius);
    padding: 1rem 1.25rem;
    min-width: 88px;
    text-align: center;
    backdrop-filter: blur(6px);
}
.countdown .box .num {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    display: block;
}
.countdown .box .label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .8;
}

/* --------------------------- Tarjetas ---------------------------- */
.card-a1 {
    border: none;
    border-radius: var(--a1-radius);
    box-shadow: var(--a1-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
    background: #fff;
}
.card-a1:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(20, 21, 43, .18);
}

/* Tarjeta de estadística (dashboard / hero) */
.stat-card {
    border-radius: var(--a1-radius);
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.stat-card .icon {
    font-size: 2.4rem;
    opacity: .35;
    position: absolute;
    right: 1rem;
    top: 1rem;
}
.stat-card .value { font-size: 2.2rem; font-weight: 800; }
.stat-card .label { opacity: .9; font-weight: 600; }

/* --------------------------- Equipos ----------------------------- */
.team-card {
    border-radius: var(--a1-radius);
    overflow: hidden;
    color: #fff;
    text-align: center;
    padding: 2rem 1.25rem;
    position: relative;
    box-shadow: var(--a1-shadow);
    transition: transform .25s ease;
}
.team-card:hover { transform: translateY(-8px) scale(1.02); }
.team-card .team-logo {
    width: 92px; height: 92px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,.65);
    background: #fff;
    margin-bottom: 1rem;
}
.team-card .team-points {
    font-size: 2.2rem;
    font-weight: 800;
}

/* ------------------------ Tabla posiciones ----------------------- */
.standings .pos {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: var(--a1-primary);
}
.standings tr:first-child .pos { background: var(--a1-amarillo); color: #14152b; }
.standings .color-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin-right: .5rem;
    vertical-align: middle;
}
.standings .progress { height: 10px; border-radius: 6px; }

/* ----------------------------- Noticias -------------------------- */
.news-card img { height: 200px; object-fit: cover; width: 100%; }
.news-card .badge { position: absolute; top: 12px; left: 12px; }

/* ----------------------------- Galería --------------------------- */
.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
    content: "\F52A"; /* bi-zoom-in */
    font-family: "bootstrap-icons";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    background: rgba(20, 21, 43, .45);
    opacity: 0;
    transition: opacity .3s;
}
.gallery-item:hover::after { opacity: 1; }

/* -------------------------- Patrocinadores ----------------------- */
.sponsor {
    filter: grayscale(1);
    opacity: .7;
    transition: all .3s;
    max-height: 70px;
}
.sponsor:hover { filter: grayscale(0); opacity: 1; }

/* ----------------------------- Footer ---------------------------- */
.footer-a1 {
    background: var(--a1-dark);
    color: rgba(255, 255, 255, .8);
    padding: 3.5rem 0 1.5rem;
}
.footer-a1 a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.footer-a1 a:hover { color: #fff; }
.footer-a1 .social a {
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    margin-right: .5rem;
    transition: background .3s;
}
.footer-a1 .social a:hover { background: var(--a1-primary); }

/* --------------------- Animación al hacer scroll ----------------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ----------------------------- Utilidades ------------------------ */
.bg-a1-dark { background: var(--a1-dark) !important; }
.cursor-pointer { cursor: pointer; }
.object-cover { object-fit: cover; }

@media (max-width: 575.98px) {
    .section { padding: 3rem 0; }
    .countdown .box { min-width: 70px; padding: .75rem; }
    .countdown .box .num { font-size: 1.8rem; }
}

/* =====================================================================
   TABLERO PÚBLICO (scoreboard en vivo)
   ===================================================================== */
.tablero {
    min-height: 100vh;
    color: #fff;
    background:
        radial-gradient(circle at 12% 15%, rgba(230,57,70,.30), transparent 38%),
        radial-gradient(circle at 88% 18%, rgba(29,111,184,.30), transparent 38%),
        radial-gradient(circle at 80% 85%, rgba(244,180,0,.25), transparent 38%),
        radial-gradient(circle at 15% 88%, rgba(42,157,84,.25), transparent 38%),
        var(--a1-dark);
}
.tablero .t-topbar {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(20,21,43,.6);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: sticky; top: 0; z-index: 10;
}
.live-dot {
    width: 11px; height: 11px; border-radius: 50%;
    background: #ff4757; display: inline-block;
    box-shadow: 0 0 0 0 rgba(255,71,87,.7);
    animation: live-pulse 1.6s infinite;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,71,87,.7); }
    70%  { box-shadow: 0 0 0 12px rgba(255,71,87,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,71,87,0); }
}
.tablero h2 { font-weight: 800; }

/* Podio top 3 */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.podium .step {
    border-radius: 18px 18px 0 0;
    padding: 1.25rem 1rem 1rem;
    text-align: center;
    color: #fff;
    width: 170px;
    position: relative;
    box-shadow: 0 -8px 30px rgba(0,0,0,.25) inset, var(--a1-shadow);
}
.podium .step .medal { font-size: 1.8rem; }
.podium .step .pts { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.podium .step .nm { font-weight: 700; }
.podium .p1 { height: 210px; }
.podium .p2 { height: 175px; }
.podium .p3 { height: 150px; }

/* Filas de posiciones grandes */
.score-row {
    display: flex; align-items: center; gap: 1rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: .85rem 1.1rem;
    margin-bottom: .6rem;
}
.score-row .rank { font-size: 1.4rem; font-weight: 800; width: 38px; opacity: .85; }
.score-row .dot { width: 18px; height: 18px; border-radius: 50%; }
.score-row .team { flex: 1; font-weight: 700; font-size: 1.1rem; }
.score-row .pts { font-size: 1.7rem; font-weight: 800; }

/* Tarjetas de resultados */
.result-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    height: 100%;
}
.result-card .vs {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.result-card .side { flex: 1; text-align: center; }
.result-card .side .nm { font-weight: 700; font-size: .95rem; }
.result-card .score { font-size: 1.9rem; font-weight: 800; padding: 0 .5rem; }

/* =====================================================================
   CARRUSEL INFINITO DE PATROCINADORES
   ===================================================================== */
.sponsor-carousel {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.sponsor-track {
    display: flex;
    align-items: center;
    gap: 3.5rem;
    width: max-content;
    animation: sponsor-scroll 28s linear infinite;
}
.sponsor-carousel:hover .sponsor-track { animation-play-state: paused; }
.sponsor-track .sp-item {
    display: flex; align-items: center; justify-content: center;
    min-width: 150px; height: 90px;
}
.sponsor-track .sp-item img {
    max-height: 70px; max-width: 150px;
    object-fit: contain;
    filter: grayscale(1) brightness(1.6);
    opacity: .8;
    transition: all .3s;
}
.sponsor-track .sp-item:hover img { filter: none; opacity: 1; }
.sponsor-track .sp-item .sp-name {
    font-weight: 700; color: #fff; opacity: .85;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50px; padding: .5rem 1.2rem; white-space: nowrap;
}
@keyframes sponsor-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .sponsor-track { animation: none; }
}
