/* ── Navbar pública Clean Factory ──────────────────── */
.cf-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: 60px;
    background: transparent;
    transition: background .3s ease, box-shadow .3s ease;
}
.cf-nav.scrolled {
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.cf-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand */
.cf-nav-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .01em;
}
.cf-nav-brand img {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    object-fit: cover;
}

/* Links */
.cf-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .25rem;
}
.cf-nav-links a {
    display: block;
    padding: .4rem .85rem;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    border-radius: 6px;
    transition: color .2s, background .2s;
}
.cf-nav-links a:hover,
.cf-nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,.12);
}
.cf-nav-links .nav-cta a {
    background: #3b82f6;
    color: #fff;
    padding: .4rem 1rem;
}
.cf-nav-links .nav-cta a:hover {
    background: #2563eb;
}

.cf-nav-links .nav-portal a {
    border: 1px solid rgba(255,255,255,.35);
    color: rgba(255,255,255,.85);
    padding: .38rem .9rem;
    border-radius: 6px;
}
.cf-nav-links .nav-portal a:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.6);
    color: #fff;
}

/* Hamburger toggle */
.cf-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.cf-nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

/* Open state */
.cf-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cf-nav-toggle.open span:nth-child(2) { opacity: 0; }
.cf-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Scroll offset para anclas */
section[id] { scroll-margin-top: 68px; }

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 768px) {
    .cf-nav-toggle { display: flex; }

    .cf-nav-links {
        position: absolute;
        top: 60px;
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(15, 23, 42, 0.97);
        backdrop-filter: blur(10px);
        padding: .5rem 1rem 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease, padding .3s ease;
    }
    .cf-nav-links.open {
        max-height: 400px;
        padding: .5rem 1rem 1rem;
    }
    .cf-nav-links a {
        padding: .65rem .75rem;
        border-radius: 8px;
    }
    .cf-nav-links .nav-cta {
        margin-top: .5rem;
    }
    .cf-nav-links .nav-cta a {
        text-align: center;
    }
}
