/**
 * Pricing plans block.
 *
 * Values mirror the Tilda original (bebestschool.kz, records rec799951008 and
 * rec1771495301): a #1cb65a band with a 40 px white heading, white cards with
 * a 30 px radius on the 1200 px grid, the highlighted one #efefef, 21 px taller
 * at each end 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.
 *
 * On bebestschool.kz/price (rec655856596) the same cards stand without the
 * heading, 60 px under the band's top edge, with a 20 px bold price above the
 * note; their "Развернуть все..." led to a second page with the full lists.
 * Here the full lists are in the cards already, their extra lines hidden
 * until the button opens them (script.js).
 */

.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: 33px;
    --bbs-pricing-overlap: 24px;
    --bbs-pricing-icon: 22px;

    padding: 52px 0 56px;
    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: calc(var(--bbs-pricing-container) + var(--bbs-pricing-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--bbs-pricing-gutter);
}

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

.bbs-pricing__title {
    /* The course pages' headings wrap at 860 px, as the originals' do. */
    max-width: 860px;
    margin: 0 auto 76px;
    color: #ffffff;
    font-size: 40px;
    line-height: 1.55;
    font-weight: 700;
    text-align: center;
}

/* A smaller line under the heading, as "ВСЕ ВОЗРАСТЫ" on
   bebestschool.kz/intensivnyj-kurs-anglijskogo (rec515435021). */
.bbs-pricing__title:has(+ .bbs-pricing__subtitle) {
    margin-bottom: 22px;
}

.bbs-pricing__subtitle {
    margin: 0 0 76px;
    color: #ffffff;
    font-size: 30px;
    line-height: 47px;
    text-align: center;
}

@media (max-width: 639px) {
    .bbs-pricing__subtitle {
        margin-bottom: 32px;
        font-size: 22px;
        line-height: 1.4;
    }
}

/* ── 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;
}

.bbs-pricing__plan {
    display: flex;
    flex-direction: column;
    /* As tall as the original's cards; longer lists grow them. */
    min-height: 724px;
    padding: 48px 16px 26px;
    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 54px;
    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: 700;
    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: 10px;
    margin: 19px 0 0;
    padding: 0 0 0 4px;
    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: 246px;
    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: 700;
    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: 55px 0 60px;
    }

    .bbs-pricing__title {
        margin-bottom: 57px;
    }

    .bbs-pricing__grid,
    .bbs-pricing__grid:has(.bbs-pricing__plan--featured) {
        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: 44px 0 40px;
    }

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

    .bbs-pricing__title {
        margin-bottom: 32px;
        font-size: 30px;
        line-height: 1.3;
    }

    .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;
    }
}

/* "bbs-pricing--narrow" (the block's Additional CSS class), on a computer:
   the heading wraps at 725 px with 50 px lines, 42 px from the top, as on
   bebestschool.kz/grupovue-kursu-ispanskogo-yazika (rec1291774021). */
@media (min-width: 960px) {
    .bbs-pricing--narrow .bbs-pricing__title {
        max-width: 725px;
        margin-top: -10px;
        line-height: 50px;
    }
}

/* "bbs-pricing--top" (the block's Additional CSS class), on a computer: the
   heading 14 px from the top at 50 px, as on
   bebestschool.kz/speaking-club-polish (rec1131159366). */
@media (min-width: 960px) {
    .bbs-pricing--top .bbs-pricing__title {
        margin-top: -38px;
        line-height: 50px;
    }
}

/* "bbs-pricing--wide-title" (the block's Additional CSS class), on a
   computer: the heading wraps at 961 px, as on
   bebestschool.kz/grupovue-kursu-portugalskogo-yazika (rec1300793711). */
@media (min-width: 960px) {
    .bbs-pricing--wide-title .bbs-pricing__title {
        max-width: 961px;
    }
}

/* With "bbs-pricing--mid" too: the heading wraps at 860 px, as on
   bebestschool.kz/grupovue-kursu-franzyskogo-yazika (rec1286117111). */
@media (min-width: 960px) {
    .bbs-pricing--narrow.bbs-pricing--mid .bbs-pricing__title {
        max-width: 860px;
    }
}

/* "bbs-pricing--title-xl" (the block's Additional CSS class): the heading in
   61 px bold Arial, as over the price plans on
   bebestschool.kz/exercises/upragnenia-na-past-perfect (rec2008926003). */
.bbs-pricing--title-xl .bbs-pricing__title {
    max-width: none;
    font-family: Arial, sans-serif;
    font-size: 61px;
    line-height: 61px;
}

@media (max-width: 959px) {
    .bbs-pricing--title-xl .bbs-pricing__title {
        font-size: 40px;
        line-height: 44px;
    }
}

@media (max-width: 639px) {
    .bbs-pricing--title-xl .bbs-pricing__title {
        font-size: 30px;
        line-height: 34px;
    }
}
