/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0a2463;
    --secondary-color: #1e3a8a;
    --accent-color: #3b82f6;
    --navy-dark: #001233;
    --navy-medium: #0f2557;
    --navy-light: #1e3a8a;
    --cyan-accent: #00d9ff;
    --dark-color: #0f172a;
    --light-color: #f1f5f9;
    --gray-color: #64748b;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #0a2463 0%, #1e3a8a 100%);
    --gradient-hover: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --tech-gradient: linear-gradient(135deg, #00d9ff 0%, #3b82f6 100%);
    --shadow: 0 10px 30px rgba(10, 36, 99, 0.15);
    --shadow-hover: 0 20px 40px rgba(10, 36, 99, 0.25);
    --glow: 0 0 20px rgba(0, 217, 255, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(10, 36, 99, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(10, 36, 99, 0.1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 30px rgba(10, 36, 99, 0.15);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

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

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

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

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: all 0.3s ease;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10, 36, 99, 0.3);
}

.lang-icon {
    font-size: 1.2rem;
}

.lang-text {
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a2463 0%, #1e3a8a 50%, #0f172a 100%);
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

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

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--tech-gradient);
    margin-top: 1rem;
    border-radius: 2px;
    box-shadow: var(--glow);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--tech-gradient);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.4);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 217, 255, 0.6);
}

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

.btn-secondary:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
}

.btn-full {
    width: 100%;
}

/* Hero Animation */
.hero-image {
    position: relative;
    height: 400px;
}

.code-animation {
    position: relative;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 217, 255, 0.2);
    backdrop-filter: blur(10px);
}

.code-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(10, 36, 99, 0.5);
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.code-animation::after {
    content: '⬤ ⬤ ⬤';
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 10px;
    color: rgba(0, 217, 255, 0.6);
    letter-spacing: 8px;
}

.code-line {
    height: 20px;
    background: var(--tech-gradient);
    border-radius: 4px;
    margin-bottom: 1rem;
    margin-top: 3rem;
    animation: codeWrite 2s ease infinite;
    opacity: 0.7;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.code-line:nth-child(1) {
    width: 80%;
    animation-delay: 0s;
}

.code-line:nth-child(2) {
    width: 60%;
    animation-delay: 0.5s;
}

.code-line:nth-child(3) {
    width: 90%;
    animation-delay: 1s;
}

.code-line:nth-child(4) {
    width: 70%;
    animation-delay: 1.5s;
}

/* Servicios */
.services {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--light-color) 100%);
    position: relative;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--gray-color);
}

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

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(10, 36, 99, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(10, 36, 99, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(10, 36, 99, 0.15);
    border-color: var(--accent-color);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.service-card p {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

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

.service-features li {
    padding: 0.5rem 0;
    color: var(--gray-color);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Tecnologías */
.technologies {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    position: relative;
    overflow: hidden;
}

.technologies::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(0, 217, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.technologies .section-header h2,
.technologies .section-header p {
    color: var(--white);
    position: relative;
    z-index: 1;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tech-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--white);
    border: 1px solid rgba(0, 217, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.tech-item:hover {
    transform: translateY(-5px);
    background: rgba(0, 217, 255, 0.1);
    border-color: var(--cyan-accent);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.3);
}

/* Nosotros */
.about {
    padding: 5rem 0;
    background: var(--white);
}

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

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.about-placeholder {
    background: var(--gradient);
    height: 400px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(10, 36, 99, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.about-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.location-marker {
    font-size: 2rem;
    color: var(--white);
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Contacto */
.contact {
    padding: 5rem 0;
    background: var(--light-color);
}

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

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

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
    min-width: 50px;
}

.contact-item h4 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--gray-color);
}

.whatsapp-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.whatsapp-link:hover {
    color: #25D366;
    transform: translateX(5px);
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
    position: relative;
    overflow: hidden;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.8;
}

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

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

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

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

@keyframes codeWrite {
    0%, 100% {
        opacity: 0.7;
        transform: scaleX(1);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.02);
    }
}

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

/* Responsive */
@media (max-width: 968px) {
    .hero .container,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        height: 300px;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

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

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

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

    .section-header h2 {
        font-size: 2rem;
    }

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

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

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

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