:root {
    --accent: #d4af37;     /* Dorado de Campeones */
    --gray: #f4f4f4;
    --primary: #0a192f;    /* Navy Profesional */
    --secondary: #172a45;  /* Navy Claro */
    --text-main: #333;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --white: #ffffff;
}

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

body {
    background-color: var(--gray);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

/* Configuración Global de Tipografía */
body {
    font-family: 'Open Sans', sans-serif;
    color: whitesmoke;
    -webkit-font-smoothing: antialiased; /* Suaviza las letras en Mac/iOS */
}

/* Títulos con Impacto Deportivo */
h1, h2, h3, .badge {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: -1px; /* Letras más juntas = más impacto */
}

/* Estilo para el HERO (La frase principal) */
.hero-content h2 {
    font-size: clamp(2.5rem, 8vw, 4.5rem); /* Se ajusta solo al tamaño de pantalla */
    font-weight: 900;
    line-height: 0.95;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5); /* Sombra para que no se pierda en la foto */
}

.highlight {
    color: #d4af37;
    font-style: italic; /* Un toque dinámico */
    display: inline-block;
}

/* Subtítulos de Secciones */
.section-header h2 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
    color: #0d1b2a;
}

/* Línea decorativa debajo de los títulos */
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #d4af37;
}

/* Estilo para los párrafos de lectura */
p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 700px;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

/* Datos de los jugadores y equipos */
.team-info h3 {
    font-size: 1.4rem;
    color: #0d1b2a;
    margin-bottom: 5px;
}

.match-category {
    font-weight: 800;
    letter-spacing: 2px;
}

.btn {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn:hover {
    letter-spacing: 2px; /* Efecto sutil al pasar el ratón */
}

/* Header & Nav */
header {
    background: var(--primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Header Base */
.header-main {
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px); /* Efecto cristal moderno */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    transition: all 0.3s ease;
}

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

.logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo { height: 50px; }

.brand-text h1 { color: #fff; font-size: 1.3rem; margin: 0; letter-spacing: 1px; }
.brand-text span { color: #d4af37; font-size: 0.7rem; font-weight: bold; display: block; }

.menu {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: 0.3s;
}

.menu a:hover { color: #d4af37; }

/* Botón especial dentro del menú */
.btn-nav {
    background: #d4af37;
    color: #0d1b2a !important;
    padding: 8px 20px;
    border-radius: 5px;
}

/* Estilos para el botón hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: 0.3s;
}

/* MEDIA QUERY: MÓVIL */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .menu {
        position: fixed;
        top: 0;
        right: -100%; /* Escondido a la derecha */
        height: 100vh;
        width: 80%;
        background: #0d1b2a;
        flex-direction: column;
        justify-content: center;
        transition: 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .menu.active { right: 0; } /* Se desliza hacia adentro */

    .menu li { margin: 20px 0; }
    .menu a { font-size: 1.5rem; }

    /* Animación X del botón hamburguesa */
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

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

.header-left {
    align-items: center;
    display: flex;
    gap: 20px;
}

.small-logos {
    display: flex;
    gap: 10px;
}

.small-logo {
    height: 30px;
    width: auto;
}

.logo-brand { align-items: center; display: flex; gap: 15px; }
.nav-logo { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); height: 60px; }
.brand-text h1 { color: var(--white); font-size: 1.5rem; letter-spacing: 2px; }
.brand-text span { color: var(--accent); font-size: 0.8rem; font-weight: bold; }

.menu { display: flex; gap: 2rem; list-style: none; }
.menu a { color: var(--white); font-size: 0.9rem; font-weight: 700; text-decoration: none; text-transform: uppercase; transition: var(--transition); }
.menu a:hover { color: var(--accent); }

.hero-premium {
    position: relative;
    height: 100vh; /* Ocupa toda la pantalla */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    
    /* AQUÍ ENVIAMOS LA IMAGEN ATRÁS */
    background-image: url('img/club.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto elegante al hacer scroll */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Capa oscura para que las letras blancas se lean bien */
    background: rgba(10, 25, 47, 0.6); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Pone las letras por encima de la capa oscura y la imagen */
    max-width: 800px;
}

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 20px 0;
}

.highlight {
    color: #d4af37; /* El dorado profesional del logo */
}

.badge {
    background: #d4af37;
    color: #0d1b2a;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Botones modernos */
.hero-btns {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary {
    background: #d4af37;
    color: #0d1b2a;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-outline {
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-outline:hover {
    background: white;
    color: #0d1b2a;
}

.hero-content { position: relative; z-index: 2; }
.badge { background: var(--accent); border-radius: 20px; color: var(--primary); font-size: 0.8rem; font-weight: 900; padding: 5px 15px; }
.hero-content h2 { font-size: 4rem; line-height: 1.1; margin: 20px 0; }
.highlight { color: var(--accent); }

/* 1. EL CONTENEDOR MAESTRO */
.container {
    width: 100%;            /* Un poco más estrecho para dar más margen lateral */
    max-width: 1800px;     /* Evita que en pantallas gigantes se estire demasiado */
    margin: 0 auto;        /* Centrado automático */
    padding: 0 20px;
}

/* 2. ESPACIADO ENTRE SECCIONES */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}

.section-centered > div {
    width: min(100%, 900px);
}

.section-centered h1,
.section-centered h2,
.section-centered h3,
.section-centered h4,
.section-centered h5,
.section-centered h6 {
    text-align: center;
}

/* 3. HERO SECTION (CENTRAR TEXTO) */
.hero-content {
    max-width: 850px;      /* Estrecha el texto del inicio para que no ocupe todo el ancho */
    margin: 0 auto;        /* Lo centra en la pantalla */
    text-align: center;    /* Centra las letras */
}

.hero-btns {
    justify-content: center; /* Centra los botones del inicio */
}

/* 4. TARJETAS Y GRIDS CENTRADOS */
.team-grid, .match-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;             /* Más espacio entre tarjetas */
    justify-content: center;
}

/* 5. EL FOOTER CENTRADO */
.footer-grid {
    max-width: 1850px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;    /* Centra el texto del footer en móvil */
    gap: 50px;
}

/* 6. MODAL (CENTRAR CONTENIDO) */
.modal-content {
    margin: auto;          /* Centra el cuadro blanco en la pantalla */
    padding: 40px;         /* Más margen interno para los jugadores */
    text-align: center;
}

.player-item {
    justify-content: center; /* Centra los jugadores dentro de la lista */
    text-align: left;        /* Pero mantiene su texto alineado a su foto */
}

/* Sección Calendario Premium */
.match-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.match-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.match-card:hover {
    transform: translateY(-5px);
}

.match-category {
    background: var(--primary); /* Azul medianoche */
    color: var(--accent); /* Dorado */
    text-align: center;
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 15px;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
}

.team-vs {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.team-vs img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.team-vs span {
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
}

.match-info {
    flex: 0.8;
    text-align: center;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.match-time {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.match-date {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    font-weight: 600;
}

.match-footer {
    background: #f1f1f1;
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    color: #555;
    font-weight: 500;
}

.match-footer i {
    color: var(--accent);
    margin-right: 5px;
}

/* Cards de Equipos */
.team-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    padding: 2rem 0;
}

.team-card {
    background: var(--white);
    border-bottom: 4px solid transparent;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: var(--transition);
}

.team-card:hover { border-bottom: 4px solid var(--accent); transform: translateY(-10px); }
.team-card img { height: 200px; object-fit: cover; width: 100%; }
.team-info { padding: 20px; text-align: center; }

.news-item img {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    margin: 20px auto 0;
    border-radius: 15px;
}

/* Modales */
.modal {
    align-items: center;
    backdrop-filter: blur(5px);
    background: rgba(10, 25, 47, 0.95);
    display: none;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 2000;
}

.modal.show { display: flex; }
.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 620px;
    overflow: hidden;
    width: min(95%, 620px);
}

.modal-header { background: var(--primary); color: var(--white); display: flex; justify-content: space-between; padding: 24px 24px 18px; }
.modal-close { cursor: pointer; font-size: 1.8rem; }

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.player-list-pro { list-style: none; padding: 24px; }
.player-item {
    align-items: center;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 18px;
    padding: 18px 0;
    color: #000;
}

.player-thumb {
    border: 3px solid var(--accent);
    border-radius: 50%;
    height: 80px;
    object-fit: cover;
    width: 80px;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.player-thumb:hover { transform: scale(1.05); }

.player-details {
    flex: 1;
}

.player-details strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.player-details span,
.player-details p {
    color: #555;
    font-size: 0.95rem;
}

.image-modal .modal-content {
    max-width: 500px;
    width: min(95%, 500px);
}

.image-modal-body {
    display: grid;
    place-items: center;
    padding: 24px;
    max-height: none;
    overflow-y: visible;
}

.player-image-wrap {
    width: clamp(320px, 70vw, 460px);
    height: clamp(320px, 70vw, 460px);
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: #f7f7f7;
    padding: 10px;
}

#playerModalImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 18px;
}

/* SECCIÓN DE CONTACTO - DISEÑO EN DOS COLUMNAS */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    position: relative;
    padding-bottom: 15px;
    padding-top: 2rem;
}

.section-header h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background: var(--secondary);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* CONTENEDOR FLEXIBLE PARA FORMULARIO E INFO */
#contacto-info .news-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    #contacto-info .news-item {
        grid-template-columns: 1fr;
    }
}

/* FORMULARIO DE CONTACTO */
.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form h3 {
    margin-bottom: 20px;
    color: #333;
}

.contact-form label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
}

.contact-form input, 
.contact-form textarea {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 2px solid grey;
    border-radius: 8px;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(0, 77, 153, 0.1);
}

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #003366;
    transform: translateY(-2px);
}

/* BLOQUE DE INFORMACIÓN (Iconos) */
.info-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
}

.info-details p {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.info-details i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

/*Inscripciones*/
.news-item h3{
    color: black;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.news-item h3 .label-gray {
    color: gray;
}

.news-item p{
    color: gray;
    font-size: 1.1rem;
    line-height: 1.6;
}

#directiva-list .news-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

#directiva-list .news-item img {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 20px 0;
    border-radius: 15px;
}

/* Footer Estilo Profesional */
.footer-premium {
    background-color: #0d1b2a; /* Azul muy oscuro de la imagen */
    color: #ffffff;
    padding: 60px 0 20px 0;
    font-family: 'Montserrat', sans-serif;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    border-bottom: 2px solid #d4af37; /* Línea dorada divisoria */
    padding-bottom: 40px;
}

.footer-logo-img {
    width: 120px;
    margin-bottom: 15px;
}

.brand-text-footer h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.tagline {
    color: #d4af37;
    font-weight: bold;
    font-size: 0.9rem;
}

.footer-column h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
    position: relative;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #d4af37;
}

.footer-social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.footer-social-icons i {
    font-size: 1.5rem;
    color: #d4af37;
    transition: transform 0.3s;
}

.footer-social-icons i:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #a0a0a0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.footer-bottom a {
    color: #d4af37;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Ajuste móvil */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-social-icons {
        justify-content: center;
    }
}