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

/* =================================================================
    VARIABLES CSS (CUSTOM PROPERTIES)
================================================================= */
:root {
    /* Colores principales - Inspirados en VGWebStudio */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --secondary-gradient: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    --accent-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);

    /* Colores neutros - Más modernos y sofisticados */
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #475569;
    --gray-light: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;

    /* Colores de acento - Paleta VGWebStudio */
    --accent: #059669;
    --accent-2: #0891b2;
    --accent-3: #7c3aed;
    --warning: #f59e0b;
    --error: #dc2626;

    /* Tipografía */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    /* Espaciado */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    --spacing-20: 5rem;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Bordes */
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-full: 9999px;

    /* Transiciones */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* =================================================================
    ESTILOS BASE
================================================================= */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

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

/* =================================================================
    HEADER Y NAVEGACIÓN
================================================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(25px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: var(--transition);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Manejo de errores de logo - Mostrar placeholder si falla */
.nav-logo-img:not([src]),
.nav-logo-img[src=""],
.nav-logo-img:not([src*="."]) {
    display: none;
}

/* Placeholders eliminados - el usuario agregará logo real más adelante */

.nav-logo h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-8);
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

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

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* =================================================================
    BOTÓN DE CAMBIO DE IDIOMA
================================================================= */
.language-switcher {
    display: flex;
    align-items: center;
    margin-left: var(--spacing-4);
}

/* DISEÑO PARA DESKTOP - Toggle Switch Elegante */
@media (min-width: 769px) {
    .lang-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.95);
        color: var(--dark);
        border: 1px solid rgba(37, 99, 235, 0.15);
        padding: 4px;
        border-radius: 24px;
        font-size: var(--font-size-xs);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: visible;
        width: 104px;
        height: 40px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(15px);
    }

    /* Slider interno del toggle para desktop */
    .lang-btn::before {
        content: '';
        position: absolute;
        top: 3px;
        left: 3px;
        width: 46px;
        height: 34px;
        background: var(--primary-gradient);
        border-radius: 20px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
        z-index: 1;
    }

    /* Estados del toggle para desktop */
    .lang-btn[data-lang="es"]::before {
        left: 3px;
    }

    .lang-btn[data-lang="en"]::before {
        left: 55px;
    }

    .flag-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 34px;
        transition: all 0.25s ease;
        flex-shrink: 0;
        position: relative;
        z-index: 2;
        border-radius: 20px;
    }

    .flag-spain, .flag-usa {
        padding: 2px;
    }

    .flag-image {
        width: 26px;
        height: 26px;
        object-fit: cover;
        border-radius: 50%;
        display: block;
        transition: all 0.25s ease;
        filter: brightness(0.9);
    }

    /* .text-flag eliminado - solo banderas */

    /* Estilo para la bandera activa */
    .lang-btn[data-lang="es"] .flag-spain .flag-image,
    .lang-btn[data-lang="en"] .flag-usa .flag-image {
        filter: brightness(1);
        transform: scale(1.08);
    }

    /* Textos eliminados - solo banderas visibles */

    .lang-text {
        display: none;
    }

    .mobile-only {
        display: none;
    }

    .emoji-flag {
        display: none;
    }

    .lang-btn:hover {
        box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
        border-color: rgba(37, 99, 235, 0.25);
    }

    .lang-btn:hover::before {
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    }

    .lang-btn:active {
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    }
}

/* DISEÑO PARA MÓVILES/TABLETS - Igual que Desktop pero más compacto */
@media (max-width: 768px) {
    .lang-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.95);
        color: var(--dark);
        border: 1px solid rgba(37, 99, 235, 0.15);
        padding: 3px;
        border-radius: 20px;
        font-size: var(--font-size-xs);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: visible;
        width: 88px;
        height: 34px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(12px);
    }

    /* Slider interno del toggle para móvil */
    .lang-btn::before {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 40px;
        height: 30px;
        background: var(--primary-gradient);
        border-radius: 17px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
        z-index: 1;
    }

    /* Estados del toggle para móvil */
    .lang-btn[data-lang="es"]::before {
        left: 2px;
    }

    .lang-btn[data-lang="en"]::before {
        left: 46px;
    }

    /* Mostrar ambas banderas en móvil */
    .flag-spain, .flag-usa {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 30px;
        transition: all 0.25s ease;
        flex-shrink: 0;
        position: relative;
        z-index: 2;
        border-radius: 17px;
        padding: 1px;
    }

    .flag-image {
        width: 22px;
        height: 22px;
        object-fit: cover;
        border-radius: 50%;
        display: block;
        transition: all 0.25s ease;
        filter: brightness(0.9);
    }

    /* Estilo para la bandera activa en móvil */
    .lang-btn[data-lang="es"] .flag-spain .flag-image,
    .lang-btn[data-lang="en"] .flag-usa .flag-image {
        filter: brightness(1);
        transform: scale(1.05);
    }

    .emoji-flag {
        display: none;
    }

    .mobile-only {
        display: none;
    }

    .lang-btn:hover {
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
        border-color: rgba(37, 99, 235, 0.2);
    }

    .lang-btn:hover::before {
        box-shadow: 0 3px 8px rgba(37, 99, 235, 0.4);
    }

    .lang-btn:active {
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
    }
}

/* Los estilos hover y active ahora están en las media queries específicas */

/* ICONOS Y TEXTO - Desktop */
@media (min-width: 769px) {
    .flag-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        transition: all 0.25s ease;
        flex-shrink: 0;
        position: relative;
        z-index: 2;
        border: 1px solid rgba(37, 99, 235, 0.1);
        margin: 0 4px;
        overflow: hidden;
    }

    .lang-text {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.5px;
        transition: all 0.25s ease;
        color: var(--white);
        position: relative;
        z-index: 2;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .flag-image {
        width: 24px;
        height: 24px;
        object-fit: cover;
        border-radius: 50%;
        display: block;
        transition: all 0.25s ease;
    }

    .emoji-flag {
        display: none;
    }
}

/* ICONOS Y TEXTO - Móviles/Tablets */
@media (max-width: 768px) {
    .flag-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 30px;
        transition: all 0.25s ease;
        flex-shrink: 0;
        position: relative;
        z-index: 2;
        border-radius: 17px;
        padding: 1px;
    }

    .lang-text {
        display: none;
    }

    .flag-image {
        width: 22px;
        height: 22px;
        object-fit: cover;
        border-radius: 50%;
        display: block;
        transition: all 0.25s ease;
        filter: brightness(0.9);
    }

    .emoji-flag {
        display: none;
    }

    /* Efectos hover removidos para evitar duplicación */
}

/* Sistema de fallback eliminado - solo banderas */

/* Animación para el cambio de idioma */
.lang-switching {
    animation: langSwitchProfessional 0.4s ease-in-out;
}

@keyframes langSwitchProfessional {
    0% { 
        opacity: 1;
        transform: translateY(0px) scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: translateY(-2px) scale(0.98);
    }
    100% { 
        opacity: 1;
        transform: translateY(0px) scale(1);
    }
}

/* Efecto adicional para el contenido del botón */
.lang-switching .flag-icon,
.lang-switching .lang-text {
    animation: langContentFade 0.4s ease-in-out;
}

@keyframes langContentFade {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* =================================================================
    HERO SECTION
================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* Gradiente actual - tonos púrpura-azul-rosa suaves */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    
    /* ALTERNATIVAS - Descomenta la que más te guste y comenta la anterior */
    
    /* Opción 1: Tonos neutros elegantes - grises con azul sutil */
    /* background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); */
    
    /* Opción 2: Gradiente profesional - azul muy suave */
    /* background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); */
    
    /* Opción 3: Tonos tierra modernos */
    /* background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); */
    
    /* Opción 4: Gradiente minimalista - blancos con toque de color */
    /* background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%); */
    
    /* Opción 5: Azul-verde suave (muy profesional) */
    /* background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%); */
    
    background-attachment: fixed; /* Fondo fijo que no se mueve con scroll */
    background-size: 100% 100vh;
    background-repeat: no-repeat;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: fixed; /* Cambio a fixed para que no se mueva */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 40% 80%, rgba(240, 147, 251, 0.15) 0%, transparent 60%);
    animation: gradientShift 8s ease-in-out infinite, backgroundBounce 12s ease-in-out infinite;
    z-index: -1; /* Detrás de todo el contenido */
}

/* Partículas de fondo del hero */
.particles-bg {
    position: fixed; /* Cambio a fixed para que no se muevan */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0; /* Detrás del contenido pero encima del ::before */
    pointer-events: none; /* Para que no interfiera con clics */
    animation: backgroundBounce 12s ease-in-out infinite;
}

.particles-bg::before,
.particles-bg::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float-particles 15s infinite linear;
}

.particles-bg::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particles-bg::after {
    top: 60%;
    left: 80%;
    animation-delay: 5s;
    animation-duration: 18s;
}

/* Contenido del hero */
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-16);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-6);
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.highlight {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: glow 2s ease-in-out infinite alternate;
}

.hero-description {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-8);
    line-height: 1.7;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-4);
    flex-wrap: wrap;
}

/* Visual del hero (tarjeta animada) */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: var(--border-radius-lg);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    width: 320px;
    height: 220px;
    overflow: hidden;
    position: relative;
    animation: float 6s ease-in-out infinite, cardGlow 4s ease-in-out infinite alternate;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            rgba(102, 126, 234, 0.1),
            transparent,
            rgba(118, 75, 162, 0.1),
            transparent);
    animation: rotate 8s linear infinite;
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: calc(var(--border-radius-lg) - 2px);
    z-index: 1;
}

.card-header {
    height: 35px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-4);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    position: relative;
    z-index: 2;
}

.dots {
    display: flex;
    gap: var(--spacing-2);
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

.dots span:nth-child(1) {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation-delay: 0s;
}

.dots span:nth-child(2) {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    animation-delay: 0.2s;
}

.dots span:nth-child(3) {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    animation-delay: 0.4s;
}

.card-content {
    padding: var(--spacing-5);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
    position: relative;
    z-index: 2;
}

.code-line {
    height: 14px;
    background: linear-gradient(90deg, #2563eb 0%, #1e40af 50%, #0891b2 100%);
    border-radius: 8px;
    opacity: 0.9;
    animation: codeFlow 3s ease-in-out infinite, shimmer 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.code-line::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: slide 2s ease-in-out infinite;
}

.code-line.short {
    width: 65%;
    animation-delay: 0.5s;
}

.code-line.medium {
    width: 85%;
    animation-delay: 1s;
}

/* =================================================================
    BOTONES GLOBALES
================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-base);
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    min-width: 140px;
    /* Área de hover más amplia para prevenir jittering */
    margin: 4px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    transition: left 0.5s ease;
    z-index: -1;
}

.btn-outline:hover::before {
    left: 0;
}

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

.form-buttons {
    display: flex;
    gap: var(--spacing-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-6);
}

/* =================================================================
    SECCIONES GENERALES
================================================================= */
section {
    padding: var(--spacing-20) 0;
    position: relative;
    z-index: 5; /* Encima del fondo fijo */
    background: var(--white); /* Fondo sólido por defecto */
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-16);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-4);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* =================================================================
    ABOUT SECTION
================================================================= */
.about {
    background: var(--light);
    z-index: 5; /* Encima del fondo fijo */
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-16);
    align-items: start;
}

.about-text h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--spacing-6);
    line-height: 1.3;
}

.about-text p {
    color: var(--gray);
    margin-bottom: var(--spacing-6);
    line-height: 1.7;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-6);
}

.feature {
    background: var(--white);
    padding: var(--spacing-6);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    /* Área de hover más amplia para prevenir jittering */
    margin: 4px;
}

.feature:hover {
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-4);
    position: relative;
    box-shadow:
        0 8px 25px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.feature:hover .feature-icon {
    transform: scale(1.05);
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    box-shadow:
        0 15px 35px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.feature-icon i {
    color: var(--white);
    font-size: var(--font-size-2xl);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: iconPulse 2s ease-in-out infinite;
}

.feature h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--spacing-2);
}

.feature p {
    color: var(--gray);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: 0;
}

/* =================================================================
    SECCIÓN DEL EQUIPO
================================================================= */
.team {
    padding: var(--spacing-20) 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--spacing-12);
    margin-top: var(--spacing-16);
    position: relative;
    z-index: 2;
}

.team-member {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-8);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(102, 126, 234, 0.2);
}

.team-member:hover::before {
    opacity: 1;
}

.member-image {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-6);
}

.image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.team-member:hover .image-placeholder {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.team-member:hover .member-photo {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.member-info {
    text-align: center;
}

.member-name {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-2);
}

.member-role {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-4);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.member-description {
    font-size: var(--font-size-base);
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: var(--spacing-6);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.member-skills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
    justify-content: center;
    margin-bottom: var(--spacing-8);
}

.skill-tag {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: var(--spacing-1) var(--spacing-3);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.skill-tag::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;
}

.skill-tag:hover::before {
    left: 100%;
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.member-actions {
    display: flex;
    gap: var(--spacing-3);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cv {
    /* Estilos específicos del CV que complementan btn-primary */
    gap: var(--spacing-2);
    position: relative;
    overflow: hidden;
}

.btn-cv::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: var(--border-radius);
}

.btn-cv:hover::before {
    left: 0;
}

.btn-cv:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

/* Botón CV deshabilitado */
.btn-cv-disabled {
    opacity: 0.6;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%) !important;
    color: #f8fafc !important;
    cursor: not-allowed !important;
    pointer-events: auto;
    filter: grayscale(100%);
}

.btn-cv-disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%) !important;
    color: #f8fafc !important;
}

.btn-cv-disabled::before {
    display: none !important;
}

.btn-linkedin {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-5);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    justify-content: center;
}

.btn-cv i,
.btn-linkedin i {
    font-size: 1.1em;
}

/* Responsive design para la sección del equipo */
@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
        margin-top: var(--spacing-12);
    }
    
    .team-member {
        padding: var(--spacing-6);
    }
    
    .member-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-cv,
    .btn-linkedin {
        width: 100%;
        max-width: 250px;
    }
    
    .btn-linkedin {
        border: 2px solid rgba(255, 255, 255, 0.9);
    }
}

@media (max-width: 480px) {
    .team {
        padding: var(--spacing-16) 0;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-6);
    }
    
    .image-placeholder,
    .member-photo {
        width: 100px;
        height: 100px;
    }
    
    .image-placeholder {
        font-size: 2rem;
    }
    
    .member-name {
        font-size: var(--font-size-xl);
    }
    
    .member-role {
        font-size: var(--font-size-base);
    }
    
    .member-description {
        font-size: var(--font-size-sm);
    }
}

/* =================================================================
    PORTFOLIO SECTION
================================================================= */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-12);
    flex-wrap: wrap;
}

.filter-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 2px solid transparent;
    color: var(--gray);
    padding: var(--spacing-3) var(--spacing-5);
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, #2563eb, #1e40af, #0891b2);
    border-radius: var(--border-radius-full);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    opacity: 1;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-gradient);
    color: var(--white);
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-8);
    max-width: 1200px;
    margin: 0 auto;
}

/* Animación flotante para las cards */
.portfolio-item {
    animation: portfolioFloat 6s ease-in-out infinite;
}

.portfolio-item:nth-child(1) {
    animation-delay: 0s;
}

.portfolio-item:nth-child(2) {
    animation-delay: 1.5s;
}

.portfolio-item:nth-child(3) {
    animation-delay: 3s;
}

.portfolio-item {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: var(--white);
    /* Área de hover más amplia para prevenir jittering */
    margin: 8px;
    position: relative;
    /* Efectos similares al hero */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Efectos de partículas para las cards */
.portfolio-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            rgba(102, 126, 234, 0.05),
            transparent,
            rgba(118, 75, 162, 0.05),
            transparent,
            rgba(240, 147, 251, 0.05),
            transparent);
    animation: rotate 15s linear infinite;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-item:hover {
    box-shadow: 
        var(--shadow-xl),
        0 0 30px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-8px) scale(1.02);
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.portfolio-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    /* Gradiente más suave que coincida con el nuevo estilo del hero */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent,
            rgba(240, 147, 251, 0.1),
            transparent);
    animation: portfolioShine 6s ease-in-out infinite;
    animation-delay: 0.5s;
}

.placeholder-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(240, 147, 251, 0.15) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
    z-index: -1;
}

.placeholder-image i {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-3);
    opacity: 0.9;
    animation: iconFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.placeholder-image p {
    font-weight: 600;
    margin: 0;
    font-size: var(--font-size-lg);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradiente similar al del hero pero más intenso para el overlay */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 50%, rgba(240, 147, 251, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    z-index: 3;
}

.portfolio-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    animation: gradientShift 4s ease-in-out infinite;
    z-index: -1;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .placeholder-image i,
.portfolio-item:hover .placeholder-image p {
    opacity: 0;
    transform: scale(0.8) translateY(-5px);
    animation-play-state: paused;
}

.portfolio-info {
    text-align: center;
    color: var(--white);
    padding: var(--spacing-4);
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.portfolio-info h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-2);
}

.portfolio-info p {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-4);
    opacity: 0.9;
}

.portfolio-links {
    display: flex;
    gap: var(--spacing-3);
    justify-content: center;
}

.portfolio-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    /* Padding invisible para evitar jittering */
    margin: 4px;
}

.portfolio-link:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: scale(1.05);
}

/* =================================================================
    ESTILOS PARA CARDS "PRÓXIMAMENTE"
================================================================= */

/* Card de próximamente */
.portfolio-item-coming-soon {
    position: relative;
    overflow: hidden;
}

.portfolio-item-coming-soon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(156, 163, 175, 0.1);
    z-index: 1;
    transition: all 0.3s ease;
}

.portfolio-item-coming-soon:hover::after {
    background: rgba(156, 163, 175, 0.05);
}

/* Fondo especial para próximamente */
.coming-soon-bg {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 50%, #4b5563 100%);
    position: relative;
    overflow: hidden;
}

.coming-soon-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(255, 255, 255, 0.03) 20px,
        rgba(255, 255, 255, 0.03) 40px
    );
    animation: comingSoonPattern 20s linear infinite;
}

@keyframes comingSoonPattern {
    0% { transform: translateX(-100px) translateY(-100px); }
    100% { transform: translateX(100px) translateY(100px); }
}

/* Icono de próximamente */
.coming-soon-icon {
    font-size: 3rem;
    opacity: 0.7;
    margin-bottom: var(--spacing-3);
    animation: comingSoonPulse 3s ease-in-out infinite;
}

@keyframes comingSoonPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.7;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Texto de próximamente */
.coming-soon-text {
    opacity: 0.8;
    font-weight: 500;
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-4);
}

/* Badge de próximamente */
.coming-soon-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    animation: comingSoonBadge 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes comingSoonBadge {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
    }
}

/* Overlay de próximamente */
.coming-soon-overlay {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.95) 0%, rgba(107, 114, 128, 0.95) 50%, rgba(75, 85, 99, 0.9) 100%);
}

.coming-soon-overlay::before {
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}

/* Mensaje de en desarrollo */
.coming-soon-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--border-radius-full);
    margin-top: var(--spacing-4);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coming-soon-message i {
    animation: comingSoonClock 2s ease-in-out infinite;
}

@keyframes comingSoonClock {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

/* Efectos hover especiales para próximamente */
.portfolio-item-coming-soon:hover .coming-soon-icon {
    animation-duration: 1s;
    transform: scale(1.2);
}

.portfolio-item-coming-soon:hover .coming-soon-badge {
    animation-duration: 1s;
}

.portfolio-item-coming-soon:hover .coming-soon-message {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
}

/* =================================================================
    CONTACT SECTION
================================================================= */
.contact {
    background: var(--light);
    z-index: 5; /* Encima del fondo fijo */
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-16);
    align-items: start;
}

.contact-info h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--spacing-4);
}

.contact-info p {
    color: var(--gray);
    margin-bottom: var(--spacing-8);
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    color: var(--white);
    font-size: var(--font-size-lg);
}

.contact-details h4 {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--spacing-1);
}

.contact-details p {
    color: var(--gray);
    margin: 0;
}

/* Enlaces de teléfono/WhatsApp */
.contact-details a[href^="https://wa.me/"],
.footer-section a[href^="https://wa.me/"] {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    padding: 2px 6px;
    position: relative;
    display: inline-block;
}

.contact-details a[href^="https://wa.me/"]:hover,
.footer-section a[href^="https://wa.me/"]:hover {
    color: #25d366;
    background-color: rgba(37, 211, 102, 0.1);
    transform: translateX(3px);
}

.contact-details a[href^="https://wa.me/"]:hover::before,
.footer-section a[href^="https://wa.me/"]:hover::before {
    content: "📱";
    position: absolute;
    left: -20px;
    animation: whatsappBounce 0.6s ease;
}

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

/* Formulario de contacto */
.contact-form-container {
    background: var(--white);
    padding: var(--spacing-8);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-group {
    position: relative;
    margin-bottom: var(--spacing-6);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-4);
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    transition: var(--transition);
    background: var(--white);
    font-family: var(--font-family);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group label {
    position: absolute;
    top: var(--spacing-4);
    left: var(--spacing-4);
    color: var(--gray);
    transition: var(--transition);
    pointer-events: none;
    background: var(--white);
    padding: 0 var(--spacing-1);
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
    top: -10px;
    left: 12px;
    font-size: var(--font-size-xs);
    color: var(--primary-color);
    background: var(--white);
    padding: 0 var(--spacing-2);
}

/* =================================================================
    VALIDACIÓN PERSONALIZADA
================================================================= */
.validation-error {
    color: var(--error);
    font-size: var(--font-size-xs);
    margin-top: var(--spacing-1);
    margin-left: var(--spacing-3);
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    animation: errorSlideIn 0.3s ease;
}

.validation-error::before {
    content: '⚠️';
    font-size: 12px;
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--error);
    background-color: rgba(239, 68, 68, 0.05);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.error:focus,
.form-group textarea.error:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-group input.error + label,
.form-group textarea.error + label {
    color: var(--error);
}

/* Animación para errores */
@keyframes errorSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estado de éxito */
.form-group input:valid:not(.error),
.form-group textarea:valid:not(.error) {
    border-color: var(--accent);
}

.form-group input:valid:not(.error) + label,
.form-group textarea:valid:not(.error) + label {
    color: var(--accent);
}

/* =================================================================
    FOOTER
================================================================= */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: var(--spacing-16) 0 var(--spacing-8);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-12);
    margin-bottom: var(--spacing-8);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-4);
}

.footer-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: var(--transition);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    filter: brightness(1.1);
}

.footer-logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Manejo de errores de logo footer - Mostrar placeholder si falla */
.footer-logo-img:not([src]),
.footer-logo-img[src=""],
.footer-logo-img:not([src*="."]) {
    display: none;
}

.footer-section h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: 0;
    color: var(--white);
}

.footer-section h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-4);
    color: var(--white);
}

.footer-section p {
    color: var(--gray-light);
    margin-bottom: var(--spacing-6);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-2);
}

.footer-section ul li a {
    color: var(--gray-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: var(--spacing-4);
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--dark-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-light);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);

}

.footer-bottom {
    padding-top: var(--spacing-8);
    border-top: 1px solid var(--dark-light);
    text-align: center;
    color: var(--gray-light);
}

/* =================================================================
    ANIMACIONES Y KEYFRAMES
================================================================= */
@keyframes gradientShift {

    0%,
    100% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }

    33% {
        transform: translateX(-20px) translateY(-20px);
        opacity: 0.8;
    }

    66% {
        transform: translateX(20px) translateY(-10px);
        opacity: 0.6;
    }
}

@keyframes float-particles {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }

    to {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotateX(0deg);
    }

    50% {
        transform: translateY(-25px) rotateX(5deg);
    }
}

/* Animación floatFixed eliminada - no necesaria */

@keyframes cardGlow {
    0% {
        filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 40px rgba(118, 75, 162, 0.5));
    }
}

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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes codeFlow {

    0%,
    100% {
        transform: scaleX(1);
        opacity: 0.9;
    }

    50% {
        transform: scaleX(0.95);
        opacity: 0.6;
    }
}

@keyframes shimmer {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }
}

@keyframes slide {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes portfolioShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }

    25% {
        opacity: 0.8;
    }

    50% {
        transform: translateX(-50%) translateY(-50%) rotate(45deg);
        opacity: 1;
    }

    75% {
        opacity: 0.8;
    }

    100% {
        transform: translateX(0%) translateY(0%) rotate(45deg);
        opacity: 0;
    }
}

@keyframes iconFloat {
    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    25% {
        transform: translateY(-4px) scale(1.01);
    }

    50% {
        transform: translateY(-8px) scale(1.02);
    }

    75% {
        transform: translateY(-4px) scale(1.01);
    }
}

@keyframes portfolioFloat {
    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    33% {
        transform: translateY(-8px) scale(1.005);
    }

    66% {
        transform: translateY(4px) scale(0.998);
    }
}

/* Animación de rebote suave para el fondo */
@keyframes backgroundBounce {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    
    25% {
        transform: translateY(-8px) scale(1.005);
    }
    
    50% {
        transform: translateY(0px) scale(1);
    }
    
    75% {
        transform: translateY(5px) scale(0.998);
    }
}

/* =================================================================
    MEDIA QUERIES - RESPONSIVE DESIGN
================================================================= */

/* Tablets y pantallas medianas */
@media (max-width: 768px) {

    /* Navegación móvil */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-8) 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);
    }

    /* Ajuste de margen para móvil */
    .language-switcher {
        margin-left: var(--spacing-2);
    }

    /* Hero section responsive */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-8);
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    /* About section responsive */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    /* Contact section responsive */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }

    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
        text-align: center;
    }

    /* Portfolio filters responsive */
    .portfolio-filters {
        gap: var(--spacing-2);
    }

    .filter-btn {
        padding: var(--spacing-2) var(--spacing-3);
        font-size: var(--font-size-sm);
    }

    /* Secciones responsive */
    section {
        padding: var(--spacing-12) 0;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }
}

/* Móviles */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-4);
    }

    .nav-container {
        padding: 0 var(--spacing-4);
    }

    /* Logos responsive */
    .nav-logo-img {
        width: 35px;
        height: 35px;
    }

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

    .footer-brand {
        justify-content: center;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

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

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .hero-card {
        width: 250px;
        height: 150px;
    }

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

    .contact-form-container {
        padding: var(--spacing-6);
    }

    .form-buttons {
        flex-direction: column;
        gap: var(--spacing-3);
    }

    .btn-whatsapp,
    .form-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =================================================================
    ANIMACIONES PARA ELEMENTOS ESPECÍFICOS
================================================================= */
/* =================================================================
    ANIMACIONES CONTROLADAS POR INTERSECTION OBSERVER
================================================================= */

@media (prefers-reduced-motion: no-preference) {
    /* Estado inicial de elementos que van a animarse */
    .portfolio-item,
    .feature,
    .contact-method,
    .team-member,
    .hero-title,
    .hero-description,
    .hero-buttons,
    .section-header {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Clase que se agrega cuando el elemento entra al viewport */
    .portfolio-item.animate-in,
    .feature.animate-in,
    .contact-method.animate-in,
    .team-member.animate-in,
    .hero-title.animate-in,
    .hero-description.animate-in,
    .hero-buttons.animate-in,
    .section-header.animate-in {
        opacity: 1;
        transform: translateY(0);
    }

    /* Estado estable después de la animación inicial */
    .portfolio-item.animate-in.stable {
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Delays escalonados sincronizados para portfolio */
    .portfolio-item.animate-in:nth-child(1) {
        transition-delay: 0.2s;
    }

    .portfolio-item.animate-in:nth-child(2) {
        transition-delay: 0.4s;
    }

    .portfolio-item.animate-in:nth-child(3) {
        transition-delay: 0.6s;
    }

    .portfolio-item.animate-in:nth-child(4) {
        transition-delay: 0.8s;
    }

    .feature.animate-in:nth-child(1) {
        transition-delay: 0.1s;
    }

    .feature.animate-in:nth-child(2) {
        transition-delay: 0.2s;
    }

    .feature.animate-in:nth-child(3) {
        transition-delay: 0.3s;
    }

    .feature.animate-in:nth-child(4) {
        transition-delay: 0.4s;
    }

    .team-member.animate-in:nth-child(1) {
        transition-delay: 0.1s;
    }

    .team-member.animate-in:nth-child(2) {
        transition-delay: 0.2s;
    }

    .contact-method.animate-in:nth-child(1) {
        transition-delay: 0.1s;
    }

    .contact-method.animate-in:nth-child(2) {
        transition-delay: 0.2s;
    }

    .contact-method.animate-in:nth-child(3) {
        transition-delay: 0.3s;
    }

    /* Delays para elementos del hero - animación secuencial */
    .hero-title.animate-in {
        transition-delay: 0.2s;
    }

    .hero-description.animate-in {
        transition-delay: 0.4s;
    }

    .hero-buttons.animate-in {
        transition-delay: 0.6s;
    }

    /* Section headers sin delay - aparecen cuando entran al viewport */
    .section-header.animate-in {
        transition-delay: 0.1s;
    }
}

/* =================================================================
    UTILIDADES Y ESTADOS GLOBALES
================================================================= */
.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Estados de hover globales */
a,
button {
    transition: var(--transition);
}

/* Z-index adicional para footer */
.footer {
    position: relative;
    z-index: 5; /* Encima del fondo fijo */
}

/* =================================================================
    PÁGINA DE AGRADECIMIENTO
================================================================= */

.thank-you-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 40px;
    position: relative;
    background: var(--primary-gradient);
    overflow: hidden;
}

.thank-you-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.thank-you-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 30px;
    animation: checkmark 0.8s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(360deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.thank-you-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.thank-you-message {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
}

.thank-you-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #555;
    font-size: 0.95rem;
}

.detail-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 20px;
}

.thank-you-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.thank-you-contact {
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.thank-you-contact p {
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

.contact-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-option:hover {

    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.contact-option i {
    font-size: 1.1rem;
}

/* Responsive para página de agradecimiento */
@media (max-width: 768px) {
    .thank-you-content {
        padding: 40px 30px;
        margin: 0 20px;
    }
    
    .thank-you-title {
        font-size: 2rem;
    }
    
    .thank-you-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .thank-you-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .contact-options {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-option {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .thank-you-page {
        padding: 100px 0 20px;
    }
    
    .thank-you-content {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .thank-you-icon {
        font-size: 3rem;
    }
    
    .thank-you-title {
        font-size: 1.8rem;
    }
    
    .detail-item {
        font-size: 0.9rem;
    }
}

/* =================================================================
    MODAL DE VISTA PREVIA DE PROYECTOS
================================================================= */

/* Overlay del modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

/* Contenido del modal */
.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    margin: 5vh auto;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Header del modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.modal-header h3 {
    margin: 0;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--dark);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: var(--font-size-xl);
    color: #374151;
    cursor: pointer;
    padding: var(--spacing-2);
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-weight: 600;
}

.modal-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

/* Body del modal */
.modal-body {
    padding: var(--spacing-6);
    overflow-y: auto;
    flex: 1;
}

.project-preview-info {
    margin-bottom: var(--spacing-6);
}

.project-preview-image {
    width: 100%;
    margin-bottom: var(--spacing-6);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.project-preview-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.project-preview-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(37, 99, 235, 0.1) 0%, 
        rgba(14, 116, 144, 0.1) 50%, 
        rgba(5, 150, 105, 0.1) 100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.project-preview-image:hover::before {
    opacity: 1;
}

.project-preview-image:hover img {
    transform: scale(1.02);
}

/* Loading spinner para imágenes */
.image-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--border-radius);
    color: var(--gray);
}

.image-loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-3);
}

.image-loading-spinner p {
    font-size: var(--font-size-sm);
    color: var(--gray);
    margin: 0;
    font-weight: 500;
}

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

.project-preview-details {
    margin-bottom: var(--spacing-6);
}

.project-preview-details p {
    font-size: var(--font-size-lg);
    line-height: 1.7;
    color: var(--gray);
    margin-bottom: var(--spacing-4);
}

/* Tecnologías del proyecto */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-4);
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-2) var(--spacing-4);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--border-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.tech-tag::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.6s ease;
}

.tech-tag:hover::before {
    left: 100%;
}

.tech-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Estilos adicionales para las tecnologías del portfolio */
.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-3);
}

.portfolio-tech .tech-tag {
    font-size: var(--font-size-xs);
    padding: var(--spacing-1) var(--spacing-3);
}

/* Footer del modal */
.modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-6);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.modal-footer .btn {
    max-width: 250px;
    text-align: center;
    justify-content: center;
}

/* Estilos para el botón de vista previa */
.preview-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.preview-btn:hover {
    transform: scale(1.1);
}

/* Responsivo para tablets */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 2vh auto;
        max-height: 96vh;
    }
    
    .modal-header {
        padding: var(--spacing-4);
    }
    
    .modal-header h3 {
        font-size: var(--font-size-xl);
    }
    
    .modal-body {
        padding: var(--spacing-4);
    }
    
    .modal-footer {
        padding: var(--spacing-4);
    }
    
    .modal-footer .btn {
        max-width: none;
        width: 100%;
    }
    
    .project-preview-details p {
        font-size: var(--font-size-base);
    }
}

/* Responsivo para móviles */
@media (max-width: 480px) {
    .modal-overlay {
        padding: var(--spacing-2);
    }
    
    .modal-content {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-header {
        padding: var(--spacing-3);
    }
    
    .modal-header h3 {
        font-size: var(--font-size-lg);
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
        background: rgba(0, 0, 0, 0.08);
        color: #1f2937;
        font-weight: 700;
    }
    
    .modal-body {
        padding: var(--spacing-3);
    }
    
    .modal-footer {
        padding: var(--spacing-3);
        justify-content: center;
    }
    
    .project-preview-image img {
        max-height: 250px;
    }
    
    .image-loading-spinner {
        min-height: 200px;
    }
    
    .image-loading-spinner .spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .image-loading-spinner p {
        font-size: 0.8rem;
    }
    
    .tech-tags {
        gap: var(--spacing-1);
    }
    
    .tech-tag {
        font-size: 0.7rem;
        padding: var(--spacing-1) var(--spacing-2);
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-content,
    .tech-tag,
    .preview-btn {
        transition: none;
    }
    
    .modal-overlay.active .modal-content {
        transform: none;
    }
    
    .tech-tag::before {
        display: none;
    }
}

/* Estados de focus para accesibilidad */
.modal-close:focus,
.preview-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    background: rgba(99, 102, 241, 0.1);
}

.modal-close:focus {
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* =================================================================
    INTERACCIONES MÓVILES PARA PORTFOLIO
================================================================= */

/* Estilos para cards activadas en móvil */
@media (max-width: 768px) {
    /* Hacer que las cards sean más táctiles en móvil */
    .portfolio-item {
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Cuando una card está activa en móvil, mostrar el overlay */
    .portfolio-item.mobile-active .portfolio-overlay {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Mejorar la visibilidad del overlay en móvil */
    .portfolio-item.mobile-active .portfolio-overlay::before {
        opacity: 0.95;
    }

    /* Hacer que los iconos de las cards activas sean más visibles */
    .portfolio-item.mobile-active .placeholder-image i,
    .portfolio-item.mobile-active .placeholder-image p {
        color: rgba(255, 255, 255, 0.3);
    }

    /* Agregar feedback visual para el toque */
    .portfolio-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* Transición suave para el overlay móvil */
    .portfolio-overlay {
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Hacer que los botones del overlay sean más grandes para tocar */
    .portfolio-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Indicador visual de que la card es interactiva */
    .portfolio-item::after {
        content: '';
        position: absolute;
        top: 8px;
        right: 8px;
        width: 6px;
        height: 6px;
        background: var(--color-primary);
        border-radius: 50%;
        opacity: 0.6;
        z-index: 2;
    }

    /* Ocultar el indicador cuando la card está activa */
    .portfolio-item.mobile-active::after {
        opacity: 0;
    }
}

/* Estilos específicos para móviles pequeños */
@media (max-width: 480px) {
    .portfolio-item.mobile-active .portfolio-info {
        padding: var(--spacing-4);
    }

    .portfolio-item.mobile-active .portfolio-info h4 {
        font-size: var(--font-size-lg);
        margin-bottom: var(--spacing-2);
    }

    .portfolio-item.mobile-active .portfolio-info p {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-3);
    }

    .portfolio-links {
        gap: var(--spacing-3);
    }
}