:root {
    --color-rojo: #b30000;
    --color-rojo-oscuro: #800000;
    --color-verde-logo: #008037;
    --color-gris-fondo: #f8fafc;
    --color-gris-oscuro: #1e293b;
    --color-blanco: #ffffff;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--color-gris-fondo);
    color: var(--color-gris-oscuro);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, .nav-link {
    font-family: 'Poppins', sans-serif;
}

/* NAVBAR */
.navbar {
    border-bottom: 4px solid var(--color-rojo);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 0.8rem 0;
}
.navbar-brand img { max-height: 42px; width: auto; }
.nav-link { font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; }
.nav-link:hover { color: var(--color-rojo) !important; }

/* HEADER / HERO */
.hero-section {
    position: relative;
    background: linear-gradient(rgba(140, 0, 0, 0.88), rgba(20, 20, 20, 0.92)), url('https://images.unsplash.com/photo-1529699211952-734e80c4d42b?q=80&w=2071&auto=format&fit=crop'); 
    background-size: cover;
    background-position: center;
    color: var(--color-blanco);
    padding: 90px 0;
    text-align: center;
}

/* TABLA DE TORNEOS RESPONSIVE */
.tabla-torneos-container {
    background: var(--color-blanco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-top: -40px;
    position: relative;
    z-index: 10;
}
.table thead {
    background: linear-gradient(90deg, var(--color-rojo), var(--color-rojo-oscuro));
    color: white;
}
.table thead th { border: none; padding: 18px 15px; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
.table tbody td { padding: 18px 15px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }

/* Botones de estado con enlace */
.badge-status { font-size: 0.7rem; padding: 6px 12px; border-radius: 30px; font-weight: 700; text-transform: uppercase; text-decoration: none; display: inline-block; transition: all 0.2s ease; }
.status-abierto { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.status-abierto:hover { background: #166534; color: #ffffff; transform: translateY(-1px); }
.status-pendiente { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.status-pendiente:hover { background: #64748b; color: #ffffff; transform: translateY(-1px); }

/* ESTADO FINALIZADO NUEVO (HEREDA EL ESTILO GRIS DEL ANTIGUO PENDIENTE) */
.status-finalizado { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; pointer-events: none; }

/* ICONOS ACTIVOS Y HOVERS */
.icon-link-active {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
    cursor: pointer;
}
.icon-link-active:hover {
    transform: scale(1.3);
}
.icon-info64 { color: #2563eb; }

/* REGLAMENTO GENERAL Y CARTEL CONTENEDOR */
.cta-bases {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid var(--color-rojo);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(179, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.cta-bases:hover {
    box-shadow: 0 8px 25px rgba(179, 0, 0, 0.15);
    transform: translateY(-2px);
}
.cartel-contenedor {
    background-color: var(--color-blanco);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cartel-img {
    max-height: 500px;
    object-fit: contain;
    width: 100%;
}

/* CLASIFICACIONES SIMÉTRICAS PERFECTAS */
@media (min-width: 992px) {
    .equal-height-wrapper {
        display: flex;
        align-items: stretch;
    }
    .equal-height-col {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .equal-height-card {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
}
.accordion-button:not(.collapsed) {
    background-color: #fff1f1;
    color: var(--color-rojo);
    font-weight: 600;
}
.list-group-item {
    border-left: none;
    border-right: none;
    padding: 10px 15px;
}

/* PATROCINADORES EN CONTENEDOR CERRADO */
.patrocinadores-block {
    background-color: var(--color-blanco);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    padding: 40px 20px;
}
.sponsor-circle {
    width: 130px;
    height: 130px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    border: 2px solid #e2e8f0;
    box-shadow: 0 6px 12px rgba(0,0,0,0.04);
    padding: 20px;
    transition: all 0.3s ease;
}
.sponsor-circle:hover {
    border-color: var(--color-rojo);
    transform: scale(1.08);
}
.sponsor-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.sponsor-name { font-size: 0.85rem; font-weight: 600; color: var(--color-gris-oscuro); display: block; }

/* FORMULARIO */
.form-card {
    background: var(--color-blanco);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}
.form-label { font-weight: 700; font-size: 0.85rem; color: #334155; margin-bottom: 8px; }
.form-control, .form-select { border-radius: 8px; border: 1px solid #e2e8f0; padding: 12px; font-size: 0.9rem; }
.form-control:focus { border-color: var(--color-rojo); box-shadow: 0 0 0 4px rgba(179,0,0,0.1); }
.btn-enviar { background: var(--color-rojo); color: white; border: none; border-radius: 8px; font-weight: 700; padding: 15px; text-transform: uppercase; transition: 0.3s; width: 100%; }
.btn-enviar:disabled { background: #cbd5e1; color: #94a3b8; cursor: not-allowed; transform: none !important; }
.btn-enviar:not(:disabled):hover { background: #000; transform: translateY(-2px); }

/* FOOTER */
footer { background: #0f172a; color: #e2e8f0; padding: 45px 0; font-size: 0.9rem; }
footer a { color: #ffffff; text-decoration: none; font-weight: 700; border-bottom: 1px dotted var(--color-rojo); padding-bottom: 2px; transition: color 0.2s; }
footer a:hover { color: var(--color-rojo); border-bottom-style: solid; }