.success-history-switch {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 33px;
    width: 100%;
    color: #127a8d;
    font-weight: 400;
    font-size: clamp(1.25rem, 1.1923rem + 0.2564vw, 1.5rem);
    line-height: 100%;
    font-family: "Manrope", sans-serif;
}

.success-history-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: #127a8d;
    line-height: 130%;
    text-decoration: none;
}

.success-history-switch__btn svg {
    display: block;
    transition: transform 0.3s ease;
}

.success-history-switch__btn:hover svg {
    transform: rotate(30deg);
}

.success-history-switch__label--active {
    font-size: clamp(2rem, 1.8846rem + 0.5128vw, 2.5rem);
    text-transform: uppercase;
}

.success-history {
    display: flex;
    flex: 1 0 50%;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    color: #262626;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.3;
    font-family: "Manrope", sans-serif;
}

.success-history__item {
    display: grid;
    grid-template-columns: 90px 1fr 30px;
    align-items: flex-start;
    gap: 40px;
    transition: box-shadow 0.3s ease;
    box-shadow: 0px -2px 9.8px 0px #127a8d29;
    border-radius: 4px;
    background: linear-gradient(
        146.12deg,
        rgba(255, 255, 255, 0.7744) 54.24%,
        rgba(255, 255, 255, 0.4224) 97.96%
    );
    padding: clamp(0.625rem, 0.1923rem + 1.9231vw, 2.5rem);
    width: 100%;
    color: inherit;
    text-decoration: none;
    position: relative;
}

.success-history__item:hover {
    cursor: pointer;
    outline: 1px solid #127a8d;
    outline-offset: -1px;
    box-shadow: 0px -4px 20px 0px #127a8d29;
    color: inherit;
    text-decoration: none;
}

.success-history__value--whom {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #127a8d;
    font-weight: 700;
    font-size: 14px;
    line-height: 130%;
    font-family: "Manrope", sans-serif;
    text-overflow: ellipsis;
}

.success-history__item--for-clients {
    background: #f4fafd;
}

.success-history__date-col {
    grid-column: 1;
}

.success-history__date {
    color: #262626;
    font-weight: 400;
    font-size: clamp(0.875rem, 0.8462rem + 0.1282vw, 1rem);
    line-height: 1.3;
    font-family: "Manrope", sans-serif;
}

.success-history__content-col {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.success-history__title {
    margin: 0;
    color: #127a8d;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.3;
    font-family: "Manrope", sans-serif;
}

.success-history__preview {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    color: #262626;
    font-weight: 400;
    font-size: clamp(0.875rem, 0.8173rem + 0.2564vw, 1.125rem);
    line-height: 1.3;
    font-family: "Manrope", sans-serif;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    max-width: 100%;
}

.success-history__title-link,
.success-history__title-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    color: #127a8d;
    line-height: 1.3;
    font-family: "Manrope", sans-serif;
    text-decoration: none;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    font-size: 18px;
    font-weight: 700;
    max-width: 100%;
}

.success-history__title-link:hover {
    text-decoration: none;
}

.success-history__cost {
    grid-column: 4;
    max-width: 83px;
}

.success-history__more {
    display: flex;
    grid-column: 3;
    justify-content: center;
    align-items: center;
    max-width: 30px;
    flex-shrink: 0;
    align-self: flex-end;
    position: absolute;
    bottom: clamp(10px, 0.4808rem + 0.641vw, 20px);
    right: clamp(10px, 0.4808rem + 0.641vw, 20px);
}

.success-history__more svg {
    display: block;
    transition: transform 0.3s ease;
}

.success-history__item:hover .success-history__more svg {
    transform: rotate(30deg);
}

.success-history__more-link {
    display: inline-block;
    transition: transform 0.3s ease;
    line-height: 0;
}

.success-history__more-link svg {
    display: block;
}

.success-history__item:visited {
    color: inherit;
    text-decoration: none;
}

.success-history__item:focus {
    outline: none;
    color: inherit;
    text-decoration: none;
}

.success-history__item:active {
    color: inherit;
    text-decoration: none;
}

.success-history__empty {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.success-history__empty-text--title {
    color: #82aeb7;
    font-weight: 400;
    font-size: 24px;
    line-height: 130%;
    font-family: "Manrope", sans-serif;
    text-align: left;
    text-transform: uppercase;
}

.success-history__empty-text {
    color: #6c6c6c;
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    font-family: "Manrope", sans-serif;
    text-align: left;
}

.success-history-nav {
    color: #127a8d;
    font-weight: 400;
    font-size: 24px;
    line-height: 100%;
    font-family: "Manrope", sans-serif;
}

.success-history-wrap {
    flex: 1 0 100%;
}

@media screen and (max-width: 768px) {
    .success-history {
        gap: 10px;
    }

    .success-history__item {
        grid-template-columns: 1fr;
        grid-template-rows: 15px auto;
        gap: 10px;
        min-height: 249px;
    }

    .success-history__date-col {
        grid-column: 1;
    }

    .success-history__content-col {
        grid-column: 1;
        gap: 10px;
    }

    .success-history__more {
        grid-column: 2;
    }
}

@media screen and (min-width: 768px) {
    .success-history-desktop {
        display: flex;
    }

    .success-history-switch-mobile {
        display: none;
    }
}

@media screen and (max-width: 767.9px) {
    .success-history-switch-mobile {
        display: flex;
    }
}

@media (min-width: 768px) {
    .success-history {
        font-size: clamp(0.875rem, 0.7917rem + 0.1736vw, 1rem);
    }
}

.success-history-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.success-history-modal.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.success-history-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.success-history-modal__content {
    position: relative;
    max-width: 1521px;
    padding: 78px;
    border-radius: 4px;
    max-height: 90vh;
    overflow: visible;
    box-sizing: border-box;
    background: #e2eff4;
    box-shadow: 0 -2px 9.8px 0 rgba(18, 122, 141, 0.16);
    backdrop-filter: blur(12px);
}

.success-history-modal__close {
    position: absolute;
    top: 32px;
    right: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 29px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.success-history-modal__close-icon {
    transition: stroke 0.2s ease;
}

.success-history-modal__close-icon line {
    transition: stroke 0.3s ease;
}

.success-history-modal__close:hover .success-history-modal__close-icon line {
    stroke: #127a8d;
}

.success-history-modal__body {
    min-height: 200px;
    flex: 1;
    max-height: calc(90vh - 250px);
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    gap: clamp(0.625rem, 0.4808rem + 0.641vw, 1.25rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #127a8d #82aeb7;
}

.success-history-modal__body::-webkit-scrollbar {
    width: 5px;
}

.success-history-modal__body::-webkit-scrollbar-button {
    display: none;
    height: 0;
    width: 0;
}

.success-history-modal__body::-webkit-scrollbar-track {
    background: #82aeb7;
    border-radius: 4px;
    margin: 2px 0;
}

.success-history-modal__body::-webkit-scrollbar-thumb {
    background: #127a8d;
    border-radius: 4px;
    min-height: 20px;
}

.success-history-modal__body::-webkit-scrollbar-thumb:hover {
    background: #0d5f6f;
}

.success-history-modal__title {
    font-family: "Manrope", sans-serif;
    font-weight: 700;
    font-size: clamp(1.125rem, 1.0385rem + 0.3846vw, 1.5rem);
    color: #127a8d;
    line-height: 130%;
    text-wrap: balance;
    text-align: left;
    max-width: 100%;
}

.success-history-modal__date {
    color: #262626;
    white-space: nowrap;
    font-family: "Manrope", sans-serif;
    font-weight: 400;
    font-size: clamp(0.75rem, 0.6923rem + 0.2564vw, 1rem);
}

.success-history-modal__text {
    font-family: "Manrope", sans-serif;
    font-weight: 400;
    font-size: clamp(0.75rem, 0.6635rem + 0.3846vw, 1.125rem);
    word-wrap: break-word;
    line-height: 1.3;
    color: #262626;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(0.625rem, 0.4808rem + 0.641vw, 1.25rem);
    align-items: flex-start;
}

.success-history-modal__text p,
.success-history-modal__text i {
    color: #262626;
    font-family: "Manrope", sans-serif;
    font-size: clamp(0.75rem, 0.6635rem + 0.3846vw, 1.125rem);
    font-weight: 400;
    max-width: 100%;
}

.success-history-modal__text a {
    color: #127a8d;
    font-family: "Manrope", sans-serif;
    font-size: clamp(0.75rem, 0.6635rem + 0.3846vw, 1.125rem);
    font-weight: 400;
    max-width: 100%;
    transition: all 0.3s ease;
}

.success-history-modal__text a:hover {
    text-decoration: none;
}

.success-history-modal__text b {
    color: #262626;
    font-family: "Manrope", sans-serif;
    font-size: clamp(0.75rem, 0.6635rem + 0.3846vw, 1.125rem);
    font-weight: 700;
    max-width: 100%;
    line-height: 130%;
}

.success-history-modal__text h2 {
    color: #127a8d;
    font-family: "Manrope", sans-serif;
    font-size: clamp(1.125rem, 1.0385rem + 0.3846vw, 1.5rem);
    font-weight: 700;
    line-height: 130%;
    margin-top: 20px;
}

.success-history-modal__text ul,
.success-history-modal__text ol {
    margin: 0;
}

.success-history-modal__text li {
    color: #262626;
    font-family: "Manrope", sans-serif;
    font-size: clamp(0.75rem, 0.6635rem + 0.3846vw, 1.125rem);
    font-weight: 400;
    max-width: 100%;
}

.success-history-modal__text img {
    max-width: 750px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.success-history-modal__text-embed {
    border-radius: 4px;
    background: linear-gradient(
        146deg,
        rgba(255, 255, 255, 0.77) 54.24%,
        rgba(255, 255, 255, 0.42) 97.96%
    );
    box-shadow: 0 -2px 9.8px 0 rgba(18, 122, 141, 0.16);
    padding: clamp(0.625rem, 0.4808rem + 0.641vw, 1.25rem)
        clamp(1.25rem, 0.9615rem + 1.2821vw, 2.5rem);
    max-width: 100%;
}

@media (max-width: 768px) {
    .success-history-modal__content {
        max-width: 340px;
        width: 100%;
        margin: 0 10px;
        padding: 60px 20px;
        max-height: 90vh;
    }

    .success-history-modal__body {
        max-height: calc(90vh - 120px);
    }

    .success-history-modal__close {
        top: 20px;
        right: 20px;
    }
}
