/* Variables de Color Mejoradas */
:root {
    --color-principal: #FF6B35; /* Naranja vibrante */
    --color-secundario: #00D4AA; /* Verde turquesa */
    --color-terciario: #4F46E5; /* Azul índigo */
    --color-acento: #F59E0B; /* Amarillo dorado */
    --color-fondo: #0F0F23; /* Azul oscuro profundo */
    --color-fondo-claro: #1A1A2E; /* Azul oscuro medio */
    --color-texto: #E5E7EB; /* Gris claro */
    --color-texto-secundario: #9CA3AF; /* Gris medio */
    --color-blanco: #FFFFFF;
    --color-negro: #000000;
    --gradient-principal: linear-gradient(135deg, #FF6B35 0%, #F59E0B 100%);
    --gradient-fondo: linear-gradient(135deg, #0F0F23 0%, #1A1A2E 50%, #16213E 100%);
    --sombra-suave: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sombra-media: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sombra-fuerte: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}


/* Reset y Estilos Base */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-fondo); /* O un color de tu elección */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-principal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Ocultar el preloader */
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-fondo);
    color: var(--color-texto);
    line-height: 1.7;
    overflow-x: hidden;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Encabezado con Menú Hamburguesa */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}


.main-header.scrolled {
    background: rgba(15, 15, 35, 0.98);
    box-shadow: var(--sombra-media);
}


.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8em;
    font-weight: 800;
    background: var(--gradient-principal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex; /* Asegúrate de que esta regla existe */
    gap: 30px;
    align-items: center;
    list-style: none;
    transition: transform 0.3s ease-out;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-texto);
    font-weight: 500;
    font-size: 0.95em;
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-principal);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--color-principal);
}

/* Menú Hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--color-principal);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-menu {
    display: none; /* Oculta el menú móvil en escritorio */
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(20px);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(-100vh);
}

.mobile-menu ul {
    list-style: none;
    padding: 80px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.mobile-menu a {
    color: var(--color-texto);
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
}

.mobile-menu a:hover {
    background: var(--gradient-principal);
    color: var(--color-blanco);
    transform: translateY(-2px);
}

/* Hero Section con Parallax */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.8) 0%, rgba(79, 70, 229, 0.6) 50%, rgba(255, 107, 53, 0.4) 100%),
                url('../assets/images/computer.avif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    will-change: transform;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: heroEntrance 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heroEntrance {
    from { 
        opacity: 0; 
        transform: translateY(40px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5em, 5vw, 4em);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--color-blanco) 0%, var(--color-principal) 50%, var(--color-secundario) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1.1em, 2vw, 1.3em);
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: var(--gradient-principal);
    color: var(--color-blanco);
    padding: 16px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--sombra-media);
    position: relative;
    overflow: hidden;
}

.cta-button::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;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--sombra-fuerte);
}

/* Partículas de Fondo */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Secciones con Parallax */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    will-change: transform;
}

.section-content {
    position: relative;
    z-index: 2;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
}

/* Título de Sección Mejorado */
.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2em, 4vw, 2.8em);
    text-align: center;
    margin-bottom: 50px;
    background: var(--gradient-principal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-principal);
    border-radius: 2px;
}

/* Animaciones Mejoradas */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Servicios Mejorados */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.6s;
}

.service-item:hover::before {
    left: 100%;
}

.service-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--sombra-fuerte);
    border-color: var(--color-principal);
}

.service-item i {
    font-size: 3.5em;
    background: var(--gradient-principal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.3s ease;
}

.service-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.service-item h3 {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--color-blanco);
}

.service-item p {
    color: var(--color-texto-secundario);
    line-height: 1.6;
}

/* Portafolio Mejorado */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16/10;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9) 0%, rgba(255, 107, 53, 0.9) 100%);
    color: var(--color-blanco);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    padding: 30px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.15);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--sombra-fuerte);
}

.portfolio-overlay h3 {
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 10px;
}

.portfolio-overlay p {
    font-size: 1em;
    opacity: 0.9;
}

/* Sección Bio Mejorada */
.bio-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.bio-text {
    text-align: center;
}

.bio-text h3 {
    font-size: 2em;
    color: var(--color-principal);
    margin-bottom: 20px;
    font-weight: 700;
}

.bio-text p {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--color-texto-secundario);
    max-width: 800px;
    margin: 0 auto 30px;
}

.bio-valores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.valor-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.valor-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--sombra-media);
    border-color: var(--color-secundario);
}

.valor-item i {
    font-size: 2.5em;
    background: linear-gradient(135deg, var(--color-secundario) 0%, var(--color-terciario) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    display: block;
}

.valor-item h4 {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-blanco);
}

.valor-item p {
    color: var(--color-texto-secundario);
    font-size: 0.95em;
}

/* Sección de Contacto Mejorada */
#contacto {
    background: linear-gradient(135deg, var(--color-terciario) 0%, var(--color-principal) 100%);
    color: var(--color-blanco);
    text-align: center;
    position: relative;
    overflow: hidden;
}

#contacto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/images/workers.avif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.1;
    z-index: 1;
}

#contacto .section-title {
    color: var(--color-blanco);
}

#contacto p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2em;
    margin-bottom: 40px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--color-blanco);
    font-size: 1em;
    transition: all 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-secundario);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.contact-form input::placeholder, 
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form button {
    background: var(--color-secundario);
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.4s ease;
}

.contact-form button:hover {
    background: var(--color-blanco);
    color: var(--color-terciario);
    transform: translateY(-3px);
}

/* Footer Mejorado */
.main-footer {
    background: var(--color-negro);
    color: var(--color-texto);
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--color-principal);
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

.social-media {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-media a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--gradient-principal);
    color: var(--color-blanco);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.2em;
}

.social-media a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--sombra-media);
}

/* Estadísticas/Métricas */
.stats-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    backdrop-filter: blur(10px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    font-size: 3em;
    font-weight: 800;
    background: var(--gradient-principal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    font-size: 1.1em;
    color: var(--color-texto-secundario);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex; /* Muestra el ícono de hamburguesa en móvil */
        flex-direction: column;
        justify-content: space-around;
        width: 25px;
        height: 20px;
        cursor: pointer;
        z-index: 1001;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1.1em;
        padding: 0 20px;
    }

    .section-content {
        padding: 30px 20px;
        margin: 10px;
    }

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bio-valores {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .parallax-bg {
        background-attachment: scroll;
    }

    .hero-bg {
        background-attachment: scroll;
    }

    .mobile-menu {
        display: block; /* Muestra el menú móvil en la media query */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(20px);
        transform: translateY(-100vh); /* Lo oculta fuera de la pantalla */
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .mobile-menu.active {
        transform: translateY(0); /* Lo muestra */
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Efectos adicionales */
.glow {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient-principal);
    z-index: 1001;
    transition: width 0.1s ease;
}