html{
    scroll-behavior:smooth;
    scroll-padding-top:100px;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family: 'Poppins', sans-serif;
    overflow-x:hidden;
}

header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 60px;
    color:white;
    z-index:1000;

    background:linear-gradient(90deg,#19B8FF 0%,#0E9DEC 100%);
    box-shadow:0 2px 14px rgba(14,107,180,0.25);
}

.logo{
    display:flex;
    align-items:center;
    gap:12px;
}

.logo img{
    height:42px;
    width:auto;
}

.logo span{
    font-size:42px;
    font-weight:800;
    letter-spacing:3px;
    color:white;
    text-transform:uppercase;
}

nav a{
    color:white;
    text-decoration:none;
    font-weight:600;
    font-size:15px;
    letter-spacing:1px;
    transition:0.3s;
}

nav a:hover{
    color:#063a66;
}

.hero{
    height:100vh;
    background-image:url("https://images.unsplash.com/photo-1484154218962-a197022b5858?auto=format&fit=crop&w=1920&q=80");
    background-position:center;
    background-size:cover;
    background-repeat:no-repeat;
}

.overlay{
    max-width:850px;
    background:rgba(0,0,0,0.55);
    width:100%;
    height:100%;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding-left:100px;
    color:white;
}

.overlay h1{
    font-size:72px;
    line-height:1;
    font-weight:800;
}

.overlay h2{
    font-size:72px;
    line-height:1;
    font-weight:800;
    color:#19B8FF;
}

.overlay p{
    margin-top:25px;
    font-size:22px;
    max-width:600px;
    line-height:1.5;
}

button:not(.language-btn){
    margin-top:30px;
    width:250px;
    padding:15px;
    border:none;
    background:#19B8FF;
    color:white;
    font-size:18px;
    cursor:pointer;
}

.services{
    padding:80px;
    text-align:center;
}

.cards{
    display:flex;
    gap:20px;
    margin-top:40px;
}

.card{
    flex:1;
    padding:30px;
    border:1px solid #ddd;
}

.projects{
    padding:80px;
    background:#f4f4f4;
    text-align:center;
}

.gallery{
    margin-top:40px;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.project{
    height:220px;
    background:#ccc;
    display:flex;
    justify-content:center;
    align-items:center;
}

footer{
    background:#1e3557;
    color:white;
    text-align:center;
    padding:60px;
}

footer p{
    margin-top:10px;
}

footer a{
    color:#5cc8ff;
    text-decoration:none;
    font-weight:600;
}

footer a:hover{
    color:#ffffff;
}
.gallery img{
    width:100%;
    height:300px;
    object-fit:cover;
    border-radius:10px;
    cursor:pointer;
    transition:0.3s;
}

.gallery img:hover{
    transform:scale(1.03);
}
.whatsapp{
    position:fixed;
    right:20px;
    bottom:20px;
    width:65px;
    height:65px;
    border-radius:50%;
    background:#25D366;

    display:flex;
    align-items:center;
    justify-content:center;

    text-decoration:none;
    font-size:32px;
    color:white;

    box-shadow:0 0 20px rgba(0,0,0,0.3);

    transition:0.3s;
}

.whatsapp:hover{
    transform:scale(1.1);
}

.projects-button{
    display:inline-block;
    margin-top:40px;
    padding:15px 30px;
    background:#19B8FF;
    color:white;
    text-decoration:none;
    border-radius:5px;
}
.contact-form{
    padding:80px;
    text-align:center;
}

.contact-form form{
    max-width:700px;
    margin:auto;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.contact-form input,
.contact-form textarea{
    padding:18px;
    border:1px solid #dce3ea;
    border-radius:10px;
    font-size:16px;
    font-family:inherit;
}

.contact-form input:focus,
.contact-form textarea:focus{
    outline:none;
    border-color:#19B8FF;
}

.contact-form textarea{
    height:150px;
}
@media (max-width: 768px){
    .cta-grid{
    grid-template-columns:1fr;
}

    header{
        flex-direction:column;
        padding:20px;
        gap:15px;
    }

    .advantages-grid{
        grid-template-columns:1fr;
    }

    .stats-grid{
        grid-template-columns:1fr;
    }

    .hero-buttons{
        flex-direction:column;
        width:100%;
        align-items:center;
    }

    nav{
        display:flex;
        flex-wrap:wrap;
        justify-content:center;
    }

    nav a{
        margin:10px;
    }

    .overlay{
        padding:30px;
        text-align:center;
        align-items:center;
    }

    .overlay h1{
        font-size:40px;
    }

    .overlay h2{
        font-size:35px;
    }

    .overlay p{
        font-size:18px;
    }

    .cards{
        flex-direction:column;
    }

    .gallery{
        grid-template-columns:1fr;
    }

    .services,
    .projects,
    .contact-form{
        padding:40px 20px;
    }

    .language-switcher{
        position:static;
        margin-bottom:30px;
    }

    .language-dropdown{
        top:15px;
        right:15px;
    }

    .ba-container{
        grid-template-columns:1fr;
    }

    .ba-slider img{
        height:220px;
    }

}

.advantages{
    padding:80px;
    background:#ffffff;
    text-align:center;
}

.advantages-grid{
    margin-top:40px;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.advantage{
    padding:30px;
    border:1px solid #e5e5e5;
    border-radius:10px;
    transition:0.3s;
}

.advantage:hover{
    transform:translateY(-5px);
}

.advantage h3{
    color:#19B8FF;
    margin-bottom:15px;
}
.hero-buttons{
    display:flex;
    gap:20px;
    margin-top:30px;
}

.secondary-button{
    width:250px;
    padding:15px;
    text-align:center;
    text-decoration:none;

    border:2px solid #19B8FF;
    color:white;

    transition:0.3s;
}

.secondary-button:hover{
    background:#19B8FF;
}
.stats{
    padding:80px;
    background:#1e3557;
    color:white;
    text-align:center;
}

.stats h2{
    color:#ffffff;
    margin-bottom:50px;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:30px;
}

.stat h3{
    font-size:50px;
    color:#19B8FF;
    margin-bottom:10px;
}

.stat p{
    font-size:18px;
}
.project-card{
    background:white;
    border-radius:10px;
    overflow:hidden;
    box-shadow:0 5px 20px rgba(0,0,0,0.1);
}

.project-card h3{
    margin:15px 0 5px;
}

.project-card p{
    margin-bottom:15px;
    color:#666;
}

.project-card a{
    display:inline-block;
    margin-bottom:20px;
    text-decoration:none;
    color:#19B8FF;
    font-weight:bold;
}
.hero-button{
    display:inline-block;
    width:250px;
    padding:15px;
    text-align:center;
    text-decoration:none;

    background:#19B8FF;
    color:white;
}

.language-menu a{
    display:flex;
    align-items:center;
    gap:12px;

    padding:14px 16px;

    color:white;
    text-decoration:none;
}

.language-menu a:hover{
    background:#1f5dbf;
}

.language-dropdown:hover .language-menu{
    display:block;
}
nav{
    display:flex;
    align-items:center;
    gap:25px;
}

nav a{
    color:white;
    text-decoration:none;
    font-weight:600;
    margin-left:0;
}

nav{
    display:flex;
    align-items:center;
    gap:25px;
}

.language-btn{
    background:none;
    border:none;
    color:white;

    padding:0;
    margin:0;

    width:auto;
    height:auto;

    font-size:16px;
    font-weight:600;

    display:flex;
    align-items:center;
    gap:6px;

    cursor:pointer;

    box-shadow:none;
    border-radius:0;
}

.language-menu{
    display:none;

    position:absolute;
    top:30px;
    right:0;

    background:#111;
    border-radius:10px;

    min-width:120px;

    overflow:hidden;
}

.language-menu a{
    display:block;
    padding:12px 15px;

    color:white;
    text-decoration:none;
}

.language-menu a:hover{
    background:#222;
}

.language-dropdown:hover .language-menu{
    display:block;
}
.before-after{
    padding:80px;
    background:#ffffff;
    text-align:center;
}

.before-after h2{
    margin-bottom:40px;
}

.before-after-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:30px;
}

.before-after-card{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.before-after-card img{
    width:100%;
    height:300px;
    object-fit:cover;
    border-radius:10px;
}
.before-after{
    padding:80px;
    background:#f8f8f8;
    text-align:center;
}

.before-after h2{
    margin-bottom:40px;
}

.ba-container{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
}

.ba-slider{
    background:white;
    padding:20px;
    border-radius:15px;
    box-shadow:0 5px 20px rgba(0,0,0,0.08);
}

.ba-slider img{
    width:100%;
    height:280px;
    object-fit:cover;
    border-radius:10px;
    margin-bottom:10px;

    transition:0.4s;
}

.ba-buttons{
    display:flex;
    justify-content:center;
    gap:15px;
}

.ba-buttons button{
    background:none;
    border:none;

    color:white;

    font-size:50px;
    font-weight:300;

    cursor:pointer;

    transition:0.3s;
}
.card,
.project-card,
.advantage{
    transition:0.3s;
}

.card:hover,
.project-card:hover,
.advantage:hover{
    transform:translateY(-8px);
    box-shadow:0 10px 30px rgba(0,0,0,0.12);
}
.cta-section{
    padding:80px;
    text-align:center;
    background:#f8f8f8;
}

.cta-section h2{
    font-size:42px;
    margin-bottom:15px;
}

.cta-section p{
    font-size:18px;
    color:#666;
    margin-bottom:40px;
}

.cta-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.cta-grid div{
    background:white;
    padding:25px;
    border-radius:12px;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
    font-weight:600;
}
section h2{
    color:#1e3557;
    font-size:42px;
    font-weight:700;
}
.project-card{
    background:white;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 8px 25px rgba(0,0,0,0.08);
    transition:0.3s;
}

.project-card:hover{
    transform:translateY(-8px);
}

.project-card img{
    height:260px;
    width:100%;
    object-fit:cover;
}

.project-card h3{
    color:#1e3557;
    font-size:20px;
    margin-top:20px;
}
.logo{
    display:flex;
    align-items:center;
    gap:12px;
}

.logo img{
    width:auto;
    height:40px;
    object-fit:contain;
    background:#ffffff;
    padding:5px 9px;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(0,0,0,0.15);
}

.logo span{
    color:white;
    font-size:32px;
    font-weight:700;
    letter-spacing:3px;
}
.secondary-button{
    border:2px solid #19B8FF;
    color:white;
}
.secondary-button:hover{
    background:#19B8FF;
}
.ba-slider{
    position:relative;
}
.prev{
    position:absolute;
    left:15px;
    top:50%;
    transform:translateY(-50%);
}
.next{
    position:absolute;
    right:15px;
    top:50%;
    transform:translateY(-50%);
}

/* === Antes y Después: slider de comparación === */
.before-after h2{
    margin-bottom:10px;
}

#ba-text{
    color:#666;
    margin-bottom:40px;
}

.ba-compare{
    position:relative;
    max-width:900px;
    margin:0 auto;
    aspect-ratio:16/10;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 12px 35px rgba(0,0,0,0.18);
    user-select:none;
}

.ba-img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.ba-before-img{
    clip-path:inset(0 50% 0 0);
}

.ba-divider{
    position:absolute;
    top:0;
    bottom:0;
    left:50%;
    width:3px;
    background:#ffffff;
    transform:translateX(-50%);
    box-shadow:0 0 8px rgba(0,0,0,0.45);
    pointer-events:none;
    z-index:3;
}

.ba-divider::after{
    content:"‹ ›";
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:46px;
    height:46px;
    border-radius:50%;
    background:#19B8FF;
    color:#ffffff;
    font-size:18px;
    font-weight:700;
    letter-spacing:2px;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 2px 10px rgba(0,0,0,0.3);
}

.ba-range{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    margin:0;
    opacity:0;
    cursor:ew-resize;
    z-index:5;
}

.ba-tag{
    position:absolute;
    bottom:16px;
    padding:6px 16px;
    background:rgba(0,0,0,0.55);
    color:#ffffff;
    font-size:14px;
    font-weight:600;
    border-radius:20px;
    letter-spacing:0.5px;
    pointer-events:none;
    z-index:3;
}

.ba-tag-left{ left:16px; }
.ba-tag-right{ right:16px; }

@media (max-width:768px){
    .before-after{
        padding:40px 20px;
    }
    .ba-compare{
        aspect-ratio:4/3;
    }
}

/* Iconos de bandera del selector de idioma */
.flag-ico{
    width:22px;
    height:auto;
    border-radius:3px;
    vertical-align:middle;
    display:inline-block;
    box-shadow:0 0 0 1px rgba(0,0,0,0.08);
}

/* ===== Botón de menú móvil (oculto en escritorio) ===== */
button.menu-toggle{
    display:none;
    margin:0;
    padding:0 4px;
    width:auto;
    height:auto;
    background:none;
    border:none;
    color:#ffffff;
    font-size:28px;
    line-height:1;
    cursor:pointer;
    box-shadow:none;
    border-radius:0;
}

/* ===== Ajustes para móvil ===== */
@media (max-width:768px){

    /* --- Cabecera + menú hamburguesa --- */
    header{
        flex-direction:row;
        justify-content:space-between;
        align-items:center;
        padding:14px 18px;
        gap:0;
    }

    .logo span{
        font-size:24px;
        letter-spacing:2px;
    }

    .logo img{
        height:34px;
    }

    button.menu-toggle{
        display:block;
    }

    nav#main-nav{
        display:none;
        position:absolute;
        top:100%;
        left:0;
        right:0;
        flex-direction:column;
        align-items:stretch;
        gap:0;
        padding:8px 18px 18px;
        background:linear-gradient(90deg,#19B8FF,#0E9DEC);
        box-shadow:0 10px 22px rgba(0,0,0,0.18);
    }

    nav#main-nav.open{
        display:flex;
    }

    nav#main-nav > a{
        margin:0;
        padding:13px 4px;
        width:100%;
        font-size:16px;
        border-bottom:1px solid rgba(255,255,255,0.18);
    }

    .language-dropdown{
        width:100%;
        margin-top:6px;
    }

    .language-btn{
        display:none;
    }

    .language-menu{
        display:block;
        position:static;
        background:transparent;
        min-width:0;
        border-radius:0;
    }

    .language-menu a{
        padding:12px 4px;
    }

    .language-menu a:hover{
        background:rgba(255,255,255,0.12);
    }

    /* --- Espaciado de secciones --- */
    .advantages,
    .stats,
    .services,
    .projects,
    .before-after,
    .cta-section,
    .contact-form,
    .about{
        padding:48px 20px;
    }

    footer{
        padding:40px 20px;
    }

    /* --- Hero --- */
    .overlay{
        padding:26px 22px;
        text-align:center;
        align-items:center;
    }
    .overlay h1{ font-size:34px; }
    .overlay h2{ font-size:32px; }
    .overlay p{  font-size:17px; }

    .hero-button,
    .secondary-button{
        width:100%;
        max-width:300px;
    }

    /* --- Tipografía de títulos --- */
    section h2{ font-size:30px; }
    .cta-section h2{ font-size:30px; }
    .stat h3{ font-size:42px; }

    /* Apilar todas las rejillas en una sola columna en móvil */
    .advantages-grid,
    .stats-grid,
    .cta-grid,
    .gallery,
    .about-grid{
        grid-template-columns:1fr;
    }
    .cards{
        flex-direction:column;
    }
    .about-text{
        text-align:center;
    }
    .map-frame{
        height:260px;
    }
}

/* ===== Sección "Sobre nosotros" + mapa ===== */
.about{
    padding:80px;
    background:#ffffff;
    text-align:center;
}

.about-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:45px;
    margin-top:40px;
    align-items:stretch;
}

.about-text{
    text-align:left;
}

.about-text p{
    margin-bottom:18px;
    color:#444;
    line-height:1.7;
    font-size:17px;
}

.map-frame{
    width:100%;
    height:340px;
    border:0;
    border-radius:15px;
    box-shadow:0 8px 25px rgba(0,0,0,0.1);
    display:block;
}

.about-area{
    margin-top:14px;
    color:#666;
    font-weight:600;
}

/* ===== Adornos: subrayado de títulos ===== */
section h2::after{
    content:"";
    display:block;
    width:64px;
    height:4px;
    margin:14px auto 0;
    background:#19B8FF;
    border-radius:2px;
}

/* ===== Iconos en tarjetas ===== */
.advantage-icon,
.card-icon{
    width:62px;
    height:62px;
    margin:0 auto 18px;
    border-radius:50%;
    background:rgba(25,184,255,0.10);
    color:#19B8FF;
    display:flex;
    align-items:center;
    justify-content:center;
}

.advantage-icon svg,
.card-icon svg{
    width:30px;
    height:30px;
}

/* ===== "Sobre nosotros": marco + highlights ===== */
.about-text{
    text-align:left;
    background:#f6fbfe;
    border-left:4px solid #19B8FF;
    border-radius:0 14px 14px 0;
    padding:34px 36px;
    box-shadow:0 6px 22px rgba(0,0,0,0.05);
}

.about-highlights{
    list-style:none;
    margin:26px 0 0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:13px;
}

.about-highlights li{
    display:flex;
    align-items:center;
    gap:12px;
    font-weight:600;
    color:#1e3557;
}

.about-highlights svg{
    width:22px;
    height:22px;
    color:#19B8FF;
    flex-shrink:0;
}

/* ===== Animación de aparición al hacer scroll ===== */
.reveal{
    opacity:0;
    transform:translateY(26px);
    transition:opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible{
    opacity:1;
    transform:none;
}

/* ===== Corrección final móvil (debe quedar al final del archivo) ===== */
@media (max-width:768px){
    .about-grid{
        grid-template-columns:1fr;
    }
    .about-text{
        text-align:center;
        padding:28px 22px;
    }
    .map-frame{
        height:240px;
    }
}

/* ===== Móvil: botón WhatsApp más pequeño + menú más bonito ===== */
@media (max-width:768px){

    /* WhatsApp flotante más pequeño y sin tapar el pie */
    .whatsapp{
        width:52px;
        height:52px;
        font-size:25px;
        right:14px;
        bottom:14px;
    }

    /* Panel del menú */
    nav#main-nav{
        border-radius:0 0 16px 16px;
        padding:12px 16px 18px;
    }

    nav#main-nav > a{
        text-align:center;
        font-size:16px;
        padding:14px 4px;
        border-bottom:1px solid rgba(255,255,255,0.18);
    }
    nav#main-nav > a:last-of-type{
        border-bottom:none;
    }

    /* Separar el bloque de idiomas de los enlaces */
    .language-dropdown{
        width:100%;
        margin-top:12px;
        padding-top:16px;
        border-top:1px solid rgba(255,255,255,0.35);
    }

    /* Idiomas como fila de "pastillas" centradas */
    .language-menu{
        display:flex;
        flex-direction:row;
        justify-content:center;
        gap:10px;
        background:transparent;
        position:static;
    }
    .language-menu a{
        display:flex;
        align-items:center;
        gap:8px;
        padding:8px 15px;
        background:rgba(255,255,255,0.16);
        border-radius:22px;
        font-weight:600;
    }
    .language-menu a:hover{
        background:rgba(255,255,255,0.30);
    }
}

/* ===== Mapa Leaflet (zona de trabajo) ===== */
.map-frame{
    overflow:hidden;
    background:#e8f2f8;
}
.leaflet-tooltip.zone-label{
    background:#0E9DEC;
    color:#ffffff;
    border:none;
    font-weight:600;
    font-size:12px;
    padding:3px 8px;
    border-radius:6px;
    box-shadow:0 1px 5px rgba(0,0,0,0.3);
}
.leaflet-tooltip.zone-label::before{ display:none; }

/* ===== Casilla de consentimiento en el formulario ===== */
.consent{
    display:flex;
    align-items:flex-start;
    gap:10px;
    text-align:left;
    font-size:14px;
    color:#555;
    max-width:700px;
    margin:0 auto;
}
.consent input{
    width:18px;
    height:18px;
    margin-top:2px;
    flex-shrink:0;
    accent-color:#19B8FF;
}
.consent a{ color:#19B8FF; }

/* ===== Enlace legal + crédito web en el pie ===== */
.footer-legal{
    margin-top:26px;
    font-size:14px;
}
.footer-legal a{
    color:#9fc7e6;
    text-decoration:none;
}
.footer-legal a:hover{ color:#ffffff; }

.web-credit{
    margin-top:22px;
    padding-top:18px;
    border-top:1px solid rgba(255,255,255,0.15);
    font-size:13px;
}
.web-credit a{
    color:#9fb3c8;
    display:inline-flex;
    align-items:center;
    gap:7px;
    text-decoration:none;
    transition:0.2s;
}
.web-credit a:hover{ color:#25D366; }
.web-credit svg{ width:16px; height:16px; }

/* ===== Móvil: mapa antes del texto + texto más pequeño ===== */
@media (max-width:768px){
    .about-map{
        order:-1;
        margin-bottom:22px;
    }
    .about-text p{
        font-size:15.5px;
        line-height:1.7;
    }
    .about-highlights li{
        font-size:15px;
    }
}

/* ===== Móvil: panel de idiomas ESTABLE (no cambia al tocar) ===== */
@media (max-width:768px){
    .language-dropdown{
        width:100%;
        margin-top:14px;
        padding:14px;
        border-top:none;
        background:rgba(255,255,255,0.10);
        border-radius:16px;
    }
    /* La clave: el estado :hover (que iOS activa al tocar) mantiene la MISMA fila */
    .language-menu,
    .language-dropdown:hover .language-menu{
        display:flex;
        flex-direction:row;
        flex-wrap:wrap;
        justify-content:center;
        gap:10px;
        position:static;
        background:transparent;
        box-shadow:none;
        min-width:0;
        border-radius:0;
        overflow:visible;
    }
    .language-menu a{
        display:flex;
        align-items:center;
        gap:8px;
        padding:9px 16px;
        background:rgba(255,255,255,0.20);
        border-radius:22px;
        font-weight:600;
        color:#ffffff;
    }
    .language-menu a:hover{
        background:rgba(255,255,255,0.32);
    }
}

/* ===== Crédito web (más grande, tipo botón) ===== */
.web-credit{
    margin-top:28px;
    padding-top:24px;
    border-top:1px solid rgba(255,255,255,0.15);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:13px;
}
.web-credit .web-credit-lead{
    font-size:15px;
    color:#cdd9e5;
}
.web-credit .web-credit-btn{
    display:inline-flex;
    align-items:center;
    gap:9px;
    padding:13px 26px;
    background:#25D366;
    color:#ffffff;
    border-radius:30px;
    text-decoration:none;
    font-weight:700;
    font-size:16px;
    box-shadow:0 6px 18px rgba(37,211,102,0.35);
    transition:0.2s;
}
.web-credit .web-credit-btn:hover{
    background:#1ebe5b;
    transform:translateY(-2px);
}
.web-credit .web-credit-btn svg{
    width:20px;
    height:20px;
}
