/* Shared public navigation (moved out of templates/includes so pages with a strict CSP can use it). */
.pub-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    /* Not `all`: on phones the scrolled padding change used to animate and slide the hamburger 20px. */
    transition: background-color 0.3s ease, border-color 0.3s ease,
                -webkit-backdrop-filter 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease;
}
.pub-header.scrolled {
    background: rgba(10, 10, 20, 0.95);
    padding: 14px 40px;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.pub-logo { height: 2.5rem; }
.pub-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}
.pub-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}
.pub-nav a:hover { color: white; }
.pub-nav a[aria-current="page"] {
    color: white;
    text-decoration: underline;
    text-decoration-color: #a78bfa;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}
.pub-nav-demo {
    color: white !important;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s;
}
.pub-nav-demo:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
    color: white !important;
}
.pub-nav-login {
    background: #7c3aed;
    color: white !important;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}
.pub-nav-login:hover {
    background: #6d28d9;
    color: white !important;
}
.pub-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.pub-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
}
.pub-start-mobile { display: none; }

@media (max-width: 768px) {
    .pub-start-mobile { display: inline-block; margin-left: auto; margin-right: 12px; }
    .pub-header,
    .pub-header.scrolled { padding: 16px 20px; }  /* scrolled must not change padding on phones */
    .pub-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 20, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .pub-nav.active { display: flex; }
    .pub-menu-toggle { display: block; }
}
