:root {
    --primary: #1a365d;     /* Azul Marino Principal */
    --secondary: #0d9488;   /* Verde Azulado / Teal */
    --accent: #f59e0b;      /* Naranja Mostaza */
    --light: #f8fafc;       /* Fondo muy claro */
    --dark: #0f172a;        /* Texto oscuro */
    --gray: #64748b;        /* Texto secundario */
    --border-radius: 16px;  /* Bordes redondeados principales */
    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.7;
}

/* -----------------------------------------------------------
    Header Profesional / Barra de Navegación
----------------------------------------------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    z-index: 1000;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
}

.logo-container span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.back-btn {
    background: var(--primary);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
}

.back-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 148, 136, 0.3);
}

/* -----------------------------------------------------------
    Hero Section / Banner Principal (Ajustado para Responsividad)
----------------------------------------------------------- */
.service-hero {
    position: relative;
    min-height: 50vh;
    background: linear-gradient(rgba(15, 23, 42, 0.7),
     rgba(15, 23, 42, 0.7)), 
     url('IMAGENINDEX/empresafondo.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 3rem 1rem;
    margin-top: 80px; /* Evita que el menú fijo tape el título */
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text {
    text-align: left;
}

.service-hero .unit-tag {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    background: rgba(245, 158, 11, 0.15);
    padding: 6px 16px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 20px;
}

.service-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ffffff;
    line-height: 1.15;
}

.service-hero p {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.5;
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-img {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* -----------------------------------------------------------
    Secciones y Cuadrícula de Cards
----------------------------------------------------------- */
.main-section {
    padding: 4rem 8%;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 3.5rem;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 4rem;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.card-body h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.card-body p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.availability-tag {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--secondary);
}

/* -----------------------------------------------------------
    Sección de Promociones
----------------------------------------------------------- */
.promo-box {
    background: #fffbeb;
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1);
    border: 2px dashed var(--accent);
    margin-top: 2rem;
}

.promo-box h3 {
    color: #b45309;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.promo-box p {
    color: #78350f;
    font-size: 1.1rem;
    max-width: 750px;
    margin: 0 auto;
}

/* -----------------------------------------------------------
    Footer
----------------------------------------------------------- */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2.5rem 5%;
    margin-top: 4rem;
}

footer p {
    font-size: 0.95rem;
}

footer .slogan {
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.5);
    margin-top: 6px;
    font-style: italic;
}

/* --- NUEVOS ESTILOS PARA SECCIONES DE CLUBES --- */

/* Respaldo Institucional (3 tarjetas separadas) */
.respaldo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.respaldo-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1.5px solid rgba(170, 8, 245, 0.1);
    transition: var(--transition);
}

.respaldo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 45px rgba(151, 231, 2, 0.3);
    border-color: var(--accent);
}

.respaldo-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.respaldo-card h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.respaldo-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Secciones de Contenido en Bloques (Zigzag) */
.content-section {
    padding: 5rem 8%;
    background: #ffffff;
}

.content-section.alt-bg {
    background: #f1f5f9;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

.content-container.reverse {
    grid-template-columns: 1fr 1.2fr;
    direction: rtl;
}

.content-container.reverse > * {
    direction: ltr;
}

.text-block h2 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.text-block p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.periodo-tag {
    background: rgba(13, 148, 136, 0.1);
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-block;
    font-weight: 600;
    margin-bottom: 15px;
}

.admin-list {
    list-style: none;
    padding: 0;
}

.admin-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 1.05rem;
    color: var(--dark);
}

/* Imágenes con Zoom */
.image-block {
    text-align: center;
    position: relative;
    cursor: pointer;
}

.zoomable-img {
    width: 100%;
    max-width: 450px;
    height: 280px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: var(--transition);
    border: 3px solid #fff;
}

.zoomable-img:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.zoom-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--gray);
    font-style: italic;
}

/* Comisión Disciplinaria Miembros Grid */
.section-subtitle-text {
    text-align: center;
    color: var(--gray);
    max-width: 700px;
    margin: -2.5rem auto 3rem auto;
    font-size: 1.1rem;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.member-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.member-img-wrapper .zoomable-img {
    height: 220px;
    max-width: 100%;
}

.member-card h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 600;
}

.member-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

.banner-carousel-container {
    width: 100%;
    margin: 0;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- BANNER DE INSCRIPCIONES A ANCHO COMPLETO --- */
.inscripciones-banner {
    position: relative;
    width: 100%;
    padding: 0;
    color: white;
    text-align: center;
    overflow: hidden;
    margin-top: 4rem;
    background-color: #0f172a;
}

.carousel-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 450px;
    padding: 4rem 2rem;
    background-size: cover;          
    background-position: center;     
    background-repeat: no-repeat;
    border-radius: 0;                    
    animation: fadeIn 0.8s ease-in-out;
}

.carousel-slide.active {
    display: flex;
}

.banner-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 2;
}

.banner-content h2 {
    font-size: 2.5rem;
    color: #ffffff; 
    margin-bottom: 15px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.banner-content h2 i {
    color: var(--accent); 
}

.banner-content p {
    font-size: 1.25rem;
    color: #f1f5f9; 
    margin-bottom: 25px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

.cta-btn {
    background: var(--accent);
    color: var(--dark);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.cta-btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: var(--accent);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MODAL DE IMAGEN AMPLIADA (AJUSTADO PARA QUE NUNCA SE DEFORME) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    text-align: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 75vh; /* Evita que la foto crezca de más y se distorsione */
    object-fit: contain; /* Mantiene la proporción simétrica de la imagen original */
    border-radius: var(--border-radius);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
}

.close-modal {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

.close-modal:hover {
    color: var(--accent);
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* --- ESTILOS PARA EL PLAN DEPORTIVO ANUAL (5 CARDS) --- */
.plan-anual-section {
    background: #f8fafc;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1350px;
    margin: 0 auto;
}

.plan-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(26, 54, 93, 0.12);
    border-color: var(--accent);
}

.plan-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.plan-img-wrapper .zoomable-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    border: none;
}

.plan-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    text-align: left;
}

.plan-card-body h3 {
    color: var(--primary);
    font-size: 1.15rem;
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-card-body h3 i {
    color: var(--accent);
    font-size: 1.1rem;
}

.plan-card-body p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .plan-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

/* --- ESTILOS MEJORADOS PARA LA SECCIÓN DE RESEÑA HISTÓRICA --- */

.historia-section-wrapper {
    padding: 3rem 5%;
    background: #f8fafc;
}

.historia-card-box {
    max-width: 1250px;
    margin: 0 auto;
    background: #ffffff;
    border: 2px solid rgba(13, 148, 136, 0.2); 
    border-radius: 20px;
    padding: 3.5rem 3rem;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
    transition: all 0.3s ease;
}

.historia-card-box:hover {
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.historia-section-wrapper .text-block p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #334155;
    margin-bottom: 5px;
    text-align: justify;
}

.historia-carousel-block {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.historia-slides-container {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.historia-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.historia-slide.active {
    opacity: 1;
    z-index: 2;
}

.historia-slide .zoomable-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 3px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* --- MEDIA QUERIES GENERALES DE RESPONSIVIDAD --- */
@media(max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    .hero-text {
        text-align: center;
    }
    .service-hero h1 {
        font-size: 2.8rem;
    }
    .hero-image-wrapper {
        justify-content: center;
    }
    .content-container, .content-container.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 30px;
        text-align: center;
    }
    .text-block h2 {
        justify-content: center;
    }
    .historia-card-box {
        padding: 2rem 1.5rem;
    }
    .historia-slides-container {
        height: 250px;
    }
}

@media(max-width: 768px) {
    header { padding: 0.8rem 4%; height: 70px; }
    .logo-container img { width: 40px; height: 40px; }
    .logo-container span { font-size: 0.85rem; }
    .back-btn { padding: 0.5rem 1rem; font-size: 0.8rem; }
    
    .service-hero { margin-top: 70px; padding: 3rem 4%; }
    .service-hero h1 { font-size: 2.2rem; }
    .service-hero p { font-size: 1.1rem; }

    .main-section { padding: 3rem 4%; }
    .section-title { font-size: 1.8rem; margin-bottom: 2.5rem; }
    
    .promo-box { padding: 2rem 1.5rem; }
    .promo-box h3 { font-size: 1.4rem; flex-direction: column; gap: 5px; }
}