/* ==========================================================================
   1. RESET GLOBAL, CONFIGURACIÓN Y TIPOGRAFÍAS
   ========================================================================== */

/* Reseteo universal para asegurar que ningún padding/borde desborde la pantalla */
*,
*::before,
*::after {
    box-sizing: border-box !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
    /* Offset para que la barra no tape los títulos */
    width: 100%;
    max-width: 100%;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    overflow-x: hidden;
    /* Corta cualquier desbordamiento lateral */
}

/* Prevenir desbordamientos laterales causados por grillas o imágenes */
.container,
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden;
}

.row {
    margin-left: -15px;
    margin-right: -15px;
}

/* Forzar que todas las imágenes y vectores nunca superen el ancho del celular */
img,
svg,
iframe {
    max-width: 100% !important;
    height: auto;
}

/* Tipografía para títulos y navegación */
h1,
h2,
h3,
h4,
h5,
h6,
.navbar-nav {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
}

.text-orange {
    color: #ff7f26 !important;
}

.texto-cursivo {
    font-family: 'Dancing Script', cursive;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
}


/* ==========================================================================
   2. BARRA DE NAVEGACIÓN (#mainNav / .navbar)
   ========================================================================== */

/* Ajuste estricto para que el Navbar nunca supere la pantalla */
.navbar {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
}

#mainNav {
    background-color: #ff7f26;
    padding-top: 15px;
    padding-bottom: 15px;
    transition: padding 0.3s ease, background-color 0.3s ease;
}

#mainNav .navbar-brand .logo-nav {
    height: 45px;
    transition: height 0.3s ease;
}

#mainNav .navbar-nav .nav-link {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #212529;
    padding: 0.5rem 0.8rem;
}

#mainNav .navbar-nav .nav-link:hover {
    color: #ffffff;
}

/* Estado contraído al hacer scroll */
#mainNav.navbar-shrink {
    padding-top: 6px;
    padding-bottom: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#mainNav.navbar-shrink .navbar-brand .logo-nav {
    height: 32px;
}


/* ==========================================================================
   3. ESTRUCTURA PRINCIPAL & HERO SECTION
   ========================================================================== */
.hero-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 75px;
    /* Compensa la barra fija */
    width: 100%;
    overflow: hidden;
}

.hero-section {
    flex: 1;
    width: 100%;
    background: url('../imagenes/1900.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* Logo central y banderas */
.brand-flags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 100%;
}

.brand-flags .flag-img {
    width: 55px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.brand-flags .flag-img:hover {
    transform: scale(1.05);
}

.brand-flags .main-hero-logo {
    max-width: 210px;
    height: auto;
}

/* Card central con textos */
.hero-card {
    background: rgba(0, 0, 0, 0.55);
    border-radius: 12px;
    max-width: 480px;
    width: 90%;
}

.hero-titulo {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 2.2rem;
    letter-spacing: 1px;
}

.hero-subtitulo {
    font-size: 1.1rem;
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
}

.hero-ubicacion {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Botón principal WhatsApp */
.boton-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: bold;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    text-decoration: none !important;
    transition: background-color 0.3s ease;
}

.boton-whatsapp:hover {
    background-color: #128C7E;
}


/* ==========================================================================
   4. ZÓCALO INFERIOR & BOTONES DE CONTACTO
   ========================================================================== */
.zocalo-info {
    background-color: #000000;
    color: #cccccc;
    border-top: 1px solid #1a1a1a;
    width: 100%;
    flex-shrink: 0;
}

.gap-contacto {
    gap: 10px;
}

.btn-contacto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-contacto:hover {
    background-color: #ff7f26;
    border-color: #ff7f26;
    color: #ffffff !important;
}

.flags-languages img {
    margin: 0 2px;
    width: 20px;
    height: auto;
    vertical-align: middle;
}


/* ==========================================================================
   5. SECCIONES DE CONTENIDO
   ========================================================================== */

/* Quiénes Somos */
.seccion-quienes-somos {
    background-color: #a666b1;
    color: #212529;
    scroll-margin-top: 60px;
}

.titulo-seccion {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    font-weight: 700;
    font-size: 2rem;
}

.subtitulo-seccion {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    font-weight: 600;
}

.texto-justificado {
    text-align: justify;
    line-height: 1.5;
    margin-bottom: 1rem;
}

@media (min-width: 992px) {
    .img-quienes-somos {
        width: 48%;
        max-width: 550px;
        margin-bottom: 1.5rem !important;
        margin-right: 2rem !important;
        shape-outside: margin-box;
    }
}

@media (max-width: 991px) {
    .img-quienes-somos {
        width: 100%;
        height: auto;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Nuestras Clases */
.seccion-clases {
    background-color: #06a4c6;
    scroll-margin-top: 60px;
}

.tarjeta-clase {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    overflow: hidden;
}

.tarjeta-clase:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tarjeta-clase .card-img-top {
    width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: calc(0.25rem - 1px);
    border-top-right-radius: calc(0.25rem - 1px);
}

.link-clase {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #e65c00;
    font-weight: normal;
    text-decoration: none;
    font-size: 1rem;
}

.link-clase:hover {
    color: #c44d00;
    text-decoration: none;
    cursor: default;
}

.texto-tarjeta {
    font-size: 0.875rem;
    color: #495057;
    text-align: justify;
    line-height: 1.5;
}

.tarjeta-punto-encuentro {
    background-color: #ffffff;
    border-left: 5px solid #e65c00;
}

/* Otras Actividades */
.seccion-actividades {
    background-color: #a666b1;
    scroll-margin-top: 60px;
}

.lista-actividades {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.6;
}

.lista-actividades li {
    margin-bottom: 4px;
}

/* Nuestro Club */
.seccion-club {
    background-color: #06a4c6;
    scroll-margin-top: 60px;
}

@media (min-width: 992px) {
    .img-club {
        width: 42%;
        max-width: 480px;
        margin-bottom: 1.5rem !important;
        margin-right: 2rem !important;
        shape-outside: margin-box;
    }
}

@media (max-width: 991px) {
    .img-club {
        width: 100%;
        max-width: 350px;
        height: auto;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
}

.btn-descarga-ficha {
    background-color: #001e40;
    color: #ffffff !important;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 28px;
    border-radius: 8px;
    display: inline-block;
    width: 100%;
    max-width: 450px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

.btn-descarga-ficha:hover {
    background-color: #ff7f26;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

/* Otros Clubes */
.seccion-otros-clubes {
    background-color: #a666b1;
    scroll-margin-top: 60px;
}

.tarjeta-destacada {
    background-color: #ffffff;
    border-left: 5px solid #06a4c6;
}

/* Tarifas */
.seccion-tarifas {
    background-color: #06a4c6;
    scroll-margin-top: 60px;
    font-size: 0.9rem;
}

.tarjeta-tarifa {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.tarjeta-tarifa .card-header {
    border-bottom: none;
    background-color: #001e40 !important;
}

.tarjeta-tarifa .table td,
.tarjeta-tarifa .table th {
    padding: 0.65rem 0.85rem;
    vertical-align: middle;
    font-size: 0.85rem;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-whatsapp:hover {
    background-color: #1eb755;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-email {
    background-color: #001e40;
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-email:hover {
    background-color: #ff7f26;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tabla-tarifas {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.tabla-tarifas thead {
    background-color: #001e40;
    color: #ffffff;
    font-weight: bold;
}

.tabla-tarifas th,
.tabla-tarifas td {
    padding: 12px 16px;
}

/* Galería y Staff */
.gallery-item {
    transition: transform 0.2s ease-in-out;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item,
.gallery-item img,
#staff .card,
#staff .card-img-top {
    border-radius: 12px !important;
}

.contact-btn {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease-in-out;
}

.contact-btn:hover {
    background-color: #ffffff;
    color: #212529;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}


/* ==========================================================================
   6. RESPONSIVE / MEDIA QUERIES (ESPECÍFICO PARA SMARTPHONES)
   ========================================================================== */
@media (max-width: 767.98px) {

    /* Quitar cualquier relleno superior que genere franjas */
    body {
        padding-top: 0 !important;
    }

    /* Afinar la barra sin desbordar */
    .navbar {
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
        min-height: 56px;
    }

    .navbar-brand {
        max-width: 65%;
        margin-right: 0 !important;
    }

    .navbar-brand img,
    .navbar-brand svg {
        max-height: 35px !important;
        width: auto !important;
    }

    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
        margin-right: 0 !important;
    }

    .hero-wrapper {
        padding-top: 56px;
    }

    .texto-cursivo {
        font-size: 1.15rem;
    }

    /* Adaptación de marca y banderas */
    .brand-flags {
        gap: 12px;
    }

    .brand-flags .flag-img {
        width: 35px;
    }

    .brand-flags .main-hero-logo {
        max-width: 130px;
    }

    .hero-titulo {
        font-size: 1.6rem;
    }

    .hero-ubicacion {
        font-size: 0.88rem;
    }

    /* Zócalo y Contacto */
    .gap-contacto {
        gap: 6px;
    }

    .btn-contacto {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    .btn-contacto i {
        font-size: 0.85rem;
    }

    .flags-languages img {
        width: 17px;
    }
}