@import url('https://fonts.googleapis.com/css?family=Merriweather|Roboto+Slab');
@import url(banner.css);
@import url(sedes.css);
@import url(pie.css);

/* ------------------------------------------------ */
/* ------------------------------------------------ */
/* SOLUCIÓN FOOTER PEGADO AL PISO (STICKY FOOTER) */
/* ------------------------------------------------ */

html,
body {
    height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Roboto Slab', serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background-image: url(../Imagenes/background.png);
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

.container-fluid {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 100%;
    padding: 0;
    /* Asegurar que el contenedor no añada padding extra que rompa el flujo */
}

main {
    flex-grow: 1;
}


/* ------------------------------------------------ */
/* ESTILOS BASE Y UTILERÍA */
/* ------------------------------------------------ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

section {
    width: 100%;
    margin-bottom: 5px;
    margin-top: 0px;
}

/* ------------------------------------------------ */
/* AJUSTE DE ANCHO DEL BANNER AL HEADER (80%) */
/* ------------------------------------------------ */

.header-matched-width {
    max-width: 80%;
    margin: 0 auto;
    width: 100%;
    /* Asegurar que tome el ancho y no colapse */
}


/* ------------------------------------------------ */
/* ESTILOS DE HOVER MODERNOS */
/* ------------------------------------------------ */

#link_trn,
#link_gmz,
#login-btn {
    display: inline-block;
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

#link_trn:hover,
#link_gmz:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.7));
}

#login-btn {
    right: 5% !important;
    /* Ajuste de posición para no solapar texto del banner */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#login-btn:hover {
    transform: translateY(-50%) scale(1.15) !important;
    filter: brightness(1.2) drop-shadow(0 0 15px rgba(25, 211, 102, 0.5));
}

/* Eliminado el cambio de imagen para evitar parpadeo */


/* ------------------------------------------------ */
/* ESTILOS DEL BOTÓN CTA */
/* ------------------------------------------------ */

.registration-cta {
    background-color: #ffc107;
    border: none;
    color: #343a40;
    font-weight: 700;
    font-size: 1.6rem;
    padding: 15px 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.registration-cta:hover {
    background-color: #e0a800;
    color: #343a40;
    transform: translateY(-3px) scale(1.01);
}

/* OPTIMIZACIÓN MÓVIL */
@media (max-width: 576px) {
    .registration-cta {
        font-size: 1.1rem;
        padding: 10px 5px;
        white-space: normal;
    }
}


/* ------------------------------------------------ */
/* ESTILOS ESPECÍFICOS DEL FOOTER */
/* ------------------------------------------------ */

/* ------------------------------------------------ */
/* NEW MINIMALIST FOOTER (TREND 2025) */
/* ------------------------------------------------ */

.footer-minimalist {
    background: rgba(18, 18, 18, 0.95) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 0 1rem;
    margin-top: auto;
}

.footer-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-info-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.footer-label {
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: #198754;
    font-weight: 800;
}

.footer-phone-link {
    font-family: 'Roboto Slab', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.footer-phone-link:hover {
    color: #25d366 !important;
}

.footer-social-links {
    display: flex;
    gap: 1.2rem;
}

.footer-social-item {
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.footer-social-item:hover {
    color: #25d366;
    opacity: 1;
    transform: translateY(-3px);
}

.footer-bottom-bar {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* RESPONSIVE FOOTER */
@media (max-width: 768px) {
    .footer-main-content {
        justify-content: center;
        text-align: center;
        gap: 1rem;
    }

    .footer-phone-link {
        font-size: 1.1rem;
    }
}


/* ------------------------------------------------ */
/* ESTILOS DEL BANNER PUBLICITARIO (DIMENSIONES Y ESTIRAMIENTO) */
/* ------------------------------------------------ */

.banner-publicitario {
    background-color: #555555;
    padding: 0;
    border-radius: 8px;
    max-height: 180px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
}

.banner-registro-img {
    height: 180px;
    width: 100%;
    object-fit: fill;
}

.banner-publicitario a {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0;
    display: block;
}


/* SOLUCIÓN 5: Aumentar el tamaño de los logos de sede */
.w-90 {
    width: 90% !important;
}

/* ------------------------------------------------ */
/* ESTILOS DEL BOTÓN FLOTANTE DE WHATSAPP OFICIAL */
/* ------------------------------------------------ */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    line-height: 60px;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    color: #fff;
    background-color: #128C7E;
    transform: scale(1.1);
}

.whatsapp-float .fa-whatsapp {
    line-height: 60px;
}

/* Ajuste para pantallas pequeñas (móvil) */
@media (max-width: 576px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 24px;
        line-height: 50px;
    }

    .whatsapp-float .fa-whatsapp {
        line-height: 50px;
    }
}

/* ------------------------------------------------ */
/* ESTILOS DE BOTONES PREMIUM (REGISTRO Y EQUIPOS) */
/* ------------------------------------------------ */

.btn-premium {
    border: none;
    border-radius: 12px;
    color: #fff !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
    /* Asegurar visibilidad */
    width: 100%;
    /* Ocupar todo el ancho de la columna */
    display: flex;
    /* Asegurar estructura flexible interna */
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
}

.btn-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.btn-registro {
    background: linear-gradient(135deg, #0d6efd 0%, #0043a8 100%);
}

.btn-equipo {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}

.btn-premium i {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* RESPONSIVE BUTTONS */
@media (max-width: 768px) {
    .btn-premium {
        padding: 15px !important;
        /* Reducir padding en móvil */
    }

    .btn-premium .fa-2x {
        font-size: 1.5em;
        /* Reducir tamaño de icono */
        margin-right: 0.5rem !important;
        /* Ajustar margen */
    }

    .btn-premium h4 {
        font-size: 1.1rem;
        /* Ajustar tamaño de texto */
    }

    .btn-premium small {
        font-size: 0.8rem;
    }
}

/* ------------------------------------------------ */
/* MODERN LEAGUE CARDS (GLASSMORPHISM) */
/* ------------------------------------------------ */

.league-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.league-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 45px rgba(25, 135, 84, 0.4);
}

.league-card-img-container {
    aspect-ratio: 16 / 9;
    /* Proporción estándar profesional */
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.league-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cambiado de fill a cover para evitar estiramiento y mantener proporción */
    transition: transform 0.6s ease;
}

.league-card:hover .league-card-img {
    transform: scale(1.1);
}

.league-card-body {
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 100%);
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.league-card-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.league-card-btn {
    background: #198754;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    border: none;
    align-self: center;
    margin-top: auto;
}

.league-card-btn::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 10px;
}

.league-card:hover .league-card-btn {
    background: #25d366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
}

/* SECTION HEADERS MODERN */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    text-transform: uppercase;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #198754;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ------------------------------------------------ */
/* ESTILOS DE ESTADÍSTICAS (TABLAS Y PESTAÑAS) */
/* ------------------------------------------------ */

.nav-tabs {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.nav-tabs .nav-link {
    color: #fff;
    border: none;
    padding: 15px 25px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #25d366;
    border: none;
}

.nav-tabs .nav-link.active {
    background-color: #198754 !important;
    color: #fff !important;
    border-radius: 10px 10px 0 0;
}

.stats-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table {
    color: #fff;
    vertical-align: middle;
}

.table thead th {
    background-color: #198754;
    border-bottom: 2px solid #25d366;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {

    /* CORRECCIÓN PESTAÑAS (TABS) DESPLAZABLES */
    .nav-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        border-bottom: 2px solid rgba(25, 135, 84, 0.3) !important;
        padding-bottom: 5px;
        scrollbar-width: none;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs .nav-item {
        white-space: nowrap;
        margin-right: 5px;
    }

    .nav-tabs .nav-link {
        padding: 10px 15px !important;
        font-size: 0.85rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px 8px 0 0 !important;
    }

    /* CORRECCIÓN TABLAS GENERALES */
    .stats-container {
        padding: 15px !important;
        margin-top: -2px;
    }

    .table {
        font-size: 0.75rem !important;
    }

    .table th,
    .table td {
        padding: 10px 4px !important;
        white-space: nowrap;
    }

    .table td.text-start button {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0;
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.6rem !important;
        margin-bottom: 25px !important;
    }

    .section-title::after {
        width: 60px !important;
    }

    header img {
        max-width: 95% !important;
    }

    .league-card-img-container {
        height: auto;
    }

    .league-card-title {
        font-size: 1.1rem !important;
    }
}

/* ------------------------------------------------ */
/* ESTILOS PROFESIONALES PARA MODALES Y JUGADORES */
/* ------------------------------------------------ */

.player-card-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.player-card-modern:hover {
    background: rgba(25, 135, 84, 0.1);
    border-color: #198754;
    transform: translateY(-3px);
}

.player-photo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #198754;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: #1a1a1a;
}

.player-photo-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-name-modern {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    /* Compatibilidad estándar */
    overflow: hidden;
    line-height: 1.2;
    height: 2.4em;
}

.template-link-box {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #198754 !important;
    color: #25d366 !important;
    font-family: monospace;
    font-weight: bold;
}

/* ------------------------------------------------ */
/* UNIVERSAL PREMIUM CAROUSEL (BOOSTRAP 5)          */
/* ------------------------------------------------ */

.carousel-premium {
    max-width: 1200px;
    margin: 1rem auto 2.5rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
}

.carousel-inner {
    border-radius: 20px;
}

.carousel-item-img {
    width: 100%;
    height: 300px;
    /* Altura refinada para desktop */
    object-fit: contain;
    /* Cambio a contain para ver la imagen completa */
    object-position: center;
    background-color: #000;
    /* Fondo negro para banners que no llenan el ancho */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item.active .carousel-item-img {
    transform: scale(1.05);
}

.carousel-overlay-premium {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
}

.carousel-caption-title {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.4rem;
    margin-bottom: 40px;
    /* Espacio para indicadores */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(37, 211, 102, 0.7);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
}

.carousel-indicators {
    margin-bottom: 1.5rem;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #25d366;
}

@media (max-width: 768px) {
    .carousel-premium {
        margin: 1rem 12px 1.5rem;
        border-radius: 15px;
    }

    .carousel-item-img {
        height: 160px;
        /* Altura optimizada para móviles con contain */
    }

    .carousel-caption-title {
        font-size: 0.85rem;
        margin-bottom: 25px;
    }

    /* UNIFORMIDAD DE BOTONES EN MÓVIL (FASE 12) */
    .btn-premium.btn-registro,
    .btn-premium.btn-equipo {
        padding: 1rem 0.5rem !important;
        min-height: 120px;
        /* Altura idéntica forzada */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .btn-premium i {
        font-size: 1.5rem !important;
        margin-right: 0 !important;
        margin-bottom: 8px;
    }

    .btn-premium span.h4 {
        font-size: 0.7rem !important;
        line-height: 1.2;
        display: block;
        width: 100%;
        white-space: normal;
        /* Permite salto de línea si es necesario */
    }

    .btn-premium small {
        font-size: 0.6rem !important;
        margin-top: 4px;
        opacity: 0.8;
    }

    .btn-premium .d-flex {
        flex-direction: column;
        width: 100%;
    }
}

/* ------------------------------------------------ */
/* COLUMNAS CONGELADAS PARA SCROLL HORIZONTAL */
/* ------------------------------------------------ */
.sticky-col {
    position: -webkit-sticky !important; /* Safari */
    position: sticky !important;
    left: 0;
    z-index: 2;
    background-clip: padding-box;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2); /* Slight shadow to separate from content below */
}

.sticky-col-right {
    position: -webkit-sticky !important; /* Safari */
    position: sticky !important;
    right: 0;
    z-index: 2;
    background-clip: padding-box;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2); /* Shadow on the left */
}

/* Clases específicas para Tabla General (PTS y ADEUDO) */
.sticky-col-adeudo {
    position: -webkit-sticky !important;
    position: sticky !important;
    right: 0;
    z-index: 2;
    background-clip: padding-box;
    width: 85px !important;
    min-width: 85px !important;
    max-width: 85px !important;
    box-sizing: border-box;
}

.sticky-col-pts {
    position: -webkit-sticky !important;
    position: sticky !important;
    right: 85px; /* Mismo ancho que adeudo */
    z-index: 2;
    background-clip: padding-box;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2); /* Sombra para indicar que puede haber más contenido atrás */
    width: 45px !important;
    min-width: 45px !important;
    max-width: 45px !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .sticky-col-adeudo {
        width: 75px !important;
        min-width: 75px !important;
        max-width: 75px !important;
    }
    .sticky-col-pts {
        right: 75px !important;
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
    }
}

/* Backgrounds for sticky columns in dark table */
.table-dark tbody td.sticky-col, 
.table-dark tbody th.sticky-col,
.table-dark tbody td.sticky-col-right, 
.table-dark tbody th.sticky-col-right,
.table-dark tbody td.sticky-col-pts,
.table-dark tbody td.sticky-col-adeudo {
    background-color: #212529 !important; /* Standard Bootstrap dark table bg */
}

/* Hover effect for sticky columns */
.table-dark.table-hover tbody tr:hover td.sticky-col,
.table-dark.table-hover tbody tr:hover td.sticky-col-right,
.table-dark.table-hover tbody tr:hover td.sticky-col-pts,
.table-dark.table-hover tbody tr:hover td.sticky-col-adeudo {
    background-color: #323539 !important; 
}

/* Headings for sticky columns */
.table thead th.sticky-col {
    background-color: #198754 !important; 
    z-index: 3; /* higher than td */
    border-right: 1px solid #25d366;
}

.table thead th.sticky-col-right,
.table thead th.sticky-col-adeudo {
    background-color: #198754 !important; 
    z-index: 3; /* higher than td */
}

.table thead th.sticky-col-pts {
    background-color: #198754 !important; 
    z-index: 3; /* higher than td */
    border-left: 1px solid #25d366;
}