/* =========================================
   1. VARIABLES Y RESET
   ========================================= */
:root {
   /* Colores extraídos del logo */
    --kids-fucsia: #E94E81;   /* Kids / Niña / Bandera */
    --kids-azul: #00AEEF;     /* Niño con cuchara / Detalles */
    --kids-verde: #8DC63F;    /* Niño centro */
    --kids-morado: #412C72;   /* Copa / Texto 'circuito' */
    --kids-amarillo: #FFF200; /* Fondo copa */
    
    /* Colores de interfaz */
    --slate: #2d2442;         /* Un tono oscuro basado en el morado */
    --bg-soft: #fdfbff;       /* Fondo casi blanco */
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(160deg, #fffafa 0%, #f0faff 40%, #fafff0 100%);
    background-attachment: fixed;
    color: var(--slate);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* =========================================
   2. NAVEGACIÓN (NAV)
   ========================================= */
nav {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 20px 5%; 
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-logo { 
    font-family: 'Nunito', sans-serif; 
    font-size: 1.6rem; 
    font-weight: 900; 
    color: var(--turq); 
}

.nav-logo span { 
    color: var(--orange); 
}

.nav-links a { 
    margin-left: 20px; 
    font-weight: 600; 
    color: var(--slate); 
    text-decoration: none; 
}

/* =========================================
   3. HERO SECTION (INICIO)
   ========================================= */
.hero {
    text-align: center; 
    padding: 80px 5%; 
    max-width: 800px; 
    margin: 0 auto;
}

h1 { 
    font-family: 'Nunito', sans-serif; 
    font-size: 3.5rem; 
    margin-bottom: 20px; 
    line-height: 1.1; 
    color: var(--kids-morado);
}

.accent { color: var(--kids-fucsia); }
.accent2 { color: var(--kids-azul); }

.hero-sub { 
    font-size: 1.2rem; 
    color: #5A6E7A; 
    margin-bottom: 40px; 
}

/* =========================================
   4. COMPONENTES: BOTONES
   ========================================= */
.hero-ctas { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
}

.btn-primary {
    background: var(--kids-morado); 
    color: #fff; 
    padding: 18px 35px;
    border-radius: 50px; 
    font-weight: 800; 
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(65, 44, 114, 0.2); 
    transition: 0.3s;
}

.btn-primary:hover { 
    transform: translateY(-4px); 
    filter: brightness(1.2);
    box-shadow: 0 15px 25px rgba(65, 44, 114, 0.3);
}

.btn-secondary {
    background: transparent; 
    color: var(--kids-fucsia); 
    padding: 15px 35px;
    border: 3px solid var(--kids-fucsia); 
    border-radius: 50px;
    font-weight: 800; 
    text-decoration: none; 
    transition: 0.3s;
}

.btn-secondary:hover { 
    background: var(--kids-fucsia); 
    color: #fff; 
    transform: translateY(-4px);
}

/* =========================================
   5. SECCIÓN GALERÍA (GENERAL)
   ========================================= */
.gallery-page { 
    padding: 80px 5%; 
}

/* Centrado del encabezado */
.header-wrapper {
    width: 100%;
    display: flex;
    justify-content: center; 
    margin-bottom: 40px;
}

.section-header {
    text-align: center;
    padding: 20px;
    background: #fdf6f0; 
    border-radius: 30px; 
    border: 3px dashed var(--kids-azul); 
    width: 90%;
    max-width: 600px;
}

.section-title {
    color: var(--kids-fucsia); 
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-sub {
    color: #5d4037;
    font-size: 1.2rem;
    font-style: italic;
}

/* Cuadrícula de fotos */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.gallery-card {
    height: 300px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-card a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover {
    transform: scale(1.02);
}

.gallery-card:hover img {
    transform: scale(1.05);
}

/* =========================================
   6. FOOTER
   ========================================= */
.footer {
    background: #1E2D38;
    color: #E0E6E9;
    padding: 60px 5% 30px;
    margin-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer h3 { font-size: 1.8rem; color: #fff; margin-bottom: 15px; }
.footer h4 { color: #FF7A3D; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }

.footer-cta {
    text-align: center; 
    padding: 20px 0;
    width: 100%; /* Asegura que ocupe todo el ancho para poder centrar */
}

.btn-footer {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #E94E81;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-footer:hover { 
    background: #E94E81; 
    transform: scale(1.05); 
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #334450;
    font-size: 0.9rem;
    color: #8899A6;
}

/* =========================================
   7. CONTACTO - ESTILO PROFESIONAL CIRCUITOKIDS
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;900&family=Fredoka+One&display=swap');

.wrap {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(160deg, #fffafa 0%, #f0faff 40%, #fafff0 100%);
    background-attachment: fixed;
    padding: 2rem 1rem;
}

/* --- HERO SECTION --- */
.hero { text-align: center; margin-bottom: 2rem; }
.hero-title { font-family: 'Fredoka One', cursive; font-size: 2.5rem; color: #e05c8a; }
.hero-title span { color: #4a90d9; }
.hero-sub { font-size: 1rem; color: #888; font-weight: 600; margin-top: 5px; }

/* --- ESTRUCTURA DE LA TARJETA (BENTO GRID) --- */
.big-card {
    max-width: 1100px;
    margin: 0 auto;
    margin-top: -90px;
    background: #fff;
    border-radius: 32px;
    border: 2px solid rgba(0, 174, 239, 0.2);
    box-shadow: 0 15px 40px rgba(0,0,0,0.07);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
}

/* --- PANELES --- */
.panel-left, .panel-right { padding: 3rem; }
.panel-left { border-right: 2px dashed #f0e0ea; }
.panel-right { background: linear-gradient(160deg, #f0f6ff 0%, #eaf6f0 100%); }

.panel-title { font-family: 'Fredoka One', cursive; font-size: 1.25rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.pt-pink { color: #e05c8a; } .dot-pink { background: #e05c8a; }
.pt-blue { color: #4a90d9; } .dot-blue { background: #4a90d9; }

/* --- FORMULARIO --- */
.form-group { margin-bottom: 1.5rem; }
.form-group label { font-weight: 900; font-size: 0.8rem; color: #555; text-transform: uppercase; margin-bottom: 8px; display: block; }
.form-group input, .form-group textarea {
    width: 100%; padding: 18px; border: 2px solid #e8e8e8;
    border-radius: 16px; font-size: 1rem; background: #fafafa;
    transition: all 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus { border-color: #e05c8a; background: #fff; box-shadow: 0 0 10px rgba(224,92,138,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.btn-send {
    width: 100%; padding: 18px; background: linear-gradient(135deg, #e05c8a, #f07c55);
    border: none; border-radius: 50px; color: #fff; font-family: 'Fredoka One', cursive;
    font-size: 1.1rem; cursor: pointer; transition: 0.3s;
    background: linear-gradient(135deg, var(--kids-fucsia), var(--kids-morado));
}
.btn-send:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(224,92,138,0.3); }

/* --- INFO E ITEMS (COLORES Y ESTILOS) --- */
.info-item { display: flex; align-items: center; gap: 15px; margin-bottom: 1.2rem; padding: 12px; border-radius: 16px; border: 1.8px solid transparent; }
.item-tel { background: #eef9f0; border-color: var(--kids-verde); }
.item-email { background: #fffde6; border-color: var(--kids-amarillo); }
.item-ig { background: #fff0f5; border-color: var(--kids-fucsia); }
.item-dir { background: #e6f7ff; border-color: var(--kids-azul); }

.info-icon { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 50%; font-size: 20px; box-shadow: 0 5px 10px rgba(0,0,0,0.05); }
.info-text strong { display: block; font-weight: 800; font-size: 0.75rem; text-transform: uppercase; color: #555; }
.info-text span, .info-text a { font-weight: 700; color: #444; text-decoration: none; font-size: 0.9rem; }

/* --- MAPA --- */

.map-container-large {
    width: 100%; height: 300px; border-radius: 20px; overflow: hidden;
    margin-top: 1.5rem; border: 4px solid #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.map-container-large iframe { width: 100%; height: 100%; }

/* --- RESPONSIVIDAD --- */
@media (max-width: 850px) {
    .big-card { grid-template-columns: 1fr; }
    .panel-left { border-right: none; border-bottom: 2px dashed #f0e0ea; }
}

/* --- CORRECCIONES GLOBALES DE RESPONSIVIDAD --- */

@media (max-width: 768px) {
    /* HERO: Ajustamos el tamaño del texto para que no se corte */
    h1 {
        font-size: 2.2rem !important;
        padding: 0 10px;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .hero-ctas {
        flex-direction: column; /* Botones uno sobre otro */
        gap: 10px;
    }

    /* FOOTER: Una sola columna centrada */
    .footer-container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px;
    }

    .footer-brand, .footer-cta, .footer-contact {
        padding: 0 20px;
    }

    /* GALERÍA: Dos columnas en móviles */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 10px;
    }

    .gallery-card {
        height: 180px; /* Fotos más pequeñas para ver más en pantalla */
    }

    /* CONTACTO: Ajuste de la tarjeta bento */
    .big-card {
        margin-top: 20px !important;
        border-radius: 20px;
    }
    
    .panel-left, .panel-right {
        padding: 1.5rem !important;
    }
    
    .form-row {
        grid-template-columns: 1fr; /* Inputs de nombre y correo uno sobre otro */
    }
}

/* Corrección de desbordamiento global */
html, body {
    overflow-x: hidden; /* Esto corta cualquier cosa que quiera salirse a la derecha */
    width: 100%;
    position: relative;
}

/* Hacer que los títulos se ajusten al ancho del celular */
h1 {
    font-size: clamp(1.8rem, 8vw, 3.5rem) !important; /* El texto se achica solo en móviles */
    word-wrap: break-word; /* Si una palabra es muy larga, la corta para que no empuje la pantalla */
    max-width: 100%;
    padding: 0 15px; /* Margen de seguridad para que el texto no toque los bordes */
}

/* El contenedor principal de la página */
main {
    width: 100%;
    overflow-x: hidden;
}

/* Ajuste para el banner de "Diversión 100%..." */
.tag-cl, .hero-sub, .hero-sub span {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    display: inline-block;
}