/* Variables CSS para temas */
:root {
    /* Colores Modo Claro - MEJORADO */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    
    /* Colores de Marca L-KTRON */
    --primary: #e49e24;
    --primary-dark: #d18d1f;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --electric: #e49e24;
    --electric-glow: rgba(228, 158, 36, 0.3);
    
    /* Gradientes eléctricos */
    --gradient-primary: linear-gradient(135deg, #e49e24 0%, #f4a261 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-electric: linear-gradient(135deg, #e49e24 0%, #f4a261 50%, #e76f51 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Tipografía */
    --font-family: 'Inter', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Bordes */
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    
    /* Transiciones */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

/* Modo Oscuro */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* FIXES PARA MOBILE - Agregar al final de styles.css */

/* Prevenir overflow horizontal */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Contenedor principal responsive */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    box-sizing: border-box;
}

/* Fix específico para el hero section */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding: 0;
        margin: 0;
        width: 100vw;
        position: relative;
        overflow: hidden;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 0 var(--spacing-md);
        box-sizing: border-box;
        margin: 0;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
        word-break: break-word;
    }
    
    .hero-description {
        font-size: var(--font-size-base);
        line-height: 1.6;
    }
    
    /* Asegurar que las partículas no causen scroll */
    .particles {
        position: absolute;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .hero-background {
        width: 100vw;
        height: 200vh;
        overflow: hidden;
        position: absolute;
        top: 0;
        left: 0;
    }
    
    /* Fix para elementos que pueden causar overflow */
    .hero-stats,
    .hero-buttons {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Prevenir elementos que se salgan de pantalla */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Fix adicional para prevenir zoom en inputs */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
        transform: none !important;
    }
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== SCROLL PROGRESS INDICATOR ===== */
.scroll-progress-left {
    position: fixed;
    left: 20px;
    bottom: 120px;
    z-index: 998;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 50%;
    border: 2px solid var(--electric, #e49e24);
    box-shadow: 0 8px 25px rgba(228, 158, 36, 0.2);
    cursor: pointer;
    overflow: visible;
}

[data-theme="dark"] .scroll-progress-left {
    background: rgba(15, 23, 42, 0.95);
}

.scroll-progress-left.visible {
    opacity: 1;
    transform: scale(1);
    animation: atomVisible 0.6s ease-out;
}

@keyframes atomVisible {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.scroll-progress-left:hover {
    transform: scale(1.15);
    box-shadow: 0 15px 35px rgba(228, 158, 36, 0.4);
}

/* SVG del átomo mejorado */
.progress-electron {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(228, 158, 36, 0.6));
    transition: all 0.3s ease;
}

.scroll-progress-left:hover .progress-electron {
    filter: drop-shadow(0 0 20px rgba(228, 158, 36, 0.8));
    transform: scale(1.1);
}

/* Porcentaje */
.progress-percentage {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--electric, #e49e24);
    background: linear-gradient(45deg, #e49e24, #f4a261);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== LOGO STYLES - MODO OSCURO Y CLARO ===== */
.logo-img {
    height: 40px;
    width: auto;
    max-width: 150px;
    transition: opacity 0.3s ease;
}

/* Logo por defecto - Modo Oscuro */
.logo-img {
    content: url('../img/LOGO-1000X1000-LKTRON-ORIGINAL-HORIZONTAL.png');
}

/* Logo para Modo Claro */
[data-theme="light"] .logo-img {
    content: url('../img/LOGO-1000X1000-LKTRON-NEGRO-HORIZONTAL.png');
}

/* Footer Logo Styles */
.footer-logo-img {
    height: 40px;
    width: auto;
    max-width: 150px;
    transition: opacity 0.3s ease;
}

/* Footer Logo por defecto - Modo Oscuro */
.footer-logo-img {
    content: url('../img/LOGO-1000X1000-LKTRON-ORIGINAL-HORIZONTAL.png');
    filter: brightness(1) invert(0);
}

/* Footer Logo para Modo Claro */
[data-theme="light"] .footer-logo-img {
    content: url('../img/LOGO-1000X1000-LKTRON-NEGRO-HORIZONTAL.png');
    filter: brightness(1) invert(0);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-electric);
    border-radius: 10px;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.gradient-text {
    background: var(--gradient-electric);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: electricGlow 2s ease-in-out infinite alternate;
}

@keyframes electricGlow {
    from { filter: brightness(1); }
    to { filter: brightness(1.2) drop-shadow(0 0 10px var(--electric-glow)); }
}

/* Botones - MEJORADOS PARA MOBILE */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: var(--font-size-base);
    min-height: 48px;
    text-align: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-electric);
    color: white;
    box-shadow: 0 4px 15px var(--electric-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--electric-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-accent);
    transform: translateY(-2px);
    border-color: var(--electric);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
}

.navbar {
    padding: var(--spacing-sm) 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.nav-logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--gradient-electric);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--electric);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-electric);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    padding: var(--spacing-xs);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-accent);
    transform: scale(1.1);
}

/* BOTÓN DE EMERGENCIA MEJORADO */
.emergency-btn {
    background: var(--gradient-danger);
    color: white;
    border: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    animation: pulse 2s infinite;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    font-size: var(--font-size-sm);
    min-width: 140px;
    justify-content: center;
    min-height: 40px;
    cursor: pointer;
}

/* MODO CLARO - Botón emergencia más visible */
[data-theme="light"] .emergency-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.5);
    border: 2px solid rgba(220, 38, 38, 0.3);
}

[data-theme="light"] .emergency-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.6);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.emergency-btn:hover {
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    padding: var(--spacing-xs);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: var(--spacing-2xl) 0;
    background: var(--bg-primary);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, var(--electric-glow) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(228, 158, 36, 0.1) 0%, transparent 50%);
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--electric), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(228, 158, 36, 0.479), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(16, 185, 129, 0.5), transparent);
    background-size: 150px 150px;
    animation: electricFlow 15s linear infinite;
}

@keyframes electricFlow {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-150px) rotate(360deg); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-2xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    animation: slideInLeft 1s ease-out;
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    animation: slideInLeft 1s ease-out;
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 10px;
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-subdescription {
    font-size: 14px;
    font-weight: 200;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    animation: slideInLeft 1s ease-out 0.4s both;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    animation: slideInRight 1s ease-out 0.6s both;
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(228, 158, 36, 0.2);
    transition: var(--transition);
}

.stat-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--electric-glow);
}

.stat-number {
    display: block;
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: var(--gradient-electric);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Services Section - MEJORADO PARA BOTONES DE IGUAL ALTURA */
.services {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-electric);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px var(--shadow);
    border-color: var(--electric);
}

.service-card[data-service="emergencias"]:hover {
    box-shadow: 0 25px 50px rgba(239, 68, 68, 0.3);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    display: block;
    animation: serviceIconFloat 3s ease-in-out infinite;
}

@keyframes serviceIconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.service-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.service-features {
    list-style: none;
    margin-bottom: var(--spacing-md);
    flex: 1;
}

.service-features li {
    padding: var(--spacing-xs) 0;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.service-card .service-btn {
    margin-top: auto;
}

.service-btn {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    width: 100%;
    min-height: 48px;
}

.service-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.service-btn.emergency-service {
    background: var(--gradient-danger);
    animation: emergencyBlink 1s ease-in-out infinite alternate;
}

@keyframes emergencyBlink {
    from { opacity: 1; }
    to { opacity: 0.8; }
}

/* Contact Section */
.contact {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
}

.contact-info h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.contact-icon {
    font-size: var(--font-size-xl);
    flex-shrink: 0;
    background: var(--gradient-electric);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-item h4 {
    font-size: var(--font-size-lg);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-form {
    background: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px var(--shadow);
}

/* ===== MEDIA QUERIES PARA MOBILE ===== */

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        justify-items: center; /* Centra el contenido del grid */
    }
    
    .contact-form {
        width: 100%;
        max-width: calc(100vw - 40px); /* Ancho completo menos márgenes */
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    /* Asegurar centrado del contenedor padre */
    .contact .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .contact-form {
        max-width: calc(100vw - 20px);
    }
    
    .contact .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
    min-height: 48px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--electric);
    box-shadow: 0 0 0 3px var(--electric-glow);
}

.form-status {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    text-align: center;
    display: none;
}

.form-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* Footer - MEJORADO PARA MOBILE */
.footer {
    background: var(--bg-primary);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.footer-section h3 {
    background: var(--gradient-electric);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo {
    margin-bottom: var(--spacing-md);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    /* padding: var(--spacing-xs) 0; */
}

.footer-section ul li a:hover {
    color: var(--electric);
    transform: translateX(5px);
}

/* Footer Mobile - MEJORADO */
.footer-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--spacing-sm);
}

.footer-toggle {
    font-size: var(--font-size-xl);
    color: var(--electric);
    transition: var(--transition);
    display: none;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(228, 158, 36, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-menu {
    max-height: none;
    overflow: visible;
    transition: all 0.3s ease;
}

/* Footer Desktop - OCULTAR TOGGLES */
@media (min-width: 769px) {
    .footer-toggle {
        display: none !important;
    }
    
    .footer-title {
        cursor: default;
        border-bottom: none;
        padding: 0;
        margin-bottom: var(--spacing-md);
    }
    
    .footer-menu {
        max-height: none !important;
        overflow: visible !important;
    }
}

.emergency-contact-btn {
    margin-top: var(--spacing-md);
    text-align: center;
}

.btn-emergency {
    display: inline-block;
    background: var(--gradient-danger);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: var(--transition);
    animation: pulse 2s infinite;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.btn-emergency:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* ===== REPOSICIONAMIENTO DE ICONOS FLOTANTES ===== */

/* WhatsApp Float Button - POSICIÓN MÁS ABAJO */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 999;
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* Chatbot Toggle - MOVIDO A LA IZQUIERDA */
.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-electric);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: var(--font-size-xl);
    box-shadow: 0 5px 15px var(--electric-glow);
    transition: var(--transition);
    z-index: 1000;
    cursor: pointer;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px var(--electric-glow);
}

/* Chatbot Container - POSICIÓN AJUSTADA PARA LA IZQUIERDA */
.chatbot-container {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 380px;
    height: 550px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px var(--shadow);
    z-index: 1000;
    display: none;
    flex-direction: column;
    border: 2px solid var(--electric);
    overflow: hidden;
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chatbot-container.active {
    display: flex;
}

.chatbot-header {
    background: var(--gradient-electric);
    color: white;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
}

.chatbot-info h4 {
    margin: 0;
    font-size: var(--font-size-base);
}

.chatbot-status {
    font-size: var(--font-size-sm);
    opacity: 0.8;
    animation: statusBlink 2s infinite;
}

@keyframes statusBlink {
    0%, 50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: var(--font-size-xl);
    margin-left: auto;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chatbot-close:hover {
    transform: rotate(90deg);
    background-color: white;
    border-radius: 50%;
    color: var(--primary);
}

.chatbot-messages {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    background: linear-gradient(to bottom, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--electric) var(--bg-accent);
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: var(--bg-accent);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--electric);
    border-radius: 3px;
    transition: var(--transition);
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.chatbot-messages::-webkit-scrollbar-button {
    display: none;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message.user-message {
    flex-direction: row-reverse;
}

.message.user-message .message-content {
    animation: messageSlideRight 0.3s ease;
}

@keyframes messageSlideRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: var(--bg-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: var(--gradient-electric);
    color: white;
}

.message-content {
    max-width: 70%;
}

.user-message .message-content {
    text-align: right;
}

.message-content p {
    background: var(--bg-secondary);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
    border: 1px solid var(--border);
    line-height: 1.4;
}

.user-message .message-content p {
    background: var(--gradient-electric);
    color: white;
    border: none;
}

.message-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* Preguntas frecuentes del chatbot - MEJORADAS */
.quick-questions {
    background: rgba(228, 158, 36, 0.05);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    margin: var(--spacing-sm) 0;
    order: 999;
    max-height: none;
    overflow: visible;
    border: 1px solid rgba(228, 158, 36, 0.2);
}

.quick-questions h5 {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    text-align: center;
    font-weight: 600;
    background: var(--gradient-electric);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-btn {
    display: block;
    width: 100%;
    background: transparent;
    border: 1px solid var(--electric);
    color: var(--electric);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xs);
    transition: var(--transition);
    min-height: 36px;
    text-align: left;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.quick-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-electric);
    transition: left 0.3s ease;
    z-index: -1;
}

.quick-btn:hover::before {
    left: 0;
}

.quick-btn:hover {
    color: white;
    transform: translateX(5px);
    border-color: var(--electric);
}

.quick-btn:last-child {
    margin-bottom: 0;
}

/* Input del chatbot - MEJORADO PARA MOBILE */
.chatbot-input {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    display: flex;
    gap: var(--spacing-xs);
    border-top: 1px solid var(--border);
    align-items: stretch;
    position: relative;
    flex-wrap: nowrap;
}

.chatbot-input input {
    flex: 1;
    padding: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 40px;
    min-width: 0;
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--electric);
    box-shadow: 0 0 0 2px var(--electric-glow);
}

#chatbot-faq-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--gradient-electric);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

#chatbot-faq-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px var(--electric-glow);
}

.chatbot-input #chatbot-send {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--gradient-secondary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
    min-width: 70px;
    cursor: pointer;
}

.chatbot-input #chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* Dropdown para FAQ - AJUSTADO PARA LA IZQUIERDA */
.faq-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50px;
    width: 320px;
    max-height: 400px;
    background: var(--bg-primary);
    border: 2px solid var(--electric);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 35px var(--shadow);
    margin-bottom: var(--spacing-xs);
    z-index: 1001;
    opacity: 0;
    transform: translateY(10px) scale(0.9);
    pointer-events: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-dropdown.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.faq-dropdown::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 30px;
    width: 16px;
    height: 16px;
    background: var(--bg-primary);
    border-right: 2px solid var(--electric);
    border-bottom: 2px solid var(--electric);
    transform: rotate(45deg);
    z-index: -1;
}

.faq-dropdown-header {
    background: var(--gradient-electric);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.faq-dropdown-header h5 {
    margin: 0;
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-align: center;
}

.faq-dropdown-content {
    padding: var(--spacing-sm);
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--electric) rgba(228, 158, 36, 0.1);
    /* Asegurar que siempre muestre el scrollbar */
    scrollbar-gutter: stable;
}

/* Scrollbar para navegadores WebKit (Chrome, Safari, Edge) */
.faq-dropdown-content::-webkit-scrollbar {
    width: 8px; /* Aumentado de 4px a 8px para mejor visibilidad */
    background: transparent;
}

.faq-dropdown-content::-webkit-scrollbar-track {
    background: rgba(228, 158, 36, 0.1);
    border-radius: 4px;
    margin: 4px 0; /* Espaciado superior e inferior */
}

.faq-dropdown-content::-webkit-scrollbar-thumb {
    background: var(--electric);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    /* Sombra para mejor visibilidad */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.faq-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #d4a532; /* Color más oscuro al hacer hover */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.faq-dropdown-content::-webkit-scrollbar-thumb:active {
    background: #b8941f; /* Color más oscuro al hacer clic */
}

.faq-dropdown-content::-webkit-scrollbar-button {
    display: none;
}

.faq-dropdown-content .quick-btn {
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs);
    text-align: left;
    min-height: 32px;
}

.faq-dropdown-content .quick-btn:hover {
    background: var(--electric);
    color: white;
    transform: translateX(3px);
}

/* Notificación de bienvenida del chatbot - AJUSTADA PARA LA IZQUIERDA */
.welcome-notification {
    position: fixed;
    bottom: 90px;
    left: 90px;
    width: 300px;
    background: var(--bg-primary);
    border: 2px solid var(--electric);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 15px 35px var(--shadow);
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: welcomePulse 2s infinite;
}

.welcome-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.welcome-notification.hide {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
}

@keyframes welcomePulse {
    0%, 100% { 
        box-shadow: 0 15px 35px var(--shadow), 0 0 0 0 rgba(228, 158, 36, 0.4);
    }
    50% { 
        box-shadow: 0 15px 35px var(--shadow), 0 0 0 8px rgba(228, 158, 36, 0);
    }
}

.welcome-notification::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 30px;
    width: 16px;
    height: 16px;
    background: var(--bg-primary);
    border-right: 2px solid var(--electric);
    border-bottom: 2px solid var(--electric);
    transform: rotate(45deg);
}

.welcome-content {
    padding: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    position: relative;
}

.welcome-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-electric);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    animation: welcomeAvatarBounce 2s infinite;
}

@keyframes welcomeAvatarBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.welcome-text {
    flex: 1;
    font-size: var(--font-size-sm);
    line-height: 1.4;
    color: var(--text-primary);
}

.welcome-text strong {
    color: var(--electric);
    display: block;
    margin-bottom: 4px;
}

.welcome-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-close:hover {
    background: var(--electric);
    color: white;
    transform: scale(1.1);
}

/* CSS para typing indicator del chatbot */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--electric);
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ===== MODAL DE AGRADECIMIENTO SIN SCROLL L-KTRON ===== */
.thank-you-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: var(--spacing-sm);
}

.thank-you-overlay.active {
    opacity: 1;
    visibility: visible;
}

.thank-you-modal {
    background: var(--bg-primary);
    border-radius: var(--border-radius-xl);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--electric);
    max-width: 420px;
    width: 100%;
    max-height: none;
    overflow: visible;
    transform: scale(0.8) translateY(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: modalEntrance 0.6s ease-out;
}

.thank-you-overlay.active .thank-you-modal {
    transform: scale(1) translateY(0);
}

@keyframes modalEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.modal-header {
    background: var(--gradient-electric);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(255,255,255,0.1) 60deg, transparent 120deg);
    animation: headerGlow 3s linear infinite;
    opacity: 0.5;
}

@keyframes headerGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-logo {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-xs);
    position: relative;
    z-index: 1;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.modal-title {
    color: white;
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.modal-content {
    padding: var(--spacing-lg);
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-electric);
    border-radius: 50%;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: white;
    animation: successPulse 2s ease-in-out infinite;
    box-shadow: 0 10px 30px var(--electric-glow);
}

@keyframes successPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 10px 30px var(--electric-glow);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 15px 40px var(--electric-glow);
    }
}

.modal-message {
    margin-bottom: var(--spacing-lg);
}

.modal-message h3 {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.modal-message p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.process-timeline {
    margin: 0;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(228, 158, 36, 0.05) 0%, rgba(228, 158, 36, 0.02) 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(228, 158, 36, 0.2);
}

.timeline-title {
    color: var(--electric);
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: linear-gradient(90deg, var(--electric) 33%, var(--border) 33%, var(--border) 100%);
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
    min-height: 60px;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-xs);
    margin-bottom: var(--spacing-xs);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.step-number.completed {
    background: var(--gradient-electric);
    color: white;
    animation: completedPulse 2s ease-in-out infinite;
    box-shadow: 0 0 15px var(--electric-glow);
}

@keyframes completedPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 15px var(--electric-glow);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 20px var(--electric-glow);
    }
}

.step-number.pending {
    background: var(--bg-accent);
    color: var(--text-muted);
    border: 2px solid var(--border);
}

.step-text {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    max-width: 70px;
    line-height: 1.3;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.timeline-step:first-child .step-text {
    color: var(--electric);
    font-weight: 600;
}

/* Animaciones */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--electric);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design - MEJORADO */
@media (max-width: 768px) {
    .scroll-progress-left {
        left: 20px;
        bottom: 100px;
        width: 60px;
        height: 60px;
    }
    
    .progress-electron {
        width: 40px;
        height: 40px;
    }
    
    .progress-percentage {
        font-size: 10px;
        bottom: -25px;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: 0 5px 15px var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content {
        margin-top: 50px;
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-stats {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .chatbot-container {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
        height: 75vh;
        bottom: 90px;
        max-height: 600px;
    }
    
    .chatbot-toggle {
        bottom: 20px;
        left: 20px;
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .footer-title {
        cursor: pointer;
    }
    
    .footer-toggle {
        display: flex !important;
    }
    
    .mobile-collapsible .footer-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        padding-top: 0;
    }
    
    .mobile-collapsible.active .footer-menu {
        max-height: 300px;
        padding-top: var(--spacing-sm);
    }
    
    .mobile-collapsible.active .footer-toggle {
        transform: rotate(45deg);
        background: var(--electric);
        color: white;
    }
    
    .faq-dropdown {
        width: 280px;
        max-height: 400px;
        left: 10px;
    }
    
    .emergency-btn {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs);
        min-width: 110px;
        min-height: 36px;
    }
    
    .chatbot-input {
        padding: var(--spacing-sm);
        gap: var(--spacing-xs);
    }
    
    .chatbot-input input {
        font-size: var(--font-size-sm);
    }
    
    #chatbot-faq-btn {
        width: 36px;
        height: 36px;
        font-size: var(--font-size-sm);
    }
    
    .chatbot-input #chatbot-send {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-xs);
        min-width: 60px;
        min-height: 36px;
    }
    
    .welcome-notification {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
        bottom: 100px;
    }
    
    .welcome-notification::before {
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }
    
    .welcome-content {
        padding: var(--spacing-sm);
    }
    
    .welcome-text {
        font-size: var(--font-size-xs);
    }
    
    .timeline-steps {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: center;
    }

    .timeline-steps::before {
        display: none;
    }

    .timeline-step {
        min-height: auto;
        width: 100%;
        max-width: 200px;
    }

    .step-text {
        max-width: none;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-buttons {
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: none;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
        left: 15px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 15px;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .faq-dropdown {
        width: calc(100vw - 30px);
        left: 5px;
        right: 5px;
    }
    
    .emergency-btn {
        font-size: 10px;
        padding: 6px 8px;
        min-width: 90px;
        min-height: 32px;
    }
    
    .scroll-progress-left {
        left: 15px;
        bottom: 100px;
        width: 50px;
        height: 50px;
    }
    
    .progress-electron {
        width: 35px;
        height: 35px;
    }
    
    .progress-percentage {
        font-size: 9px;
    }
    
    .chatbot-container {
        height: 70vh;
        max-height: 500px;
        left: 5px;
        width: calc(100vw - 10px);
    }
    
    .chatbot-input {
        padding: 8px;
        flex-wrap: nowrap;
    }
    
    .chatbot-input input {
        min-width: 0;
        flex: 1;
    }
    
    #chatbot-faq-btn {
        width: 32px;
        height: 32px;
    }
    
    .chatbot-input #chatbot-send {
        min-width: 50px;
        min-height: 32px;
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .modal-header {
        padding: var(--spacing-md);
    }

    .modal-content {
        padding: var(--spacing-sm);
    }

    .success-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-xl);
    }

    .modal-title {
        font-size: var(--font-size-lg);
    }

    .modal-message h3 {
        font-size: var(--font-size-base);
    }

    .modal-message p {
        font-size: var(--font-size-xs);
    }
    
    .timeline-step {
        max-width: 150px;
    }
    
    .step-text {
        font-size: 10px;
        line-height: 1.2;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

/* Optimización para reducir el uso de CPU en animaciones */
@media (prefers-reduced-motion: reduce) {
    .progress-electron,
    .electron-orbit,
    .electron-nucleus,
    .electron,
    .progress-percentage,
    .scroll-progress-left {
        animation: none !important;
    }
    
    .scroll-progress-left {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .scroll-progress-left:hover {
        transform: scale(1.1);
    }
}

/* Mejora de rendimiento para dispositivos de baja potencia */
@media (max-width: 480px) and (max-height: 667px) {
    .particles {
        display: none;
    }
    
    .progress-electron {
        animation-duration: 12s;
    }
    
}

/* ===== MEJORAS ADICIONALES PARA BETTER UX ===== */

/* Asegurar que el área de mensajes tenga suficiente espacio */
@media (max-width: 768px) {
    .chatbot-messages {
        flex: 1;
        min-height: 300px; /* Altura mínima para mensajes */
        padding: var(--spacing-sm); /* Reducir padding en mobile */
    }
    
    /* Mejorar el scroll en el área de mensajes */
    .chatbot-messages {
        scrollbar-width: thin;
    }
    
    .chatbot-messages::-webkit-scrollbar {
        width: 4px; /* Scrollbar más delgado */
    }
}

@media (max-width: 480px) {
    .chatbot-messages {
        min-height: 250px;
        padding: 8px; /* Padding más compacto en móviles pequeños */
    }
    
    /* Reducir el espacio entre mensajes en mobile */
    .chatbot-messages {
        gap: var(--spacing-sm);
    }
}

/* ===== OPTIMIZAR DROPDOWN FAQ PARA MOBILE ===== */
@media (max-width: 768px) {
    .faq-dropdown {
        width: 300px;
        max-height: 450px; /* Aumentar altura del dropdown */
        left: 40px; /* Mejor posicionamiento */
    }
    
    .faq-dropdown-content {
        max-height: 310px; /* Más espacio para contenido */
    }
}

@media (max-width: 480px) {
    .faq-dropdown {
        width: calc(100vw - 30px);
        left: 5px;
        right: 5px;
        max-height: 400px;
    }
    
    .faq-dropdown-content {
        max-height: 270px;
        padding: var(--spacing-xs); /* Padding más compacto */
    }
}

/* ===== MEJORAR BOTONES DE PREGUNTAS FRECUENTES ===== */
@media (max-width: 768px) {
    .quick-btn {
        min-height: 40px; /* Botones más altos para mejor tap target */
        font-size: var(--font-size-sm);
        padding: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .quick-btn {
        min-height: 44px; /* Cumplir con estándares de accesibilidad */
        font-size: var(--font-size-xs);
    }
}

.g-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Para dispositivos móviles */
@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.77);
        transform-origin: 0 0;
    }
}