/* ==================== LOGO DEL TORNEO: SIN FONDO ==================== */
.contenedor-logo-torneo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    background: transparent;
    border: none;
    padding: 0;
}
.logo-torneo-animado {
    width: 110px;
    height: 110px;
    object-fit: contain;
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
    transition: 
        opacity 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        filter 0.7s ease;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.15));
    background: transparent;
}
.logo-torneo-animado.mostrar {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ==================== NOMBRE DEL TORNEO ==================== */
.nombre-torneo-animado {
    font-size: 2.2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(15px);
    transition: 
        opacity 0.6s ease 0.2s,
        transform 0.6s ease 0.2s;
}
.nombre-torneo-animado.mostrar {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== BOTÓN Y MENÚ EDICIONES ==================== */
.contenedor-ediciones {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
    /* ✅ Queda POR ENCIMA de todo el contenido de abajo */
    z-index: 10;
    opacity: 0;
    transform: translateY(10px);
    transition: 
        opacity 0.5s ease 0.4s,
        transform 0.5s ease 0.4s;
}
.contenedor-ediciones.mostrar {
    opacity: 1;
    transform: translateY(0);
}
.boton-ediciones-animado {
    padding: 0.7rem 1.4rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}
.boton-ediciones-animado:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.menu-ediciones {
    position: absolute;
    top: 100%;
    margin-top: 0.6rem;
    min-width: 170px;
    background: #055a8a;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: 
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease;
    /* ✅ Mismo nivel o más alto, nunca pasa atrás */
    z-index: 11;
}
.menu-ediciones.oculto {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.menu-ediciones:not(.oculto) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.menu-ediciones a {
    display: block;
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    transition: 
        background 0.2s ease,
        padding-left 0.2s ease;
}
.menu-ediciones a:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 1.5rem;
}

/* ==================== SECCIÓN FORMATO (aseguramos que quede ABAJO) ==================== */
.seccion-formato-animado {
    padding: 1.5rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-bottom: 3rem;
    line-height: 1.7;
    /* ✅ Se asegura de estar por debajo del botón */
    position: relative;
    z-index: 1;
}


/* ==================== SECCIONES GENERALES ==================== */
.seccion-formato-animado,
.seccion-equipos-animado,
.seccion-fase-animado {
    opacity: 0;
    transform: translateY(20px);
    transition: 
        opacity 0.6s ease,
        transform 0.6s ease;
}
.seccion-formato-animado.mostrar { transition-delay: 0.5s; }
.seccion-equipos-animado.mostrar { transition-delay: 0.7s; }
.seccion-fase-animado.mostrar { transition-delay: 0.9s; }
.seccion-formato-animado.mostrar,
.seccion-equipos-animado.mostrar,
.seccion-fase-animado.mostrar {
    opacity: 1;
    transform: translateY(0);
}

.seccion-formato-animado {
    padding: 1.5rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-bottom: 3rem;
    line-height: 1.7;
}
.titulo-seccion {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.15);
}

/* ==================== CARRUSEL EQUIPOS ==================== */
.carrusel-equipos {
    overflow-x: auto;
    padding-bottom: 1rem;
    position: relative;
}
.carrusel-equipos::-webkit-scrollbar { height: 6px; }
.carrusel-equipos::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.carrusel-contenido {
    display: flex;
    gap: 1.2rem;
    min-width: max-content;
}
.tarjeta-equipo {
    position: relative;
    width: 150px;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    transition: 
        transform 0.3s ease,
        background 0.3s ease;
    background: rgba(255,255,255,0.05);
}
.tarjeta-equipo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../../assets/images/imagenblanca-remera.svg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 0;
}
.tarjeta-equipo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.25));
    z-index: 1;
}
.tarjeta-equipo:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.1);
}
.tarjeta-equipo img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}
.tarjeta-equipo span {
    font-weight: bold;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* ==================== FECHAS Y PARTIDOS ==================== */
.grupo-fecha {
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    opacity: 0;
    transform: translateX(-15px);
    transition: 
        opacity 0.5s ease,
        transform 0.5s ease;
}
.grupo-fecha.mostrar {
    opacity: 1;
    transform: translateX(0);
}
.nombre-fecha {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 3px solid #0A84C7;
}
.grid-partidos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.tarjeta-partido {
    position: relative;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(15px);
    transition: 
        opacity 0.4s ease,
        transform 0.4s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}
.tarjeta-partido.mostrar {
    opacity: 1;
    transform: translateY(0);
}
.tarjeta-partido:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.dato-fecha {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    font-size: 0.85rem;
    opacity: 0.8;
}
.dato-estadio {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    max-width: 45%;
    font-size: 0.85rem;
    opacity: 0.8;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.equipos-resultado {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding: 0 1rem;
}
.escudo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: width 0.25s ease, height 0.25s ease;
}
.resultado {
    font-size: 1.8rem;
    font-weight: bold;
    padding: 0 1rem;
    transition: font-size 0.25s ease;
}
.dato-estado {
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ==================== AJUSTES MÓVIL ==================== */
@media (max-width: 640px) {
    .resultado { font-size: 1.4rem; }
    .escudo { width: 40px; height: 40px; }
    .nombre-torneo-animado { font-size: 1.8rem; }
    .logo-torneo-animado { width: 90px; height: 90px; }
}
