/* ═══════════════════════════════════════════════════════════
   ERRORPAGE.CSS — friendly 404 / error page
   Follows the site dark-mode convention: the page wrapper goes
   dark navy, the card stays white and floats on top of it.
═══════════════════════════════════════════════════════════ */

.errorPageWrap {
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    /* The navbar is position:fixed at 80px tall, so it sits outside normal
       flow and would otherwise overlap this content. Every other page wrapper
       on the site clears it the same way (.admin-wrapper, .PageContainer). */
    margin-top: 80px;
    /* Fills the rest of the viewport (80px navbar + ~240px footer) so the
       footer never rides up on tall screens. */
    min-height: calc(100vh - 320px);
    padding: 48px 20px 72px;
}

.errorPageCard {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 6px 28px rgba(13, 21, 38, 0.09);
    max-width: 620px;
    width: 100%;
    padding: 48px 44px 40px;
    text-align: center;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.errorCode {
    font-size: 5.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--navy);
    margin-bottom: 6px;
}

/* Antique-gold rule under the numeral, echoing the card accents used
   on the homepage. */
.errorCode::after {
    content: "";
    display: block;
    width: 62px;
    height: 4px;
    border-radius: 2px;
    background: var(--antique-gold);
    margin: 18px auto 0;
}

.errorHeading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 22px 0 10px;
}

.errorMessage {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 auto 30px;
    max-width: 44ch;
}

/* ── Primary actions ── */
.errorActions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 34px;
}

.errorBtn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.errorBtn--primary {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
}

.errorBtn--primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.errorBtn--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-input);
}

.errorBtn--secondary:hover {
    background: var(--bg-surface-alt);
    border-color: var(--navy);
}

.errorBtn:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 2px;
}

/* ── Secondary link row ── */
.errorLinks {
    border-top: 1px solid var(--border-color);
    padding-top: 22px;
}

.errorLinksLabel {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.errorLinksList {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    justify-content: center;
}

.errorLinksList a {
    color: var(--primary);
    font-size: 0.93rem;
    font-weight: 500;
    text-decoration: none;
}

.errorLinksList a:hover {
    text-decoration: underline;
}

/* ── Dark mode — page goes navy, card stays white ── */
[data-theme="dark"] .errorPageWrap {
    background: var(--bg-gradient) !important;
}

[data-theme="dark"] .errorPageCard {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Small screens ── */
@media (max-width: 600px) {
    .errorPageWrap {
        padding: 40px 16px 60px;
        min-height: calc(100vh - 260px);
    }

    .errorPageCard {
        padding: 36px 24px 30px;
    }

    .errorCode {
        font-size: 4rem;
    }

    .errorHeading {
        font-size: 1.35rem;
    }

    .errorActions {
        flex-direction: column;
    }

    .errorBtn {
        width: 100%;
    }
}
