/* --- CONFIGURACIÓN GENERAL Y RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background: radial-gradient(circle at top right, #1e293b, #0f172a, #020617);
    color: #e5e7eb;
    min-height: 100vh;
}

/* --- NAVEGACIÓN (Navbar Corregida) --- */
/* Busca .navbar en style.css y déjalo así: */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    padding: 0.8rem 2rem;
    
    /* CAMBIO CLAVE: Usamos Grid en lugar de Flex */
    display: grid; 
    grid-template-columns: 1fr auto 1fr; /* Izquierda, Centro (ajustado al texto), Derecha */
    align-items: center;
    
    z-index: 1000;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* El logo se queda a la izquierda */
.nav-logo {
    display: flex;
    align-items: center;
    z-index: 10000; /* Para que siempre esté por encima */
}

.nav-logo img {
    max-width: 100%;
    height: 45px; /* Tamaño por defecto en escritorio */
    transition: height 0.3s ease;
}

.nav-logo img:hover {
    transform: scale(1.05);
}

/* El menú se queda perfectamente en el centro real del contenedor */
.nav-links {
    display: flex;
    gap: 2rem;
    justify-self: center; 
}


/* Ajuste para que el botón no rompa el equilibrio */
.nav-links a.btn-contact {
    margin-left: auto; /* Empuja el botón de contacto al final del contenedor si es necesario */
}

.nav-links a {
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.text-gradient {
    color: #60a5fa;
}

.btn-contact {
    background: white;
    color: #0f172a;
    padding: 0.6rem 1.2rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 800;
    transition: transform 0.3s;
    justify-self: end; 
}

.btn-contact:hover {
    transform: scale(1.05);
}

/* --- HERO SECTION --- */
.hero {
    padding: 10rem 1.5rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 1.5rem 0;
    color: white;
}

.text-gradient {
    background: linear-gradient(to right, #60a5fa, #2dd4bf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    color: #9ca3af;
    font-size: 1.15rem;
    max-width: 45rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* --- ANIMACIONES (Sin errores de centrado) --- */
@keyframes fadeInUpNav {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar.animate-fade-in-up {
    animation: fadeInUpNav 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.opacity-0 { opacity: 0; }

/* --- FOOTER --- */
.main-footer {
    margin-top: 5rem;
    padding: 4rem 0 2rem;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-brand p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4, .footer-social h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: #9ca3af;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #2dd4bf;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    color: #9ca3af;
    font-size: 1.3rem;
    transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
    color: #60a5fa;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: #4b5563;
    font-size: 0.8rem;
}
.mobile-only-contact{
    display: none;
}

/* --- RESPONSIVE DESIGN --- */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .navbar {
        width: 95%;
        padding: 0.8rem 1.5rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

/* Móviles (Smartphone) */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Ocultamos el menú normal para usar un menú hamburguesa luego */
    }

    .hero {
        padding: 8rem 1rem 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    /* Ajuste para el Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-brand p {
        margin: 1rem auto;
    }

    .social-icons {
        justify-content: center;
    }
}


/* Ocultar el botón en escritorio */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none; /* Oculto por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(15px);
        padding: 2rem;
        border-radius: 0 0 1.25rem 1.25rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        gap: 1.5rem;
        text-align: center;
    }

    /* Clase que activaremos con JS */
    .nav-links.active {
        display: flex;
    }
}

/* --- NUEVAS SECCIONES REUTILIZABLES --- */
.section-padding {
    padding: 8rem 1.5rem 8rem;
}

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #9ca3af;
    font-size: 1.1rem;
}

.bg-soft {
    background: rgba(255, 255, 255, 0.02);
}

/* --- ESTILOS TARIFAS --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
}

.pricing-card {
    background: rgba(15, 23, 42, 0.5);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.pricing-card.featured {
    background: #0f172a;
    border: 2px solid #3b82f6;
    transform: scale(1.05);
    position: relative;
}

.badge-featured {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.plan-name { font-size: 1.5rem; margin-bottom: 0.5rem; }
.plan-price { 
    font-size: 2.5rem; 
    font-weight: 900; 
    background: linear-gradient(to right, #60a5fa, #2dd4bf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.plan-features { margin-bottom: 2rem; }
.plan-features li { color: #9ca3af; margin-bottom: 0.75rem; font-size: 0.95rem; }
.plan-features i { color: #2dd4bf; margin-right: 0.5rem; }

.btn-plan-primary {
    display: block; text-align: center; background: #2563eb; color: white;
    padding: 0.8rem; border-radius: 0.75rem; font-weight: 700; transition: 0.3s;
}

.btn-plan-secondary {
    display: block; text-align: center; background: rgba(255, 255, 255, 0.05); color: white;
    padding: 0.8rem; border-radius: 0.75rem; font-weight: 700; transition: 0.3s;
}

/* --- ESTILOS INCLUIDO --- */
.features-include-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.feature-item h4 { margin-bottom: 0.5rem; font-weight: 700; }
.feature-item p { font-size: 0.85rem; color: #9ca3af; }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; color: #60a5fa; }

/* --- CARRUSEL (Scroll Nativo) --- */
/* --- CARRUSEL INFINITO ANIMADO --- */
.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
}

.carousel-track {
    display: flex;
    width: calc(400px * 8 + 1.5rem * 8); /* Ancho tarjeta * cantidad + gaps */
    animation: scrollInfinite 30s linear infinite; /* Movimiento constante */
}

/* Pausa al poner el cursor encima */
.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-card {
    min-width: 400px;
    margin: 0 0.75rem;
    background: #0f172a;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.carousel-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* La animación que mueve el track hacia la izquierda */
@keyframes scrollInfinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-400px * 4 - 1.5rem * 4)); /* Se mueve exactamente la mitad */
    }
}


/* --- MEJORA DEL CARRUSEL: EFECTO FOCUS --- */

/* 1. Aseguramos que el contenedor tenga espacio para que la tarjeta crezca sin cortarse */
.carousel-wrapper {
    padding: 3rem 0; /* Aumentamos el padding vertical */
}

/* 2. Efecto de agrandado en la tarjeta individual */
.carousel-card {
    /* ... mantén tus estilos anteriores ... */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

/* 3. Cuando pasas el ratón por una tarjeta específica */
.carousel-card:hover {
    transform: scale(1.1); /* Se agranda un 10% */
    z-index: 10; /* Se pone por encima de las tarjetas de los lados */
    border-color: #3b82f6; /* Cambia el borde al azul que usas en la destacada */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.3);
}

/* 4. Opcional: Hacer que las demás tarjetas se oscurezcan un poco cuando una está en hover */
.carousel-track:hover .carousel-card:not(:hover) {
    filter: brightness(0.7) grayscale(0.2);
    transform: scale(0.95);
}


/* Ajuste para móviles */
@media (max-width: 768px) {
    .carousel-card {
        min-width: 280px;
    }
    .carousel-track {
        width: calc(280px * 8 + 1.5rem * 8);
        animation-duration: 20s; /* Más rápido en móvil para que no aburra */
    }
    @keyframes scrollInfinite {
        100% {
            transform: translateX(calc(-280px * 4 - 1.5rem * 4));
        }
    }
}

/* --- CONTACTO RÁPIDO --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    padding: 2.5rem;
    border-radius: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card i { font-size: 2.5rem; margin-bottom: 1rem; }
.contact-card span { font-weight: 800; font-size: 1.2rem; }
.contact-card p { font-size: 0.85rem; color: #9ca3af; }

.card-whatsapp { background: rgba(34, 197, 94, 0.1); }
.card-whatsapp i { color: #22c55e; }
.card-email { background: rgba(59, 130, 246, 0.1); }
.card-email i { color: #3b82f6; }
.card-phone { background: rgba(168, 85, 247, 0.1); }
.card-phone i { color: #a855f7; }

.contact-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.1); }

/* --- RESPONSIVE ADAPTATION --- */
@media (max-width: 768px) {
    .pricing-card.featured { transform: scale(1); }
    .carousel-card { min-width: 300px; }
    .section-title { font-size: 2rem; }
}

/* --- ANIMACIONES DE MOVIMIENTO CONSTANTE --- */

/* Efecto flotante suave para iconos o tarjetas destacadas */
@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

/* Efecto de brillo que pasa por la tarjeta (Glow Sweep) */
.pricing-card, .contact-card {
    position: relative;
    overflow: hidden;
}

.pricing-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.03), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
}

.pricing-card:hover::after {
    left: 100%;
    top: 100%;
}

/* Mejora del Hover en tarjetas */
.pricing-card:hover, .contact-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    border-color: #60a5fa;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Animación para el gradiente del texto (para que cambie de color solo) */
@keyframes gradientText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.text-gradient {
    background-size: 200% auto;
    animation: gradientText 5s linear infinite;
}

/* Suavizar el scroll del carrusel */
.carousel-container {
    scroll-behavior: smooth;
    cursor: grab;
}

.carousel-container:active {
    cursor: grabbing;
}

/* --- RECUPERAR MOVIMIENTO (Sustitución de Tailwind) --- */

/* Hace que los elementos que tienen AOS empiecen invisibles y suban */
[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Las clases de opacidad que usas en el Hero */
.opacity-0 {
    opacity: 0 !important;
}

/* Los delays que usas en el index (sin esto, todo sale a la vez) */
.delay-1 { transition-delay: 200ms !important; animation-delay: 200ms !important; }
.delay-2 { transition-delay: 400ms !important; animation-delay: 400ms !important; }
.delay-3 { transition-delay: 600ms !important; animation-delay: 600ms !important; }

/* Si usas animaciones manuales como fade-in-up en la navbar */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1 !important; /* El !important asegura que gane a la clase opacity-0 */
        transform: translateY(0);
    }
}

html, body {
    width: 100%;
    max-width: 100vw; /* Evita que el body sea más ancho que la ventana */
    overflow-x: hidden; /* Corta cualquier cosa que sobresalga a la derecha */
    position: relative;
    margin: 0;
    padding: 0;
}

/* Aplica lo mismo al contenedor principal si lo usas */
.main-container {
    overflow-x: hidden;
    width: 100%;
}

/* --- SECCIÓN CLIENTES --- */
.section-header-left {
    margin-bottom: 4rem;
    text-align: left;
}

.badge-mini {
    color: #d946ef; /* El color fucsia de tu imagen */
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.header-line {
    width: 50px;
    height: 4px;
    background: #d946ef;
    margin: 10px 0 25px 0;
}

.section-title-small {
    font-size: 2.2rem;
    color: white;
    font-weight: 700;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 3rem;
    align-items: center;
    justify-items: center;
}

.client-logo {
    width: 100%;
    max-width: 160px;
    /* Invertimos un poco y subimos mucho el brillo para que lo negro pase a gris claro */
    filter: grayscale(1) invert(0.8) brightness(1.2); 
    opacity: 0.8;
    transition: all 0.4s ease;
}

.client-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.client-logo:hover {
    filter: grayscale(0) invert(0) brightness(1); /* Al pasar el ratón se ve original */
    opacity: 1;
    transform: scale(1.1);
}

/* Ajuste móvil */
@media (max-width: 768px) {
    .clients-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 logos por fila en móvil */
        gap: 2rem;
    }
    .section-title-small {
        font-size: 1.8rem;
    }
}

/* Contenedor para alinear perfil y contacto */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    justify-self: end; /* Se alinea a la derecha del grid */
}

/* El círculo del perfil */
.user-profile-trigger {
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #60a5fa, #2dd4bf); /* Gradiente de tu web */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
}

.user-avatar:hover { transform: scale(1.1); }

/* El menú desplegable */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 180px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 10px;
    display: none; /* Controlado por JS */
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.profile-dropdown.show { display: flex; animation: fadeInUp 0.3s ease; }

.dropdown-header { padding: 5px 10px; }
.dropdown-header small { color: #2dd4bf; font-weight: 800; font-size: 0.7rem; display: block; }
.dropdown-header strong { color: white; font-size: 0.9rem; }

.profile-dropdown hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 8px 0; }

.profile-dropdown a {
    padding: 8px 10px;
    color: #9ca3af;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-dropdown a:hover { background: rgba(255, 255, 255, 0.05); color: white; }

/* --- NUEVO ESTILO PARA EL BOTÓN DE ENTRAR --- */
.login-link {
    /* Posicionamiento y Espaciado */
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Espacio para un icono si lo pones */
    padding: 0.6rem 1.4rem;
    margin-right: 0.8rem;
    
    /* Tipografía */
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    
    /* El "Cristal" (Glassmorphism) */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px; /* Bordes totalmente redondeados */
    
    /* Transiciones suaves */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden; /* Para el efecto de brillo */
    z-index: 1;
}

/* Efecto de Brillo (Glow) al pasar el ratón */
.login-link:hover {
    color: #0f172a; /* Texto oscuro para que contraste */
    background: white; /* Fondo blanco puro */
    border-color: white;
    transform: translateY(-3px) scale(1.03); /* Sube un poco y crece */
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3), 0 0 15px rgba(45, 212, 191, 0.3); /* Doble brillo azul/fucsia */
}

/* Efecto de pulsado */
.login-link:active {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 5px 10px rgba(56, 189, 248, 0.2);
}

/* El "rayo" de brillo que cruza el botón */
.login-link::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.6s ease;
}

.login-link:hover::after {
    left: 100%;
}