/* Advantages Section (Frame 77) */
.advantages-section {
    width: 100%;
    background-color: #FAFAFA; /* фон блока преимуществ серый */
    padding: 140px 0;
}

.advantages-section__wrapper {
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 40px;
}

.advantages-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "card1 card3"
        "card2 card4";
    gap: 120px 80px;
}

.advantage-card {
    display: flex;
    align-items: center;
    gap: 80px;
}

.advantage-card--1 {
    grid-area: card1;
}

.advantage-card--2 {
    grid-area: card2;
}

.advantage-card--3 {
    grid-area: card3;
}

.advantage-card--4 {
    grid-area: card4;
}

.advantage-card--reverse {
    flex-direction: row-reverse;
}

.advantage-card__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 360px;
}

.advantage-card__number {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 62px;
    font-weight: 100;
    line-height: 1.2;
    letter-spacing: -3.1px;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #57a7b3 17.308%, rgba(87, 167, 179, 0) 85.811%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.advantage-card__title {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    color: #0C181A;
    margin: 0;
}

.advantage-card__description {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #3D3D3D;
    margin: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.advantage-card__image {
    width: 315px;
    height: 315px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
}

.advantage-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Кнопка "Перейти в каталог" после блока преимуществ */
.advantages-section__action {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 80px;
}

.advantages-section__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #0C181A;
    background: #FFFFFF;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.12;
    text-transform: uppercase;
    color: #0C181A;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.advantages-section__button:hover {
    background: #0C181A;
    color: #FFFFFF;
}

@media screen and (max-width: 1599px) {
    .advantage-card {
        gap: 60px;
    }
}

/* От 1140px до 640px - две колонки с адаптированными размерами */
@media screen and (max-width: 1139px) and (min-width: 640px) {
    .advantages-section {
        padding: 100px 0;
    }

    .advantages-section__wrapper {
        padding: 0 40px;
    }

    .advantages-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "card1 card3"
            "card2 card4";
        gap: 80px 40px;
        align-items: start;
    }

    .advantage-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
        margin-bottom: 0;
        padding-bottom: 0;
        align-self: start;
        height: auto;
    }

    .advantage-card--3 {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        align-self: start;
        height: auto;
    }
    
    .advantage-card--3 .advantage-card__content {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .advantage-card--3 .advantage-card__image {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .advantage-card--3 .advantage-card__description {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .advantage-card--3 .advantage-card__title {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .advantage-card--3 .advantage-card__number {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .advantage-card--reverse {
        flex-direction: column;
    }

    .advantage-card__content {
        max-width: 100%;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .advantage-card__title {
        height: calc(22px * 1.2 * 2); /* 2 строки: font-size * line-height * количество строк = 52.8px */
        min-height: calc(22px * 1.2 * 2);
        max-height: calc(22px * 1.2 * 2);
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .advantage-card__description {
        height: calc(16px * 1.4 * 3); /* 3 строки: font-size * line-height * количество строк = 67.2px */
        min-height: calc(16px * 1.4 * 3);
        max-height: calc(16px * 1.4 * 3);
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .advantage-card__image {
        width: 100%;
        max-width: 100%;
        height: 300px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .advantages-section__action {
        margin-top: 80px;
    }
    
    .advantages-section__button {
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* Дополнительная специфичность для диапазона до 890px */
@media screen and (max-width: 890px) and (min-width: 640px) {
    .advantages-list {
        align-items: start !important;
        gap: 60px 40px !important;
    }
    
    .advantage-card__title {
        height: calc(22px * 1.2 * 2) !important; /* 2 строки */
        min-height: calc(22px * 1.2 * 2) !important;
        max-height: calc(22px * 1.2 * 2) !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }
    
    .advantage-card__description {
        height: calc(16px * 1.4 * 3) !important; /* 3 строки */
        min-height: calc(16px * 1.4 * 3) !important;
        max-height: calc(16px * 1.4 * 3) !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
    }
    
    .advantage-card--3 {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        align-self: start !important;
        height: auto !important;
    }
    
    .advantage-card--1 {
        align-self: start !important;
        height: auto !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .advantage-card--3 .advantage-card__content {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .advantage-card--3 .advantage-card__image {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .advantage-card {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* Mobile (640px и меньше) - по дизайну Figma */
@media screen and (max-width: 639px) {
    .advantages-section {
        padding: 26px 0 40px;
        position: relative;
    }

    .advantages-section__wrapper {
        padding: 0 30px;
        padding-left: unset;
        padding-right: unset;
        position: relative;
        width: 100%;
        max-width: 315px;
        margin: 0 auto;
    }

    .advantages-list {
        display: flex;
        flex-direction: column;
        gap: 44px;
    }

    .advantage-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 29px;
        width: 100%;
    }

    .advantage-card--reverse {
        flex-direction: column;
    }

    .advantage-card__content {
        max-width: 100%;
        width: 100%;
        gap: 20px;
        display: flex;
        flex-direction: column;
    }

    .advantage-card__number {
        font-size: 62px;
        font-weight: 100;
        letter-spacing: -3.1px;
    }

    .advantage-card__title {
        font-size: 22px;
        font-weight: 600;
    }

    .advantage-card__description {
        font-size: 16px;
        font-weight: 400;
        line-height: 1.4;
        color: #3D3D3D;
    }

    .advantage-card__image {
        width: 315px;
        height: 315px;
        max-width: 100%;
        border-radius: 0;
        overflow: hidden;
    }
    
    .advantages-section__action {
        margin-top: 60px;
    }
    
    .advantages-section__button {
        padding: 8px 16px;
        font-size: 10px;
    }
}

/* Advantages Text Section (Frame 77) */
.advantages-text-section {
    position: relative;
    width: 100%;
    background-color: #FFFFFF; /* фон блока "Почему выбирают Garda" оставляем белым */
    padding-top: 100px;
    padding-bottom: 100px;
}

.advantages-text-section__wrapper {
    position: relative;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 180px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 100px;
}

.advantages-text-section__left {
    flex: 0 0 auto;
    width: 526px;
}

.advantages-text-section__subtitle {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 4.8px;
    color: #ACACAC;
    margin: 0 0 30px 0;
    padding: 0;
    white-space: pre;
}

.advantages-text-section__title {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    color: #0C181A;
    margin: 0;
    padding: 0;
}

.advantages-text-section__title-garda {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    font-style: italic;
}

.advantages-text-section__right {
    flex: 0 0 auto;
    width: 761px;
}

.advantages-text-section__description {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    color: #3D3D3D;
    margin: 0;
    padding: 0;
}

.advantages-text-section__description-garda {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    font-style: italic;
}

/* Responsive styles for text section */
@media screen and (max-width: 1599px) {
    .advantages-text-section__wrapper {
        padding: 0 100px;
        gap: 60px;
    }
    
    .advantages-text-section__left {
        width: 450px;
    }
    
    .advantages-text-section__right {
        width: 650px;
    }
}

@media screen and (max-width: 1199px) {
    .advantages-text-section {
        padding-top: 80px;
        padding-bottom: 80px;
    }
    
    .advantages-text-section__wrapper {
        flex-direction: column;
        padding: 0 50px;
        gap: 40px;
    }
    
    .advantages-text-section__left {
        width: 100%;
    }
    
    .advantages-text-section__right {
        width: 100%;
    }
    
    .advantages-text-section__title {
        font-size: 26px;
    }
    
    .advantages-text-section__description {
        font-size: 16px;
    }
}

/* Mobile (640px и меньше) */
@media screen and (max-width: 639px) {
    .advantages-text-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .advantages-text-section__wrapper {
        padding: 0 20px;
        gap: 32px;
        flex-direction: column;
    }
    
    .advantages-text-section__left {
        width: 100%;
        max-width: 315px;
    }
    
    .advantages-text-section__right {
        width: 100%;
    }
    
    .advantages-text-section__subtitle {
        font-size: 10px;
        letter-spacing: 2.4px;
        margin-bottom: 20px;
    }
    
    .advantages-text-section__title {
        font-size: 32px;
        font-weight: 600;
        line-height: 110%;
        text-transform: uppercase;
        color: #0C181A;
    }
    
    .advantages-text-section__title-garda {
        font-size: 32px;
        font-weight: 600;
        font-style: italic;
        line-height: 110%;
        text-transform: uppercase;
    }
    
    .advantages-text-section__description {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Small Mobile (480px и меньше) */
@media screen and (max-width: 479px) {
    .advantages-text-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }
    
    .advantages-text-section__wrapper {
        padding: 0 16px;
        gap: 24px;
    }
    
    .advantages-text-section__left {
        width: 100%;
        max-width: 315px;
    }
    
    .advantages-text-section__subtitle {
        font-size: 9px;
        letter-spacing: 2px;
        margin-bottom: 16px;
    }
    
    .advantages-text-section__title {
        font-size: 32px;
        font-weight: 600;
        line-height: 110%;
        text-transform: uppercase;
        color: #0C181A;
    }
    
    .advantages-text-section__title-garda {
        font-size: 32px;
        font-weight: 600;
        font-style: italic;
        line-height: 110%;
        text-transform: uppercase;
    }
    
    .advantages-text-section__description {
        font-size: 13px;
    }
}

