* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #141935;
    --bg-card: #1a1f3a;
    --accent-primary: #B0C4DE;
    --accent-secondary: #7c3aed;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: #FAFAFA;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

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

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: rgba(26, 31, 58, 0.6);
    padding: 0.4rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    font-family: inherit;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 212, 255, 0.1);
}

.lang-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}


/* Hero Section */
.hero {
    padding: 200px 0 150px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 1rem 2.5rem;
    background: #2C2C2C;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-5px);
}

.tech-carousel {
    position: absolute;
    bottom: 100px;
    left: 0;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background: linear-gradient(90deg,
            var(--bg-primary) 0%,
            transparent 10%,
            transparent 90%,
            var(--bg-primary) 100%);
}

.tech-track {
    display: flex;
    gap: 3rem;
    animation: scroll 30s linear infinite;
    width: fit-content;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(26, 31, 58, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.tech-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(26, 31, 58, 0.95);
}


@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.tech-carousel:hover .tech-track {
    animation-play-state: paused;
}


/* Badge */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Section */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s, border-color 0.3s;
    text-align: center;
    text-align: justify;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.3);
}

.card p {
    font-size: 18px;
}

.card h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Architecture Diagram */
.architecture-diagram {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    margin: 3rem 0;
    overflow-x: auto;
    align-items: center;
}

.arch-flow {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 800px;
    align-items: center
}

.arch-layer {
    display: flex;
    align-items: center;
    gap: 1rem;

}

.arch-node {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 200px;
    text-align: center;
    font-weight: 600;
    position: relative;
    align-items: center
}

.arch-node::after {
    content: '↓';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.arch-node.no-arrow::after {
    display: none;
}

.arch-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.arch-sub {
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid var(--accent-secondary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* Features List */
.features-list {
    list-style: none;
    margin-top: 1.5rem;
}

.features-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
    text-align: center;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.2rem;
    align-items: center;
}

/* Dashboard Preview */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.metric-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(124, 58, 237, 0.1));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 1rem 0;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dashboard Preview */
.dashboard-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.dashboard-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.dashboard-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s;
}

.dashboard-item:hover img {
    transform: scale(1.02);
}

.dashboard-caption {
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
    font-weight: 500;
    background: rgba(0, 212, 255, 0.05);
}

/* Lightbox for full-size images */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: rgba(0, 212, 255, 0.8);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
    text-align: right;
}

.tech-tag {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--accent-primary);
}

/* Contact CTA */
.contact-section {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(124, 58, 237, 0.05));
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-secondary {
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .nav-links {
        display: none;
    }

    nav .container {
        justify-content: space-between;
    }


    .badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }

    .arch-flow {
        min-width: auto;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1.05rem;
    }

    .card {
        padding: 1.75rem;
    }

    .card h3 {
        font-size: 1.35rem;
    }

    .tech-carousel {
        bottom: 70px;
    }

    .tech-track {
        gap: 2rem;
    }

    .tech-item {
        padding: 0.65rem 1.2rem;
        font-size: 0.9rem;
        min-width: 160px;
    }

    .tech-icon {
        font-size: 1.3rem;
    }

    .arch-node {
        min-width: 200px;
        font-size: 0.9rem;
    }

    .dashboard-images {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }

    .lightbox img {
        max-width: 90%;
        max-height: 85%;
    }

    .container {
        padding: 0 15px;
    }

    #observabilidad .container {
        padding: 0 10px;
    }

    .dashboard-item {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}