/* ===== DESIGN TOKENS & CSS VARIABLES ===== */
:root {
    /* === BRAND COLORS === */
    --primary-50: #f0f4ff;
    --primary-100: #e0e9ff;
    --primary-200: #c7d8ff;
    --primary-300: #a5bfff;
    --primary-400: #8299ff;
    --primary-500: #667eea;
    --primary-600: #5a67d8;
    --primary-700: #4c51bf;
    --primary-800: #434190;
    --primary-900: #3c366b;

    --secondary-50: #faf5ff;
    --secondary-100: #f3e8ff;
    --secondary-200: #e9d5ff;
    --secondary-300: #d8b4fe;
    --secondary-400: #c084fc;
    --secondary-500: #a855f7;
    --secondary-600: #9333ea;
    --secondary-700: #7c3aed;
    --secondary-800: #6b21a8;
    --secondary-900: #581c87;

    /* === SEMANTIC COLORS === */
    --success: #10ac84;
    --warning: #f39c12;
    --error: #e74c3c;
    --info: #3498db;

    /* === NEUTRAL COLORS === */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* === TYPOGRAPHY === */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;

    /* === SPACING === */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* === BORDER RADIUS === */
    --radius-sm: 0.125rem;
    --radius-base: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;

    /* === SHADOWS === */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* === GRADIENTS === */
    --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--secondary-600) 100%);
    --gradient-success: linear-gradient(135deg, #10ac84 0%, #1dd1a1 100%);
    --gradient-warning: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    --gradient-error: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* === TRANSITIONS === */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-bounce: 250ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* === Z-INDEX === */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;

    /* === BREAKPOINTS === */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;

    /* Colores semánticos expandidos */
    --color-primary-50: #f0f4ff;
    --color-primary-100: #e0e7ff;
    --color-primary-200: #c7d2fe;
    --color-primary-300: #a5b4fc;
    --color-primary-400: #818cf8;
    --color-primary-500: #667eea;
    --color-primary-600: #5b21b6;
    --color-primary-700: #4c1d95;
    --color-primary-800: #3730a3;
    --color-primary-900: #312e81;

    /* Espaciado sistemático */
    --space-xs: 0.25rem;    /* 4px */
    --space-sm: 0.5rem;     /* 8px */
    --space-md: 1rem;       /* 16px */
    --space-lg: 1.5rem;     /* 24px */
    --space-xl: 2rem;       /* 32px */
    --space-2xl: 3rem;      /* 48px */
    --space-3xl: 4rem;      /* 64px */

    /* Tipografía escalable */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */

    /* Sombras sistemáticas */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transiciones estándar */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* Breakpoints */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--text-base);
}

body {
    font-family: var(--font-primary);
    line-height: var(--line-height-relaxed);
    color: var(--gray-800);
    overflow-x: hidden;
    background-color: var(--gray-50);
}

/* Responsive images */
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-5);
}

/* ===== UTILITY CLASSES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    font-size: var(--text-base);
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* ===== OPTIMIZED CTA STYLES ===== */
.cta-urgent {
    position: relative;
    background: var(--gradient-error) !important;
    animation: pulse-urgent 2s infinite;
    box-shadow: 0 0 var(--space-5) rgba(255, 107, 107, 0.6) !important;
}

.cta-urgent:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 var(--space-10) var(--space-8) rgba(255, 107, 107, 0.8) !important;
}

.cta-urgent::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24, #ff6b6b);
    border-radius: var(--radius-xl);
    z-index: -1;
    animation: rotate-border 3s linear infinite;
}

.cta-presupuesto {
    background: linear-gradient(135deg, var(--info) 0%, var(--primary-600) 100%) !important;
    box-shadow: 0 var(--space-1) var(--space-5) rgba(0, 210, 255, 0.4) !important;
}

.cta-presupuesto:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 var(--space-2) var(--space-8) rgba(0, 210, 255, 0.6) !important;
}

.btn-call {
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-md);
    animation: phone-ring 3s infinite;
}

.btn-call:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.cta-main {
    display: block;
    font-size: var(--text-base);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

.cta-subtitle {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-weight-normal);
    opacity: 0.9;
    margin-top: var(--space-1);
}

/* ===== CTA ANIMATIONS ===== */
@keyframes pulse-urgent {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.6); }
    50% { box-shadow: 0 0 30px rgba(255, 107, 107, 0.9); }
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes phone-ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-3deg); }
    20%, 40% { transform: rotate(3deg); }
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.logo-img {
    width: 40px;
    height: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh; /* fallback */
    min-height: 100svh; /* mobile-safe viewport height */
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: -2;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-text {
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 1s ease forwards;
}

.title-line:nth-child(2) {
    animation-delay: 0.3s;
}

.highlight {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: slideUp 1s ease forwards 0.6s;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: slideUp 1s ease forwards 0.9s;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 80px;
    opacity: 0;
    animation: slideUp 1s ease forwards 1.2s;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 100px 0;
    background: #f8f9fa;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: white;
    font-size: 2rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.service-description {
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 8px 0;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: 100px 0;
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    text-align: center;
    color: white;
    padding: 20px;
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-info p {
    margin-bottom: 16px;
    opacity: 0.9;
}

.project-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 100px 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text .section-header {
    text-align: left;
    margin-bottom: 40px;
}

.about-description p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.7;
}

.about-values {
    margin-top: 40px;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.value-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.value-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.value-item p {
    color: #666;
    line-height: 1.5;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-stats {
    position: absolute;
    bottom: -30px;
    right: -30px;
    display: flex;
    gap: 20px;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 100px;
}

.stat-box .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-box .stat-label {
    font-size: 0.8rem;
    color: #666;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 100px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.contact-details p {
    color: #666;
    line-height: 1.6;
}

.contact-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 16px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 40px;
    height: 40px;
}

.footer-description {
    color: #ccc;
    margin-bottom: 30px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
}

.footer-section h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-contact p {
    margin-bottom: 1rem;
    color: #b0b0b0;
}

.footer-contact i {
    color: #667eea;
    margin-right: 0.5rem;
    width: 20px;
}

.footer-certifications {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cert-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #888;
}

.footer-bottom-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-tagline {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #b0b0b0;
    line-height: 1.6;
}

/* Form Enhancements */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    color: white;
}

.form-header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.form-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    margin: 0;
    transform: scale(1.2);
}

.form-note {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 1rem;
    line-height: 1.5;
}

/* Contact Info Enhancements */
.contact-item h3 {
    color: #667eea !important;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-item p {
    line-height: 1.6;
    color: #333 !important;
    font-weight: 500;
}

.contact-item p a {
    color: #667eea !important;
    text-decoration: none;
    font-weight: 600;
}

.contact-item p a:hover {
    color: #5a67d8 !important;
    text-decoration: underline;
}

.contact-item small {
    color: #666 !important;
    font-style: italic;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Lock body scroll when mobile nav is open */
body.nav-open { overflow: hidden; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    html, body { overflow-x: hidden; }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-text .section-header {
        text-align: center;
    }

    .about-stats {
        position: static;
        justify-content: center;
        margin-top: 30px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .stat-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .service-card,
    .contact-form {
        padding: 30px 20px;
    }

    .about-stats {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* ===== LOADING ANIMATION ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== LIVE CHAT WIDGET ===== */
.live-chat-widget {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-modal);
    font-family: var(--font-primary);
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    position: relative;
    animation: chat-pulse 2s infinite;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.chat-toggle i {
    font-size: var(--text-xl);
    color: white;
}

.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error);
    color: white;
    border-radius: var(--radius-full);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    animation: notification-bounce 1s infinite;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.chat-window.active {
    display: flex;
    animation: chat-slide-up 0.3s ease-out;
}

.chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-agent {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.agent-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-avatar i {
    font-size: var(--text-lg);
}

.agent-info h4 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
}

.agent-status {
    font-size: var(--text-sm);
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.agent-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: var(--radius-full);
    animation: status-pulse 2s infinite;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-base);
    transition: background-color var(--transition-fast);
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    background: var(--gray-50);
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    background: white;
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    font-size: var(--text-sm);
    line-height: var(--line-height-relaxed);
}

.bot-message .message-content {
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
}

.user-message .message-content {
    background: var(--gradient-primary);
    color: white;
}

.message-time {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: var(--space-1);
    align-self: flex-end;
}

.chat-quick-actions {
    padding: var(--space-3);
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    background: white;
    border-top: 1px solid var(--gray-200);
}

.quick-action {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.quick-action:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
    color: var(--primary-700);
}

.chat-input-container {
    padding: var(--space-4);
    background: white;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: var(--space-2);
}

#chatInput {
    flex: 1;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color var(--transition-fast);
}

#chatInput:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#chatSend {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

#chatSend:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

#chatSend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== CHAT ANIMATIONS ===== */
@keyframes chat-pulse {
    0%, 100% { box-shadow: var(--shadow-lg); }
    50% { box-shadow: var(--shadow-xl), 0 0 0 10px rgba(102, 126, 234, 0.1); }
}

@keyframes notification-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes chat-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== RESPONSIVE CHAT ===== */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - var(--space-8));
        height: 400px;
        bottom: 70px;
        right: var(--space-4);
    }
    
    .live-chat-widget {
        bottom: var(--space-4);
        right: var(--space-4);
    }
}

/* ===== MEJORAS AVANZADAS ===== */

/* Ripple Effect for Buttons */
.btn, .cta-main {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced Scroll Animations */
.fade-in, .slide-up, .scale-in {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.animate {
    opacity: 1;
}

.slide-up {
    transform: translateY(50px);
}

.slide-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    transform: scale(0.8);
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Card Tilt Effects */
.service-card, .feature-card {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

.service-card:hover, .feature-card:hover {
    transform: perspective(1000px) rotateX(0) rotateY(0) translateZ(10px);
}

/* Lazy Loading Images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Enhanced Form Styles */
.form-group {
    position: relative;
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    position: static;
    pointer-events: auto;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--color-text, #111111);
    transition: all 0.3s ease;
    font-size: var(--font-size-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Prevent forced dark controls and keep white background in fields */
.contact-form,
.contact-form input,
.contact-form select,
.contact-form textarea {
    color-scheme: light;
}
/* Force readable text and caret in form fields regardless of theme */
.contact-form input,
.contact-form select,
.contact-form textarea {
    background-color: #ffffff !important;
    color: #111111 !important;
    caret-color: #111111;
}
/* Ensure placeholders remain visible in all browsers */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #666666 !important;
    opacity: 1 !important;
}
.contact-form input::-moz-placeholder,
.contact-form textarea::-moz-placeholder {
    color: #666666 !important;
    opacity: 1 !important;
}

/* Ensure Chrome autofill doesn't paint dark background/text */
input:-webkit-autofill,
select:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #111111 !important;
    caret-color: #111111;
}

/* Counter Animations */
.stat-number {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    display: inline-block;
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-primary);
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideInRight 0.5s ease;
}

.update-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.update-content button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.update-content button:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Parallax Hero Background */
.hero-background {
    will-change: transform;
    backface-visibility: hidden;
}

/* Enhanced Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Advanced Hover Effects */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.service-card:hover::after {
    transform: translateX(100%);
}

/* Improved Focus Indicators */
.btn:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* ===== Quick fixes: Firefox form + Typography ===== */
/* Ensure consistent typography in form controls */
.form-group input,
.form-group select,
.form-group textarea {
    font-family: inherit;
    line-height: 1.5;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-clip: padding-box;
}

/* Placeholder visibility across browsers (including Firefox) */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-light, #9aa0a6);
    opacity: 1; /* Firefox keeps opacity < 1 por defecto */
}
.form-group input::-moz-placeholder,
.form-group textarea::-moz-placeholder {
    color: var(--color-text-light, #9aa0a6);
    opacity: 1;
}

/* Select: normalize look in Firefox and add clear dropdown indicator */
.form-group select {
    padding-right: 40px; /* espacio para el icono */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%23667eea'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Validation states without Firefox inner red glow */
.form-group input:required:invalid,
.form-group select:required:invalid,
.form-group textarea:required:invalid {
    border-color: #f5b5b5;
}
input:-moz-ui-invalid,
select:-moz-ui-invalid,
textarea:-moz-ui-invalid {
    box-shadow: none;
}

/* Remove legacy inner focus padding in Firefox for inputs/buttons */
input::-moz-focus-inner,
button::-moz-focus-inner {
    border: 0;
}

/* Checkbox: consistent sizing and color in Firefox */
.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary, #667eea);
    transform: none; /* evita desenfoque en Firefox por escalado */
    margin-top: 2px;
}

/* Slightly improve text rendering and scaling across browsers */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #1a1a1a;
        --color-surface: #2d2d2d;
        --color-text: #e5e7eb; /* texto claro pero no puro blanco para mejor contraste */
        --color-text-light: #b0b0b0;
        --color-border: #404040;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .live-chat-widget,
    .back-to-top,
    .hero-buttons {
        display: none !important;
    }
    
    .hero {
        height: auto;
        padding: var(--space-8) 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* ===== MANUAL VIEW TOGGLE ===== */
/* Vista manual: selector en navbar */
.nav-container .view-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-toggle .toggle-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    background: #fff;
    color: #333;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

/* Estilos específicos para información de contacto de EG20 */
.top-bar {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    color: white;
    padding: var(--space-sm) 0;
    font-size: var(--font-size-sm);
}

.contact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
}

.contact-item i {
    color: var(--color-primary-200);
    width: 16px;
    text-align: center;
}

.contact-item a {
    color: white !important;
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.contact-item a:hover {
    color: var(--color-primary-200) !important;
}

.contact-item span {
    color: white !important;
    font-weight: 500;
}

/* Información de contacto en el footer */
.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.footer-contact i {
    color: var(--color-primary-400);
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-hours p {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.footer-hours strong {
    color: var(--color-primary-400);
}

/* Mapa mejorado */
.map-container {
    margin-top: var(--space-3xl);
}

.map-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.map-overlay {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: var(--space-lg);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-width: 300px;
}

.map-info h4 {
    color: var(--color-primary-600);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-lg);
}

.map-info p {
    margin-bottom: var(--space-md);
    line-height: 1.5;
    color: #4a5568;
}

/* Botón de emergencia mejorado */
.btn-emergency {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    border: none;
    animation: pulse-emergency 2s infinite;
    position: relative;
    overflow: hidden;
}

.btn-emergency:hover {
    background: linear-gradient(135deg, #c53030, #9c2626);
    transform: translateY(-2px);
}

.btn-emergency::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-emergency:hover::before {
    left: 100%;
}

@keyframes pulse-emergency {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(229, 62, 62, 0);
    }
}

/* Tarjetas de contacto */
.contact-detail {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary-500);
}

.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-primary-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-lg);
}

.contact-text h4 {
    color: var(--color-primary-600);
    margin-bottom: var(--space-xs);
    font-size: var(--font-size-lg);
}

.contact-text p {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.contact-text a {
    color: var(--color-primary-600);
    text-decoration: none;
    font-weight: 500;
}

.contact-text a:hover {
    color: var(--color-primary-700);
    text-decoration: underline;
}

.contact-text small {
    color: #718096;
    font-style: italic;
}

/* Responsive para información de contacto */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .contact-item {
        font-size: var(--font-size-xs);
    }
    
    .map-overlay {
        position: static;
        margin-top: var(--space-lg);
        max-width: none;
    }
    
    .contact-detail {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        align-self: center;
    }
}

/* Indicadores de estado online/offline */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 20px;
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.status-indicator.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #38a169;
    border-radius: 50%;
    animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mejoras para accesibilidad en contacto */
.contact-form label {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: var(--space-xs);
    display: block;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

.contact-form .required::after {
    content: ' *';
    color: #e53e3e;
}
.view-toggle .toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.view-toggle .toggle-btn.active {
    background: var(--primary-500);
    color: white;
}

/* ===== CHAT WIDGET INTELIGENTE ===== */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: var(--font-primary);
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.chat-toggle i {
    color: white;
    font-size: 24px;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chat-widget.open .chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    padding: 16px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar i {
    font-size: 18px;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 80%;
    animation: slideInMessage 0.3s ease;
}

.user-message {
    align-self: flex-end;
}

.user-message .message-content {
    background: var(--primary-500);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
}

.bot-message .message-content {
    background: var(--gray-100);
    color: var(--gray-800);
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
}

.message-time {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 4px;
    text-align: right;
}

.bot-message .message-time {
    text-align: left;
}

.chat-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.chat-action {
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-200);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-align: left;
}

.chat-action:hover {
    background: var(--primary-100);
    transform: translateX(4px);
}

.typing-indicator {
    align-self: flex-start;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: 18px 18px 18px 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.chat-input-container {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
    align-items: center;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

#chat-input:focus {
    border-color: var(--primary-500);
}

#chat-send {
    width: 40px;
    height: 40px;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#chat-send:hover {
    background: var(--primary-600);
    transform: scale(1.05);
}

/* Animaciones del chat */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingDots {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Responsive para chat */
@media (max-width: 768px) {
    .chat-window {
        width: 300px;
        height: 450px;
        bottom: 70px;
        right: -10px;
    }

    .chat-widget {
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 400px;
        right: -15px;
    }
}

/* ===== CALCULADORA DE PRESUPUESTOS ===== */
.bg-gradient {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-50) 100%);
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-8);
    max-width: 1000px;
    margin: 0 auto;
}

.calculator-form {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
    position: relative;
    min-height: 500px;
}

.calculator-step {
    display: none;
    animation: fadeInStep 0.5s ease;
}

.calculator-step.active {
    display: block;
}

.calculator-step h3 {
    color: var(--gray-800);
    margin-bottom: var(--space-6);
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.option-card {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-card:hover {
    border-color: var(--primary-300);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.option-card.selected {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.option-card i {
    font-size: 2.5rem;
    color: var(--primary-500);
    margin-bottom: var(--space-3);
}

.option-card h4 {
    color: var(--gray-800);
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-semibold);
}

.option-card p {
    color: var(--gray-600);
    font-size: var(--text-sm);
    margin: 0;
}

.service-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

.service-option {
    display: block;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.service-option:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.service-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.service-option input[type="radio"]:checked + .checkmark {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.service-option input[type="radio"]:checked + .checkmark::after {
    display: block;
}

.service-option input[type="radio"]:checked ~ .option-content {
    color: var(--primary-700);
}

.checkmark {
    position: absolute;
    top: 16px;
    right: 16px;
    height: 20px;
    width: 20px;
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: color 0.2s ease;
}

.option-content i {
    font-size: 1.5rem;
    color: var(--primary-500);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

/* Eliminado - ya está definido arriba */

.form-group input,
.form-group select {
    padding: var(--space-3);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.budget-result {
    text-align: center;
}

.budget-summary {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.budget-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--gray-200);
}

.budget-item:last-child {
    border-bottom: none;
}

.budget-item.total {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
    color: var(--primary-700);
    border-top: 2px solid var(--primary-200);
    margin-top: var(--space-3);
    padding-top: var(--space-4);
}

.budget-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.calculator-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--gray-200);
}

.calculator-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.progress-indicator {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    margin-bottom: var(--space-2);
}

.progress-step.active {
    background: var(--primary-50);
    color: var(--primary-700);
}

.progress-step.completed {
    background: var(--success);
    color: white;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: var(--text-sm);
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--primary-500);
    color: white;
}

.progress-step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-label {
    font-weight: var(--font-weight-medium);
}

.calculator-info {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
}

.calculator-info h4 {
    color: var(--gray-800);
    margin-bottom: var(--space-4);
    font-size: var(--text-lg);
}

.calculator-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calculator-info li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    color: var(--gray-600);
}

.calculator-info li i {
    color: var(--success);
    font-size: var(--text-sm);
}

/* Animaciones de la calculadora */
@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive para calculadora */
@media (max-width: 1024px) {
    .calculator-container {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .calculator-sidebar {
        order: -1;
    }

    .progress-indicator {
        display: flex;
        justify-content: space-between;
        padding: var(--space-4);
    }

    .progress-step {
        flex-direction: column;
        text-align: center;
        margin-bottom: 0;
        flex: 1;
    }

    .step-label {
        font-size: var(--text-xs);
        margin-top: var(--space-1);
    }
}

@media (max-width: 768px) {
    .option-grid {
        grid-template-columns: 1fr;
    }

    .service-options {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .budget-actions {
        flex-direction: column;
    }

    .calculator-navigation {
        flex-direction: column;
        gap: var(--space-4);
    }
}

/* Animaciones y microinteracciones mejoradas */
.service-card {
    transition: all var(--transition-normal);
    transform-origin: center;
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--color-primary-400);
}

/* Enhanced service cards with consistent border effects */
.service-card-enhanced {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary-500), var(--primary-300), var(--primary-500)) border-box;
}

.service-card-enhanced::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-300), var(--primary-500));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card-enhanced:hover::before {
    opacity: 0.3;
}

/* Animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== MAGIC UI ANIMATIONS ===== */
/* Shimmer Button Animations */
@keyframes shimmer-slide {
    to {
        transform: translate(calc(100cqw - 100%), 0);
    }
}

@keyframes spin-around {
    0% {
        transform: translateZ(0) rotate(0);
    }
    15%, 35% {
        transform: translateZ(0) rotate(90deg);
    }
    65%, 85% {
        transform: translateZ(0) rotate(270deg);
    }
    100% {
        transform: translateZ(0) rotate(360deg);
    }
}

/* Animated Shiny Text */
@keyframes shiny-text {
    0%, 90%, 100% {
        background-position: calc(-100% - var(--shiny-width)) 0;
    }
    30%, 60% {
        background-position: calc(100% + var(--shiny-width)) 0;
    }
}

/* Border Beam Animation */
@keyframes border-beam {
    100% {
        offset-distance: 100%;
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== MAGIC UI COMPONENTS ===== */

/* Shimmer Button */
.shimmer-button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-6);
    color: white;
    font-weight: 600;
    font-size: var(--text-base);
    cursor: pointer;
    transition: all 0.3s ease;
    --speed: 2s;
}

.shimmer-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer-slide var(--speed) ease-in-out infinite;
}

.shimmer-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Animated Shiny Text */
.animated-shiny-text {
    --shiny-width: 100px;
    background: linear-gradient(
        110deg,
        var(--gray-800) 45%,
        var(--primary-500),
        var(--gray-800) 55%
    );
    background-size: 250% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: shiny-text 3s ease-in-out infinite;
}

/* Border Beam */
.border-beam {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(45deg, transparent, var(--primary-500), transparent);
    background-size: 200% 200%;
    animation: spin-around calc(var(--speed, 2s) * 2) linear infinite;
}

.border-beam::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, transparent, var(--primary-400), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
}

/* Ripple Button */
.ripple-button {
    position: relative;
    overflow: hidden;
    background: var(--primary-500);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-5);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ripple-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-button:active::after {
    width: 300px;
    height: 300px;
    animation: ripple 0.6s ease-out;
}

/* ===== STATS SECTION ===== */
.stats-section {
    padding: var(--space-16) 0;
    background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23667eea" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: var(--space-6);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-600);
    line-height: 1;
    margin-bottom: var(--space-2);
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Number Ticker Animation */
.stat-number.counting {
    animation: pulse 0.1s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== PARTICLES BACKGROUND ===== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-400);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(odd) {
    animation-delay: -2s;
    animation-duration: 8s;
}

.particle:nth-child(even) {
    animation-delay: -4s;
    animation-duration: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    50% {
        transform: translateY(-100vh) translateX(50px) scale(1.2);
        opacity: 0.6;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-200vh) translateX(100px) scale(0.8);
        opacity: 0;
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary-500);
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast-icon {
    font-size: 1.2rem;
    color: var(--primary-500);
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-1);
}

.toast-message {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--gray-600);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Clases de animación */
.animate-in {
    animation-duration: 0.6s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fadeInUp { animation-name: fadeInUp; }
.animate-fadeInLeft { animation-name: fadeInLeft; }
.animate-fadeInRight { animation-name: fadeInRight; }
.animate-scaleIn { animation-name: scaleIn; }

/* Estados de validación de formularios */
.field-error {
    color: #e53e3e;
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.field-invalid {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

.field-valid {
    border-color: #38a169 !important;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1) !important;
}

.form-success {
    background: linear-gradient(135deg, #38a169, #48bb78);
    color: white;
    padding: var(--space-md);
    border-radius: 8px;
    margin-top: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: slideInDown 0.3s ease;
}

.form-error {
    background: linear-gradient(135deg, #e53e3e, #fc8181);
    color: white;
    padding: var(--space-md);
    border-radius: 8px;
    margin-top: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: slideInDown 0.3s ease;
}

/* Navbar mejorada */
.navbar {
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.navbar-hidden {
    transform: translateY(-100%);
}

/* Botones mejorados */
.btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Notificación de actualización */
.update-notification {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    background: var(--color-primary-500);
    color: white;
    padding: var(--space-md);
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    animation: slideInUp 0.3s ease;
}

.update-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.update-content button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.update-content button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Fallback para JS deshabilitado */
.js-fallback {
    opacity: 1 !important;
}

.js-fallback [data-animate] {
    opacity: 1 !important;
    transform: none !important;
}

/* Soporte para prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mejoras de accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible mejorado */
*:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary-500);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 6px;
}

/* ===== SISTEMA DE RESERVAS ===== */
.booking-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
    max-width: 1200px;
    margin: 0 auto;
}

.booking-form {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.booking-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.info-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
}

.info-card h3 {
    color: var(--gray-800);
    margin-bottom: var(--space-4);
    font-size: var(--text-lg);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    color: var(--gray-600);
}

.info-card li i {
    color: var(--primary-500);
}

.schedule {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.schedule-item.emergency {
    background: linear-gradient(135deg, #e53e3e, #fc8181);
    color: white;
    font-weight: 600;
}

.contact-direct {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--primary-50);
    color: var(--primary-700);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-btn:hover {
    background: var(--primary-100);
    transform: translateY(-2px);
}

.contact-btn i {
    color: var(--primary-500);
}

/* Estilos específicos para formulario de reservas */
.booking-form .form-group input,
.booking-form .form-group select,
.booking-form .form-group textarea {
    background: #ffffff !important;
    color: #1a1a1a !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    border: 2px solid #e2e8f0 !important;
    caret-color: #1a1a1a !important;
}

.booking-form .form-group input:focus,
.booking-form .form-group select:focus,
.booking-form .form-group textarea:focus {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border-color: var(--primary-500) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.booking-form .form-group input::placeholder,
.booking-form .form-group textarea::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}

.booking-form .form-group label {
    color: #374151 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* Responsive para reservas */
@media (max-width: 768px) {
    .booking-container {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .form-actions {
        flex-direction: column;
    }
}
.view-toggle .toggle-btn[aria-pressed="true"] {
    background: var(--primary-500);
    color: #fff;
    border-color: var(--primary-500);
}

/* Forzar vista (sobrescribe algunos comportamientos clave) */
body[data-view="mobile"] .container {
    max-width: 420px;
    margin: 0 auto;
}

body[data-view="mobile"] .nav-menu {
    display: none !important;
}

body[data-view="mobile"] .nav-toggle {
    display: flex !important;
}

body[data-view="mobile"] .hero-title {
    font-size: 2.5rem !important;
}

body[data-view="mobile"] .hero-buttons {
    flex-direction: column !important;
    align-items: center !important;
}

body[data-view="desktop"] .nav-menu {
    display: flex !important;
}

body[data-view="desktop"] .nav-toggle {
    display: none !important;
}

body[data-view="desktop"] .hero-title {
    font-size: 4rem !important;
}

body[data-view="desktop"] .hero-buttons {
    flex-direction: row !important;
}






