/**
 * Pricing plans block.
 *
 * Values mirror the Tilda original (bebestschool.com, records rec501008070
 * and rec1772135111): a #1cb65a band with a 40 px white heading and a 20 px
 * white paragraph, white cards with a 30 px radius on the 1200 px grid, the
 * highlighted one #efefef, 21 px taller at the top and 43 px at the foot and
 * laid 24 px over each neighbour, 17 px feature lines, and yellow 275 × 55
 * buttons. Below 1200 px the cards stack, as they do there.
 */

.bbs-pricing {
    --bbs-pricing-font: 'ApercuPro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --bbs-pricing-container: 1200px;
    --bbs-pricing-gutter: 20px;

    --bbs-pricing-green: #1cb65a;
    --bbs-pricing-card: #ffffff;
    --bbs-pricing-featured: #efefef;
    --bbs-pricing-yellow: #ffde51;
    --bbs-pricing-yellow-featured: #ffd72e;
    --bbs-pricing-yellow-hover: #f5cc1f;
    --bbs-pricing-muted: #838383;
    --bbs-pricing-desc: #454545;

    --bbs-pricing-radius: 30px;
    /* How far the highlighted card reaches past the others, above and below. */
    --bbs-pricing-lift: 21px;
    --bbs-pricing-drop: 43px;
    --bbs-pricing-overlap: 24px;
    --bbs-pricing-icon: 22px;

    padding: 19px 0 93px;
    background: var(--bbs-pricing-green);
    color: #000000;
    font-family: var(--bbs-pricing-font);
}

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

.bbs-pricing__inner {
    max-width: var(--bbs-pricing-container);
    margin: 0 auto;
    padding: 0 var(--bbs-pricing-gutter);
}

.bbs-pricing--untitled {
    padding-top: 60px;
}

.bbs-pricing__title {
    margin: 0 auto 65px;
    color: #ffffff;
    font-size: 40px;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
}

/* As a page's own heading — the H1 of the Вартість page (bebestschool.com/ua/pricing,
   rec1162217831) — it is 61 px. */
h1.bbs-pricing__title {
    font-size: 61px;
    line-height: 1.1;
}

@media (max-width: 1199px) {
    h1.bbs-pricing__title {
        font-size: 48px;
    }
}

@media (max-width: 639px) {
    h1.bbs-pricing__title {
        font-size: 30px;
        line-height: 1.2;
    }
}

.bbs-pricing__title:has(+ .bbs-pricing__intro) {
    margin-bottom: 17px;
}

.bbs-pricing__intro {
    margin: 0 0 65px;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.55;
    font-weight: 400;
}

/* ── Cards side by side ── */
.bbs-pricing__grid {
    display: grid;
    grid-template-columns: repeat(var(--bbs-pricing-count, 3), minmax(0, 1fr));
    column-gap: 24px;
    align-items: stretch;
}

/* With a highlighted card the others butt up to it and it covers their edges. */
.bbs-pricing__grid:has(.bbs-pricing__plan--featured) {
    column-gap: 0;
}

/* Three plans around a highlighted one, as the original: the outer cards
   400 px and the middle one 406 px with its 24 px laid over each of them. */
.bbs-pricing__grid:has(> .bbs-pricing__plan--featured:nth-child(2):nth-last-child(2)) {
    grid-template-columns: minmax(0, 401fr) minmax(0, 358fr) minmax(0, 401fr);
}

.bbs-pricing__plan {
    display: flex;
    flex-direction: column;
    /* As tall as the original's cards; longer lists grow them. */
    min-height: 731px;
    padding: 48px 16px 33px;
    border-radius: var(--bbs-pricing-radius);
    background: var(--bbs-pricing-card);
}

/* The strip a neighbour's highlighted card lies over is kept free of text. */
.bbs-pricing__plan:has(+ .bbs-pricing__plan--featured) {
    padding-right: calc(16px + var(--bbs-pricing-overlap));
}

.bbs-pricing__plan--featured + .bbs-pricing__plan {
    padding-left: calc(16px + var(--bbs-pricing-overlap));
}

.bbs-pricing__plan--featured {
    --bbs-pricing-icon: 31px;
    --bbs-pricing-yellow: var(--bbs-pricing-yellow-featured);

    position: relative;
    z-index: 1;
    margin: calc(var(--bbs-pricing-lift) * -1) calc(var(--bbs-pricing-overlap) * -1) calc(var(--bbs-pricing-drop) * -1);
    padding: 47px 24px 71px;
    background: var(--bbs-pricing-featured);
}

.bbs-pricing__plan--featured:first-child {
    margin-left: 0;
}

.bbs-pricing__plan--featured:last-child {
    margin-right: 0;
}

/* ── Card content ── */
.bbs-pricing__name {
    margin: 0;
    font-size: 24px;
    line-height: 1.55;
    font-weight: 900;
    text-align: center;
}

.bbs-pricing__plan--featured .bbs-pricing__name {
    font-size: 30px;
}

.bbs-pricing__desc {
    margin: 13px 0 0;
    color: var(--bbs-pricing-desc);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 400;
    text-align: center;
}

.bbs-pricing__plan--featured .bbs-pricing__desc {
    margin-top: 6px;
    padding: 0 36px;
}

.bbs-pricing__features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 19px 0 0;
    padding: 0;
    list-style: none;
}

.bbs-pricing__feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 400;
}

.bbs-pricing__plan--featured .bbs-pricing__feature {
    gap: 17px;
}

.bbs-pricing__plan--featured .bbs-pricing__features {
    gap: 14px;
}

.bbs-pricing__feature--excluded {
    color: var(--bbs-pricing-muted);
}

/* Lines kept for the full list: in the page, hidden until the plans are expanded. */
.bbs-pricing__feature--extra {
    display: none;
}

.bbs-pricing.is-expanded .bbs-pricing__feature--extra {
    display: flex;
    animation: bbs-pricing-reveal 0.35s ease-out both;
}

@keyframes bbs-pricing-reveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.bbs-pricing__feature strong,
.bbs-pricing__feature b {
    font-weight: 700;
}

.bbs-pricing__icon {
    display: block;
    flex: 0 0 var(--bbs-pricing-icon);
    width: var(--bbs-pricing-icon);
    height: var(--bbs-pricing-icon);
}

.bbs-pricing__more {
    align-self: flex-start;
    margin-top: 12px;
    color: #000000;
    font-size: 20px;
    line-height: 1.55;
    font-weight: 400;
    text-decoration: underline;
}

.bbs-pricing__more:visited {
    color: #000000;
}

/* The expand button looks like the link it replaces. */
.bbs-pricing__toggle {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    text-align: left;
    text-underline-offset: auto;
    cursor: pointer;
}

.bbs-pricing__more:hover,
.bbs-pricing__more:focus-visible {
    color: var(--bbs-pricing-green);
}

/* Note and button sit on the card's lower edge, level across the row. */
.bbs-pricing__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    padding-top: 32px;
}

.bbs-pricing__price {
    margin: 0 0 18px;
    font-size: 20px;
    line-height: 1.55;
    font-weight: 700;
    text-align: center;
}

.bbs-pricing__note {
    max-width: 300px;
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 400;
    text-align: center;
}

.bbs-pricing__plan--featured .bbs-pricing__note {
    max-width: 358px;
    font-size: 15px;
}

.bbs-pricing__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 275px;
    min-height: 55px;
    padding: 8px 24px;
    border-radius: 30px;
    background: var(--bbs-pricing-yellow);
    color: #000000;
    font-size: 17px;
    line-height: 1.55;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.bbs-pricing__btn:visited {
    color: #000000;
}

.bbs-pricing__btn:hover,
.bbs-pricing__btn:focus-visible {
    background: var(--bbs-pricing-yellow-hover);
    color: #000000;
    text-decoration: none;
}

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

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

    .bbs-pricing.is-expanded .bbs-pricing__feature--extra {
        animation: none;
    }
}

/* ── 1199 and below: one under another, as the original ── */
@media (max-width: 1199px) {
    .bbs-pricing {
        --bbs-pricing-container: 960px;
        --bbs-pricing-gutter: 10px;
        --bbs-pricing-icon: 22px;

        padding: 19px 0 50px;
    }

    .bbs-pricing__inner {
        padding: 0 20px;
    }

    .bbs-pricing__title,
    .bbs-pricing__intro {
        margin-bottom: 50px;
    }

    .bbs-pricing__title:has(+ .bbs-pricing__intro) {
        margin-bottom: 15px;
    }

    .bbs-pricing__grid,
    .bbs-pricing__grid:has(.bbs-pricing__plan--featured),
    .bbs-pricing__grid:has(> .bbs-pricing__plan--featured:nth-child(2):nth-last-child(2)) {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 25px;
    }

    .bbs-pricing__plan,
    .bbs-pricing__plan--featured,
    .bbs-pricing__plan:has(+ .bbs-pricing__plan--featured),
    .bbs-pricing__plan--featured + .bbs-pricing__plan {
        min-height: 0;
        margin: 0;
        padding: 38px 26px 26px;
    }

    .bbs-pricing__plan--featured {
        --bbs-pricing-icon: 22px;
    }

    .bbs-pricing__desc,
    .bbs-pricing__plan--featured .bbs-pricing__desc {
        padding: 0;
    }

    .bbs-pricing__plan--featured .bbs-pricing__feature {
        gap: 8px;
    }

    .bbs-pricing__plan--featured .bbs-pricing__features {
        gap: 10px;
    }

    .bbs-pricing__note,
    .bbs-pricing__plan--featured .bbs-pricing__note {
        max-width: 508px;
        font-size: 15px;
    }
}

/* ── 639 and below ── */
@media (max-width: 639px) {
    .bbs-pricing {
        --bbs-pricing-gutter: 16px;
        --bbs-pricing-icon: 17px;

        padding: 19px 0 50px;
    }

    .bbs-pricing__inner {
        padding: 0 var(--bbs-pricing-gutter);
    }

    .bbs-pricing--untitled {
        padding-top: 31px;
    }

    .bbs-pricing__title,
    .bbs-pricing__intro {
        margin-bottom: 44px;
    }

    .bbs-pricing__grid,
    .bbs-pricing__grid:has(.bbs-pricing__plan--featured) {
        row-gap: 20px;
    }

    .bbs-pricing__plan,
    .bbs-pricing__plan--featured,
    .bbs-pricing__plan:has(+ .bbs-pricing__plan--featured),
    .bbs-pricing__plan--featured + .bbs-pricing__plan {
        padding: 26px 12px 20px;
    }

    .bbs-pricing__plan--featured {
        --bbs-pricing-icon: 17px;
    }

    .bbs-pricing__plan--featured .bbs-pricing__name {
        font-size: 24px;
    }

    .bbs-pricing__desc {
        margin-top: 8px;
        font-size: 14px;
    }

    .bbs-pricing__features {
        padding-left: 0;
    }

    .bbs-pricing__feature {
        font-size: 14px;
    }

    .bbs-pricing__feature .bbs-pricing__icon {
        margin-top: 1px;
    }

    .bbs-pricing__more {
        font-size: 17px;
    }

    .bbs-pricing__footer {
        padding-top: 24px;
    }

    .bbs-pricing__note,
    .bbs-pricing__plan--featured .bbs-pricing__note {
        margin-bottom: 14px;
        font-size: 12px;
    }

    .bbs-pricing__btn {
        width: 100%;
        max-width: 275px;
        min-width: 0;
        min-height: 45px;
        font-size: 15px;
    }
}

@media (max-width: 479px) {
    .bbs-pricing__title {
        font-size: 26px;
    }

    .bbs-pricing__plan,
    .bbs-pricing__plan--featured {
        border-radius: 20px;
    }
}

/*
 * In a blog article ("bbs-pricing--article" in Advanced → Additional CSS
 * class): as the Tilda original's articles have it (bebestschool.com/blog/
 * isput-goethe), TildaSans throughout and the heading in Arial Bold
 * 61 / 61 px, 18 px down and set left at 148 px on the grid, 62 px over the
 * cards.
 */
.bbs-pricing.bbs-pricing--article {
    --bbs-pricing-font: 'TildaSans', Arial, sans-serif;

    padding-top: 18px;
}

.bbs-pricing--article .bbs-pricing__title {
    margin-bottom: 62px;
    padding-left: 148px;
    font-family: Arial, sans-serif;
    font-size: 61px;
    line-height: 61px;
    text-align: left;
}

/* With the prices under the lists the cards stand 19 px lower. */
.bbs-pricing--article.bbs-pricing--prices {
    padding-bottom: 89px;
}

.bbs-pricing--article.bbs-pricing--prices .bbs-pricing__title {
    margin-bottom: 81px;
}

/* With no heading the band starts 41 px over the cards. */
.bbs-pricing.bbs-pricing--article.bbs-pricing--untitled {
    padding-top: 41px;
}

.bbs-pricing--article .bbs-pricing__plan:first-child .bbs-pricing__desc {
    max-width: 327px;
    margin-right: auto;
    margin-left: auto;
}

.bbs-pricing--article .bbs-pricing__plan--featured .bbs-pricing__desc {
    max-width: 290px;
    margin-right: auto;
    margin-left: auto;
    padding: 0;
}

@media (max-width: 1199px) {
    .bbs-pricing--article .bbs-pricing__title {
        padding-left: 0;
        font-size: 48px;
        line-height: 1.1;
        text-align: center;
    }
}

@media (max-width: 639px) {
    .bbs-pricing--article .bbs-pricing__title {
        margin-bottom: 40px;
        font-size: 30px;
        line-height: 1.2;
    }
}

/*
 * On a course page (bebestschool.com/spanish-course, rec551243245 over
 * rec1772135111): the heading in TildaSans Bold 40 / 50 px, upper case,
 * centred, 48 px of space under it; no line under it.
 */
.bbs-pricing--article.bbs-pricing--course .bbs-pricing__title {
    margin-bottom: 48px;
    padding-left: 0;
    font-family: 'TildaSans', Arial, sans-serif;
    font-size: 40px;
    line-height: 50px;
    text-align: center;
    text-transform: uppercase;
}

.bbs-pricing--article.bbs-pricing--course {
    padding-top: 40px;
}

/* Course page heading as measured on /italiano-course/italiano-beginner
   (rec724834802): ApercuPro SemiBold, 42 px down, 59 px over the cards. */
.bbs-pricing.bbs-pricing--article.bbs-pricing--course {
    padding-top: 42px;
}

.bbs-pricing--article.bbs-pricing--course .bbs-pricing__title {
    margin-bottom: 59px;
    font-family: 'ApercuPro', Arial, sans-serif;
    font-weight: 600;
}

@media (min-width: 1200px) {
    .bbs-pricing.bbs-pricing--article.bbs-pricing--course {
        padding-top: 42px;
        padding-bottom: 103px;
    }

    .bbs-pricing--article.bbs-pricing--course .bbs-pricing__title {
        max-width: 760px;
        margin: 0 auto 59px;
    }
}

/* A long word in capitals still fits a phone: it breaks rather than run past the screen. */
@media (max-width: 639px) {
    .bbs-pricing__title {
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

/* A course page's line under the heading ("ВСЕ ВОЗРАСТЫ"): 30 px white, centred. */
.bbs-pricing--article.bbs-pricing--course .bbs-pricing__intro {
    max-width: 860px;
    margin: -40px auto 40px;
    color: #ffffff;
    font-size: 30px;
    line-height: 47px;
    text-align: center;
}
