/* ==========================================
   1. VARIABLES GLOBALES (SaaS / QClay Style)
   ========================================== */
/* ==========================================
   1. VARIABLES GLOBALES Y MODO OSCURO
   ========================================== */
:root {
    --c-bg-main: #FFFFFF;
    --c-bg-cream: #FDFBF7;
    --c-pastel-blue: #EFF6FF;
    --c-navy: #0F172A;
    --c-accent: #454ce2; /* TU NUEVO AZUL CALORCITO */
    --c-text-main: #1E293B;
    --c-text-light: #64748B;
    --c-border: rgba(15, 23, 42, 0.06);
    --font-main: 'Poppins', sans-serif;
    --radius-sm: 16px; --radius-md: 24px; --radius-lg: 32px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-float: 0 20px 40px -10px rgba(15, 23, 42, 0.08);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 🌙 MOTOR DE MODO OSCURO */
body.dark-theme {
    --c-bg-main: #0B1120; /* Azul noche profundísimo */
    --c-bg-cream: #151E32;
    --c-pastel-blue: #1E293B;
    --c-navy: #FFFFFF; 
    --c-text-main: #F8FAFC;
    --c-text-light: #94A3B8;
    --c-border: rgba(255, 255, 255, 0.1);
}

body { transition: background-color 0.4s ease, color 0.4s ease; }
body.dark-theme .bg-navy { background-color: var(--c-accent); color: #fff; }
body.dark-theme .bento-card.bg-white { background-color: var(--c-bg-cream); }
body.dark-theme .glass-nav.scrolled { background: rgba(11, 17, 32, 0.85); }
body.dark-theme .hero-img { filter: brightness(0.8); }

/* Controladores de Logos (Blindado) */
.logo-light { display: block !important; }
.logo-dark { display: none !important; }
body.dark-theme .logo-light { display: none !important; }
body.dark-theme .logo-dark { display: block !important; }

/* ==========================================
   2. RESET Y BASE
   ========================================== */
* {
    margin: 0; padding: 0; box-sizing: border-box;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    background-color: var(--c-bg-main);
    color: var(--c-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Bloquea el scroll hasta que cargue el preloader */
body.loading-locked { overflow: hidden; height: 100vh; }

a { text-decoration: none; color: inherit; }
li { list-style: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 5%; }
.section-padding { padding: 140px 0; }

.bg-cream { background-color: var(--c-bg-cream); }
.bg-pastel-blue { background-color: var(--c-pastel-blue); }
.bg-white { background-color: var(--c-bg-main); }
.bg-navy { background-color: var(--c-navy); color: var(--c-bg-main); }

/* ==========================================
   3. PRELOADER MAMALÓN
   ========================================== */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 99999; display: flex; justify-content: center; align-items: center;
    background: transparent; pointer-events: none;
}

.preloader-curtain {
    position: absolute; top: 0; height: 100%; width: 50vw;
    background-color: var(--c-navy);
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}
.preloader-curtain.left { left: 0; transform-origin: left; }
.preloader-curtain.right { right: 0; transform-origin: right; }

/* Clases que inyecta JS al 100% */
body.loaded .preloader-curtain { transform: scaleX(0); }
body.loaded #preloader { visibility: hidden; transition: visibility 0s 1.2s; }

.preloader-content {
    position: relative; z-index: 2; display: flex; flex-direction: column;
    align-items: center; gap: 32px; transition: opacity 0.4s ease;
}
body.loaded .preloader-content { opacity: 0; }

.logo-glare-wrap { position: relative; overflow: hidden; padding: 10px; }
.preloader-logo { width: 220px; filter: brightness(0) invert(1); }

.glare-effect {
    position: absolute; top: 0; left: 0; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-20deg) translateX(-200%); 
    animation: glare 2s infinite ease-in-out;
    will-change: transform; /* Esto avisa a la tarjeta gráfica que procese la animación */
}
@keyframes glare { 100% { transform: skewX(-20deg) translateX(400%); } }


.loading-bar-container { width: 260px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden; }
.loading-bar { height: 100%; width: 0%; background: var(--c-bg-main); transition: width 0.2s ease; }

.loading-data { 
    width: 100%; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; gap: 8px; 
    color: rgba(255,255,255,0.9); font-size: 1rem; 
    font-weight: 500; letter-spacing: 0.5px; text-align: center; 
}

/* ==========================================
   4. NAVBAR (GLASSMORPHISM)
   ========================================== */
.glass-nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 24px 0; transition: all 0.4s ease;
}
.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--c-border);
    padding: 16px 0; box-shadow: var(--shadow-soft);
}

.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.brand img { height: 45px; transition: transform 0.3s; }
.brand:hover img { transform: scale(1.05); }

.nav-links { display: flex; gap: 40px; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--c-text-main); transition: color 0.3s; position: relative; }
.nav-links a:hover { color: var(--c-accent); }

/* Botones */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px; border-radius: 50px; font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); border: none;
}
.btn-primary { background: var(--c-navy); color: var(--c-bg-main); box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2); }
.btn-primary:hover { background: var(--c-accent); transform: translateY(-3px); box-shadow: var(--shadow-float); }

.btn-outline { background: transparent; color: var(--c-navy); border: 1.5px solid var(--c-border); }
.btn-outline:hover { border-color: var(--c-navy); background: rgba(15, 23, 42, 0.02); }

.btn-large { padding: 18px 36px; font-size: 1.05rem; }

/* ==========================================
   5. HERO & TIPOGRAFÍA GIGANTE
   ========================================== */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 140px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }

.pill-badge {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--c-pastel-blue); color: var(--c-accent);
    padding: 8px 20px; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 24px; border: 1px solid rgba(37, 99, 235, 0.1);
}
.pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); animation: pulseDot 2s infinite;
}
@keyframes pulseDot { 70% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }

.giant-heading {
    font-size: clamp(3rem, 5vw, 5rem); line-height: 1.05; letter-spacing: -0.03em;
    color: var(--c-navy); font-weight: 800; margin-bottom: 24px;
}
.text-glow { color: var(--c-accent); position: relative; text-shadow: 0 0 40px rgba(37, 99, 235, 0.2); }

.hero-desc { font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--c-text-light); margin-bottom: 40px; max-width: 90%; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero Visual (Fotos y Cartas) */
.hero-visual { position: relative; }
.image-mask { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow-float); }
.hero-img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 10s ease-out; }
.hero-visual:hover .hero-img { transform: scale(1); }

.floating-card {
    position: absolute; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px);
    padding: 16px 24px; border-radius: var(--radius-md); display: flex; align-items: center; gap: 16px;
    box-shadow: var(--shadow-float); border: 1px solid rgba(255,255,255,0.4); z-index: 2;
}
.top-right { top: 60px; right: -40px; }
.bottom-left { bottom: 80px; left: -40px; }

.icon-box { width: 50px; height: 50px; border-radius: 14px; background: var(--c-pastel-blue); color: var(--c-accent); display: flex; justify-content: center; align-items: center; font-size: 1.3rem; }
.icon-box.dark { background: var(--c-navy); color: var(--c-bg-main); }
.card-info strong { display: block; font-size: 0.95rem; color: var(--c-navy); }
.card-info span { font-size: 0.8rem; color: var(--c-text-light); }

.float-anim-1 { animation: floatY 6s ease-in-out infinite; }
.float-anim-2 { animation: floatY 8s ease-in-out infinite reverse; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* ==========================================
   6. BENTO BOX GRID (Especialidades)
   ========================================== */
.section-title { margin-bottom: 60px; max-width: 650px; }
.section-title h2 { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 16px; }
.section-title p { color: var(--c-text-light); font-size: 1.1rem; }

.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(320px, auto); gap: 24px; }

.bento-card {
    border-radius: var(--radius-lg); padding: 40px; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: flex-end;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid var(--c-border); box-shadow: var(--shadow-soft);
}
.bento-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-float); }

/* Lógica de columnas Grid */
.bento-large { grid-column: span 8; }
.bento-card:not(.bento-large):not(.bento-wide) { grid-column: span 4; }
.bento-wide { grid-column: span 8; } 

.bento-icon { font-size: 2.5rem; margin-bottom: 24px; color: var(--c-navy); }
.accent-blue { color: var(--c-accent); }
.glow-white { color: var(--c-bg-main); text-shadow: 0 0 20px rgba(255,255,255,0.4); }

.bento-card h3 { font-size: 1.6rem; margin-bottom: 12px; font-weight: 700; position: relative; z-index: 2; }
.bento-large h3 { font-size: 2.2rem; }
.bg-navy h3 { color: var(--c-bg-main); }
.bento-card p { color: var(--c-text-light); font-size: 1rem; position: relative; z-index: 2; }
.bg-navy p { color: rgba(255,255,255,0.8); }

.bento-large .bento-content { width: 55%; position: relative; z-index: 2; }
.bento-img-bg {
    position: absolute; right: 0; top: 0; width: 50%; height: 100%;
    background-size: cover; background-position: center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
    mask-image: linear-gradient(to right, transparent 0%, black 40%);
    transition: transform 0.8s ease;
}
.bento-card:hover .bento-img-bg { transform: scale(1.05); }

.flex-row { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.text-wrap { max-width: 65%; }

.bento-glow-bg {
    position: absolute; top: -50%; right: -10%; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, transparent 70%); border-radius: 50%; z-index: 1; pointer-events: none;
}

.btn-circle {
    width: 65px; height: 65px; background: var(--c-bg-main); color: var(--c-navy); border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-size: 1.5rem; transition: var(--transition);
}
.bento-card:hover .btn-circle { transform: scale(1.1) rotate(-45deg); background: var(--c-accent); color: var(--c-bg-main); }

/* ==========================================
   7. SECCIÓN DEL EQUIPO
   ========================================== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }

.team-member {
    background: var(--c-bg-main); border-radius: var(--radius-md); padding: 24px; text-align: center;
    border: 1px solid var(--c-border); transition: all 0.4s ease; box-shadow: var(--shadow-soft);
}
.team-member:hover { box-shadow: var(--shadow-float); transform: translateY(-8px); border-color: rgba(37, 99, 235, 0.2); }

.member-img { width: 100%; aspect-ratio: 1/1; border-radius: 20px; overflow: hidden; margin-bottom: 24px; background: var(--c-pastel-blue); }
.member-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: all 0.5s ease; }
.team-member:hover .member-img img { filter: grayscale(0%); transform: scale(1.05); }

.member-info h4 { font-size: 1.2rem; color: var(--c-navy); margin-bottom: 4px; }
.member-info .role { display: block; color: var(--c-accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.member-info p { font-size: 0.85rem; color: var(--c-text-light); }

/* ==========================================
   8. FOOTER
   ========================================== */
.footer { background: var(--c-navy); color: var(--c-bg-main); padding: 100px 0 40px; border-top-left-radius: 40px; border-top-right-radius: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 2fr; gap: 60px; margin-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 60px; }

.footer-logo { height: 45px; filter: brightness(0) invert(1); margin-bottom: 24px; }
.slogan-footer { color: rgba(255,255,255,0.7); font-size: 1.1rem; font-style: italic; margin-bottom: 24px; max-width: 350px; }

.social-links { display: flex; gap: 16px; }
.social-icon { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.05); display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; }
.social-icon:hover { background: var(--c-accent); transform: translateY(-4px); }

.footer-contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.contact-item { display: flex; gap: 16px; }
.contact-item .icon { color: var(--c-accent); font-size: 1.4rem; }
.contact-item .text strong { display: block; margin-bottom: 4px; font-weight: 500; font-size: 1.05rem; }
.contact-item .text span, .contact-item .text a { display: block; color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: color 0.3s; }
.contact-item .text a:hover { color: var(--c-bg-main); }

.footer-bottom { text-align: center; color: rgba(255,255,255,0.4); font-size: 0.85rem; }

/* ==========================================
   9. ANIMACIONES DE SCROLL (STEPPED REVEAL)
   ========================================== */
.reveal-step {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
    will-change: opacity, transform;
}
.reveal-step.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* ==========================================
   10. INTERFAZ CHATBOT (LEXBOT AI)
   ========================================== */
.chat-tooltip {
    position: fixed; bottom: 100px; right: 30px; background: var(--c-bg-main); color: var(--c-navy);
    padding: 16px 20px; border-radius: 20px 20px 0 20px; box-shadow: var(--shadow-float);
    font-size: 0.9rem; font-weight: 500; max-width: 260px; z-index: 1999; cursor: pointer;
    opacity: 0; transform: translateY(20px); pointer-events: none; transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--c-border);
}
.chat-tooltip.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

.chatbot-wrapper {
    position: fixed; bottom: 30px; right: 30px; width: 380px; height: 600px; max-height: 85vh;
    z-index: 2000; opacity: 0; pointer-events: none; transform: translateY(40px) scale(0.95);
    transform-origin: bottom right; transition: all 0.4s var(--transition-smooth);
}
.chatbot-wrapper.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chatbot-container {
    width: 100%; height: 100%; background: var(--c-bg-main); border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(15,23,42,0.25); display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid var(--c-border);
}

.chat-header {
    background: var(--c-navy); color: var(--c-bg-main); padding: 20px;
    display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.header-info { display: flex; align-items: center; gap: 12px; }
.status-dot { width: 10px; height: 10px; background: #10B981; border-radius: 50%; box-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }
.bot-name { display: block; font-weight: 600; font-size: 1.05rem; }
.bot-status { font-size: 0.75rem; color: #94A3B8; }
.close-chat-btn { background: none; border: none; color: var(--c-bg-main); font-size: 1.2rem; cursor: pointer; }

.chat-body {
    flex: 1; padding: 20px; overflow-y: auto; background: var(--c-bg-cream);
    display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }

.bot-msg, .user-msg {
    max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 0.9rem; line-height: 1.4;
    animation: popIn 0.3s var(--transition-smooth) forwards;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.bot-msg { background: var(--c-bg-main); color: var(--c-text-main); border-bottom-left-radius: 4px; box-shadow: var(--shadow-soft); border: 1px solid var(--c-border); }
.user-msg { background: var(--c-accent); color: var(--c-bg-main); border-bottom-right-radius: 4px; align-self: flex-end; }

.quick-replies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; animation: popIn 0.4s ease forwards; }
.quick-reply-btn {
    background: transparent; color: var(--c-accent); border: 1px solid var(--c-accent);
    padding: 8px 16px; border-radius: 50px; font-size: 0.85rem; font-family: inherit; font-weight: 500;
    cursor: pointer; transition: all 0.2s ease;
}
.quick-reply-btn:hover { background: var(--c-accent); color: var(--c-bg-main); transform: translateX(3px); }

.typing-indicator { display: flex; gap: 4px; padding: 12px 16px; background: var(--c-bg-main); border-radius: 18px; border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: var(--shadow-soft); border: 1px solid var(--c-border); }
.typing-indicator span { width: 6px; height: 6px; background: #94A3B8; border-radius: 50%; animation: typeBlink 1.4s infinite both; }
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
@keyframes typeBlink { 0%, 80%, 100% { transform: scale(0); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

.chat-input { padding: 16px; background: var(--c-bg-main); border-top: 1px solid var(--c-border); display: flex; gap: 10px; }
.chat-input input {
    flex: 1; border: 1px solid var(--c-border); background: var(--c-bg-cream);
    padding: 12px 16px; border-radius: 50px; outline: none; font-family: inherit; font-size: 0.95rem; transition: border-color 0.3s;
}
.chat-input input:focus { border-color: var(--c-accent); }
.chat-input button {
    width: 45px; height: 45px; border-radius: 50%; background: var(--c-accent); color: var(--c-bg-main);
    border: none; cursor: pointer; transition: transform 0.2s; display: flex; justify-content: center; align-items: center; font-size: 1.2rem;
}
.chat-input button:hover { transform: scale(1.05); }

/* ==========================================
   11. DISEÑO RESPONSIVO (Tablets y Móviles)
   ========================================== */
@media (max-width: 1024px) {
    .bento-large, .bento-wide { grid-column: span 12; }
    .bento-large { flex-direction: column; align-items: flex-start; }
    .bento-large .bento-content { width: 100%; padding-bottom: 220px; }
    .bento-img-bg { width: 100%; height: 250px; top: auto; bottom: 0; mask-image: linear-gradient(to top, transparent 0%, black 50%); -webkit-mask-image: linear-gradient(to top, transparent 0%, black 50%); }
    .bento-card:not(.bento-large):not(.bento-wide) { grid-column: span 6; }
    
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-cta { justify-content: center; }
    .hero-visual { margin-top: 40px; }
    .floating-card.top-right { right: 0; }
    .floating-card.bottom-left { left: 0; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .giant-heading { font-size: 2.8rem; }
    .section-padding { padding: 80px 0; }
    
    .bento-card:not(.bento-large):not(.bento-wide) { grid-column: span 12; }
    .flex-row { flex-direction: column; text-align: center; gap: 20px; }
    .text-wrap { max-width: 100%; }
    
    .footer-contact { grid-template-columns: 1fr; }
    
    /* LEXBOT NATIVO: BOTTOM SHEET EN MÓVILES */
    .chat-tooltip { bottom: 90px; right: 20px; left: 20px; text-align: center; max-width: 100%; border-radius: 16px; }
    .chatbot-wrapper { width: 100%; height: 85vh; bottom: 0; right: 0; border-radius: 24px 24px 0 0; transform: translateY(100%); }
    .chatbot-container { border-radius: 24px 24px 0 0; border: none; }
    
    /* FIX NAVBAR CELULAR */
    .nav-wrapper { display: flex; justify-content: space-between; gap: 8px; }
    .brand img { height: 35px !important; } /* Logo un poco más compacto */
    #theme-toggle { width: 38px !important; height: 38px !important; font-size: 1rem !important; }
}

/* ==========================================
   MODIFICACIONES QUIRÚRGICAS Y NUEVAS SECCIONES
   ========================================== */

/* 1. Salvar las cabezas de los abogados (Sobreescribe la existente) */
.member-img img { object-position: top center !important; }

/* 2. Arreglar el preloader trabado en celular (Uso de dvh) */
body.loading-locked, #preloader { height: 100dvh !important; }

/* 3. Estilos del Marquee Animado (El toque Perrón) */
.bg-accent { background-color: var(--c-accent); }
.text-white { color: var(--c-bg-main); }
.marquee-container {
    overflow: hidden; padding: 18px 0; display: flex;
    box-shadow: var(--shadow-soft); border-top: 1px solid rgba(255,255,255,0.1); 
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.marquee-content {
    display: flex; gap: 40px; align-items: center; white-space: nowrap;
    animation: scroll-marquee 20s linear infinite; font-weight: 800; font-size: 1.1rem; letter-spacing: 1px;
}
.marquee-content i { color: #FDE047; }
@keyframes scroll-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* 4. Estilos del Acordeón FAQ */
.faq-accordion { max-width: 850px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.faq-item {
    background: var(--c-bg-main); border: 1px solid var(--c-border);
    border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-item:hover { transform: translateX(8px); border-color: rgba(37, 99, 235, 0.3); box-shadow: var(--shadow-float); }

.faq-question {
    width: 100%; text-align: left; padding: 24px; background: transparent; border: none;
    font-size: 1.05rem; font-weight: 600; color: var(--c-navy); cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; font-family: inherit;
    transition: color 0.3s;
}
.faq-question span { max-width: 85%; line-height: 1.4; }
.faq-icon {
    width: 40px; height: 40px; border-radius: 50%; background: var(--c-pastel-blue); min-width: 40px;
    color: var(--c-accent); display: flex; justify-content: center; align-items: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); font-size: 1.2rem;
}
.faq-item.active .faq-question { color: var(--c-accent); }
.faq-item.active .faq-icon { transform: rotate(135deg); background: var(--c-accent); color: var(--c-bg-main); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.answer-content { padding: 0 24px 24px; color: var(--c-text-light); font-size: 0.95rem; line-height: 1.7; }
.answer-content strong { color: var(--c-navy); }
.faq-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.faq-actions .btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* 5. FIXES PARA CELULAR (El botón circular de Whatsapp) */
@media (max-width: 768px) {
    .nav-cta { 
        font-size: 0 !important; width: 45px !important; height: 45px !important; 
        padding: 0 !important; justify-content: center !important; border-radius: 50% !important; 
    }
    .nav-cta i { font-size: 1.5rem; margin: 0; }
}

/* --- UI ANIMADA LEXY Y MINIMIZAR --- */
.lexy-avatar-wrap { position: relative; width: 45px; height: 45px; display: inline-block; }
.lexy-avatar { 
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #FFF;
    border: 2px solid var(--c-accent); animation: lexyBreathe 2s infinite ease-in-out; 
}
@keyframes lexyBreathe { 
    0%, 100% { box-shadow: 0 0 10px rgba(69, 76, 226, 0.4); transform: scale(1); } 
    50% { box-shadow: 0 0 20px rgba(69, 76, 226, 0.8); transform: scale(1.05); } 
}
.chat-controls { display: flex; gap: 15px; align-items: center; }
.chat-controls button { background: none; border: none; color: var(--c-bg-main); font-size: 1.2rem; cursor: pointer; transition: transform 0.2s; }
.chat-controls button:hover { transform: scale(1.2); }

#chatbot-wrapper.minimized { height: 75px !important; transform: translateY(0) scale(1) !important; overflow: hidden; border-radius: 24px; cursor: pointer; }
#chatbot-wrapper.minimized .chat-body, #chatbot-wrapper.minimized .chat-input, #chatbot-wrapper.minimized .typing-indicator { display: none !important; }


/* ==========================================
   🚀 FIXES DEFINITIVOS Y MODAL CV (100/100)
   ========================================== */

/* 1. Aceleración por Hardware (Adiós crasheos en móvil) */
.glass-nav, .floating-card, .bento-card, .chatbot-wrapper { transform: translateZ(0); will-change: transform, opacity; }

/* Barra de carga por GPU */
.loading-bar { width: 100% !important; background: var(--c-bg-main); transform-origin: left; transform: scaleX(0); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }

/* Punto palpitante CPU-Safe */
.pulse-dot { box-shadow: none !important; animation: none !important; position: relative; overflow: visible; }
.pulse-dot::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--c-accent); animation: pulseSafe 2s infinite ease-out; }
@keyframes pulseSafe { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(3.5); opacity: 0; } }

/* Brillo del preloader GPU-Safe */
.glare-effect { transform: skewX(-20deg) translateX(-150%) !important; left: auto !important; animation: glare 2s infinite ease-in-out !important; will-change: transform; }
@keyframes glare { 100% { transform: skewX(-20deg) translateX(300%); } }

/* LexyBot CPU-Safe + Radar */
.lexy-avatar { box-shadow: none !important; animation: none !important; border: 2px solid var(--c-accent); object-fit: cover !important; position: relative; z-index: 2; padding: 4px !important; background: #FFFFFF !important; }
.lexy-avatar-wrap { filter: drop-shadow(0 10px 15px rgba(69, 76, 226, 0.3)); animation: floatBotSafe 3s infinite ease-in-out !important; will-change: transform; }
@keyframes floatBotSafe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.lexy-avatar-wrap::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, var(--c-accent), transparent 60%); animation: radarSpin 3s linear infinite; z-index: 0; }
@keyframes radarSpin { 100% { transform: rotate(360deg); } }

/* Rebote de LexyBot al abrir */
.chatbot-wrapper.active { animation: botBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important; transform-origin: bottom right; }
@keyframes botBounceIn { 0% { transform: translateY(100px) scale(0.8); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }

/* 2. Reparación Definitiva del Contraste del Footer */
.footer-bottom p, .slogan-footer { color: rgba(255,255,255,0.85); }
.contact-item .text span, .contact-item .text a { color: rgba(255,255,255,0.9); }
body.dark-theme .footer { background-color: #060B14 !important; border-top: 1px solid rgba(255,255,255,0.05); color: #F8FAFC !important; }
body.dark-theme .footer * { color: inherit; }
body.dark-theme .footer .slogan-footer, body.dark-theme .footer .footer-bottom p, body.dark-theme .footer .contact-item .text span { color: #94A3B8 !important; }
body.dark-theme .footer .contact-item .text strong { color: #FFFFFF !important; }
body.dark-theme .footer .social-icon { background: rgba(255,255,255,0.05) !important; color: #FFFFFF !important; }
body.dark-theme .footer .social-icon:hover { background: var(--c-accent) !important; color: #FFFFFF !important;}
body.dark-theme .footer .footer-logo { filter: brightness(0) invert(1) !important; }
body.dark-theme .footer .icon { color: var(--c-accent) !important; }

/* Reducir carga gráfica en móviles */
@media (max-width: 768px) {
    .glass-nav.scrolled, .floating-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
    .glass-nav.scrolled { background: rgba(255, 255, 255, 0.98) !important; }
    body.dark-theme .glass-nav.scrolled { background: rgba(11, 17, 32, 0.98) !important; }
    .floating-card { background: rgba(255, 255, 255, 0.98) !important; }
    body.dark-theme .floating-card { background: rgba(15, 23, 42, 0.98) !important; }
}

/* 3. Estilos del Modal CV */
.member-img:hover .cv-overlay { opacity: 1; }
.cv-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: all 0.3s ease; }
.cv-modal.active { opacity: 1; pointer-events: auto; }
.cv-content { background: var(--c-bg-main); width: 90%; max-width: 480px; border-radius: var(--radius-md); padding: 32px; position: relative; transform: translateY(30px); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow-float); max-height: 85vh; overflow-y: auto; border: 1px solid var(--c-border); text-align: left; }
.cv-modal.active .cv-content { transform: translateY(0); }
.cv-close { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 1.5rem; color: var(--c-text-light); cursor: pointer; transition: transform 0.2s; }
.cv-close:hover { color: var(--c-accent); transform: scale(1.1) rotate(90deg); }
.cv-header { display: flex; gap: 20px; align-items: center; border-bottom: 1px solid var(--c-border); padding-bottom: 24px; margin-bottom: 20px; text-align: left; }
.cv-header img { width: 85px; height: 85px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c-pastel-blue); }
.cv-header h3 { color: var(--c-navy); font-size: 1.35rem; line-height: 1.2; margin-bottom: 6px; }
.cv-header .role { color: var(--c-accent); font-weight: 600; font-size: 0.9rem; background: var(--c-pastel-blue); padding: 4px 12px; border-radius: 20px; }
body.dark-theme .cv-content { border-color: rgba(255,255,255,0.1); }
body.dark-theme .cv-header h3, body.dark-theme .cv-body h4 { color: #fff; }