/**
 * Offer banner block.
 *
 * Values mirror the Tilda original (bebestschool.kz/ielts-podgotovka,
 * rec1976209283): a 1100 × 580 #1cb65a card rounded 20 px, 60 px of white
 * above and below; on the left, 40 px in, a 42 px bold white heading 27 px
 * from the top, 20 px bold white text 30 px under it and a 200 × 55 yellow
 * button 30 px under that; on the right a 469 px #a6dcbc bubble 30 px from
 * the top with 20 px text, and under it the photo (443 px) on the card's
 * bottom edge. Narrower everything is stacked and centred: a 600 px card on
 * tablets, one 40 px narrower than the screen on phones.
 */

.bbs-offer {
    padding: 60px 20px;
    background: #ffffff;
    font-family: var(--bbs-font, 'ApercuPro', Arial, sans-serif);
}

.bbs-offer *,
.bbs-offer *::before,
.bbs-offer *::after {
    box-sizing: border-box;
}

.bbs-offer__card {
    display: flex;
    align-items: stretch;
    max-width: 1100px;
    min-height: 580px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    background: #1cb65a;
    color: #ffffff;
}

.bbs-offer__main {
    flex: 0 1 560px;
    padding: 27px 0 40px 40px;
}

.bbs-offer__title {
    margin: 0;
    color: inherit;
    font-size: 42px;
    line-height: 53px;
    font-weight: 700;
}

.bbs-offer__text {
    margin: 30px 0 0;
    font-size: 20px;
    line-height: 31px;
    font-weight: 700;
}

.bbs-offer__text + .bbs-offer__text {
    margin-top: 16px;
}

.bbs-offer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    min-height: 55px;
    margin-top: 30px;
    padding: 8px 28px;
    border-radius: 30px;
    background: #ffd62c;
    color: #000000;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.bbs-offer__btn:hover,
.bbs-offer__btn:focus-visible {
    background: #ffcb00;
    color: #000000;
}

.bbs-offer__btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.bbs-offer__side {
    display: flex;
    flex: 0 0 469px;
    flex-direction: column;
    align-items: center;
    margin: 0 30px 0 auto;
    padding-top: 30px;
}

.bbs-offer__note {
    width: 100%;
    margin: 0;
    padding: 20px 10px;
    border-radius: 20px;
    background: #a6dcbc;
    color: #000000;
    font-size: 20px;
    line-height: 31px;
    font-weight: 700;
}

/* The photo stands on the card's bottom edge. */
.bbs-offer__img {
    display: block;
    width: 443px;
    max-width: 100%;
    height: auto;
    margin-top: auto;
}

/* Side by side, the photo starts 11 px left of the bubble, as on the original. */
@media (min-width: 960px) {
    .bbs-offer__img {
        align-self: flex-start;
        margin-left: -11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bbs-offer__btn {
        transition: none;
    }
}

/* ── 1199 and below ── */
@media (max-width: 1199px) {
    .bbs-offer__main {
        padding-left: 20px;
    }

    .bbs-offer__side {
        margin-right: 15px;
    }
}

/* ── 959 and below: stacked ── */
@media (max-width: 959px) {
    .bbs-offer__card {
        flex-direction: column;
        max-width: 600px;
        min-height: 0;
    }

    .bbs-offer__main {
        flex: none;
        padding: 27px 20px 0;
    }

    .bbs-offer__btn {
        display: flex;
        width: 200px;
        margin: 30px auto 0;
    }

    .bbs-offer__side {
        flex: none;
        width: 469px;
        max-width: calc(100% - 20px);
        margin: 0 auto;
        padding-top: 60px;
    }

    .bbs-offer__img {
        width: 446px;
        margin-top: 0;
    }
}

/* ── 639 and below ── */
@media (max-width: 639px) {
    .bbs-offer {
        padding: 60px 33px;
    }

    .bbs-offer__main {
        padding: 27px 8px 0;
    }

    .bbs-offer__title {
        font-size: 32px;
        line-height: 40px;
    }

    /* Line breaks typed in the heading hold from tablets up only. */
    .bbs-offer__br {
        display: none;
    }

    .bbs-offer__text {
        font-size: 18px;
        line-height: 28px;
    }

    .bbs-offer__side {
        width: 100%;
        max-width: none;
        padding-top: 70px;
    }

    .bbs-offer__note {
        width: calc(100% - 10px);
        padding: 27px 7px;
        font-size: 18px;
        line-height: 28px;
    }

    .bbs-offer__img {
        width: 100%;
    }
}

/*
 * "discount": the banner of bebestschool.com's course pages
 * (/spanish-course, rec2155599553): a 520 px band; a 1160 × 400 #1cb65a card
 * 60 px down on the 1200 px grid, square-cornered; the heading in TildaSans
 * Bold 40 / 50 px white, 26 px into the card and 11 px down, 563 px wide;
 * a 274 × 164 #ffd62c plate rounded 20 px, 849 px in and 20 px down, its
 * line in TildaSans Black 26 / 40 px centred 18 px down; the picture,
 * 395 × 332, 444 px in and 62 px down; a 230 × 60 #ffd62c button rounded
 * 30 px, 16 px Arial semi-bold black, 20 px in and 280 px down.
 */
.bbs-offer.bbs-offer--discount {
    padding: 60px 0;
    font-family: 'TildaSans', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.bbs-offer--discount .bbs-offer__card {
    position: relative;
    box-sizing: border-box;
    width: 1160px;
    max-width: none;
    height: 400px;
    min-height: 0;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: #1cb65a;
}

.bbs-offer--discount .bbs-offer__main {
    position: static;
    width: auto;
    padding: 0;
}

.bbs-offer--discount .bbs-offer__title {
    position: absolute;
    top: 11px;
    left: 26px;
    width: 563px;
    margin: 0;
    color: #ffffff;
    font-size: 40px;
    line-height: 50px;
    font-weight: 700;
}

.bbs-offer--discount .bbs-offer__btn {
    position: absolute;
    top: 280px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 230px;
    height: 60px;
    margin: 0;
    padding: 0;
    border-radius: 30px;
    background: #ffd62c;
    color: #000000;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 600;
}

.bbs-offer--discount .bbs-offer__side {
    position: static;
    width: auto;
    margin: 0;
}

.bbs-offer--discount .bbs-offer__note {
    position: absolute;
    top: 20px;
    left: 849px;
    box-sizing: border-box;
    width: 274px;
    height: 164px;
    margin: 0;
    padding: 18px 0 0;
    border-radius: 20px;
    background: #ffd62c;
    color: #000000;
    font-size: 26px;
    line-height: 40px;
    font-weight: 900;
    text-align: center;
}

.bbs-offer--discount .bbs-offer__note::before,
.bbs-offer--discount .bbs-offer__note::after {
    display: none;
}

.bbs-offer--discount .bbs-offer__img {
    position: absolute;
    top: 62px;
    left: 444px;
    width: 395px;
    height: 332px;
    max-width: none;
    margin: 0;
    object-fit: contain;
}

@media (max-width: 1199px) {
    .bbs-offer--discount .bbs-offer__card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: auto;
        max-width: 600px;
        height: auto;
        margin: 0 20px;
        padding: 30px 20px;
    }

    .bbs-offer--discount .bbs-offer__title,
    .bbs-offer--discount .bbs-offer__btn,
    .bbs-offer--discount .bbs-offer__note,
    .bbs-offer--discount .bbs-offer__img {
        position: static;
    }

    .bbs-offer--discount .bbs-offer__title {
        width: auto;
        font-size: 32px;
        line-height: 1.25;
        text-align: center;
    }

    .bbs-offer--discount .bbs-offer__side {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .bbs-offer--discount .bbs-offer__img {
        width: 300px;
        height: auto;
    }

    .bbs-offer--discount .bbs-offer__main {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}
