/* header.css — sobreescritura limpia, usa variables de styles.css */

/* El .topbar y .menu-* ya están definidos en styles.css.
   Este archivo añade refinamientos específicos del nav. */

.topbar {
    background: rgba(13, 13, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2.5rem;
    height: 68px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 200;
    gap: 2rem;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Sombra sutil cuando se hace scroll */
.topbar.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.topbar .logo {
    height: 48px;
    width: auto;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.topbar .logo:hover { opacity: 0.8; transform: scale(1.03); }

.menu-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.menu-list {
    display: flex;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-list li { display: flex; }

.menu-list a {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
}

.menu-list a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 13px;
    right: 13px;
    height: 1.5px;
    background: var(--purple);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.menu-list a:hover {
    color: var(--text);
    background: var(--purple-muted);
}
.menu-list a:hover::after { transform: scaleX(1); }

/* Ítem activo */
.menu-list a.active {
    color: var(--purple);
}
.menu-list a.active::after { transform: scaleX(1); }

/* Toggle hamburguesa */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--purple-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    width: 36px;
    height: 36px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.menu-toggle:hover { background: rgba(168,85,247,0.2); border-color: var(--purple); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
    .topbar { padding: 0 1.25rem; gap: 1rem; }

    .menu-toggle { display: flex; }

    .menu-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: 210px;
        background: var(--bg-elevated);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 6px;
        box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(168,85,247,0.1);
        z-index: 300;
        gap: 2px;
    }

    .menu-list.active {
        display: flex;
        animation: menuFadeIn 0.18s ease forwards;
    }

    .menu-list a {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.82rem;
        border-radius: var(--radius-sm);
    }
    .menu-list a::after { display: none; }

    .menu-container { justify-content: flex-end; }
}

@media (max-width: 480px) {
    .menu-list { width: calc(100vw - 2.5rem); right: -0.5rem; }
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
