/* ─────────────────────────────────────────────────────────────
   CS42 — shared navigation extras
   Scoped to .cs42-* so it never collides with a page's own nav
   styles. The trigger keeps whatever button class its siblings
   use, so each page's nav still looks like itself.
   ───────────────────────────────────────────────────────────── */

.cs42-menu {
    position: relative;
    display: inline-flex;
}

.cs42-menu-trigger {
    /* inherit the page's own nav-button look; only the caret is ours */
    display: inline-flex;
    align-items: center;
    gap: 0.34em;
    cursor: pointer;
}

.cs42-menu-caret {
    display: inline-block;
    font-size: 0.72em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.cs42-menu[data-open="true"] .cs42-menu-caret {
    transform: rotate(180deg);
}

.cs42-menu-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    z-index: 200;

    min-width: 178px;
    padding: 0.4rem;
    background: #14261F;
    border: 1px solid rgba(255, 244, 225, 0.15);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);

    display: flex;
    flex-direction: column;
    gap: 0.12rem;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.cs42-menu[data-open="true"] .cs42-menu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* inside the fixed bar the trigger is shorter than the bar itself,
   so the panel needs extra offset to clear the bar's bottom edge */
.sticky-nav .cs42-menu-panel { top: calc(100% + 1.15rem); }

.cs42-menu-panel a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    color: rgba(255, 244, 225, 0.74);
    text-decoration: none;
    border: 0;
    background: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.cs42-menu-panel a:hover,
.cs42-menu-panel a:focus-visible {
    background: rgba(137, 215, 183, 0.13);
    color: #FFF4E1;
    outline: none;
}

.cs42-menu-panel a[aria-current="page"] {
    color: #89D7B7;
}

/* external links get a small outward arrow */
.cs42-menu-panel a[target="_blank"]::after {
    content: '↗';
    margin-left: auto;
    font-size: 0.82em;
    opacity: 0.55;
}

/* keep the panel on screen when the trigger sits near a viewport edge */
@media (max-width: 620px) {
    .cs42-menu-panel {
        left: auto;
        right: 0;
        transform: translateY(-6px);
    }
    .cs42-menu[data-open="true"] .cs42-menu-panel {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs42-menu-caret,
    .cs42-menu-panel { transition: none; }
}

/* ── shared footer link row ── */
.cs42-foot-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
}

.cs42-foot-links a {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 244, 225, 0.62);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cs42-foot-links a:hover {
    color: #89D7B7;
    border-color: #89D7B7;
}

.cs42-foot-sep {
    color: rgba(255, 244, 225, 0.28);
    font-size: 0.78rem;
}
