/*
 * Страница ошибки (общий шаблон resources/views/errors/_layout.blade.php).
 * Иллюстрация — общая, текст и накладной "стикер" над ярлыком в иллюстрации
 * подменяются по коду ошибки.
 */

.error-page {
    padding: calc(var(--site-header-height) + 32px) 0 96px;
}

.error-page__shell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 57px;
    align-items: center;
}

/* --- Левая колонка: иллюстрация --- */

.error-page__illustration {
    position: relative;
    aspect-ratio: 660 / 540;
    width: 100%;
    max-width: 557px;
}

.error-page__illustration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/*
 * Накладной "бумажный стикер" — лежит поверх ярлыка #404 в иллюстрации.
 * Координаты подобраны в процентах под текущий PNG (archive.png 660x540) — если
 * иллюстрацию заменят, проверьте, попадает ли стикер на ярлык.
 */
.error-page__sticker {
    position: absolute;
    left: 47%;
    top: 36%;
    width: auto;
    min-height: 14%;
    color: #36220d;
    transform: rotate(-5deg);
    text-align: center;
    font-family: 'Oswald-Medium';
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Правая колонка: текст --- */

.error-page__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.error-page__code {
    display: flex;
    gap: 16px;
}
.error-page__code-label, .error-page__code-number {
    font-family: 'Oswald-Medium';
    font-weight: 500;
    font-size: 100px;
    line-height: 90px;
    letter-spacing: 4%;
    text-transform: uppercase;
    color: #3D5632;
}

.error-page__tagline {
    font-family: 'Gogol-Regular';
    font-weight: 400;
    font-size: 36px;
    line-height: 100%;
    color: #3D5632;
    margin-top: 10px;
}

.error-page__description {
    font-family: 'Lora-Regular';
    font-weight: 400;
    font-size: 18px;
    line-height: 24px;
    margin-bottom: 50px;
}

.error-page__cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3D5632;
    padding: 12px 28px;
    font-family: 'Lora-Regular';
    font-weight: 400;
    font-size: 18px;
    line-height: 24px;
    color: #FFF4E7; 
    border-radius: 8px;
    transition: .8s;
}

.error-page__cta:hover,
.error-page__cta:focus-visible {
    background: #516A46;
}

.error-page__cta:active {
    background: #29421E;
}

/* --- Адаптив --- */
@media screen and (max-width: 1279.98px) {
    .error-page__shell {
        display: flex;
        flex-direction: column-reverse;
        gap: 40px;
    }
    .error-page__content {
        align-items: center;
    }
    .error-page__description {
        max-width: 600px;
        text-align: center;
    }
    .error-page__cta {
        margin: 0 auto;
    }
}
@media screen and (max-width: 1023.98px) {
    .error-page__shell {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    .error-page__content {
        margin: 0 auto;
        align-items: center;
    }
    .error-page__description {
        margin-left: auto;
        margin-right: auto;
    }
    .error-page__cta {
        align-self: center;
    }
}
@media screen and (max-width: 659.98px) {
    .error-page__content {
        gap: 8px;
    }
    .error-page__code-label, .error-page__code-number {
        font-size: 40px;
        line-height: 50px;
    }
    .error-page__tagline {
        font-size: 32px;
        margin-top: 0;
    }
    .error-page__description {
        font-size: 16px;
        line-height: 22px;
        margin: 8px 0 32px;
    }
    .error-page {
        padding: calc(var(--site-header-height) + 32px) 0 56px;
    }
    .error-page__sticker {
        left: 45%;
        top: 36%;
        font-size: 12px;
    }
}
@media screen and (max-width: 474.98px) {
    .error-page__sticker {
        font-size: 11px;
    }
}
@media screen and (max-width: 424.98px) {
    .error-page__sticker {
        left: 46%;
        font-size: 9px;
    }
}
@media screen and (max-width: 374.98px) {
    .error-page__sticker {
        left: 47%;
        font-size: 7px;
    }
}
