.error-404-section {
    background: var(--bg-body, #fbfcfe);
}

.error-404-panel {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.error-404-code {
    margin: 0 0 8px;
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: 0.04em;
    color: var(--secondary-color, #bfa14a);
}

.error-404-heading {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--heading-color, #1b2d47);
}

.error-404-lead {
    margin: 0 auto 28px;
    max-width: 540px;
    color: var(--text-muted, #73839a);
    font-size: 1.05rem;
    line-height: 1.7;
}

.error-404-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
}

.error-404-search > i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #73839a);
    pointer-events: none;
}

.error-404-search input[type="search"] {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--glass-border, rgba(10, 25, 47, 0.1));
    border-radius: 10px;
    background: var(--glass-bg, #fff);
    color: var(--heading-color, #1b2d47);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}

.error-404-search input[type="search"]:focus {
    outline: none;
    border-color: var(--primary-color, #0a192f);
    box-shadow: 0 0 0 2px rgba(10, 25, 47, 0.14);
}

.error-404-search .btn-primary {
    flex: 0 0 auto;
    margin: 0;
}

.error-404-search .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.error-404-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 16px;
}

.error-404-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    background: var(--glass-bg, #fff);
    border: 1px solid var(--glass-border, rgba(10, 25, 47, 0.1));
    border-radius: 12px;
    text-align: left;
    transition: var(--transition, all 0.3s ease);
}

.error-404-link:hover {
    border-color: var(--primary-color, #0a192f);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm, 0 2px 12px rgba(10, 25, 47, 0.06));
}

.error-404-link__icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(10, 25, 47, 0.08);
    color: var(--primary-color, #0a192f);
    font-size: 1.15rem;
}

.error-404-link:hover .error-404-link__icon {
    background: var(--primary-color, #0a192f);
    color: var(--on-primary, #fff);
}

.error-404-link__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.error-404-link__text strong {
    color: var(--heading-color, #1b2d47);
    font-size: 1rem;
}

.error-404-link__text span {
    color: var(--text-muted, #73839a);
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .error-404-panel {
        margin-bottom: 32px;
    }

    .error-404-search {
        flex-direction: column;
        align-items: stretch;
    }

    .error-404-search > i {
        top: 18px;
        transform: none;
    }

    .error-404-search .btn-primary {
        width: 100%;
        text-align: center;
    }
}
