/**
 * Стили для результатов профтеста
 * Разные стили для разных типов профессий
 */

/* Базовые стили для всех типов профессий */
/* 
 * Стили для страницы результатов профориентационного теста
 * Модульный подход - импортирует только необходимые стили
 */

/* Базовые стили */
@import "../common/variables.css";
@import "../common/reset.css";
@import "../common/fonts.css";
@import "../common/buttons.css";

/* Импорт стилей для результатов */
/* @import url("quiz-header.css"); */

.results-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    background-color: #294ea1;
    background-blend-mode: color-burn;
    background-position: 50% 100%;
    background-size: 4000px;
    opacity: 0;
}

.results-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.05;
}

.results-title_panel-info {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3465d5;
    border-radius: 24px;
    padding: 16px 32px;
    min-width: 258px;
    height: 58px;
    text-align: center;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 24px;
    line-height: 110%;
    color: #fff;
    margin: 0 auto 40px;
}

.results-title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 56px;
    line-height: 110%;
    text-align: center;
    color: #fff;
    margin: 0 auto 40px;
    max-width: 990px;
}

/* Стили для страницы результатов профтеста */
.results-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #294ea1;
    position: relative;
    overflow-x: hidden;
    padding-top: 140px;
}

.page-404.results-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
}

@media screen and (max-height: 700px) {
    .page-404.results-page {
        padding-top: 90px;
    }
}

.results-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.results-proftest .results-wrapper {
    max-width: 794px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    padding-bottom: 120px;
}

.page-404 .img-wrapper {
    width: 100%;
    max-width: 360px;

    img {
        max-width: 100%;
    }
}

.page-404 {
    .bg-pattern-1 {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 65vw;
        height: 95vh;
        max-height: 1100px;
        background-color: #294ea1;
        background-blend-mode: color-burn;
        z-index: 0;
        pointer-events: none;
        background-size: cover;
        background-position: center top;
        opacity: 0.2;
    }

    .bg-pattern-2 {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 65vw;
        height: 95vh;
        max-height: 1100px;
        background-color: #294ea1;
        background-blend-mode: color-burn;
        z-index: 0;
        pointer-events: none;
        background-size: cover;
        background-position: center top;
        opacity: 0.2;
    }

    .bg-pattern-top {
        position: absolute;
        z-index: 0;
        right: 15%;
        top: 70px;
        width: 31%;
        pointer-events: none;
    }

    .bg-pattern-bottom {
        position: absolute;
        z-index: 0;
        right: 12%;
        top: 590px;
        width: 15%;
        pointer-events: none;

    }

    .bg-pattern-atom {
        position: absolute;
        z-index: 0;
        top: 330px;
        left: 0;
        pointer-events: none;
        transform: translateX(-50%);
        width: 330px;
        opacity: 0.2;
    }
}

.page-404 .results-wrapper {
    margin: auto;
    padding-top: 140px;
    padding-bottom: 0;
}

.page-404 .no-results-message .wrap-image {
    max-width: 298px;
}

.results-title_panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 365px;
    margin: 0 auto;

    .img-wrapper {
        width: 100%;
        max-width: 360px;

        img {
            max-width: 100%;
        }
    }
}

.results-content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    max-width: 740px;
}

.results-content--training {
    max-width: 996px;

}

.professions-container .results-content__item {
    display: grid;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
}

.results-content__item-text {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 26px;
    line-height: 140%;
    letter-spacing: -0.02em;
    text-align: center;
    color: #fff;
    max-width: 890px;
    margin: 0 auto;

    span {
        font-weight: 700;
        color: #FFAD2B;
    }

    a {
        text-decoration: underline;
        transition: all 0.3s ease;
        color: #fff;
    }

    a:hover {
        text-decoration: none;
    }
}

.page-template-page-results-main-final {
    .results-content__item-text {
        line-height: 1;
    }
}

.results-content__buttons {
    max-width: 690px;
    margin: 40px auto;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;

    .btn--primary {
        flex: 1;
        gap: 16px;
        justify-content: center;
    }
}

.page-template-page-results-main-final .results-content__buttons .btn--primary {
    max-width: 340px;
    margin: 0 auto;
}

.results-content__item-img {
    width: 100%;
    max-width: 390px;

    img {
        max-width: 100%;
        transform: translateY(6px);
    }
}

.results-content__item-title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 32px;
    line-height: 120%;
    color: #fff;
}

.results-content__item-title--mobile {
    display: none;
}

.results-content__panel {
    box-shadow: 0 0 30px 0 rgba(41, 78, 161, 0.1);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 32px;
    padding: 32px 32px 56px;
    width: 100%;
}

.results-content__panel-text {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 20px;
    line-height: 140%;
    color: #fff;
}

.results-content__panel-text p {
    margin-bottom: 1rem;
    padding: 0;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 20px;
    line-height: 140%;
    color: #fff;
}

.results-content__panel-text p:last-child {
    margin-bottom: 0;
}

.results-content__panel-buttons {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;

    .btn {
        color: #fff;
    }

    .btn--primary {
        flex: 1;
    }
}

.results-proftest .results-content__panel-buttons {
    .btn--primary {
        justify-content: center;
    }
}

.results-footer {
    margin-top: 140px;
    border-radius: 24px;
    padding: 40px 40px 56px;
    width: 100%;
    background: rgba(14, 49, 127, 0.6);
    margin-bottom: 120px;
    max-width: 996px;
    margin-left: auto;
    margin-right: auto;
}

.results-footer__title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 32px;
    line-height: 120%;
    color: #fff;
    margin-bottom: 20px;
}

.results-footer__content {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 20px;
    line-height: 140%;
    color: #fff;
}

.results-footer__content p {
    padding: 0;
    margin-bottom: 1rem;
}

.results-footer__content p:last-child {
    margin-bottom: 0;
}

.results-footer__content a {
    text-decoration: underline;
    transition: all 0.3s ease;
}

.results-footer__content a:hover {
    text-decoration: none;
}

.results-footer_column:first-child {
    border-right: 1px solid #fff;
}

.results-footer_column {
    flex: 1;
}

.results-footer_colum,
.results-footer_column p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 20px;
    line-height: 140%;
    letter-spacing: -0.03em;
    text-align: center;
    color: #fff;
}

.results-footer_column p {
    max-width: 330px;
    width: 100%;
    padding: 0;
    margin: 0 auto;
}

.results-footer_column .btn {
    max-width: 330px;
    margin: 40px auto 0;
    justify-content: center;
}

.results-footer_column-social {
    width: 216px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
    margin: 40px auto 0;

    a {
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;

        img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }
    }
}

.results-footer_row {
    display: flex;
    justify-content: space-between;
}

.results-footer__light {
    background: rgba(255, 255, 255, 0.2);
}

.results-page--main {
    display: flex;
    flex-direction: column;

    .results-wrapper {
        flex: 1;
    }

    .results-title_panel-img-1 {
        width: 280px;
        position: absolute;
        top: 50%;
        left: calc(50vw - 690px);
        transform: translateY(-50px);

        img {
            max-width: 100%;
            width: 100%;
        }
    }

    .results-title_panel-img-2 {
        width: 240px;
        position: absolute;
        top: 50%;
        right: calc(50vw - 690px);
        transform: translateY(-200px);

        img {
            max-width: 100%;
            width: 100%;
        }
    }

    .results-title_panel-img-mobile {
        display: none;
    }

    .bg-pattern-1 {
        position: fixed;
        bottom: 0;
        left: -10vw;
        width: 65vw;
        height: 95vh;
        max-height: 1100px;
        background-color: #294ea1;
        background-blend-mode: color-burn;
        z-index: -1;
        background-size: 180%;
        background-position: top right;
    }

    .bg-pattern-2 {
        position: fixed;
        bottom: 0;
        right: -10vw;
        width: 65vw;
        height: 95vh;
        max-height: 1100px;
        background-color: #294ea1;
        background-blend-mode: color-burn;
        z-index: -1;
        background-size: 180%;
        background-position: top left;
    }
}

.results-page--main-hard {
    .results-title_panel-img-1 {
        width: 360px;
        left: calc(50vw - 730px);
    }

    .results-title_panel-img-2 {
        width: 300px;
        right: calc(50vw - 730px);
        transform: translateY(-170px);
    }
}

.bg-welcome-levels-top {
    position: fixed;
    z-index: 0;
    right: 8%;
    top: 70px;
    width: 31%;
    pointer-events: none;
}

@media (max-height: 980px) {
    .results-page--main {
        .results-wrapper {
            margin-top: 0;
            margin-bottom: auto;
            justify-content: flex-start;
        }
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .results-title {
        font-size: 2rem;
    }

    .results-content__item-title {
        font-size: 1.25rem;
    }

    .results-content__panel {
        padding: 1.5rem;
        margin: 1rem;
    }

    .results-content__panel-buttons {
        flex-direction: column;
        align-items: center;
    }

    .results-content__panel-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .results-footer {
        padding: 1.5rem;
        margin: 1rem;
    }

    .results-footer__title {
        font-size: 1.25rem;
    }

    .results-proftest .results-wrapper {
        padding: 1rem 0;
    }

    .results-proftest .results-content__item-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .results-page--main {
        .results-title_panel-img-1 {
            display: none;
        }

        .results-title_panel-img-2 {
            display: none;
        }


    }

    .results-content {
        padding: 0 20px;
    }

    .results-page {
        .results-title {
            padding: 0 20px;
        }
    }

    .page-404 {
        .bg-pattern-top {
            right: 7%;
            top: 38px;
            width: 43%;
        }

        .bg-pattern-bottom {
            right: 12%;
            top: 590px;
            width: 21%;
        }

        .bg-pattern-atom {
            transform: translateX(-40%);
        }

        .results-wrapper {
            padding-top: 70px;
        }
    }

}

/* Анимации */
.results-proftest .results-content__item {
    animation: fadeInUp 0.8s ease-out;
}

.results-proftest .results-content__panel {
    animation: fadeInUp 1s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@media (max-width:450px) {
    .results-content__item-title {
        display: none;
    }

    .results-content__item-title--mobile {
        display: block;
        margin-bottom: 1em;
    }

    .results-proftest .results-wrapper {
        padding-bottom: 40px;
    }

    .results-footer_row {
        flex-direction: column;
    }

    .results-footer_column:first-child {
        border: none;
        padding-bottom: 30px;
        border-bottom: 1px solid #fff;
        margin-bottom: 30px;
    }

    .results-content__buttons {
        display: flex;
        flex-direction: column;
    }

    .results-content__item-text {
        font-size: 20px;
        line-height: 1.4;
    }

    .results-footer {
        width: 100%;
        min-width: auto;
        margin: 0 0 50px;
    }

    .results-content {
        padding: 0 20px;
    }

    .professions-container .results-content__item {
        display: flex;
        flex-direction: column;

    }

    .results-proftest .results-content__panel {
        margin: 16px auto;
    }

    .results-page {
        padding-top: 90px;

        .results-title_panel-info {
            font-weight: 400;
            font-size: 16px;
            line-height: 140%;
            text-align: center;
            height: 46px;
            border-radius: 24px;
            padding: 12px 24px;
            width: max-content;
            min-width: 180px;
            margin: 0 auto 16px;
        }

        .results-title {
            font-weight: 700;
            font-size: 32px;
            line-height: 110%;
            text-align: center;
        }

        .results-proftest .results-content__item-title {
            font-weight: 700;
            font-size: 20px;
            line-height: 140%;
            letter-spacing: -0.03em;
        }

        .results-content__panel-text p {
            font-weight: 400;
            font-size: 16px;
            line-height: 140%;
            letter-spacing: -0.03em;
        }

        .results-content__panel-buttons .btn {
            text-align: center;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            max-width: 100%;
        }
    }

    .results-page--main {
        display: flex;
        flex-direction: column;

        .results-wrapper {
            flex: 1;
        }

        .results-title_panel-img-mobile {
            display: block;
            margin-bottom: 16px;

            img {
                max-width: 100%;
                width: 100%;
            }
        }

        .bg-pattern-1 {
            display: none;
        }

        .bg-pattern-2 {
            display: none;
        }

        .results-content__buttons {
            display: flex;
            flex-direction: column-reverse;

            .btn {
                width: 100%;
                text-align: center;
                justify-content: center;

                img {
                    display: none;
                }
            }
        }

    }

    .page-404 {

        .bg-pattern-1,
        .bg-pattern-2,
        .bg-pattern-top,
        .bg-pattern-bottom,
        .bg-pattern-atom {
            display: none;
        }
    }

    /* .results-page--main-hard {
        .results-title_panel-img-1 {
            display: block;
            position: static;
            transform: none
        }
        .results-title_panel-img-2 {
            display: none;
        }
    } */
}

/* ==========================================================================
   Оптимизированные стили для мгновенной загрузки результатов
   ========================================================================== */

/* Скрытые блоки профессий */
.profession-block {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
}

/* Анимация появления профессии */
.profession-block.revealing {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

/* Анимация элементов контента */
.profession-block .animate-in {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.profession-block .animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Сообщение об отсутствии результатов */
.no-results-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;

    .wrap-image {
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;

        img {
            width: 100%;
            max-width: 100%;
        }
    }
}

.no-results-content {
    text-align: center;
    border-radius: 24px;
    padding: 40px 40px 56px;
    transform: translateY(20px);
    transition: all 0.6s ease;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 0 60px 0;
}

.page-404 .no-results-content {
    background: transparent;
    transform: translateY(0);
    padding: 32px 40px 56px;
}

.page-404 .no-results-content h1 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 56px;
    font-weight: 700;
}

.page-404 .no-results-content p {
    color: #fff;
    margin-bottom: 64px;
    font-size: 26px;
    font-weight: 400;
}

.page-404 .no-results-content .btn {
    width: 100%;
    max-width: 386px;
    margin: 0 auto;
}

.no-results-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.no-results-content h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

.no-results-content p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 20px;
    line-height: 140%;
    letter-spacing: -0.03em;
    text-align: center;
    color: #fff;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.no-results-content .btn {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 20px;
    line-height: 120%;
    transition: all 0.3s ease;
    background: var(--color-primary-red);
    color: var(--color-white);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 50px;
    height: 56px;
    padding: 16px 24px;
    text-align: center;
    display: flex;
    justify-content: center;
    max-width: fit-content;
    margin: 30px auto 0;
}

/* Профессиональные изображения с оптимизацией загрузки */
.profession-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    pointer-events: none;
}

/* Предотвращение смещения контента при загрузке */
.professions-container {
    position: relative;
    min-height: 600px;
    /* Фиксированная высота для предотвращения скачков */

    img {
        width: 100%;
        pointer-events: none;
    }
}

/* Оптимизация производительности */
.profession-block:not(.revealing) {
    will-change: auto;
}

.profession-block.revealing {
    will-change: transform, opacity;
}

/* Анимация кнопок */
.results-content__panel-buttons .btn {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .no-results-content h2 {
        font-size: 24px;
    }

    .no-results-content p {
        font-size: 16px;
    }

    .results-content__item-title {
        font-size: 20px;
    }

    .professions-container {
        min-height: 500px;
    }

    .page-404 .no-results-content h1 {
        margin-bottom: 8px;
        font-size: 32px;
    }

    .page-404 .no-results-content p {
        margin-bottom: 48px;
        font-size: 20px;
    }
}

@media screen and (max-width:450px) {
    .results-title_panel {
        .img-wrapper {
            width: 244px;
            max-width: 244px;
            margin-bottom: -5px;
            margin-top: 15px;
            margin-left: auto;
            margin-right: auto;
            display: block;
        }
    }

    .no-results-message .wrap-image {
        max-width: 320px;
        margin: 0 auto;
    }

    .page-404 .no-results-message .wrap-image {
        max-width: 320px;
    }

    .no-results-content {
        padding: 24px 16px 40px;
    }

    .no-results-content .btn {
        width: 100%;
        max-width: 100%;
    }

    .professions-container {
        min-height: fit-content;
    }

    .page-404 .professions-container {
        min-height: 450px;
    }

    .page-404 .no-results-content h1 {
        margin-bottom: 8px;
        font-size: 32px;
    }

    .page-404 .no-results-content p {
        margin-bottom: 48px;
        font-size: 20px;
    }

    .page-404 .no-results-content .btn {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}