/* styles.css */
:root {
    --color-primario: #2c3e50;
    --color-secundario: #3498db;
    --color-acento: #e74c3c;
    --color-texto: #333;
    --color-texto-claro: #fff;
    --color-fondo: #ffffff;
    --color-fondo-claro: #f5f7fa;
    --sombra: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transicion: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --borde-redondeado: 8px;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--color-texto);
    background-color: var(--color-fondo);
    padding-top: 70px;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.contenedor {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.bg-claro {
    background-color: var(--color-fondo-claro);
}

/* --- Keyframes para las animaciones --- */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}


/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.navbar .contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primario);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-menu a {
    color: var(--color-primario);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secundario);
    transition: width 0.3s ease-in-out;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--color-secundario);
}


.boton-nav {
    padding: 8px 18px;
    background: var(--color-acento);
    color: white;
    border-radius: 50px;
    transition: var(--transicion);
}
.boton-nav:hover {
    background: #c0392b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- ESTILOS PARA MENÚ HAMBURGUESA --- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background-color: var(--color-primario);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primario);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }


/* --- Sección Home --- */
#home.full-screen {
    height: calc(100vh - 70px);
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(imgs/Fondo.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    position: relative;
}

#home.full-screen::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.contenido-home {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px;
    color: var(--color-texto-claro);
}

.contenido-home h1 {
    font-size: 3.2rem;
    margin-bottom: 15px;
    font-weight: 700;
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease-out 0.5s forwards;
}

.contenido-home p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.contenido-home p.typing-effect {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid rgba(255, 255, 255, 0.75);
    width: 0;
    animation: 
        typing 2s steps(45, end) 1.5s forwards,
        blink 0.75s step-end infinite;
}

.contenido-home p.sub-effect {
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease-out 2.5s forwards; 
}

.opciones {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease-out 3.5s forwards;

}

.boton {
    padding: 12px 25px;
    background: transparent;
    color: var(--color-texto-claro);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    transition: var(--transicion);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.boton:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.boton-cta {
    background: var(--color-acento);
    border-color: var(--color-acento);
}

.boton-cta:hover { background: #c0392b; }

/* Estilos Comunes de Sección */
.seccion-contenido { padding: 80px 0; }
.seccion-contenido h2 { text-align: center; font-size: 2.5rem; margin-bottom: 15px; color: var(--color-primario); }
.subtitulo { text-align: center; color: #666; margin-bottom: 50px; font-size: 1.1rem; max-width: 700px; margin-left: auto; margin-right: auto; }

/* Sección Problema/Solución */
#problema-solucion { background-color: var(--color-primario); color: var(--color-texto-claro); padding: 60px 0; }
.texto-destacado { text-align: center; font-size: 1.3rem; line-height: 1.7; max-width: 850px; margin: 0 auto; }
.texto-destacado strong { color: var(--color-secundario); }

/* --- SECCIÓN SERVICIOS --- */
.grid-servicios {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    text-align: center;
}

.servicio-item { 
    background: white; 
    padding: 30px; border-radius: var(--borde-redondeado); 
    box-shadow: var(--sombra); 
    transition: var(--transicion); 
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.servicio-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.12);
}
.servicio-link {
    text-decoration: none;
    color: inherit;
    display: block; 
}
.servicio-icono { width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 50%; transition: transform 0.3s ease; }
.servicio-item:hover .servicio-icono {
    transform: scale(1.1);
}
.servicio-item h3 { margin-bottom: 10px; color: var(--color-primario); }


/*  ======== SECCIÓN DE PLANES (ACTUALIZADA) ======== */
.grid-planes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.plan-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: var(--borde-redondeado);
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: var(--transicion);
    box-shadow: var(--sombra);
    position: relative;
    overflow: hidden;
}
.plan-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 24px rgba(44, 62, 80, 0.15);
}

.plan-recomendado {
    border: 2px solid var(--color-secundario);
    transform: scale(1.05);
}
.plan-recomendado:hover {
    transform: scale(1.08);
}

.plan-badge {
    position: absolute;
    top: 15px;
    right: -45px;
    background-color: var(--color-secundario);
    color: white;
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 3;
}

.plan-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}
.plan-header h3 {
    font-size: 1.8rem;
    color: var(--color-primario);
}
.plan-tagline {
    font-size: 1rem;
    color: var(--color-secundario);
    font-weight: 500;
}

.plan-body {
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.plan-ahorro-badge {
    position: absolute;
    top: -4px;
    left:-30px;
    width: 45%;
    background-color: var(--color-acento);
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    z-index: 2;
    text-align: center;
}

.plan-ahorro-badge::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    border-style: solid;
    border-width: 8px 8px 0 0;
    border-color: #9e3224 transparent transparent transparent;
}

/* NUEVO: Placeholder para el precio */
.plan-precio-placeholder {
    text-align: center;
    margin-top: 45px;
    margin-bottom: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-fondo-claro);
    border-radius: var(--borde-redondeado);
    padding: 10px;
}
.plan-precio-placeholder p {
    font-size: 1.1rem;
    color: var(--color-primario);
    font-weight: 600;
    line-height: 1.3;
}

.plan-descripcion {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
    text-align: center;
    flex-grow: 1; 
}

.plan-features {
    list-style: none;
    margin-bottom: 30px;
    padding: 0;
    flex-grow: 2; 
    text-align: left;
}
.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    color: #444;
}
.plan-features svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-secundario);
    margin-top: 2px;
}

.boton-plan {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    border: 2px solid var(--color-secundario);
    color: var(--color-secundario);
    background-color: transparent;
    border-radius: var(--borde-redondeado);
    font-weight: 600;
    transition: var(--transicion);
    margin-top: auto; 
}
.boton-plan:hover {
    background-color: var(--color-secundario);
    color: white;
    box-shadow: 0 5px 10px rgba(52, 152, 219, 0.3);
}

.boton-plan-cta {
    background-color: var(--color-secundario);
    color: white;
}
.boton-plan-cta:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* --- NUEVOS ESTILOS: Sección Soluciones a Medida --- */
.caja-solucion-medida {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-fondo);
    padding: 40px;
    border-radius: var(--borde-redondeado);
    box-shadow: var(--sombra);
    text-align: center;
    border-left: 5px solid var(--color-acento);
    transition: var(--transicion);
}
.caja-solucion-medida:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.caja-solucion-medida p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}
.caja-solucion-medida .boton-cta {
    display: inline-block;
    width: auto;
    padding: 12px 30px;
}

/* Sección Casos de Éxito */
#casos-exito {
    background-color: var(--color-fondo-claro);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 10px 22px;
    border: 2px solid var(--color-secundario);
    background-color: transparent;
    color: var(--color-secundario);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transicion);
    font-family: 'Poppins', sans-serif;
}
.filter-btn:hover, .filter-btn.active { 
    background-color: var(--color-secundario); 
    color: white; 
    transform: translateY(-3px);
}

.grid-proyectos { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, 320px); 
    justify-content: center;
    gap: 30px; 
    transition: opacity 0.4s ease-in-out;
    opacity: 1;
}

.grid-proyectos.fading-out {
    opacity: 0;
}

.proyecto { 
    background: #fff; 
    border-radius: var(--borde-redondeado); 
    overflow: hidden; 
    box-shadow: var(--sombra); 
    transition: var(--transicion);
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.proyecto:hover { 
    transform: translateY(-12px); 
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.12); 
}

.imagen-proyecto { height: 200px; overflow: hidden; }
.imagen-proyecto img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.proyecto:hover .imagen-proyecto img { transform: scale(1.08); }
.proyecto h3 { padding: 20px 20px 10px; font-size: 1.3rem; color: var(--color-primario); }
.proyecto p { padding: 0 20px 20px; color: #666; font-size: 0.95rem; flex-grow: 1; }
.etiqueta { display: inline-block; background: var(--color-secundario); color: white; padding: 5px 15px; border-radius: 50px; font-size: 0.8rem; margin: 0 20px 20px; }

/* Sección Por Qué Elegirnos */
.grid-elegirnos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.elegirnos-item { background-color: white; padding: 30px; border-left: 5px solid var(--color-secundario); border-radius: 0 var(--borde-redondeado) var(--borde-redondeado) 0; transition: var(--transicion); box-shadow: var(--sombra); }
.elegirnos-item:hover {
    transform: translateX(5px);
    border-left-color: var(--color-acento);
}
.elegirnos-item h3 { margin-bottom: 10px; color: var(--color-primario); }

/* Sección Nosotros (Simple) */
.contenido-nosotros-simple { max-width: 800px; margin: 0 auto; text-align: center; }
.contenido-nosotros-simple p { font-size: 1.1rem; color: #555; }

/* Sección Contacto */
.formulario-contacto { max-width: 700px; margin: 0 auto; background: #fff; padding: 40px; border-radius: var(--borde-redondeado); box-shadow: 0 10px 30px rgba(0,0,0,0.08);}
.grupo-formulario { margin-bottom: 20px; }
.grupo-formulario label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--color-primario); }
.grupo-formulario input, .grupo-formulario textarea { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: var(--borde-redondeado); font-family: 'Poppins', sans-serif; transition: var(--transicion); }
.grupo-formulario input:focus, .grupo-formulario textarea:focus { outline: none; border-color: var(--color-secundario); box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2); }
.grupo-formulario textarea { min-height: 150px; resize: vertical; }
.boton-enviar { width: 100%; padding: 15px; background: var(--color-acento); color: white; border: none; border-radius: var(--borde-redondeado); font-size: 1rem; font-weight: 500; cursor: pointer; transition: var(--transicion); text-transform: uppercase; letter-spacing: 1px; }
.boton-enviar:hover { background: #c0392b; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4); }

.info-contacto { text-align: center; margin-bottom: 40px; font-size: 1.1rem; line-height: 1.8; }
.info-contacto p { margin-bottom: 10px; }
.info-contacto a { color: var(--color-acento); font-weight: 500; }
.info-contacto a:hover { text-decoration: underline; }

/* Footer */
.pie-pagina { background: var(--color-primario); color: white; padding: 25px 0; text-align: center; }
.pie-pagina p { font-size: 0.9rem; opacity: 0.8; }

/* Botón Flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: var(--transicion);
}
.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
}
.whatsapp-icon {
    width: 32px;
    height: 32px;
    fill: white;
}

/* --- Animación Fade-in para Secciones --- */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* --- SECCIÓN RESPONSIVE --- */

@media (max-width: 992px) {
    .grid-servicios {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* === CAMBIOS PRINCIPALES PARA MÓVILES === */
@media (max-width: 768px) {
    body { padding-top: 70px; }
    
    .nav-toggle { display: block; }
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    }
    .nav-menu.active { right: 0; }
    .nav-menu a { font-size: 1.2rem; }
    .nav-toggle.active .hamburger { background-color: transparent; }
    .nav-toggle.active .hamburger::before { top: 0; transform: rotate(45deg); }
    .nav-toggle.active .hamburger::after { bottom: 0; transform: rotate(-45deg); }
    
    #home.full-screen { height: 100vh; padding-top: 0; }
    
    .contenido-home {
        padding: 0 25px;
    }
    
    .contenido-home h1 {
        font-size: 2.2rem;
    }

    .contenido-home p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .contenido-home p.typing-effect {
        animation: none;
        width: auto;
        border-right: none;
        white-space: normal;
        opacity: 0;
        animation: fadeInSlideUp 0.8s ease-out 1.5s forwards; 
    }
    
    .opciones { flex-direction: column; gap: 15px; }
    .boton { width: 100%; text-align: center; }
    .seccion-contenido { padding: 60px 15px; }

    .grid-servicios {
        grid-template-columns: 1fr;
    }
    .servicio-item { min-height: auto; }

    .formulario-contacto { padding: 30px 20px; }
    .filter-buttons { gap: 10px; }
    .filter-btn { padding: 8px 18px; font-size: 0.9rem; }
    .grid-proyectos { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
    .grid-planes { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
   
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .whatsapp-icon { width: 28px; height: 28px; }
}