/* === IMPORTACIÓN DE FUENTES === */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Roboto+Condensed:wght@700;900&display=swap');

/* --- PALETA REFINADA PARA MÁXIMA LEGIBILIDAD --- */
:root {
    --liga-azul: #0a3d91;
    --liga-rojo: #e21f26;
    --liga-crema: #fffbe6;
    --liga-oscuro: #0f172a;
    --liga-blanco: #ffffff;
}

/* === ESTILOS GENERALES DEL BODY === */
body {
    background-image: url("../img/fondo.png?v=3");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh;
    background-color: #f4f6f9;
    font-family: 'Roboto Condensed', sans-serif;
}

.fw-black {
    font-weight: 900 !important;
}

/* Mobile optimization */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }
}

/* Capa de contraste: para que el contenido sea legible sobre la foto */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: -1;
}

/* --- ESTILOS DE LA BARRA DE NAVEGACIÓN --- */
.navbar {
    padding: 0.8rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--liga-blanco) !important;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--liga-crema) !important;
    opacity: 1;
}

.nav-link-salir {
    color: #ff8a8a !important;
}

/* Marcador gigante */
.marcador-gigante {
    color: var(--liga-azul) !important;
}

/* --- ESTILOS ESPECÍFICOS DEL INDEX --- */
.card-liga {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    background-color: #ffffff;
}

.card-liga:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(10, 61, 145, 0.1) !important;
}

.btn-liga {
    background-color: var(--liga-azul) !important;
    border: none !important;
    border-radius: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
}

.btn-liga:hover {
    background-color: var(--liga-rojo) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(226, 31, 38, 0.3);
}

/* --- ESTILOS DE LA CLASIFICACIÓN --- */
.btn-liga-sm {
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 16px;
}

.tabla-fila-equipo:hover {
    background-color: var(--liga-crema) !important;
}

.equipo-enlace:hover .nombre-equipo {
    color: var(--liga-rojo) !important;
    transition: color 0.2s ease;
}

thead th {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: none !important;
}

/* --- ESTILOS DE RANKINGS REFINADOS --- */
.table td,
.table th {
    vertical-align: middle !important;
}

.tabla-fila-ranking:hover {
    background-color: var(--liga-crema) !important;
}

.ranking-nombre:hover {
    color: var(--liga-azul) !important;
    transition: color 0.2s ease;
}

/* --- ESTILOS DETALLE EQUIPO --- */
.card-header-equipo {
    background: linear-gradient(45deg, var(--liga-azul), var(--liga-oscuro));
    color: white;
    border-radius: 15px 15px 0 0 !important;
}

.equipo-header-box {
    border-bottom: 4px solid var(--liga-rojo);
    border-radius: 15px;
    background: white;
}

.marcador-partido {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 1.1rem;
    min-width: 70px;
    text-align: center;
}

.fila-jugador:hover {
    background-color: var(--liga-crema) !important;
}

/* --- ESTILOS DETALLE JUGADOR PRO --- */
.player-card-fut {
    background: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.7)),
        url('https://images.unsplash.com/photo-1556056504-5c7696c4c28d?q=80&w=2076&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    border: none;
    border-bottom: 5px solid var(--liga-rojo) !important;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    filter: brightness(1.1);
}

.avatar-circulo {
    width: 130px;
    height: 130px;
    background: rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(5px);
    border: 4px solid var(--liga-rojo);
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
}

.stat-box-jugador {
    border: none;
    border-radius: 15px;
    background-color: #f8fafc;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.stat-box-jugador:hover {
    transform: translateY(-5px);
    border-bottom: 3px solid var(--liga-azul);
}

/* --- ESTILOS CALENDARIO (COLORES DE LA LIGA) --- */
.jornada-header {
    border-left: 5px solid var(--liga-rojo);
    padding-left: 15px;
}

.match-link {
    transition: all 0.3s ease;
    border-bottom: 1px solid #edf2f7 !important;
    text-decoration: none !important;
}

.match-link:hover {
    background-color: var(--liga-crema) !important;
    transform: scale(1.005);
}

.nombre-equipo-calendario {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--liga-oscuro);
    letter-spacing: -0.5px;
}

.escudo-wrapper {
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #94a3b8;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.escudo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.marcador-calendario {
    background-color: var(--liga-azul);
    color: white;
    font-weight: 900;
    padding: 8px 18px;
    border-radius: 8px;
    min-width: 90px;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vs-badge-style {
    color: var(--liga-rojo);
    font-weight: 900;
    font-size: 0.9rem;
    background: #f8fafc;
    border: 2px solid var(--liga-rojo);
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-block;
}

.arbitro-info {
    background-color: #f1f5f9;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    color: var(--liga-oscuro);
}

/* --- ADICIONES PARA RESERVAS --- */
.btn-outline-success.transition-btn {
    border-width: 2px;
    font-weight: 800;
    transition: all 0.3s ease;
}

.btn-outline-success.transition-btn:hover {
    background-color: #198754;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2);
}

.x-small {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.transition-link {
    transition: all 0.2s ease;
    display: inline-block;
}

.transition-link:hover {
    transform: translateX(-5px);
    color: var(--liga-rojo) !important;
}

/* ============================================ */
/* === ESTILOS DEL INDEX - BANNER Y DIVISIONES === */
/* ============================================ */

/* BANNER PRINCIPAL */
.main-league-banner {
    height: 480px;
    background-color: #000;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    pointer-events: none;
}

/* DIVISIONES */
.category-strip {
    transition: all 0.2s ease;
    border-radius: 8px;
}

.category-strip:hover {
    background-color: #f8f9fa !important;
    transform: translateX(10px);
    border-color: #e2001a !important;
}

.strip-number {
    transform: skewX(-10deg);
    display: inline-block;
}

.btn-fav:focus {
    outline: none;
    box-shadow: none;
}

/* ============================================ */
/* === ESTILOS DEL QUIOSCO - PERIÓDICOS === */
/* ============================================ */

.paper-portada {
    background: #fff;
    border: 1px solid #000;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    max-width: 340px;
    margin: 0 auto;
    transform: rotate(-1.5deg);
}

.alternate-tilt {
    transform: rotate(2deg) !important;
}

.paper-portada:hover {
    transform: scale(1.06) rotate(0deg) translateY(-10px) !important;
    z-index: 10;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
}

.paper-logo {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.8rem;
    line-height: 0.75;
    letter-spacing: -3px;
    transform: scaleX(0.8);
    transform-origin: left;
    display: inline-block;
}

/* Headers de noticias */
.header-dh7 {
    background-color: #e2001a;
    color: white;
    padding: 6px 10px;
    border-bottom: 3px solid #000;
}

.header-cronica {
    background-color: #fff;
    color: #e2001a;
    padding: 6px 10px;
    border-bottom: 4px solid #e2001a;
}

.header-diario {
    background-color: #222;
    color: #fff;
    padding: 6px 10px;
    border-bottom: 3px solid #ffcc00;
}

/* ACTUALIDAD - Fondo negro con rojo */
.header-actualidad {
    background-color: #000;
    color: white;
    padding: 6px 10px;
    border-bottom: 3px solid #e21f26;
}

.logo-mundo {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.6rem;
    line-height: 0.85;
    letter-spacing: -1.5px;
    display: inline-block;
    transform: scaleX(0.85);
    transform-origin: left;
}

.logo-mundo .amarillo {
    color: #ffcc00;
    display: block;
}

.logo-mundo .blanco {
    color: #ffffff;
    display: block;
}

/* ESTADIO DH7 - Logo rojo/verde cursiva */
.header-estadio-dh7 {
    background-color: #fff;
    padding: 6px 10px;
    border-bottom: 4px solid #00923f;
}

.logo-estadio {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.3rem;
    font-style: italic;
    letter-spacing: -1.5px;
    line-height: 1;
    display: inline-block;
    transform: scaleX(0.8);
    transform-origin: left;
}

.logo-estadio .rojo {
    color: #e21f26;
}

.logo-estadio .verde {
    color: #00923f;
}

.paper-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.paper-info {
    font-size: 0.55rem;
    font-weight: 900;
    text-align: right;
    line-height: 1.1;
}

.paper-main-photo {
    position: relative;
    height: 350px;
    border-bottom: 2px solid #000;
    overflow: hidden;
}

.paper-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.paper-headline-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 10px 10px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
}

.paper-headline {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.9rem;
    line-height: 0.85;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: -1.2px;
    color: white;
}

.paper-subhead {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.75rem;
    display: inline-block;
    padding: 2px 8px;
    margin-top: 8px;
    font-weight: 900;
}

.bg-mundo {
    background-color: #000 !important;
    color: white !important;
}

.bg-estadio-verde {
    background-color: #00923f !important;
}

.paper-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
}

.faldon-item {
    padding: 6px;
    font-size: 0.6rem;
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.1;
}

.faldon-item strong {
    color: #e2001a;
    display: block;
}

/* Banner Quiosco */
.quiosco-banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('https://images.unsplash.com/photo-1504711434969-e33886168f5c?q=80&w=1000');
    background-size: cover;
    background-position: center;
    border-left: 8px solid #e2001a;
}

.btn-inicio {
    background-color: var(--liga-azul);
    color: var(--liga-blanco) !important;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-inicio:hover {
    background-color: var(--liga-rojo);
    color: var(--liga-blanco) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================ */
/* === RESPONSIVE MEDIA QUERIES === */
/* ============================================ */

/* Ordenador (PC) */
@media (min-width: 992px) {
    .nombre-equipo-calendario {
        font-size: 1.3rem !important;
    }

    .escudo-wrapper {
        width: 55px;
        height: 55px;
    }

    .marcador-gigante {
        font-size: 8.5rem;
        font-weight: 900;
        line-height: 0.8;
        letter-spacing: -5px;
        color: var(--liga-oscuro);
    }

    .responsive-title {
        font-size: 2.8rem;
        color: var(--liga-rojo);
        font-weight: 800;
    }

    .border-custom-right {
        border-right: 2px solid #dee2e6 !important;
    }
}

/* Móvil */
@media (max-width: 767.98px) {
    .nombre-equipo-calendario {
        font-size: 0.75rem !important;
        line-height: 1;
        margin: 0 4px !important;
    }

    .escudo-wrapper {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .marcador-calendario {
        min-width: 65px !important;
        padding: 4px 8px !important;
        font-size: 0.9rem !important;
    }

    .vs-badge-style {
        padding: 2px 6px !important;
        font-size: 0.65rem !important;
        border-width: 1px !important;
    }

    .match-link {
        padding: 1rem 0.5rem !important;
    }

    .marcador-gigante {
        font-size: 3.5rem;
        color: var(--liga-azul);
    }

    .responsive-title {
        font-size: 1.2rem;
        color: var(--liga-rojo);
    }

    .border-custom-right {
        border-bottom: 2px solid #dee2e6 !important;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}

/* --- OTROS --- */
.footer {
    border-top: 4px solid var(--liga-azul) !important;
}

.card-featured {
    background-color: var(--liga-crema) !important;
    border: 1px solid #fef08a !important;
}