/* ============================================================
   ESTILOS PÁGINA PÚBLICA DE TORNEOS
   ============================================================ */

:root {
    --primary-color: #1a2c3e;
    --secondary-color: #e6b422;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-600: #6c757d;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 14px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: #212529;
    background-color: #fff;
    overflow-x: hidden;
    padding-top: 70px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: linear-gradient(135deg, #0a1a2a 0%, var(--primary-color) 100%);
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand img {
    height: 35px;
}

.navbar-brand span {
    color: var(--secondary-color);
}

.nav-link {
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.7rem !important;
    color: rgba(255,255,255,0.8) !important;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color) !important;
}

.nav-link i {
    margin-right: 4px;
}

/* ============================================================
   SLIDER / HERO
   ============================================================ */
.hero-section {
    margin-bottom: 0;
}

.carousel-item {
    height: 75vh;
    min-height: 400px;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    filter: brightness(0.7);
}

.carousel-caption {
    bottom: 25%;
    text-align: left;
    left: 10%;
    right: auto;
    max-width: 600px;
}

.carousel-caption h3 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-caption p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ============================================================
   SECCIONES GENERALES
   ============================================================ */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 0.8rem auto 1.2rem;
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.05rem;
}

.bg-light {
    background-color: var(--gray-100) !important;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn-ver-todos {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    background: transparent;
    border: 2px solid var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-ver-todos:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.btn-ver-todos i {
    margin-left: 6px;
}

/* ============================================================
   EQUIPOS
   ============================================================ */
.equipos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.equipo-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.equipo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.equipo-card a {
    text-decoration: none;
    color: inherit;
}

.equipo-card img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid var(--gray-200);
}

.equipo-card .logo-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 10px;
}

.equipo-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--primary-color);
}

.equipo-card p {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin: 0;
}

/* ============================================================
   PARTIDOS
   ============================================================ */
.partidos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.partido-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    transition: all 0.3s ease;
}

.partido-card:hover {
    box-shadow: var(--shadow-hover);
}

.partido-equipos {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.equipo-local,
.equipo-visitante {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.equipo-local img,
.equipo-visitante img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
}

.sin-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--gray-600);
}

.partido-vs {
    font-weight: 700;
    color: var(--gray-600);
    font-size: 0.8rem;
}

.partido-info {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.partido-info i {
    margin-right: 4px;
}

/* ============================================================
   TABLA DE POSICIONES
   ============================================================ */
.tabla-container {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.tabla-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tabla-container thead th {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

.tabla-container tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.tabla-container tbody tr:hover {
    background: var(--gray-100);
}

.tabla-container tbody tr:last-child td {
    border-bottom: none;
}

.tabla-logo {
    width: 25px;
    height: 25px;
    object-fit: contain;
    border-radius: 50%;
    margin-right: 8px;
}

.pts {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.dg-pos {
    color: #198754;
    font-weight: 600;
}

.dg-neg {
    color: #dc3545;
    font-weight: 600;
}

/* ============================================================
   GOLEADORES
   ============================================================ */
.goleadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.goleador-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.goleador-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.goleador-card img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
}

.goleador-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.goleador-info {
    flex: 1;
}

.goleador-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-color);
}

.goleador-info p {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin: 0;
}

.goleador-goles {
    text-align: center;
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
}

.goleador-goles span {
    font-size: 1.3rem;
    display: block;
    line-height: 1.2;
}

.goleador-goles small {
    font-size: 0.6rem;
    font-weight: 400;
}

/* ============================================================
   TRANSMISIONES
   ============================================================ */
.transmisiones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.transmision-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.transmision-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.transmision-embed iframe {
    width: 100%;
    height: 200px;
    border: none;
}

.transmision-info {
    padding: 12px 16px;
}

.transmision-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--primary-color);
}

.transmision-info p {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin: 0;
}

/* ============================================================
   GALERÍA
   ============================================================ */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.galeria-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeria-item:hover img {
    transform: scale(1.08);
}

.galeria-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 12px 16px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay span {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================================
   PATROCINADORES
   ============================================================ */
.patrocinadores-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px 40px;
}

.patrocinador-item img {
    max-height: 60px;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.patrocinador-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.patrocinador-item a {
    display: block;
    text-decoration: none;
}

.patrocinador-item span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-600);
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.contacto-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.contacto-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 4px;
}

.contacto-item h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0 0 2px 0;
}

.contacto-item p {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-color);
}

/* ============================================================
   SEDES
   ============================================================ */
.sedes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.sede-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.sede-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.sede-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.sede-card p {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.sede-card p i {
    margin-right: 6px;
}

.btn-ver-mapa {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--gray-100);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-ver-mapa:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================================
   SIN INFORMACIÓN
   ============================================================ */
.sin-info {
    text-align: center;
    padding: 30px 20px;
    color: var(--gray-600);
    background: var(--gray-100);
    border-radius: var(--radius);
    border: 1px dashed var(--gray-200);
}

.sin-info i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    color: var(--gray-600);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--primary-color);
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}

.footer h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-bottom .fa-heart {
    color: #e74c3c;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .carousel-item {
        height: 60vh;
        min-height: 350px;
    }
    .carousel-caption h3 {
        font-size: 2rem;
    }
    .section {
        padding: 3rem 0;
    }
    .section-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    .carousel-item {
        height: 50vh;
        min-height: 300px;
    }
    .carousel-caption {
        bottom: 15%;
        left: 5%;
        max-width: 90%;
    }
    .carousel-caption h3 {
        font-size: 1.5rem;
    }
    .equipos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    .partido-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .partido-equipos {
        justify-content: center;
    }
    .partido-info {
        justify-content: center;
    }
    .goleadores-grid {
        grid-template-columns: 1fr;
    }
    .galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .transmisiones-grid {
        grid-template-columns: 1fr;
    }
    .navbar-brand {
        font-size: 1rem;
    }
    .navbar-brand img {
        height: 28px;
    }
    .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0 !important;
    }
    .section-header h2 {
        font-size: 1.5rem;
    }
    .contacto-grid {
        grid-template-columns: 1fr;
    }
    .sedes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        height: 40vh;
        min-height: 250px;
    }
    .carousel-caption h3 {
        font-size: 1.2rem;
    }
    .carousel-caption p {
        font-size: 0.9rem;
    }
    .equipos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .equipo-card {
        padding: 12px;
    }
    .equipo-card img,
    .equipo-card .logo-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .equipo-card h3 {
        font-size: 0.8rem;
    }
    .tabla-container {
        font-size: 0.75rem;
        overflow-x: auto;
    }
    .tabla-container thead th,
    .tabla-container tbody td {
        padding: 6px 10px;
    }
}