/* ==========================================================================
   MOBILE FIRST & RESPONSIVE OVERRIDES (Radical UX Change)
   ========================================================================== */

/* Botón Flotante (FAB) */
.float-cta {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none; /* Asegurar que no tenga subrayado */
}

.float-cta:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: #FFF;
}

/* Estilos cuando fullpage.js está desactivado (Móvil/Tablet) */
body.fp-responsive {
    overflow-y: auto !important; /* Permitir scroll nativo */
    height: auto !important;
}

body.fp-responsive header {
    position: fixed;
    top: 0;
    background: #000;
    padding: 10px 0;
    height: 70px; /* Altura fija para evitar saltos */
}

body.fp-responsive .section,
body.fp-responsive .section-container,
body.fp-responsive .slide {
    height: auto !important;
    min-height: auto !important;
    padding: 60px 0 !important; /* Espacio para respirar */
    display: block !important;
}

/* Ajustes específicos por sección en móvil */
body.fp-responsive #inicio {
    padding-top: 80px !important; /* Compensar header fijo */
}

body.fp-responsive #home-top,
body.fp-responsive #home-bot {
    height: auto;
    padding: 40px 0;
}

body.fp-responsive #home-logo img {
    width: 80%;
    max-width: 300px;
}

/* Tipografía Móvil Mejorada */
body.fp-responsive h1 {
    font-size: 2.5em;
    line-height: 1.2;
}

body.fp-responsive p {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Cards en columna para móvil */
body.fp-responsive .cards-container {
    flex-direction: column;
    padding: 0 15px;
}

body.fp-responsive .card {
    margin-bottom: 20px;
    transform: none !important; /* Desactivar animaciones de entrada complejas */
    opacity: 1 !important;
}

/* Sección Transformación en móvil */
body.fp-responsive .transform-content {
    flex-direction: column;
}

body.fp-responsive .transform-text {
    padding-right: 0;
    margin-bottom: 40px;
}

body.fp-responsive .transform-visual {
    justify-content: center;
}

body.fp-responsive .code-window {
    width: 100%;
    margin-top: 20px;
}

/* Sección Nosotros - Ajuste de ancho */
body.fp-responsive #somos-list {
    width: 100% !important;
    display: block !important;
    padding: 1.5em !important;
}

body.fp-responsive .somos-img {
    display: none; /* Ocultar imagen decorativa en móvil para ahorrar espacio o ponerla abajo */
}

/* Sección Servicios - Ajuste visual */
body.fp-responsive .servicios-1-content {
    flex-direction: column;
}

body.fp-responsive .servicios-1-img {
    width: 100%;
    margin-bottom: 20px;
}

body.fp-responsive .servicios-1-img img {
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

/* Navegación Móvil */
@media only screen and (max-width: 900px) {
    .btn-toggle {
        display: block;
        top: 20px;
        right: 20px;
        z-index: 2000; /* Asegurar que esté por encima de todo */
        background: rgba(0,0,0,0.5); 
        padding: 5px;
        border-radius: 5px;
        position: fixed;
    }
    
    header {
        top: 0; 
        z-index: 1500;
        transition: height 0.3s ease;
    }
    
    #menu ul {
        display: none; 
    }
    
    header.active {
        height: 100vh !important;
        background: rgba(0,0,0,0.95);
        overflow: hidden;
        position: fixed;
        width: 100%;
        left: 0;
    }
    
    header.active #menu ul {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    header.active #menu li {
        display: block;
        margin: 15px 0;
        opacity: 0;
        animation: fadeIn 0.5s forwards;
    }
    
    header.active #menu li:nth-child(1) { animation-delay: 0.1s; }
    header.active #menu li:nth-child(2) { animation-delay: 0.2s; }
    header.active #menu li:nth-child(3) { animation-delay: 0.3s; }
    header.active #menu li:nth-child(4) { animation-delay: 0.4s; }
    header.active #menu li:nth-child(5) { animation-delay: 0.5s; }
    
    header.active #menu li a {
        font-size: 2em; 
        color: #fff;
        font-weight: 300;
        text-transform: uppercase;
        letter-spacing: 2px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
