/* =========================================
   1. CONFIGURACIÓN GENERAL Y FUENTES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary-black: #111111;
    --primary-white: #ffffff;
    --bjj-blue: #0055D4;
    --bjj-blue-dark: #003f9e;
    --whatsapp-green: #25D366;
    --bg-grey: #f4f4f4;
    --kids-color: #00796b;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { scroll-behavior: smooth; }

body { 
    font-family: 'Roboto', sans-serif;
    color: #333; 
    background-color: var(--primary-white); 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

h1, h2, h3, h4, .logo-text, .btn-principal, .btn-secundario, .btn-precio, button {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================
   2. HEADER Y MENÚ
   ========================================= */
header {
    background: var(--primary-white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px 5%;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--bjj-blue);
    min-height: 80px; 
}

.logo-container { display: flex; align-items: center; gap: 15px; }
.logo-img { height: 65px; width: auto; }
.logo-text { font-weight: 900; font-size: 1.5rem; color: var(--primary-black); } 

.menu-icon {
    display: block !important;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-black);
}

nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
}

nav ul {
    display: none;
    flex-direction: column;
    background-color: var(--primary-white);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: center;
    border-top: 1px solid #eee;
}

nav ul.activo { display: flex; }
nav ul li { width: 100%; border-bottom: 1px solid #f0f0f0; }
nav ul li a {
    text-decoration: none;
    color: var(--primary-black);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    display: block;
    padding: 15px;
    transition: 0.3s;
    font-family: 'Oswald', sans-serif;
}
nav ul li a:hover { background-color: #f9f9f9; color: var(--bjj-blue); }

/* =========================================
   3. PORTADA (HERO SECTION) CON FONDO
   ========================================= */
.hero-section {
    background: url('fondo.jpg'); 
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 40px;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px black;
    line-height: 1.1;
}

.hero-subtext {
    font-size: 1.4rem;
    margin-bottom: 30px;
    font-weight: 400;
    color: #f0f0f0;
    font-family: 'Roboto', sans-serif;
}

/* =========================================
   4. BOTONES
   ========================================= */
.btn-principal, .btn-precio, .btn-whatsapp-grande, button {
    display: inline-block;
    background: var(--bjj-blue);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    text-align: center;
}

.btn-principal:hover, .btn-precio:hover, button:hover {
    background: var(--bjj-blue-dark);
    transform: translateY(-2px);
}

.btn-secundario {
    display: inline-block;
    background: #333;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}
.btn-secundario:hover { background: #111; }

.btn-whatsapp-grande {
    background-color: var(--whatsapp-green);
    width: 100%;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-whatsapp-grande:hover { background-color: #128C7E; }

/* =========================================
   5. SECCIONES GENERALES
   ========================================= */
.seccion-pagina, .seccion-gris {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 12px;
    margin: 40px auto;
    max-width: 1100px;
    padding: 40px;
    width: 90%;
}

h2 { 
    text-align: center; 
    margin-bottom: 30px; 
    color: var(--primary-black); 
    font-size: 2.5rem; 
}
.subtitulo { text-align: center; color: #666; margin-bottom: 40px; }

.lista-normas-grande, .lista-ventajas, .lista-equipamiento { list-style: none; padding: 0; }
.lista-ventajas li, .lista-normas-grande li { margin-bottom: 10px; color: #555; }
.lista-ventajas i, .lista-equipamiento i { color: var(--bjj-blue); margin-right: 10px; }

/* =========================================
   6. GRID DE BENEFICIOS (INICIO)
   ========================================= */
.grid-beneficios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 40px auto 0 auto;
}
.item-beneficio { text-align: center; padding: 20px; }
.item-beneficio i { font-size: 2.5rem; color: #333; margin-bottom: 15px; }
.item-beneficio h4 { margin-bottom: 10px; color: var(--bjj-blue); font-size: 1.3rem; }

/* =========================================
   7. HORARIOS Y TABLAS
   ========================================= */
.vista-movil { display: none; }
.tabla-container { display: block; overflow-x: auto; max-width: 1100px; margin: 0 auto; background: white; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid #ddd; }
table { width: 100%; border-collapse: collapse; min-width: 700px; border-style: hidden; }
th, td { border: 1px solid #eee; padding: 15px; text-align: center; }
th { background: var(--primary-black); color: white; text-transform: uppercase; font-family: 'Oswald', sans-serif; font-size: 1.1rem; letter-spacing: 1px; }

.hora { background-color: #2c3e50 !important; color: white !important; font-weight: bold; }
.gi { background-color: #ffffff !important; color: #222222 !important; border-left: 5px solid #cccccc !important; font-weight: bold; }
.nogi { background-color: #1a1a1a !important; color: #ffffff !important; border-left: 5px solid #000000 !important; font-weight: bold; }
.kids34-gi { background-color: #f0f3f5 !important; color: #333333 !important; border-left: 5px solid #aebac5 !important; font-weight: bold; }
.kids34-nogi { background-color: #444c55 !important; color: #ffffff !important; border-left: 5px solid #2b3036 !important; font-weight: bold; }
.kids12-gi { background-color: #e6f0fa !important; color: #1c3d5a !important; border-left: 5px solid #82a8c9 !important; font-weight: bold; }
.kids12-nogi { background-color: #2b4c6b !important; color: #ffffff !important; border-left: 5px solid #16283b !important; font-weight: bold; }
.competicion { background-color: #7a1f1f !important; color: #ffffff !important; border-left: 5px solid #4a1010 !important; font-weight: bold; }
.open-mat { background-color: #c19b44 !important; color: #ffffff !important; border-left: 5px solid #8f722e !important; font-weight: bold; }

/* =========================================
   8. TARIFAS
   ========================================= */
.grid-precios { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 40px; }
.tarjeta-precio { background: white; border: 1px solid #ddd; border-radius: 10px; padding: 30px; width: 280px; text-align: center; box-shadow: 0 4px 6px rgba(0,0,0,0.05); position: relative; transition: transform 0.3s; display: flex; flex-direction: column; }
.tarjeta-precio:hover { transform: translateY(-5px); }
.tarjeta-precio.destacado { border: 2px solid var(--bjj-blue); background-color: #fcfcfc; transform: scale(1.05); z-index: 1; }
.etiqueta-top { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background-color: #d32f2f; color: white; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; white-space: nowrap; font-family: 'Oswald', sans-serif; }
.precio { font-size: 2.5rem; font-weight: bold; color: #333; margin: 15px 0; font-family: 'Oswald', sans-serif; }
.precio span { font-size: 1rem; color: #777; font-weight: normal; font-family: 'Roboto', sans-serif; }
.lista-ventajas-precio { list-style: none; padding: 0; text-align: left; margin-top: 20px; margin-bottom: 20px; flex-grow: 1; }
.lista-ventajas-precio li { margin-bottom: 10px; font-size: 0.95rem; }
.lista-ventajas-precio i { color: var(--bjj-blue); margin-right: 8px; }

/* =========================================
   9. INSTALACIONES Y CONTACTO
   ========================================= */
.instalacion-item { display: flex; align-items: center; gap: 40px; margin-bottom: 60px; flex-wrap: wrap; }
.instalacion-item.al-reves { flex-direction: row-reverse; }
.foto-instalacion, .texto-instalacion, .info-contacto, .mapa-container { flex: 1; min-width: 300px; }
.foto-instalacion img { width: 100%; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.columna-info { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); text-align: center; margin-bottom: 20px;}
.contenedor-columnas { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.contenedor-contacto { display: flex; flex-wrap: wrap; gap: 40px; max-width: 1200px; margin: 0 auto; }
.mapa-container { height: 450px; border-radius: 10px; overflow: hidden; background-color: #eee; }
.lista-datos { list-style: none; padding: 0; margin-bottom: 30px; }
.lista-datos li { display: flex; align-items: flex-start; margin-bottom: 20px; font-size: 1.1rem; }
.lista-datos i { color: var(--bjj-blue); font-size: 1.5rem; margin-right: 15px; width: 25px; text-align: center; }
.caja-llamada { background-color: #f9f9f9; padding: 25px; border-radius: 10px; border-left: 5px solid #25D366; margin-bottom: 30px; }

/* =========================================
   10. ESTILOS DE EQUIPAMIENTO
   ========================================= */
.contenedor-doble { display: flex; justify-content: center; gap: 40px; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; }
.caja-equipo { flex: 1; min-width: 320px; background: #ffffff; padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); border: 1px solid #eee; }
.estilo-nogi { border-top: 6px solid #111; }
.estilo-gi { border-top: 6px solid #0055D4; }
.titulo-equipo { text-align: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.titulo-equipo i { font-size: 2.5rem; margin-bottom: 10px; display: block; }
.estilo-nogi i { color: #111; }
.estilo-gi i { color: #0055D4; }
.lista-limpia { list-style: none; padding: 0; }
.lista-limpia li { margin-bottom: 12px; font-size: 1rem; color: #444; }
.lista-limpia i { color: green; margin-right: 8px; }
.nota-gris { background: #f9f9f9; padding: 10px; border-radius: 5px; border-left: 4px solid #333; font-size: 0.95rem; }
.nota-azul { background: #e3f2fd; padding: 10px; border-radius: 5px; border-left: 4px solid #0055D4; font-size: 0.95rem; }

/* =========================================
   11. PREGUNTAS FRECUENTES (FAQ)
   ========================================= */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: white; border-radius: 8px; margin-bottom: 15px; border: 1px solid #ddd; overflow: hidden; }
.faq-pregunta { width: 100%; padding: 20px; background: #fff; border: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 1.1rem; font-weight: bold; color: #333; text-align: left; transition: background 0.3s; font-family: 'Oswald', sans-serif; }
.faq-pregunta:hover { background-color: #f4f4f4; color: var(--bjj-blue); }
.faq-respuesta { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; background: #fff; padding: 0 20px; }
.faq-respuesta p, .faq-respuesta ul { margin: 20px 0; color: #555; }
.faq-respuesta ul li { border-bottom: 1px solid #eee; margin-bottom: 10px; padding-bottom: 10px; }
.faq-respuesta ul li:last-child { border-bottom: none; }

/* =========================================
   12. FOOTER
   ========================================= */
footer { background: black; padding: 20px; text-align: center; color: #666; font-size: 0.8rem; margin-top: auto; }

/* =========================================
   13. WHATSAPP FLOTANTE Y MENSAJE EMERGENTE (BLINDADO)
   ========================================= */
.whatsapp-container {
    position: fixed !important; 
    bottom: 30px !important;
    right: 30px !important;
    left: auto !important; /* Bloquea que el móvil lo centre */
    z-index: 999999 !important; 
    display: flex;
    flex-direction: column;
    align-items: flex-end !important; /* Fuerza todo a pegarse a la derecha */
    gap: 12px; 
}

.wa-mensaje {
    background-color: white;
    color: #333;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 0.95rem;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    border: 1px solid #eee;
    position: relative;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s ease;
    white-space: nowrap; /* Evita que el texto se rompa raro en el móvil */
}

/* La flechita del globo, apuntando al botón en la derecha */
.wa-mensaje::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px; 
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.wa-mensaje.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.btn-float { 
    background: #25D366; 
    color: white; 
    border: none; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    font-size: 30px; 
    cursor: pointer; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: transform 0.3s;
}
.btn-float:hover { transform: scale(1.1); }

/* =========================================
   14. RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    header { padding: 5px 15px !important; min-height: 60px !important; }
    .logo-img { height: 45px !important; width: auto; }
    .logo-text { font-size: 1.1rem !important; margin-top: 0; }
    .logo-container { flex-direction: row; text-align: left; margin-bottom: 0; }
    .menu-icon { font-size: 1.6rem !important; }
    .hero-section h1 { font-size: 2.2rem !important; }
    .seccion-pagina { padding: 20px 5% !important; margin: 20px auto !important; width: 95% !important; }
    
    .contenedor-doble { flex-direction: column; }
    .instalacion-item, .instalacion-item.al-reves { flex-direction: column; }

    .tabla-container { display: none !important; }
    .vista-movil { display: block !important; }
    .dia-bloque { margin-bottom: 25px; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: white; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
    .dia-titulo { background-color: #111; color: white; padding: 12px; text-align: center; font-weight: 900; text-transform: uppercase; font-family: 'Oswald', sans-serif; }
    .clase-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid #eee; }
    .clase-item:last-child { border-bottom: none; }
    
    /* Amarre definitivo a la esquina inferior derecha para móviles */
    .whatsapp-container { 
        bottom: 20px !important; 
        right: 20px !important; 
    }
    .btn-float { width: 55px; height: 55px; font-size: 28px; }
    .wa-mensaje { font-size: 0.85rem; padding: 10px 14px; }
}/* =========================================
   14. RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    header { padding: 5px 15px !important; min-height: 60px !important; }
    .logo-img { height: 45px !important; width: auto; }
    .logo-text { font-size: 1.1rem !important; margin-top: 0; }
    .logo-container { flex-direction: row; text-align: left; margin-bottom: 0; }
    .menu-icon { font-size: 1.6rem !important; }
    .hero-section h1 { font-size: 2.2rem !important; }
    .seccion-pagina { padding: 20px 5% !important; margin: 20px auto !important; width: 95% !important; }
    
    .contenedor-doble { flex-direction: column; }
    .instalacion-item, .instalacion-item.al-reves { flex-direction: column; }

    .tabla-container { display: none !important; }
    .vista-movil { display: block !important; }
    .dia-bloque { margin-bottom: 25px; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: white; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
    .dia-titulo { background-color: #111; color: white; padding: 12px; text-align: center; font-weight: 900; text-transform: uppercase; font-family: 'Oswald', sans-serif; }
    .clase-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid #eee; }
    .clase-item:last-child { border-bottom: none; }
    
    /* En móviles, hacemos el WhatsApp un pelín más pequeño para que no estorbe */
    .whatsapp-container { bottom: 20px !important; right: 20px !important; }
    .btn-float { width: 50px; height: 50px; font-size: 25px; }
    .wa-mensaje { font-size: 0.85rem; padding: 10px 14px; }
}