@media (max-width: 480px) {
    /* Extra small devices */
    .container {
        padding: 0 20px;
    }

    .nav-wrapper {
        padding: 0.75rem 0;
    }

    .logo-img {
        height: 60px;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-card {
        padding: 2rem;
    }

    .cta-button {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .status-indicator {
        padding: 0.4rem 0.8rem;
    }

    .status-text {
        font-size: 0.8rem;
    }
}/* ===== RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta moderna oscura refinada */
    --primary-bg: #0f0f0f;
    --secondary-bg: #1f1f1f; /* Más claro para mayor contraste */
    --accent-bg: #262626;
    --card-bg: #1f1f1f;
    
    /* Colores de acento más sobrios */
    --accent-primary: #6366f1;  /* Indigo */
    --accent-secondary: #8b5cf6; /* Violeta */
    --accent-tertiary: #1e40af;  /* Azul profundo en lugar de rosa */
    --accent-success: #10b981;   /* Verde */
    
    /* Gradientes simplificados */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #1e40af 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #1e40af 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #1e40af 100%);
    
    /* Colores de texto */
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-tertiary: #737373;
    
    /* Bordes */
    --border-color: #2a2a2a;
    --border-light: #404040;
    
    /* Sombras más refinadas */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
    
    /* Transiciones más suaves */
    --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BASE STYLES ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ===== NAVBAR MODERNO ===== */
.navbar {
    background-color: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

/* Logo */
.logo {
    z-index: 1001;
}

.logo-img {
    height: 60px;
    width: auto;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.status-text {
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 500;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Mobile Menu Button */
.menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-icon {
    display: block;
    width: 28px;
    height: 24px;
    position: relative;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-icon span:nth-child(3) { bottom: 0; }

/* Active state */
.menu-button.active .menu-icon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-button.active .menu-icon span:nth-child(2) {
    opacity: 0;
}

.menu-button.active .menu-icon span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow: hidden;
    z-index: 999;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    padding: 100px 40px 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-links li {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s ease;
}

.mobile-menu.active .mobile-links li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu.active .mobile-links li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-links li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-links li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-links li:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.active .mobile-links li:nth-child(5) { transition-delay: 0.5s; }

.mobile-link {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 0;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:hover {
    color: var(--text-primary);
    transform: translateX(10px);
}

.link-number {
    font-size: 0.875rem;
    opacity: 0.5;
}

.mobile-cta {
    color: var(--accent-primary);
    border-color: rgba(99, 102, 241, 0.2);
}

.mobile-footer {
    text-align: center;
    opacity: 0.5;
    font-size: 0.875rem;
}

/* Wave effect for mobile menu */
.mobile-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: wave 10s linear infinite;
    pointer-events: none;
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .menu-button {
        display: block;
    }
    
    .nav-wrapper {
        padding: 1rem 0;
    }
}

/* Logo Section */
.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-base);
}

.logo:hover {
    transform: translateX(5px);
}

.logo-img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: var(--transition-base);
}

.logo:hover .logo-img {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

/* Hide desktop-only elements on mobile */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* Navigation Center */
.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 6px;
    position: relative;
}

.nav-indicator {
    position: absolute;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    z-index: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Visual indicator for active state */
.nav-pill .nav-link.active {
    background: rgba(99, 102, 241, 0.1);
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Only show the before pseudo element on non-dropdown active links */
.nav-link.active:not(.has-dropdown .nav-link)::before {
    opacity: 1;
}

/* Don't show active text effect on dropdown items */
.has-dropdown .nav-link::before {
    display: none;
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: calc(100% + 20px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(25, 25, 25, 0.98);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    min-width: 720px;
    z-index: 1000;
}

.has-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.1);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.mega-menu-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.mega-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mega-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.mega-menu-item:hover::before {
    opacity: 1;
}

.mega-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: grayscale(0.2);
    transition: all 0.3s ease;
}

.mega-menu-item:hover .mega-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.mega-menu-item h4 {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.mega-menu-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.status-text {
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 500;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover::before {
    width: 100px;
    height: 100px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.cta-button:hover .cta-arrow {
    transform: translateX(4px);
}

.cta-arrow {
    transition: transform 0.3s ease;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: url('portada.jpg') no-repeat center center;
    background-size: cover;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 15, 15, 0.7);
    z-index: 1;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    min-height: 4rem;
}

/* ===== ANIMACIÓN DE CÓDIGO ===== */
.code-brackets {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    color: var(--accent-primary);
    opacity: 0;
    animation: fadeInBrackets 0.5s ease forwards;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.brackets-left {
    animation-delay: 0.2s;
    margin-right: 0.5rem;
}

.brackets-right {
    animation-delay: 0.2s;
    margin-left: 0.5rem;
}

.animated-text {
    position: relative;
    display: inline-block;
    font-family: 'Courier New', monospace;
    min-width: 650px;
}

.binary-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ff00;
    font-size: 0.8em;
    opacity: 0;
    animation: binaryFadeIn 1s ease forwards 0.5s;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    white-space: nowrap;
}

.code-text {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    color: #f97316;
    font-size: 0.7em;
    opacity: 0;
    animation: codeFadeIn 1s ease forwards 1.5s;
    white-space: nowrap;
}

.code-text-end {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    color: #f97316;
    font-size: 0.7em;
    opacity: 0;
    animation: codeFadeIn 1s ease forwards 1.5s;
    white-space: nowrap;
}

.final-text {
    opacity: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: finalTextReveal 1.5s ease forwards 2.5s;
    display: inline-block;
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--text-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    position: relative;
}

/* Animación de resaltado para palabras clave */
.final-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        transparent 20%,
        rgba(99, 102, 241, 0.3) 25%,
        transparent 30%,
        transparent 45%,
        rgba(99, 102, 241, 0.3) 50%,
        transparent 55%,
        transparent 85%,
        rgba(99, 102, 241, 0.3) 90%,
        transparent 95%
    );
    animation: highlightSweep 3s ease infinite 4s;
    pointer-events: none;
}

@keyframes fadeInBrackets {
    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes binaryFadeIn {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.9);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes codeFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.9);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) scale(0.9);
    }
}

@keyframes finalTextReveal {
    0% {
        opacity: 0;
        transform: scale(0.9);
        filter: blur(10px);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes highlightSweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Efecto de partículas flotantes */
.hero-content::before,
.hero-content::after {
    content: '< />';
    position: absolute;
    color: var(--accent-primary);
    opacity: 0.1;
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
}

.hero-content::before {
    top: -50px;
    left: 10%;
    animation-delay: 0s;
}

.hero-content::after {
    content: '{ }';
    bottom: -50px;
    right: 10%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ===== RESTO DEL CSS ORIGINAL ===== */
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 4s;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 4.2s;
}

.btn {
    padding: 14px 36px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    background: var(--gradient-secondary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
    position: relative;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.btn-secondary:hover::before {
    opacity: 1;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: transparent;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 5rem 0;
    background-color: var(--secondary-bg);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 16px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(1.2);
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 0;
}

.service-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    opacity: 0.08;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    position: relative;
    z-index: 1;
    color: var(--accent-primary);
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 5rem 0;
    background-color: var(--primary-bg);
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 800;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.8;
    font-size: 1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.stat:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.image-placeholder {
    background: linear-gradient(135deg, var(--card-bg), var(--accent-bg));
    height: 500px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.12;
    animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ===== CLIENTS SECTION ===== */
.clients {
    padding: 5rem 0;
    background-color: var(--secondary-bg);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.client-logo {
    background: var(--card-bg);
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.logo-placeholder {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 5rem 0;
    background-color: var(--primary-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--secondary-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.06);
}

.contact-info {
    padding: 2.5rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.info-item {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.info-item:hover {
    transform: translateX(6px);
    border-color: var(--accent-primary);
}

.info-item strong {
    color: var(--accent-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--secondary-bg);
    padding: 4rem 0 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1.25rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition-base);
}

.social-links a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.7s ease forwards;
}

/* Respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .service-card,
    .stat,
    .client-logo,
    .btn,
    .info-item,
    .social-links a {
        animation: none;
        transform: none;
        transition: none;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.5rem 0;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 2rem;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }

    .nav-toggle span {
        display: block;
        width: 26px;
        height: 3px;
        background: var(--text-primary);
        margin: 5px 0;
        transition: var(--transition-fast);
        border-radius: 2px;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* Mobile adjustments for hero */
    .hero-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 0.25rem;
        min-height: auto;
        padding: 0 1rem;
    }

    .animated-text {
        min-width: auto;
        width: 100%;
        font-size: 0.9em;
    }

    .code-brackets {
        font-size: 1em;
        display: none; /* Hide brackets on mobile for cleaner look */
    }

    .binary-text,
    .code-text,
    .code-text-end {
        font-size: 0.5em;
    }

    .final-text {
        font-size: 1em;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        max-width: none;
        padding: 16px 24px;
        font-size: 1rem;
    }

    /* Fix hero content spacing */
    .hero-content {
        padding: 0 0.5rem;
        width: 100%;
    }

    .hero {
        padding-top: 80px; /* Account for fixed navbar */
    }

    .section-title {
        font-size: 2.25rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .logo h2 {
        font-size: 2rem; /* Smaller logo size for mobile */
    }

    .hero-content::before,
    .hero-content::after {
        display: none;
    }
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: var(--accent-primary);
    color: var(--primary-bg);
}

::-moz-selection {
    background: var(--accent-primary);
    color: var(--primary-bg);
}
/* ===== ESTILOS PARA VIDEO EN SECCIÓN NOSOTROS ===== */

/* Contenedor del video */
.about-video-container {
    position: relative;
}

.about-video {
    background: linear-gradient(135deg, var(--card-bg), var(--accent-bg));
    height: 500px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.about-video:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Estilos del video */
.about-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transition: var(--transition-base);
}

/* Overlay del video */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: var(--transition-base);
    border-radius: 20px;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Botón de play personalizado */
.play-button {
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
}

.play-button:hover {
    transform: scale(1.1);
}

.play-button svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.play-button:hover svg circle {
    fill: var(--accent-primary);
}

/* Efectos adicionales */
.about-video::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: pulse 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.about-video:hover::before {
    opacity: 1;
}

/* Responsive para video */
@media (max-width: 768px) {
    .about-video {
        height: 300px;
        margin-top: 2rem;
    }
    
    .play-button svg {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .about-video {
        height: 250px;
        border-radius: 16px;
    }
    
    .about-video video {
        border-radius: 16px;
    }
    
    .video-overlay {
        border-radius: 16px;
    }
    
    .play-button svg {
        width: 45px;
        height: 45px;
    }
}
/* ===== CLIENTS SECTION CON SOPORTE PARA IMÁGENES ===== */
.clients {
    padding: 5rem 0;
    background-color: var(--secondary-bg);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.client-logo {
    background: var(--card-bg);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.client-logo:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

/* Efectos de hover adicionales */
.client-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.client-logo:hover::before {
    opacity: 1;
}

/* Estilos mejorados para las imágenes de clientes */
.client-image {
    max-width: 85%;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(70%) brightness(1.2) contrast(1.15) saturate(0.3);
    transition: all 0.35s ease;
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 auto;
}

.client-logo:hover .client-image {
    filter: grayscale(0%) brightness(1) contrast(1) saturate(1);
    transform: scale(1.05);
}

/* Texto de respaldo mejorado */
.client-fallback {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: none;
    position: relative;
    z-index: 2;
    opacity: 0.8;
    text-align: center;
    line-height: 1.2;
}

/* Mostrar fallback si la imagen no carga */
.client-image[src=""],
.client-image:not([src]) {
    display: none;
}

.client-image[src=""] + .client-fallback,
.client-image:not([src]) + .client-fallback {
    display: block;
}

/* Animación de carga para imágenes */
.client-image {
    opacity: 0;
    animation: fadeInImage 0.6s ease forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estados de carga */
.client-logo.loading {
    background: linear-gradient(90deg, var(--card-bg) 25%, var(--accent-bg) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .client-logo {
        height: 120px;
        padding: 1.5rem 1rem;
    }
    
    .client-image {
        max-height: 60px;
        max-width: 90%;
    }
    
    .client-fallback {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .clients-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .client-logo {
        height: 100px;
        padding: 1rem;
    }
    
    .client-image {
        max-height: 50px;
        max-width: 85%;
    }
    
    .client-fallback {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }
}

/* Efecto especial para hover en toda la grid */
.clients-grid:hover .client-logo:not(:hover) {
    opacity: 0.65;
    transform: scale(0.97);
}

.clients-grid:hover .client-logo:not(:hover) .client-image {
    filter: grayscale(85%) brightness(0.8) contrast(0.9) saturate(0.2);
}

/* Transición suave para el efecto de group hover */
.client-logo {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}