/* ======================================
   СТИЛИ ПОРТФОЛИО - НОВЫЙ ДИЗАЙН
   (соответствует верстке unigost верстка)
   ====================================== */

/* Базовые стили страницы портфолио */
body.b__portfolio {
    background: rgb(245, 245, 246) !important;
}

body.b__portfolio h1 {
    color: #2a6475 !important;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.portfolio {
    margin-bottom: 60px;
}

.portfolio__container {
    margin: 0 auto;
    max-width: 79rem;
    box-sizing: content-box;
    padding: 0 1.5rem;
}

.portfolio__content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.portfolio__content .aside p {
    text-align: justify;
    margin-bottom: 1.25rem;
}

.portfolio__block {
    -webkit-box-flex: 0;
    -ms-flex: 0 1 65%;
    flex: 0 1 65%;
}

/* ======================================
   СПИСОК ПОРТФОЛИО (страница /portfolio)
   ====================================== */

.benefit__block {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.benefit__item {
    flex: 0 1 48%;
    border-radius: 4px;
    background: rgba(255, 255, 255, 1);
    padding: 22px;
    margin-bottom: 32px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.benefit__item:hover {
    border-radius: 30px;
    box-shadow: 0px 6px 10px 0px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.benefit__item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.benefit__item-logo {
    max-height: 40px;
    max-width: 100px;
}

.benefit__item-logo img {
    max-height: 40px;
    max-width: 100px;
    object-fit: contain;
}

.brnefit__desc {
    color: rgba(42, 100, 117, 1);
    font-family: Montserrat, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
    text-align: left;
}

.benefit__title {
    color: rgba(42, 100, 117, 1);
    font-family: Montserrat, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 120%;
    text-align: left;
    text-decoration-line: underline;
    margin-bottom: 12px;
    display: block;
}

a.benefit__title {
    text-decoration: underline !important;
}

a.benefit__title:hover {
    text-decoration: none;
}

.benefit__text {
    color: rgba(49, 52, 58, 1);
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 120%;
    text-align: left;
    margin-bottom: 32px;
}

.benefit__item-bage {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.benefit__bage {
    color: rgba(49, 52, 58, 1);
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 120%;
    text-align: left;
    padding: 5px 16px;
    border-radius: 27px;
    width: max-content;
    margin-bottom: 8px;
}

.benefit__item-bage .benefit__bage:first-child,
.benefit__bage-expert {
    border: 2px solid rgba(255, 149, 20, 1);
    margin-bottom: 16px;
}

.benefit__item-bage .benefit__bage:not(:first-child),
.benefit__bage-doc {
    border: 2px solid rgba(42, 100, 117, 1);
}

.benefit__bage a {
    color: inherit;
    text-decoration: none;
}

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

.b__portfolio .btn__news {
    margin-top: 10px;
}

/* ======================================
   СТРАНИЦА КЕЙСА (case)
   ====================================== */

.case h1 {
    color: #2a6475;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

@supports (font-size: clamp(1.625rem, 1.4217479675rem + 1.0162601626vw, 2.25rem)) {
    .case h1 {
        font-size: clamp(1.625rem, 1.4217479675rem + 1.0162601626vw, 2.25rem);
    }
}

@supports not (font-size: clamp(1.625rem, 1.4217479675rem + 1.0162601626vw, 2.25rem)) {
    .case h1 {
        font-size: calc(1.625rem + 0.625 * (100vw - 20rem) / 61.5);
    }
}

@supports (margin-bottom: clamp(1.25rem, 1.168699187rem + 0.406504065vw, 1.5rem)) {
    .case h1 {
        margin-bottom: clamp(1.25rem, 1.168699187rem + 0.406504065vw, 1.5rem);
    }
}

@supports not (margin-bottom: clamp(1.25rem, 1.168699187rem + 0.406504065vw, 1.5rem)) {
    .case h1 {
        margin-bottom: calc(1.25rem + 0.25 * (100vw - 20rem) / 61.5);
    }
}

.benefit__desc {
    color: rgba(119, 119, 119, 1);
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 22px;
}

/* Описание кейса */
.case__text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 14px;
    padding: 22px;
    background: #fff;
    margin-bottom: 40px;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 120%;
    border-radius: 4px;
}

.case__text ol {
    margin-left: 22px;
}

.case__text h3 {
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 120%;
    color: #2A6475;
    margin: 0;
}

/* Блок отзыва */
.case__feedback-block {
    display: flex;
    justify-content: space-between;
    gap: 58px;
}

.case .benefit__item-top {
    justify-content: start;
    margin-bottom: 40px;
}

.case .benefit__item-logo {
    margin-right: 40px;
    max-height: 60px;
    max-width: 150px;
}

.case .benefit__item-logo img {
    max-height: 60px;
    max-width: 150px;
}

.case__feedback-img {
    background: rgba(48, 128, 150, 0.14);
    padding: 33px 40px;
    border-radius: 4px;
    flex-shrink: 0;
    height: fit-content;
}

.case__feedback-img img {
    max-width: 300px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.case__feedback-img img:hover {
    transform: scale(1.02);
}

.case__feedback-text {
    color: rgba(49, 52, 58, 1);
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 120%;
}

.case__feedback-text h4 {
    color: rgba(42, 100, 117, 1);
    font-family: Montserrat, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 16px;
    margin-bottom: 14px;
}

/* Блок эксперта */
.case__experts {
    padding: 30px 26px 30px 26px;
    background: #fff;
    margin: 40px 0;
    border-radius: 4px;
}

.case .content-experts {
    gap: 36px;
    margin-top: 0;
    display: flex;
    align-items: flex-start;
}

.case .content-experts__img {
    max-width: 160px;
    width: 160px;
    flex-shrink: 0;
}

.case .content-experts__img img {
    width: max-content;
    max-width: 160px;
    border-radius: 4px;
}

.case .experts__text-desc {
    color: rgba(42, 100, 117, 1);
    font-family: Montserrat, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 120%;
    margin-bottom: 10px;
}

.case .experts__text-name {
    color: rgba(42, 100, 117, 1);
    font-family: Montserrat, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 120%;
}

.case .experts__text__desc {
    color: rgba(119, 119, 119, 1);
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 120%;
    margin-bottom: 9px;
}

.case .experts__text-text a {
    display: flex;
    gap: 24px;
    align-items: center;
    color: #2A6475;
    margin: 15px 0 0;
}

.case .btn__blue {
    max-width: 320px;
    height: 44px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 23px;
    margin: auto;
}

/* Стрелка в кнопке "Вернуться в портфолио" на странице кейса */
.case .btn__blue img {
    display: inline-block;
    filter: brightness(0) invert(1); /* делаем иконку белой, чтобы она не сливалась с фоном */
}

/* ======================================
   СЛАЙДЕР
   ====================================== */

.professional__slider {
    position: relative;
    margin: 40px 0 0;
}

.professional__cards {
    display: flex;
    transition: transform 0.3s ease;
    justify-content: center;
    align-items: center;
    height: 336px;
    border-radius: 4px;
    background: rgba(42, 100, 117, 1);
    overflow: hidden;
    position: relative;
}

.slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    line-height: 1;
    transition: 1s ease;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
}

.slide img.images {
    max-width: 544px;
    max-height: 336px;
    width: auto;
    height: 100%;
    object-fit: cover;
    padding: 0;
    margin: 0;
}

.professioal-card__arrow {
    position: relative;
    top: -40px;
    z-index: 9;
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: auto;
    max-width: 544px;
}

.b__case .arrows,
.case .arrows {
    outline: none;
    border: none;
    cursor: pointer;
    fill: white;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    padding: 0.4rem 0.7rem 0.5rem;
    background: rgba(42, 100, 117, 0.8);
    color: #fff;
    transition: background 0.3s ease;
}

.b__case .arrows:hover,
.case .arrows:hover {
    background: rgba(42, 100, 117, 1);
}

.button-arrwo-left {
    margin-left: 10px;
}

.button-arrow-right {
    margin-right: 10px;
}

.slide-active {
    opacity: 1;
    z-index: 3;
    transform: translateX(-50%) scale(1);
}

.slide-next {
    transform: translateX(calc(-50% + 184px)) scale(0.8);
    z-index: 2;
}

.slide-prev {
    transform: translateX(calc(-50% - 184px)) scale(0.8);
    z-index: 2;
}

/* ======================================
   МОДАЛЬНОЕ ОКНО ДЛЯ ИЗОБРАЖЕНИЙ
   ====================================== */

.modal {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.733);
    margin-top: -1px;
    animation: zoom 0.3s ease-in-out;
    z-index: 9999;
}

@keyframes zoom {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.modal img {
    height: 100%;
    object-fit: cover;
    max-height: 90vh;
}

.closeBtn {
    color: rgba(255, 255, 255, 0.87);
    font-size: 25px;
    position: absolute;
    top: 0;
    right: 0;
    margin: 20px;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

.closeBtn:hover {
    color: rgb(255, 255, 255);
}

/* ======================================
   ASIDE ФОРМА
   ====================================== */

.b__portfolio .aside {
    -webkit-box-flex: 0;
    -ms-flex: 0 1 30%;
    flex: 0 1 30%;
    margin-left: 1.875rem;
}

.b__portfolio .aside__form {
    border-radius: 0.25rem;
    background: rgba(48, 128, 150, 0.14);
    padding: 2rem 2rem;
    margin-bottom: 2.5rem;
}

.b__portfolio .aside__form h3 {
    color: #2a6475;
    font-family: Montserrat, sans-serif;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 120%;
    margin-top: 0;
    margin-bottom: 1rem;
}

.b__portfolio .aside__form p {
    color: #31343a;
    font-family: Montserrat, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 150%;
    margin-bottom: 1.5rem;
}

.b__portfolio .aside__form form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.b__portfolio .aside__form input[type="text"],
.b__portfolio .aside__form input[type="phone"],
.b__portfolio .aside__form input[type="email"],
.b__portfolio .aside__form select,
.b__portfolio .aside__form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Montserrat, sans-serif;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}

.b__portfolio .aside__form input:focus,
.b__portfolio .aside__form select:focus,
.b__portfolio .aside__form textarea:focus {
    outline: none;
    border-color: #2a6475;
}

.b__portfolio .aside__form textarea {
    min-height: 100px;
    resize: vertical;
}

.b__portfolio .aside__form .hidden {
    display: none;
}

.b__portfolio .aside__form .btn,
.b__portfolio .aside__form input[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #ff9514;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: Montserrat, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 0.5rem;
}

.b__portfolio .aside__form .btn:hover,
.b__portfolio .aside__form input[type="submit"]:hover {
    background: #e88810;
}

.b__portfolio .aside__form .policy {
    color: #31343a;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 150%;
    margin-top: 1rem;
    margin-bottom: 0;
}

.b__portfolio .aside__form .policy a {
    color: #2a6475;
    text-decoration: underline;
}

.b__portfolio .aside__form-mob {
    display: none;
    border-radius: 0.25rem;
    background: #2a6475;
    padding: 1.75rem 1.25rem;
    margin-bottom: 2.5rem;
}

.b__portfolio .aside__form-mob h3 {
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 120%;
    margin-top: 0;
    margin-bottom: 1rem;
}

.b__portfolio .aside__form-mob p {
    color: #fff;
    font-size: 1rem;
    font-weight: 400;
    line-height: 150%;
    margin-bottom: 2rem;
}

.b__portfolio .aside__form-mob .btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #ff9514;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-family: Montserrat, sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

/* Кнопка "Показать еще" */
.b__portfolio .btn__news {
    text-align: center;
    margin-top: 20px;
}

.b__portfolio .btn__blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.875rem 2rem;
    background: #2a6475;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-family: Montserrat, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.b__portfolio .btn__blue:hover {
    background: #1e4d5a;
}

.b__portfolio .btn__blue img {
    width: 20px;
    height: auto;
}

/* ======================================
   АДАПТИВ
   ====================================== */

@media (max-width: 1343px) {
    .portfolio__content {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .b__portfolio .aside {
        -webkit-box-flex: 0;
        -ms-flex: 0 1 auto;
        flex: 0 1 auto;
        margin-left: 0;
        margin-top: 50px;
        max-width: 500px;
    }
}

@media (max-width: 866px) {
    .benefit__item {
        flex: 0 1 auto;
        max-width: 400px;
    }

    .benefit__block {
        justify-content: center;
    }
}

@media (max-width: 851px) {
    .case .slide-prev {
        transform: translateX(calc(-50% - 100px)) scale(0.8);
    }

    .case .slide-next {
        transform: translateX(calc(-50% + 100px)) scale(0.8);
    }
}

@media (max-width: 851px) {
    .case .experts__text-desc {
        margin-bottom: 0;
    }
}

@media (max-width: 646px) {
    .modal img {
        max-height: 404px;
    }
}

@media (max-width: 768px) {
    .b__portfolio .aside__form {
        display: none;
    }
    
    .b__portfolio .aside__form-mob {
        display: block;
    }
}

@media (max-width: 585px) {
    .b__portfolio h1 {
        font-size: 24px;
    }

    .case .professional__cards {
        height: auto;
        min-height: 200px;
    }

    .case .slide img.images {
        max-width: 100%;
        width: 100%;
        height: auto;
    }

    .case .professional__slider {
        margin: 22px 0;
    }

    .case .slide-prev {
        transform: translateX(calc(-50% - 50px)) scale(0.8);
    }

    .case .slide-next {
        transform: translateX(calc(-50% + 50px)) scale(0.8);
    }

    .case__text {
        margin-bottom: 22px;
        margin-top: -10px;
    }

    .case__feedback-block {
        flex-direction: column;
        gap: 22px;
    }

    .case__feedback-img {
        width: max-content;
        margin: auto;
    }

    .case .experts__text {
        display: flex;
        justify-content: center;
        flex-direction: column;
        margin-bottom: 30px;
        gap: 5px;
    }

    .case .experts__text-desc {
        font-size: 20px;
    }

    .case .experts__text-name {
        font-size: 20px;
    }

    .case__experts {
        padding: 30px 15px 30px 15px;
        background: #fff;
        margin: 22px 0;
    }

    .case .professioal-card__arrow {
        top: calc(131px + (280 - 131) * ((100vw - 320px) / (585 - 320)));
        margin: 0;
    }

    .case .content-experts__img img {
        max-width: 131px;
    }

    .case .content-experts {
        gap: 16px;
        margin-top: 0;
    }
}

@media (max-width: 468px) {
    .brnefit__desc {
        font-size: 18px;
    }

    .benefit__title {
        font-size: 20px;
    }

    .case .experts__text-desc {
        font-size: 18px;
    }
}

@media (max-width: 374px) {
    .brnefit__desc {
        font-size: 15px;
    }

    .benefit__item {
        padding: 10px;
    }

    .case .experts__text-desc {
        font-size: 18px;
    }
}
