/* Variables de Color Premium */
:root {
    --primary: #4f46e5;       /* Índigo Tecnológico */
    --primary-light: #e0e7ff; /* Tono suave de fondo */
    --accent: #10b981;        /* Verde Esmeralda de Conversión */
    --dark: #0f172a;          /* Slate 900 (Negro azulado elegante) */
    --text-muted: #64748b;    /* Slate 500 */
    --bg-light: #f8fafc;      /* Fondo ultra limpio */
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background-color: #fff;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

section {
    padding: 90px 0;
}

/* Botones Premium */
.btn-premium {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.btn-premium:hover {
    background-color: #4338ca;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}
.btn-accent {
    background-color: var(--accent);
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
}
.btn-accent:hover {
    background-color: #059669;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}
.btn-outline-custom {
    border: 2px solid var(--dark);
    color: var(--dark);
    font-weight: 500;
    padding: 11px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.btn-outline-custom:hover {
    background-color: var(--dark);
    color: white;
    transform: translateY(-2px);
}

/* Navbar Efecto Cristal (Glassmorphism) */
.navbar {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--dark) !important;
    letter-spacing: -0.5px;
}
.navbar-brand span {
    color: var(--primary);
}
.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    margin: 0 5px;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--primary) !important;
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at 90% 10%, rgba(224, 231, 255, 0.5) 0%, rgba(255,255,255,1) 70%);
    padding: 53px 0 53px;
}
.hero-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
}
.hero-title {
    font-size: 3.8rem;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--dark);
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.hero-img-container img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.12));
    animation: float 5s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Portafolio Moderno */
.portfolio-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    background: #fff;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}
.portfolio-img-wrapper {
    position: relative;
    overflow: hidden;
}
.portfolio-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-card:hover img {
    transform: scale(1.06);
}
.portfolio-info {
    padding: 24px;
}

/* Tarjetas de Precios Avanzadas */
.pricing-section {
    background-color: var(--bg-light);
}
.card-pricing {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 40px 30px;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.card-pricing:hover {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}
.card-pricing.popular {
    border: 2px solid var(--primary);
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.12);
}
.popular-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    padding: 6px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
.price {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}
.feature-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}
.feature-list li {
    margin-bottom: 14px;
    font-size: 0.95rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 10px;
}
.feature-list i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* Sección Beneficios con Iconos Estilizados */
.benefit-box {
    padding: 30px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: #fff;
}
.benefit-box:hover {
    background: var(--bg-light);
}
.icon-container {
    width: 70px;
    height: 70px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 22px;
    transition: all 0.3s ease;
}
.benefit-box:hover .icon-container {
    background-color: var(--primary);
    color: white;
    transform: scale(1.05) rotate(5deg);
}

/* FAQ Estilizado */
.accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 16px !important;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}
.accordion-button {
    font-weight: 600;
    color: var(--dark);
    padding: 20px;
}
.accordion-button:not(.collapsed) {
    background-color: var(--primary-light);
    color: var(--primary);
    box-shadow: none;
}

/* WhatsApp Flotante */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 34px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
    color: #fff;
}

/* --- ESTILOS EXCLUSIVOS DEL FOOTER --- */
footer {
    background-color: var(--dark) !important;
    color: #e2e8f0 !important; /* Texto principal en gris plata muy claro */
}
footer h2, footer h3, footer h5 {
    color: #ffffff !important; /* Títulos en blanco brillante */
}
.footer-text-secondary {
    color: #94a3b8 !important; /* Gris intermedio de excelente legibilidad */
}
footer hr, footer .border-secondary {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-section {
        text-align: center;
        padding: 120px 0 70px;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-img-container {
        margin-top: 50px;
    }
    section {
        padding: 70px 0;
    }
}

/* ==========================================================================
   NUEVAS INTERACCIONES: MÁQUINA DE ESCRIBIR Y MODO OSCURO
   ========================================================================== */

/* Cursor de la máquina de escribir */
.typing-cursor {
    animation: blink 0.8s infinite;
    font-weight: 300;
    color: var(--primary);
    margin-left: 4px;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   BOTÓN DE MODO OSCURO FLOTANTE (CORREGIDO PARA MÓVILES)
   ========================================================================== */

.theme-toggle-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    left: 40px;
    background-color: var(--dark);
    color: #ffffff;
    border-radius: 50%;
    text-align: center;
    font-size: 26px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.3);
    z-index: 2000; /* <--- AUMENTADO a 2000 para forzarlo a estar siempre al frente */
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto; /* <--- Garantiza que el elemento responda a los toques */
}

.theme-toggle-float:hover {
    transform: scale(1.1);
}

/* Ajuste de color del botón en modo oscuro */
body.dark-mode .theme-toggle-float {
    background-color: #ffffff !important;
    color: var(--dark) !important;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

/* Ajuste del botón de WhatsApp para mantener simetría */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 34px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 2000; /* <--- AUMENTADO a 2000 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* RESPONSIVO MÓVIL OPTIMIZADO */
@media (max-width: 768px) {
    .theme-toggle-float {
        width: 55px;
        height: 55px;
        bottom: 30px; /* Subido un poco para evitar la barra nativa del celular */
        left: 20px;
        font-size: 22px;
    }
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 30px; /* Subido para alinearse con el modo oscuro */
        right: 20px;
        font-size: 28px;
    }
}

/* --- ESTILOS REGLAS MODO OSCURO (ESTILO PREMIUM SLATE) --- */
body.dark-mode {
    background-color: #0f172a;
    color: #f8fafc;
}

body.dark-mode .bg-white,
body.dark-mode .navbar,
body.dark-mode .portfolio-card,
body.dark-mode .card-pricing,
body.dark-mode .benefit-box,
body.dark-mode .accordion-item {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .bg-light,
body.dark-mode .pricing-section,
body.dark-mode .accordion-button:not(.collapsed) {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

body.dark-mode .navbar-brand,
body.dark-mode .nav-link,
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6,
body.dark-mode .accordion-button {
    color: #f8fafc !important;
}

body.dark-mode .text-muted, 
body.dark-mode .price-iva, 
body.dark-mode .feature-list li {
    color: #94a3b8 !important;
}

body.dark-mode .hero-section {
    background: radial-gradient(circle at 90% 10%, rgba(79, 70, 229, 0.15) 0%, #0f172a 70%) !important;
}

body.dark-mode .btn-outline-custom {
    border-color: #f8fafc !important;
    color: #f8fafc !important;
}

body.dark-mode .btn-outline-custom:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

body.dark-mode .accordion-button::after {
    filter: invert(1); /* Invierte las flechas del acordeón para que se vean blancas */
}

/* ==========================================================================
   CORRECCIÓN DEL MENÚ MÓVIL (HAMBURGUESA) EN MODO OSCURO
   ========================================================================== */

body.dark-mode .navbar-toggler-icon {
    /* Invierte el color del SVG de Bootstrap (de gris oscuro a blanco brillante) */
    filter: invert(1) !important; 
}

/* Opcional: Si quieres que el botón tenga un ligero destello al tocarlo en móviles */
body.dark-mode .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1) !important;
}

/* ==========================================================================
   CORRECCIONES DE CONTRASTE EN MODO OSCURO (PRECIOS Y FAQ)
   ========================================================================== */

/* Fuerza a los precios con clase 'text-dark' a volverse blancos en modo oscuro */
body.dark-mode .price.text-dark {
    color: #ffffff !important;
}

/* Corrige el fondo y el texto del contenido de las preguntas frecuentes */
body.dark-mode .accordion-body {
    background-color: #1e293b !important; /* Fondo slate oscuro */
    color: #e2e8f0 !important;           /* Texto gris claro ultra legible */
}

/* Asegura que el botón de la pregunta cuando está cerrado también se vea bien */
body.dark-mode .accordion-button.collapsed {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}