/* --- RESET Y ESTILOS GLOBALES --- */

html {
    /* Esto hace que el salto sea una animación fluida en navegadores modernos */
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;

    /* ESTADO INICIAL BLOQUEADO */
    overflow: hidden;
    /* Bloquea el scroll inicialmente */
}

/* Cuando el sitio se desbloquea */
body.unlocked {
    overflow: auto;
}

/* Ocultar contenido mientras está bloqueado */
body:not(.unlocked)>main>section:not(.hero-switch),
body:not(.unlocked)>footer {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    /* Asegura que no sea interactuable */
    transition: opacity 1s ease, visibility 0s linear 1s;
    /* Delay visibility transition */
}

body.unlocked>main>section:not(.hero-switch),
body.unlocked>footer {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 1s ease;
}

/* Contenedor principal para centrar contenido */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4 {
    color: #1a1a1a;
}

p {
    color: #555;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- RESET Y ESTILOS GLOBALES --- */
/* (Header eliminado para experiencia inmersiva) */

/* --- UTILIDAD DE ANIMACIÓN GLOBAL (SCROLL REVEAL) --- */
.reveal-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    /* Curva suave y elegante */
    will-change: opacity, transform;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- SECCIÓN 1: HERO SWITCH (Interruptor de Potencia) --- */
.hero-switch {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background-color: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: all 0.8s ease-in-out;
}

/* Fondo oculto que aparece al encender */
.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Imagen de fondo Local SVG */
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(20, 20, 30, 0.85)), url('img/Mockup_Dispositivos_SitioWeb.svg');
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

/* --- ESTADO INICIAL (Interruptor) --- */
.switch-container {
    position: relative;
    z-index: 10;
    text-align: center;
    transition: transform 0.8s ease, opacity 0.5s ease;
}

.switch-message {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 40px;
    letter-spacing: 1px;
    font-family: 'Roboto', sans-serif;
}

.switch-message strong {
    color: #eee;
    font-weight: 700;
}

/* Diseño de Interruptor Moderno Retroiluminado */
.power-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 260px;
    height: 120px;
    position: relative;
    margin: 0 auto;
}

.power-switch input {
    display: none;
}

/* CARCASA DEL INTERRUPTOR */
.modern-switch-label {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    perspective: 500px;
}

.modern-switch-housing {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 12px;
    padding: 10px;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.8),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 2px #000,
        0 10px 20px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* TECLA BASCULANTE */
.modern-switch-rocker {
    width: 100%;
    height: 100%;
    background: linear-gradient(#222, #181818);
    border-radius: 6px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;

    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: center center;

    /* ESTADO INICIAL (OFF): Inclinado a la derecha */
    transform: rotateY(15deg);

    box-shadow:
        inset 5px 0 10px rgba(0, 0, 0, 0.8),
        /* Sombra izquierda (hundido) */
        inset -2px 0 5px rgba(255, 255, 255, 0.1);
    /* Brillo derecho (salido) */
}

/* TEXTOS ON/OFF */
.switch-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    transition: all 0.3s ease;
    user-select: none;
}

/* TEXTO OFF (Inicialmente encendido en ROJO) */
.switch-text.off {
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
    opacity: 1;
}

/* TEXTO ON (Inicialmente apagado) */
.switch-text.on {
    color: #333;
    text-shadow: none;
    opacity: 0.5;
    transform: scale(0.9);
}

/* --- ESTADO ENCENDIDO (:checked) --- */

/* Movimiento de la tecla */
.power-switch input:checked+.modern-switch-label .modern-switch-rocker {
    /* Bascular a la izquierda */
    transform: rotateY(-15deg);

    box-shadow:
        inset -5px 0 10px rgba(0, 0, 0, 0.8),
        /* Sombra derecha (hundido) */
        inset 2px 0 5px rgba(255, 255, 255, 0.1);
    /* Brillo izquierda (salido) */
}

/* Cambio de Luces */
.power-switch input:checked+.modern-switch-label .switch-text.on {
    color: #00ff00;
    /* Verde Neon */
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
    opacity: 1;
    transform: scale(1);
}

.power-switch input:checked+.modern-switch-label .switch-text.off {
    color: #333;
    text-shadow: none;
    opacity: 0.5;
    transform: scale(0.9);
}

/* --- ESTADO REVELADO (Contenido Final) --- */
.hero-reveled-content {
    position: absolute;
    z-index: 5;
    text-align: center;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out;
    pointer-events: none;
    /* Inactivo hasta que se muestre */
}

.hero-reveled-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.btn-cta {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: #F58634;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(245, 134, 52, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: #ddd;
    border: 2px solid #555;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #777;
    color: #fff;
}

/* --- ACTIVACIÓN DEL HERO (.is-active) --- */
.hero-switch.is-active .hero-background-image {
    opacity: 1;
}

.hero-switch.is-active .switch-container {
    opacity: 0;
    transform: scale(1.5);
    pointer-events: none;
}

.hero-switch.is-active .hero-reveled-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0.5s;
    /* Esperar a que el switch desaparezca */
}


/* --- SECCIÓN 2: ESTADÍSTICAS (NARANJA) --- */
.stats-section {
    background: linear-gradient(135deg, #F99F59 0%, #F58634 100%);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
}

.stats-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.stats-left {
    max-width: 60%;
}

.stats-header {
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.stat-item {
    margin-bottom: 30px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    max-width: 450px;
}

/* Decoración abstracta derecha (simulada) */
.stats-graphic {
    /* Eliminamos el estilo de fuente que usaba el lápiz: */
    font-size: 0;
    opacity: 1;
    /* Hacemos la imagen visible */

    /* DEFINICIÓN DE LA IMAGEN DE FONDO (¡Aquí es donde se cambia!) */
    background-image: url('img/estadisticas.png');
    background-size: contain;
    /* Asegura que la imagen se vea completa */
    background-repeat: no-repeat;
    background-position: center;

    /* Definimos el tamaño del contenedor para que la imagen se vea */
    width: 300px;
    /* Ancho deseado para el gráfico */
    height: 300px;
    /* Alto deseado para el gráfico */

    /* El transform original puede causar problemas con imágenes, lo eliminamos: */
    /* transform: rotate(-15deg); */
}

/* --- SECCIÓN 3: BENEFICIOS --- */
.benefits {
    margin-bottom: 80px;
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-title {
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 50px;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    /* Aumentado de 50px para más aire */
    max-width: 900px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;

    /* Animación Inicial */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* CLASE DISPARADORA (Javacript) */
.benefit-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* STAGGER (Escalonamiento) */
.benefit-item:nth-child(1) {
    transition-delay: 0s;
}

.benefit-item:nth-child(2) {
    transition-delay: 0.2s;
}

.benefit-item:nth-child(3) {
    transition-delay: 0.4s;
}

.benefit-item:nth-child(4) {
    transition-delay: 0.6s;
}

.benefit-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.benefit-text h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    /* Un poco más de espacio */
}

.benefit-text p {
    font-size: 0.95rem;
    /* Un poco más legible */
    color: #666;
    line-height: 1.6;
}

/* --- SECCIÓN 4: SOBRE MÍ (Texto + Imagen) --- */
.about {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
    background-color: #f9f9f9;
    /* Fondo sutil para diferenciar */
}

/* Ajuste para que el fondo gris ocupe todo el ancho si se desea, 
           pero aquí lo mantengo limpio en el contenedor */

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.btn-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    color: #F58634;
    border-bottom: 2px solid #F58634;
}

/* --- SECCIÓN SERVICIOS (REFACTORIZADO) --- */
.services {
    padding: 100px 0;
    /* Buen aire vertical */
}

.services-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
    /* Seguridad para pantallas medianas */
}

/* Tarjeta Unificada */
.service-card-pro {
    flex: 1;
    min-width: 280px;
    /* Evita que se aplasten */
    max-width: 350px;
    text-align: center;
    padding: 20px;

    /* ANIMACIÓN DE ENTRADA SUAVE */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1), transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

/* Clase Activadora */
.service-card-pro.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Elementos Internos */
.service-icon {
    height: 60px;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    stroke: #F58634;
    /* Asegura que el SVG sea naranja */
}

.service-card-pro h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.service-card-pro p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

/* RESPONSIVE (Móvil) - Fluidez total */
@media (max-width: 768px) {
    .services-row {
        flex-direction: column;
        align-items: center;
        gap: 60px;
        /* Más espacio en móvil para que no se sienta 'tosco' */
    }

    .service-card-pro {
        width: 100%;
        max-width: 400px;
        padding: 0 10px;
        /* Pequeño respiro lateral */
    }
}

/* --- SECCIÓN 6: FAQ DUDAS FRECUENTES --- */
.faq {
    margin-bottom: 80px;
    position: relative;
}

.faq-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.faq-icon {
    font-size: 2rem;
    font-weight: bold;
    color: #ddd;
}

.faq-list {
    cursor: pointer;
    /* Indica que se puede hacer clic en las preguntas */
}

.faq-item {
    margin-bottom: 30px;
}

.faq-question {
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.faq-question::before {
    content: '•';
    color: #F58634;
    /* Azulito claro en la imagen original, aquí uso el naranja del tema */
    font-size: 1.5rem;
    margin-right: 10px;
    line-height: 0;
}

.faq-answer {
    padding-left: 20px;
    font-size: 0.95rem;
}

/* --- SECCIÓN 7: FOOTER / CTA --- */
.footer-cta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 60px 0;
    border-top: 1px solid #eee;
}

.cta-left h2 {
    font-size: 2.5rem;
    max-width: 300px;
    line-height: 1.1;
}

.cta-right {
    text-align: right;
}

.cta-socials {
    margin-bottom: 20px;
}

.cta-socials p,
.cta-contact p {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #999;
}

/* Links de Contacto y Redes (Unificados) */
.btn-contact-nav {
    font-weight: 700;
    margin-left: 10px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-contact-nav:hover {
    color: #F58634;
}

/* --- RESPONSIVE (Móvil) --- */

@media (max-width: 768px) {

    /* 1. AJUSTES GENERALES */
    .container {
        padding: 0 15px;
        /* Reducimos el padding lateral para usar más espacio */
    }

    /* Reducimos el padding en todas las secciones para que haya más contenido */
    section {
        padding: 60px 0;
        /* Padding generoso para evitar sensación tosca */
    }

    /* 2. HERO SWITCH MOVIL */
    .hero-switch {
        height: 100vh;
        /* Mantener full height en movil para impacto */
    }

    .hero-reveled-content h1 {
        font-size: 2.2rem;
    }

    .switch-message {
        font-size: 1.2rem;
    }

    /* Bloque 2 Unificado */

    /* 5. ESTADÍSTICAS (SECCIÓN 2) */
    .stats-content {
        flex-direction: column;
        text-align: center;
        /* Centramos el texto cuando la gráfica desaparece */
    }

    .stats-graphic {
        display: none;
        /* Como ya lo tenías, ocultamos la gráfica */
    }

    .stats-left {
        max-width: 100%;
    }

    /* 6. SOBRE MÍ (ABOUT) */
    .about {
        flex-direction: column;
        text-align: center;
    }

    /* Aseguramos que la imagen y el texto se vean bien */
    .about-image,
    .about-text {
        width: 100%;
        margin: 0;
    }

    /* 7. BENEFICIOS */
    .benefits-grid {
        grid-template-columns: 1fr;
        /* Cada beneficio ocupa su propia fila */
    }

    .benefits {
        padding-top: 80px;
    }

    .benefits .section-title {
        margin-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 8. SERVICIOS (Espaciado Extra Mobile) */
    #servicios {
        margin-bottom: 100px !important;
    }

    /* 9. FOOTER Y CTA */
    .footer-cta {
        flex-direction: column;
        align-items: center;
        /* Centramos para móvil */
        gap: 30px;
        text-align: center;
    }

    .cta-right {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
        /* Centramos los iconos sociales */
    }

    /* Bloque 3 Unificado */

    /* 10. HEADER / NAV (Si no tienes menú hamburguesa) */
    header {
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        text-align: center;
        margin-top: 15px;
    }

    .nav-links a {
        margin: 10px 0;
    }
}

/* EFECTO HOVER INMERSIVO */
/* EFECTO HOVER ESTATICO (Neutralización Total) */
/* Bloque de servicios eliminado (consolidado arriba) */

/* Oculta el contenido de las respuestas por defecto */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    /* Transición para la animación de apertura */
    padding-left: 20px;
}

/* Propiedades del encabezado de la pregunta */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.toggle-icon {
    font-size: 1.5rem;
    font-weight: 300;
    margin-left: 20px;
    transition: transform 0.3s ease;
    color: #F58634;
    /* Color del signo +/- */
}

/* Gira el icono + a una X (o un -) cuando está activo */
.accordion-header.active .toggle-icon {
    transform: rotate(45deg);
    /* Gira 45 grados para simular una 'X' */
    color: #333;
}

.faq-title {
    margin-bottom: 0;
}

/* --- SECCIÓN TESTIMONIOS --- */
.testimonials {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 80px;
    padding: 0 20px;
}

.testimonial-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-quote {
    font-size: 1.4rem;
    font-style: italic;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.4;
    /* Center layout adjustment */
    padding: 0;
}

.testimonial-author {
    margin-bottom: 30px;
}

.client-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.project-name {
    font-size: 0.9rem;
    color: #666;
}

/* Browser Mockup Removed */

/* Responsive */


/* --- ANIMACIONES DE TÍTULOS (Estilo Premium) --- */
.title-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    position: relative;
    display: table;
    /* Fallback para fit-content */
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Pseudo-elemento para el subrayado dinámico */
.title-animate::after {
    content: '';
    position: absolute;
    bottom: -10px;
    /* Separación del texto */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    /* Empieza invisible */
    height: 4px;
    /* Grosor de la línea */
    background-color: #F58634;
    /* Color del tema */
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: 0.4s;
    /* Espera a que el texto suba un poco */
}

/* Estado Visible (Activado por JS) */
.title-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.title-animate.visible::after {
    width: 60px;
    /* Ancho final estético */
}