body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; background-color: #f4f4f9; }
h1 { background-color: #003366; color: white; padding: 20px; margin: 0 0 15px 0; text-align: center; border-bottom: 3px solid #0066cc; }
table { width: 90%; margin: 20px auto; border-collapse: collapse; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; overflow: hidden; }
th, td { padding: 15px; border: 1px solid #ddd; text-align: center; background-color: #fff; }
th {
    background-color: #FF0000;
    color: white;
    text-transform: uppercase;
    text-align: center !important;      /* fuerza centrado horizontal */
    vertical-align: middle !important;  /* fuerza centrado vertical */
    min-height: 50px !important;                   /* fuerza altura mínima uniforme */
}
tr:nth-child(even) { background-color: #f9f9f9; }
tr:hover { background-color: #f1f1f1; }
.ronda { text-decoration: underline; }
a { color: #1E90FF; text-decoration: none; }
a:hover { text-decoration: underline; }
.deporte { font-weight: bold; }
.fecha {
    background-color: #4CAF50; 
    color: white; 
    padding: 15px 0;    /* menos altura arriba y abajo */
    margin: 15px;    /* margen: 0 arriba, 15px abajo */
    text-align: center; 
    font-size: 1.2em; 
}

.details { display: none; background-color: #f0f0f0; padding: 10px; border-top: 1px solid #ddd; }
.show-details { cursor: pointer; color: #007BFF; text-decoration: underline; }

/* Tabla con formato unificado */
.tabla-eventos {
    width: 95% !important;
    margin: 20px auto;
    table-layout: fixed;     /* Fuerza misma estructura en todas las tablas */
}

/* --- Cabecera SIN altura fija --- */
.tabla-eventos thead th {
    height: auto !important;
    padding: 10px;
    vertical-align: middle !important;
    text-align: center !important;
}

/* --- Filas del cuerpo con altura igual --- */
.tabla-eventos tbody td {
    height: 50px !important;          /* altura igual en todas las filas */
    vertical-align: middle !important;
    text-align: center !important;
}

/* ---------- ANCHOS UNIFICADOS DE TODAS LAS TABLAS ---------- */

/* Columna 1: Hora */
.tabla-eventos th:nth-child(1),
.tabla-eventos td:nth-child(1) { width: 40px; }


/* Columna 2: Deporte */
.tabla-eventos th:nth-child(2),
.tabla-eventos td:nth-child(2) {
    width: 120px;
    text-align: center;         /* centra líneas de texto si son varias */
    vertical-align: middle;     /* centra verticalmente la celda completa */
}

/* Icono dentro de la celda de deporte */
.icono-deporte {
    width: 21px;
    height: 21px;
    vertical-align: middle;     /* pega el icono a la primera línea del texto */
    margin-right: 4px;          /* separa icono del texto */
}




/* Columna 3: Competición */
.tabla-eventos th:nth-child(3),
.tabla-eventos td:nth-child(3) { width: 220px; }

/* Columna 4: Evento */
.tabla-eventos th:nth-child(4),
.tabla-eventos td:nth-child(4) { width: 300px; }

/* Columna 5: Canales */
.tabla-eventos th:nth-child(5),
.tabla-eventos td:nth-child(5) { width: 220px; }
@media (max-width: 768px) {
    table { width: 100%; font-size: 12px; }
    body { font-size: 14px; }
    th, td { padding: 10px; }
}
#search-container {
    background-color: #e8f0f8;       /* fondo del bloque completo */
    padding: 10px 0;                  /* menos altura */
    display: flex;
    justify-content: center;          /* centra horizontalmente */
    align-items: center;              /* centra verticalmente */
    gap: 15px;
    border-radius: 10px;
}
.search-box {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;  /* gris clarito */          /* fondo del input */
    border-radius: 20px;
    padding: 5px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.search-box i {
    color: #1E90FF;                   /* lupa azul */
    margin-right: 8px;
    font-size: 16px;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 200px;
}
/* --- POPUP PARA CANALES --- */
.popup {
    display: none;
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.popup-content h3 {
    margin-top: 0;
    font-size: 18px;
    text-align: center;
}

@media (max-width: 768px) {

    /* Ocultar cabecera */
    .tabla-eventos thead {
        display: none;
    }

    .tabla-eventos,
    .tabla-eventos tbody,
    .tabla-eventos tr,
    .tabla-eventos td {
        display: block;
        width: 100% !important;
    }

    .tabla-eventos tr {
        margin-bottom: 15px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        padding: 10px;
    }

    .tabla-eventos td {
        text-align: left !important;
        height: auto !important;
        padding: 6px 10px;
        border: none;
    }

    .tabla-eventos td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        color: #555;
        margin-bottom: 2px;
        font-size: 12px;
    }
}

