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

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

/* ===== VARIABLES CSS ===== */
:root {
    /* Light Theme - Paleta de Colores Moderna con Dorado #EFBF04 y Azul Oscuro */
    --bg-primary: #ffffff;                    /* Blanco puro para fondos principales */
    --bg-secondary: #f8fafc;                  /* Gris muy claro para fondos secundarios */
    --bg-tertiary: #f1f5f9;                   /* Gris claro para fondos terciarios */
    --text-primary: #0f172a;                  /* Azul muy oscuro para texto principal */
    --text-secondary: #1e293b;                /* Azul oscuro para texto secundario */
    --text-muted: #334155;                    /* Azul medio para texto atenuado */
    --accent-primary: #C5A465;                /* Dorado vibrante #EFBF04 para elementos principales */
    --accent-secondary: #d4a017;              /* Dorado oscuro para elementos secundarios */
    --accent-success: #059669;                /* Verde oscuro para éxito y confirmaciones */
    --accent-warning: #C5A465;                /* Dorado #EFBF04 para advertencias */
    --accent-error: #dc2626;                  /* Rojo oscuro para errores */
    --border-color: #cbd5e1;                  /* Azul grisáceo para bordes */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 10px 10px -5px rgba(15, 23, 42, 0.08);
    --gradient-primary: linear-gradient(135deg, #EFBF04 0%, #d4a017 100%);
    --gradient-secondary: linear-gradient(135deg, #fbbf24 0%, #EFBF04 100%);
    --gradient-accent: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] {
    /* Dark Theme - Paleta de Colores Moderna */
    --bg-primary: #0f172a;                    /* Azul muy oscuro para fondos principales */
    --bg-secondary: #1e293b;                   /* Azul oscuro para fondos secundarios */
    --bg-tertiary: #334155;                    /* Azul medio para fondos terciarios */
    --text-primary: #f8fafc;                   /* Blanco para texto principal */
    --text-secondary: #cbd5e1;                 /* Gris claro para texto secundario */
    --text-muted: #94a3b8;                     /* Gris medio para texto atenuado */
    --accent-primary: #60a5fa;                 /* Azul claro para elementos principales */
    --accent-secondary: #93c5fd;               /* Azul muy claro para elementos secundarios */
    --accent-success: #34d399;                 /* Verde claro para éxito y confirmaciones */
    --accent-warning: #fbbf24;                 /* Amarillo claro para advertencias */
    --accent-error: #f87171;                   /* Rojo claro para errores */
    --border-color: #334155;                   /* Azul medio para bordes */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3730a3 100%);
    --gradient-secondary: linear-gradient(135deg, #be185d 0%, #dc2626 100%);
    --gradient-accent: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

/* ===== UTILIDADES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    overflow-x: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== 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);
    }
}

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

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

/* Clases de animación */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out forwards;
}

/* Estados iniciales para animaciones */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Animaciones específicas por sección */
.hero .hero-container {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.welcome .section-header {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.welcome .welcome-text {
    animation: fadeInLeft 0.8s ease-out 0.4s both;
}

.welcome .welcome-form {
    animation: fadeInRight 0.8s ease-out 0.4s both;
}

.welcome .welcome-stats {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.services .section-header {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.service-card {
    animation: scaleIn 0.6s ease-out both;
}

.service-card:nth-child(1) { animation-delay: 0.3s; }
.service-card:nth-child(2) { animation-delay: 0.4s; }
.service-card:nth-child(3) { animation-delay: 0.5s; }
.service-card:nth-child(4) { animation-delay: 0.6s; }

.process .section-header {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.process-carousel {
    animation: scaleIn 0.8s ease-out 0.4s both;
}

.gallery .section-header {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gallery-item {
    animation: scaleIn 0.6s ease-out both;
}

.gallery-item:nth-child(1) { animation-delay: 0.3s; }
.gallery-item:nth-child(2) { animation-delay: 0.4s; }
.gallery-item:nth-child(3) { animation-delay: 0.5s; }
.gallery-item:nth-child(4) { animation-delay: 0.6s; }
.gallery-item:nth-child(5) { animation-delay: 0.7s; }
.gallery-item:nth-child(6) { animation-delay: 0.8s; }
.gallery-item:nth-child(7) { animation-delay: 0.9s; }
.gallery-item:nth-child(8) { animation-delay: 1.0s; }

.testimonials .section-header {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.testimonial-card {
    animation: slideInFromBottom 0.8s ease-out both;
}

.testimonial-card:nth-child(1) { animation-delay: 0.3s; }
.testimonial-card:nth-child(2) { animation-delay: 0.4s; }
.testimonial-card:nth-child(3) { animation-delay: 0.5s; }

.about .section-header {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.about .about-text {
    animation: fadeInLeft 0.8s ease-out 0.4s both;
}

.contact .section-header {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.contact .contact-info {
    animation: fadeInLeft 0.8s ease-out 0.4s both;
}

.contact .contact-form {
    animation: fadeInRight 0.8s ease-out 0.4s both;
}

/* Responsive animations */
@media (max-width: 768px) {
    .welcome .welcome-text,
    .welcome .welcome-form,
    .about .about-text,
    .contact .contact-info,
    .contact .contact-form {
        animation: fadeInUp 0.8s ease-out 0.4s both;
    }
}

/* ===== MEJORAS PARA MODO OSCURO ===== */
/* Transiciones suaves para todos los elementos */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .section-title {
    color: #f8fafc !important;
}

[data-theme="dark"] .section-subtitle {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .stat-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .service-card:hover,
[data-theme="dark"] .testimonial-card:hover,
[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

/* ===== HEADER Y NAVEGACIÓN ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
}

.header.glassmorphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .header.glassmorphism {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header.glassmorphism {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav {
    padding: 1rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-logo.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    max-width: 320px;
}

/* Logo theme switching */
.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Language Selector */
.language-selector {
    display: flex;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 8px;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.lang-btn {
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn.active {
    background-color: rgba(197, 164, 101, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--accent-primary);
    border: 1px solid rgba(197, 164, 101, 0.4);
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    background-color: rgba(197, 164, 101, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.theme-toggle .light-icon,
.theme-toggle .dark-icon {
    position: absolute;
    transition: all 0.3s ease;
}

/* Estado inicial (sin data-theme o light) */
.theme-toggle .light-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle .dark-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .theme-toggle .light-icon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .dark-icon {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .theme-toggle .light-icon {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .theme-toggle .dark-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    padding: 8rem 0 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.hero-bg-image.before {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.hero-bg-image.after {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: transparent; /* Hacer la barra transparente */
    cursor: grab;
    transform: translateX(-50%);
    z-index: 10;
    transition: left 0.1s ease;
}

.hero-slider:active {
    cursor: grabbing;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    background-color: transparent; /* Hacer el handle transparente */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    border: none; /* Quitar el borde */
    transition: all 0.2s ease;
}

.slider-handle:hover {
    /* Sin efectos visuales ya que es invisible */
}

.slider-handle:active {
    cursor: grabbing;
}

.scroll-indicator {
    display: none; /* Ocultar el indicador de scroll */
}

.scroll-indicator span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scroll-indicator::before {
    content: '↕';
    font-size: 1rem;
    animation: bounce 2s infinite;
}

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

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero-logo {
    text-align: center;
    z-index: 3;
}

.hero-logo .logo-img {
    height: 300px;
    width: auto;
    object-fit: contain;
    max-width: 800px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    animation: logoFloat 3s ease-in-out infinite;
}

/* Hero logo - always use light version */
.hero-logo .logo-light {
    display: block;
}

.hero-logo .logo-dark {
    display: none;
}

[data-theme="dark"] .hero-logo .logo-light {
    display: block; /* Keep showing light version even in dark mode */
}

[data-theme="dark"] .hero-logo .logo-dark {
    display: none;
}

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

.hero-logo .logo-img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.hero-content {
    display: none; /* Ocultar completamente la card del hero */
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: auto; /* Empuja el botón hacia la parte inferior */
    align-self: center; /* Centra el botón horizontalmente */
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background-color: var(--accent-primary);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

/* ===== WELCOME SECTION ===== */
.welcome {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.welcome::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23f0f0f0" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.welcome-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.welcome-text {
    max-width: 600px;
    text-align: left;
}

.welcome-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-height: 1.2em;
    display: flex;
    align-items: center;
}

.welcome-title .typed-cursor {
    color: var(--accent-primary);
    font-weight: 800;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.welcome-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.welcome-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Welcome Form Styles */
.welcome-form {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.welcome-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.quote-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea {
    min-height: 100px;
    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(197, 164, 101, 0.1);
    background-color: var(--bg-primary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.required-text {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.75rem;
    color: var(--accent-error);
    font-weight: 500;
    opacity: 0.8;
}

.form-submit {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(197, 164, 101, 0.3);
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 164, 101, 0.4);
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
}

.form-submit:active {
    transform: translateY(0);
}

/* ===== CAMPOS ADICIONALES DEL FORMULARIO ===== */
.field-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.25rem;
    opacity: 0.9;
}

/* ===== SUBIDA DE ARCHIVOS ===== */
.file-upload-container {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    gap: 0.75rem;
    min-height: 120px;
}

.file-upload-label:hover {
    border-color: var(--accent-primary);
    background: rgba(197, 164, 101, 0.05);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.file-upload-label i {
    font-size: 2.5rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.file-upload-label:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.file-upload-label span {
    font-weight: 600;
    font-size: 1rem;
}

.file-upload-label small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.file-preview {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
}

.file-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.file-preview-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.file-preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.file-preview-item .remove-file {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(248, 113, 113, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.file-preview-item .remove-file:hover {
    background: var(--accent-error);
    transform: scale(1.1);
}

.welcome-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 191, 4, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(239, 191, 4, 0.4);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== SERVICIOS ===== */
.services {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.services-carousel-container {
    position: relative;
    margin-top: 3rem;
    padding: 0 60px; /* Espacio para las flechas */
    overflow: visible; /* Permitir que las flechas sean visibles */
}

/* Grid móvil oculto por defecto */
.services-grid-mobile {
    display: none;
}

.services-carousel {
    overflow: hidden;
    position: relative;
}

.services-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 2rem;
    width: 100%; /* Ancho completo del contenedor */
    will-change: transform; /* Optimización para GPU */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.carousel-btn:focus {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

.carousel-btn-prev {
    left: 0px; /* Dentro del padding del contenedor */
}

.carousel-btn-next {
    right: 0px; /* Dentro del padding del contenedor */
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.carousel-btn:disabled:hover {
    background: var(--accent-primary);
    transform: translateY(-50%);
    box-shadow: var(--shadow-md);
}

/* Responsive carousel buttons */
@media (max-width: 768px) {
    /* Ocultar carrusel en móvil y mostrar grid */
    .services-carousel-container {
        display: none;
    }
    
    /* Mostrar grid de servicios en móvil */
    .services-grid-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 3rem;
    }
    
    .services-grid-mobile .service-card {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    /* En móvil pequeño, 1 columna */
    .services-grid-mobile {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.service-card {
    position: relative;
    background-color: var(--bg-primary);
    border-radius: 16px;
    flex: 0 0 auto;
    width: calc(25% - 1.5rem); /* 4 cards por fila con gap */
    min-width: 280px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
}

.service-card:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Media background */
.service-media { position: absolute; inset: 0; }
.service-bg { 
    width: 100%;
    height: 100%; 
    object-fit: cover; 
    transform: scale(1.05); 
    transition: transform 0.5s ease, filter 0.5s ease; 
    filter: saturate(1.05) contrast(1.05); 
}
.service-overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%); 
    mix-blend-mode: multiply; 
    transition: background 0.5s ease;
}

.service-card:hover .service-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.5) 100%);
}

.service-card:hover .service-bg { 
    transform: scale(1.1); 
    filter: blur(2px) brightness(0.4) saturate(0.9);
}

/* Content */
.service-content { position: relative; z-index: 2; padding: 1.75rem; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 0.75rem; text-align: left; color: white; }

.service-icon { width: 64px; height: 64px; line-height: 64px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: white; box-shadow: 0 8px 24px rgba(0,0,0,0.25); backdrop-filter: blur(6px); }

.service-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.service-description {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Features list */
.service-features { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.service-features li { list-style: none; font-size: 0.8rem; padding: 0.35rem 0.6rem; border-radius: 999px; color: #0f172a; background: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.7); }

.service-cta-hint { margin-top: 0.5rem; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: rgba(255,255,255,0.95); opacity: 0.9; }
.service-cta-hint::after { content: '→'; opacity: 0.9; }

.service-card:hover { transform: translateY(-8px) rotate3d(1,0,0,0.5deg); box-shadow: var(--shadow-xl); border-color: var(--accent-primary); }

/* ===== PROCESO ===== */
.process {
    padding: 6rem 0;
    background-color: var(--bg-primary);
}

.process-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.process-carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
    min-height: 450px;
    padding: 2rem 0;
}

.process-step {
    text-align: center;
    padding: 3rem 2rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%) scale(0.8) rotate(0deg);
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.process-step.active {
    opacity: 1;
    transform: translateX(0) scale(0.92) rotate(0deg); /* tamaño ligeramente menor */
    z-index: 3;
}

.process-step.prev {
    transform: translateX(-90%) translateY(10px) scale(0.82) rotate(-6deg);
    z-index: 2;
    opacity: 0.3;
    filter: blur(1px);
}

.process-step.next {
    transform: translateX(90%) translateY(10px) scale(0.82) rotate(6deg);
    z-index: 2;
    opacity: 0.3;
    filter: blur(1px);
}

.process-step.behind {
    transform: translateX(0) translateY(18px) scale(0.75) rotate(0deg);
    opacity: 0.1;
    z-index: 1;
    filter: blur(2px);
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 24px rgba(239, 191, 4, 0.4);
    transition: all 0.3s ease;
}

.process-step.active .step-number {
    transform: scale(1.1);
}

.step-icon {
    width: 100px;
    height: 100px;
    background-color: var(--bg-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    color: var(--accent-primary);
    border: 3px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.process-step.active .step-icon {
    transform: scale(1.05);
    background-color: var(--accent-primary);
    color: white;
}

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* Controles del carrusel */
.process-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.process-nav-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.process-nav-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.process-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

.process-dots {
    display: flex;
    gap: 1rem;
}

.process-dot {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.process-dot.active {
    background: var(--accent-primary);
    transform: scale(1.3);
}

.process-dot:hover {
    background: var(--accent-primary);
    transform: scale(1.2);
}

/* ===== PORTAFOLIO ===== */
.portfolio.gallery { padding: 6rem 0; background-color: var(--bg-secondary); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; display: block; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
.gallery-item img { width: 100%; height: 100%; display: block; object-fit: cover; transform: scale(1.02); transition: transform 0.4s ease, filter 0.4s ease; filter: saturate(1.05) contrast(1.05); }
.gallery-item::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(0,0,0,0.0), rgba(0,0,0,0.25)); opacity: 0; transition: opacity 0.3s ease; }
.gallery-item:hover img { transform: scale(1.06); filter: brightness(0.85); }
.gallery-item:hover::after { opacity: 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 10000; padding: 2rem; }
.lightbox[hidden] { display: none; }
.lightbox-image { max-width: 90vw; max-height: 85vh; border-radius: 12px; box-shadow: var(--shadow-2xl); }
.lightbox-btn { position: absolute; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); color: white; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; backdrop-filter: blur(6px); }
.lightbox-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.06); }
.lightbox-close { top: 24px; right: 24px; font-size: 28px; line-height: 1; }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* ===== TESTIMONIOS ===== */
.testimonials {
    padding: 6rem 0;
    background-color: var(--bg-primary);
}

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

.testimonial-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.stars .fas.fa-star {
    color: var(--border-color);
    transition: color 0.3s ease;
}

.stars .fas.fa-star.active {
    color: var(--accent-warning);
}

.testimonial-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.author-icon i {
    font-size: 1.5rem;
}

.author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.author-location {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Estados de carga y error para testimonials */
.testimonials-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.testimonials-loading p {
    color: var(--text-muted);
    font-size: 1rem;
}

.testimonials-error,
.no-testimonials {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background-color: var(--bg-secondary);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
}

.testimonials-error p,
.no-testimonials p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.testimonials-error {
    border-color: var(--accent-error);
    background-color: rgba(220, 38, 38, 0.05);
}

.testimonials-error p {
    color: var(--accent-error);
}

/* ===== SOBRE NOSOTROS ===== */
.about {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== CONTACTO ===== */
.contact {
    padding: 6rem 0;
    background-color: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.contact-details h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-secondary);
}

/* Estilos para redes sociales en contacto */
.social-links-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link-contact:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 164, 101, 0.3);
}

.social-handle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.social-handle-footer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-align: center;
}

/* Formulario */
.contact-form {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

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

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

/* ===== FOOTER ===== */
.footer {
    background-color: var(--bg-tertiary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.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;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-logo .logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    max-width: 300px;
}

/* Footer logo theme switching */
.footer-logo .logo-light {
    display: block;
}

.footer-logo .logo-dark {
    display: none;
}

[data-theme="dark"] .footer-logo .logo-light {
    display: none;
}

[data-theme="dark"] .footer-logo .logo-dark {
    display: block;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .welcome-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .welcome-text {
        text-align: center;
    }
    
    .welcome-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 1024px) {
    .services-track {
        gap: 1.5rem;
    }
    
    .service-card {
        width: calc(50% - 0.75rem); /* 2 cards por fila en tablet */
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .welcome-form {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-subtitle {
        font-size: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .form-submit {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .form-group textarea {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
        min-height: 80px;
    }
    
    .file-upload-label {
        padding: 1.5rem 1rem;
        min-height: 100px;
        gap: 0.5rem;
    }
    
    .file-upload-label i {
        font-size: 2rem;
    }
    
    .file-upload-label span {
        font-size: 0.9rem;
    }
    
    .file-upload-label small {
        font-size: 0.75rem;
    }
    
    .file-preview {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.5rem;
    }
    
    .file-preview-item img {
        height: 60px;
    }
    
    .file-preview-item .remove-file {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .hero-content {
        padding: 2rem;
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .welcome {
        padding: 4rem 0;
    }
    
    .welcome-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .welcome-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .services-track {
        gap: 1rem;
    }
    
    .service-card {
        width: 100%; /* 1 card por fila en móvil */
        min-width: 280px;
    }
    
    .process-carousel {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .process-carousel-container {
        overflow: hidden;
        min-height: 350px;
        margin: 0;
    }
    
    .process-step {
        padding: 2rem 1rem;
    }
    
    .step-number {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
        border-radius: 14px;
    }
    
    .step-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        border-radius: 16px;
    }
    
    .step-title {
        font-size: 1.5rem;
    }
    
    .step-description {
        font-size: 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* Lightbox responsive */
    .lightbox {
        padding: 1rem;
    }
    
    .lightbox-image {
        max-width: 95vw;
        max-height: 80vh;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-logo .logo-img {
        height: 65px;
        max-width: 220px;
    }
    
    /* Responsive navbar logo visibility */
    .nav-logo {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    .nav-logo.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Responsive logo theme switching */
    .nav-logo .logo-light {
        display: block;
    }
    
    .nav-logo .logo-dark {
        display: none;
    }
    
    [data-theme="dark"] .nav-logo .logo-light {
        display: none;
    }
    
    [data-theme="dark"] .nav-logo .logo-dark {
        display: block;
    }
    
    .footer-logo .logo-img {
        height: 60px;
        max-width: 220px;
    }
    
    /* Responsive footer logo theme switching */
    .footer-logo .logo-light {
        display: block;
    }
    
    .footer-logo .logo-dark {
        display: none;
    }
    
    [data-theme="dark"] .footer-logo .logo-light {
        display: none;
    }
    
    [data-theme="dark"] .footer-logo .logo-dark {
        display: block;
    }
    
    .hero-logo .logo-img {
        height: 140px;
        max-width: 400px;
    }
    
    /* Responsive hero logo - always use light version */
    .hero-logo .logo-light {
        display: block;
    }
    
    .hero-logo .logo-dark {
        display: none;
    }
    
    [data-theme="dark"] .hero-logo .logo-light {
        display: block; /* Keep showing light version even in dark mode */
    }
    
    [data-theme="dark"] .hero-logo .logo-dark {
        display: none;
    }
    
    .scroll-indicator {
        bottom: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    /* Responsive header controls */
    .nav-controls {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .language-selector {
        gap: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    /* Asegurar que el header no cause overflow */
    .header {
        overflow: hidden;
    }
    
    .nav-container {
        padding: 0 1rem;
        min-height: auto;
    }
    
    .nav {
        padding: 0.75rem 0;
    }
    
    /* Asegurar que todas las secciones sean responsivas */
    .hero, .welcome, .services, .process, .portfolio, .testimonials, .about, .contact, .footer {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Asegurar que los grids no causen overflow */
    .services-track, .testimonials-grid, .gallery-grid, .welcome-stats {
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .welcome-title {
        font-size: 1.8rem;
        min-height: 1.5em;
    }
    
    .welcome-subtitle {
        font-size: 1.125rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card,
    .process-step,
    .portfolio-item,
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .nav-logo .logo-img {
        height: 55px;
        max-width: 180px;
    }
    
    /* Mobile navbar logo visibility */
    .nav-logo {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    .nav-logo.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Mobile logo theme switching */
    .nav-logo .logo-light {
        display: block;
    }
    
    .nav-logo .logo-dark {
        display: none;
    }
    
    [data-theme="dark"] .nav-logo .logo-light {
        display: none;
    }
    
    [data-theme="dark"] .nav-logo .logo-dark {
        display: block;
    }
    
    .footer-logo .logo-img {
        height: 55px;
        max-width: 200px;
    }
    
    /* Mobile footer logo theme switching */
    .footer-logo .logo-light {
        display: block;
    }
    
    .footer-logo .logo-dark {
        display: none;
    }
    
    [data-theme="dark"] .footer-logo .logo-light {
        display: none;
    }
    
    [data-theme="dark"] .footer-logo .logo-dark {
        display: block;
    }
    
    .process-carousel-container {
        min-height: 350px;
        overflow: visible;
    }
    
    .process-step {
        padding: 1.5rem 1rem;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        border-radius: 12px;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
        border-radius: 14px;
    }
    
    .step-title {
        font-size: 1.25rem;
    }
    
    .step-description {
        font-size: 0.95rem;
    }
    
    .process-carousel-controls {
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .process-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .slider-handle {
        width: 28px;
        height: 28px;
    }
    
    .hero-logo .logo-img {
        height: 100px;
        max-width: 300px;
    }
    
    /* Mobile hero logo - always use light version */
    .hero-logo .logo-light {
        display: block;
    }
    
    .hero-logo .logo-dark {
        display: none;
    }
    
    [data-theme="dark"] .hero-logo .logo-light {
        display: block; /* Keep showing light version even in dark mode */
    }
    
    [data-theme="dark"] .hero-logo .logo-dark {
        display: none;
    }
    
    .scroll-indicator {
        bottom: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    /* Extra responsive header controls for very small screens */
    .nav-controls {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .language-selector {
        gap: 0.25rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Lightbox extra responsive */
    .lightbox {
        padding: 0.5rem;
    }
    
    .lightbox-image {
        max-width: 98vw;
        max-height: 75vh;
    }
}

/* ===== ANIMACIONES ===== */
@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);
    }
}

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

/* ===== ESTADOS DE HOVER Y FOCUS ===== */
.service-card:hover .service-icon {
    transform: scale(1.1);
}

.process-step:hover .step-icon {
    transform: scale(1.1);
    background-color: var(--accent-primary);
    color: white;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* ===== SELECCIÓN DE TEXTO ===== */
::selection {
    background-color: var(--accent-primary);
    color: white;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

[data-theme="dark"] .hero-content {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glassmorphism para tema oscuro */
[data-theme="dark"] .header {
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
}

[data-theme="dark"] .header.glassmorphism {
    background-color: rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .language-selector {
    background-color: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .theme-toggle {
    background-color: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(96, 165, 250, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .lang-btn.active {
    background-color: rgba(96, 165, 250, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--accent-primary);
    border: 1px solid rgba(96, 165, 250, 0.4);
}