/* Botón de WhatsApp en el footer */
.footer-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #8B5CF6 0%, #4F46E5 100%);
    color: #fff;
    border-radius: 50px;
    padding: 0.4rem 1.1rem;
    margin-left: 10px;
    box-shadow: 0 2px 12px rgba(79,70,229,0.18);
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s, transform 0.2s;
}
.footer-whatsapp-btn:hover {
    background: linear-gradient(90deg, #00F0FF 0%, #4F46E5 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.07);
}
/* =========================================
   1. VARIABLES DE DISEÑO (Design Tokens) - ACTUALIZADO
   ========================================= */
/* Animaciones Scroll */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(.77,0,.18,1), transform 0.7s cubic-bezier(.77,0,.18,1);
}
.fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}
:root {
    /* Paleta de Colores personalizada */
    --primary-dark: #1A2B4C;
    --accent-blue: #4F46E5;
    --accent-blue-dark: #312E81;
    --bg-light: #F8FAFC;
    --text-color: #334155;

    /* Degradados y Sombras */
    --gradient-hero-title: linear-gradient(135deg, #8B5CF6, #4F46E5, #312E81);
    --gradient-btn-primary: linear-gradient(135deg, #8B5CF6, #4F46E5);
    --shadow-btn-primary: 0 4px 15px rgba(79, 70, 229, 0.25);

    /* Tipografía */
    --font-heading: 'Montserrat', 'Syne', sans-serif;
    --font-body: 'Inter', 'Roboto', sans-serif;
}

/* =========================================
   2. RESET Y ACCESIBILIDAD BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.1;
}

/* Utilidad Glassmorphism Base */
.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
}

/* =========================================
   3. HEADER & NAVBAR
   ========================================= */
.header {
    position: fixed;
    top: 20px;
    left: 5%;
    width: 90%;
    z-index: 1000;
    background-color: #fdfefe;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-group {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.logo-text {
    color: #8B5CF6;
    font-family: 'Montserrat', 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: 0.08em;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-block;
}
.logo-text:hover {
    color: #4F46E5;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #8B5CF6;
}

/* Botones Globales */
.btn-primary {
    background: var(--gradient-btn-primary);
    color: #ffffff !important;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    box-shadow: var(--shadow-btn-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--accent-blue-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    color: #8B5CF6;
    border-bottom: 2px solid #8B5CF6;
}

/* Botón Hamburguesa */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-dark);
    transition: all 0.3s ease-in-out;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-section {
    min-height: 100vh;
    padding: 120px 5% 4rem 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem); 
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

/* --- Lado Izquierdo: Tipografía y Contenido (Actualizado) --- */
.text-gradient {
    background: var(--gradient-hero-title); /* Usar el nuevo degradado de 3 colores */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.glow-blob {
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.2) 0%, rgba(26, 43, 76, 0.05) 70%);
    filter: blur(40px);
    z-index: -1;
    border-radius: 50%;
    animation: pulseGlow 6s infinite alternate;
}

.hero-img {
    width: 90%;
    max-width: 850px;
    height: auto;
    animation: float 5s ease-in-out infinite;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.08));
    border-radius: 50%;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* =========================================
   5. SECCIÓN SERVICIOS
   ========================================= */
.services-section {
    position: relative;
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
}

.services-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.glass-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-teal);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--primary-dark);
    bottom: -50px;
    right: -50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 2;
}

.service-card {
    padding: 2.5rem 2rem;
    text-align: left;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card.glass-panel {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px 0 rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.4);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(20, 184, 166, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-teal-dark);
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.7;
}

/* =========================================
   6. MEDIA QUERIES (Responsividad)
   ========================================= */
@media (max-width: 968px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 140px;
    }

    .hero-description {
        margin: 0 auto 2.5rem auto;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: -120%;
        top: 85px;
        flex-direction: column;
        background-color: var(--bg-light);
        width: 100%;
        border-radius: 16px;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* =========================================
   6. PORTFOLIO SECTION
   ========================================= */
.portfolio-section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 4rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* --- Tarjetas del Portafolio --- */
.portfolio-card {
    text-decoration: none; /* Quitamos el subrayado del enlace */
    display: block;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden; /* Mantiene la imagen dentro de los bordes redondeados */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.portfolio-card:hover {
    transform: translateY(-10px); /* Levitación */
    box-shadow: var(--shadow-btn-primary); /* Sombra vibrante púrpura */
    border-color: var(--vibrant-purple);
}

/* --- Contenedor de la Imagen y Efecto Overlay --- */
.portfolio-image {
    position: relative;
    width: 100%;
    height: 260px; /* Altura fija para que todas las tarjetas sean iguales */
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen sin deformarla */
    transition: transform 0.6s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.08); /* Zoom suave a la foto */
}

/* La capa oscura que aparece al hacer hover */
.portfolio-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(26, 43, 76, 0.85); /* Azul marino transparente */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

/* El botón simulado dentro del overlay */
.view-btn {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-btn-primary); /* Degradado vibrante */
    border-radius: 50px;
    transform: translateY(20px); /* Empieza un poco abajo */
    transition: transform 0.4s ease;
}

.portfolio-card:hover .view-btn {
    transform: translateY(0); /* Sube a su posición final al hacer hover */
}

/* --- Textos de la Tarjeta --- */
.portfolio-info {
    padding: 1.5rem;
    text-align: left;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* =========================================
   7. PRICING & PLANES SECTION
   ========================================= */
.pricing-section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    background-color: #ffffff; /* Fondo blanco para separar visualmente del resto */
    border-radius: 40px; /* Bordes redondeados masivos muy modernos */
    box-shadow: 0 10px 40px rgba(0,0,0,0.02);
    margin-bottom: 4rem;
}

.pricing-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center; /* Centra las tarjetas, permitiendo que la "Popular" destaque */
}

/* Tarjeta Base */
.pricing-card {
    background: var(--bg-light);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.04);
}

/* Tarjeta Popular (La del medio) */
.pricing-card.popular {
    background: #ffffff;
    border: 2px solid var(--vibrant-purple);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
    transform: scale(1.05); /* Ligeramente más grande */
    z-index: 2;
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-btn-primary);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: var(--font-heading);
}

/* Tipografía de los Planes */
.plan-name {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.plan-desc {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    min-height: 50px; /* Alinea los precios si las descripciones tienen distinto largo */
}

.plan-price {
    margin-bottom: 2rem;
    font-family: var(--font-heading);
}

.plan-price .amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.plan-price .currency {
    font-size: 1.5rem;
    vertical-align: top;
    font-weight: 600;
    color: var(--primary-dark);
}

.plan-price .period {
    color: var(--text-color);
    font-weight: normal;
}

/* Lista de Beneficios */
.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2.5rem;
}

.plan-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.plan-features svg {
    width: 20px;
    height: 20px;
    color: var(--vibrant-magenta); /* Checkmarks coloridos */
    flex-shrink: 0;
}

/* Ajustes Responsive para los Planes */
@media (max-width: 968px) {
    .pricing-card.popular {
        transform: scale(1); /* Quitamos el scale en móviles para que no se salga de la pantalla */
    }
    .pricing-card.popular:hover {
        transform: translateY(-5px);
    }
}

/* =========================================
   7.5 CONTACT CTA SECTION (WhatsApp)
   ========================================= */
.contact-section {
    padding: 2rem 5% 6rem 5%;
    max-width: 1000px; /* Un poco más angosto para que la lectura sea rápida */
    margin: 0 auto;
    text-align: center;
}

.cta-card {
    background: #ffffff;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 32px;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
}

.cta-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
}

.cta-card h2, .cta-card p, .cta-card a {
    position: relative;
    z-index: 2; /* Para que el texto esté por encima del resplandor */
}

.cta-subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 1rem auto 3rem auto;
    max-width: 500px;
}

/* Botón Gigante de WhatsApp */
.btn-whatsapp-massive {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    background: #25D366; /* Verde oficial de WhatsApp */
    color: #ffffff;
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    transition: all 0.4s ease;
    animation: pulseWhatsApp 2s infinite; /* Animación de latido */
}

.btn-whatsapp-massive:hover {
    background: #1EBE5D;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    animation: none; /* Se detiene la animación al pasar el mouse para no marear */
}

.wa-icon svg {
    width: 40px;
    height: 40px;
}

.wa-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
    line-height: 1.2;
    text-align: left;
}

.wa-number {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    display: block;
    text-align: left;
}

/* Animación de Latido (Pulse) */
@keyframes pulseWhatsApp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Ajustes Móviles */
@media (max-width: 768px) {
    .btn-whatsapp-massive {
        padding: 1rem 1.5rem;
        gap: 1rem;
        width: 100%; /* Ocupa todo el ancho en móviles */
        justify-content: center;
    }
    
    .wa-text {
        font-size: 1rem;
    }
    
    .wa-icon svg {
        width: 30px;
        height: 30px;
    }
}

/* =========================================
   8. FOOTER CORPORATIVO
   ========================================= */
.footer {
    background-color: var(--primary-dark);
    color: #cbd5e1; /* Un gris claro azulado para excelente legibilidad */
    padding: 5rem 5% 1.5rem 5%;
    position: relative;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* La primera columna ocupa más espacio */
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Columna 1: Marca */
.footer-logo {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 350px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a svg {
    width: 18px;
    height: 18px;
}

.social-links a:hover {
    background: var(--gradient-btn-primary);
    transform: translateY(-5px);
    border-color: transparent;
}

/* Columnas 2 y 3: Enlaces y Contacto */
.footer-links h3,
.footer-contact h3 {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: var(--vibrant-blue);
    padding-left: 5px; /* Pequeño salto a la derecha al hacer hover */
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-contact svg {
    width: 18px;
    height: 18px;
    color: var(--vibrant-purple);
}

.footer-contact a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--vibrant-magenta);
}

/* Base del Footer (Copyright) */
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Responsive Footer */
@media (max-width: 968px) {
    .footer-container {
        grid-template-columns: 1fr; /* Todo pasa a una sola columna en móviles */
        gap: 3rem;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto 2rem auto;
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }
}