/*
  Homepage plans — modern cards; overrides global custom.css .pricing-table-box rules.
*/

body.index .cl-home-plans .pricing-table-box {
    padding-bottom: 0;
    text-align: inherit;
    z-index: auto;
    position: relative;
    border-radius: 1.15rem;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

body.index .cl-home-plans .pricing-table-box::after {
    content: none !important;
    display: none !important;
}

body.index .cl-home-plans .pricing-table-box:hover {
    transform: translateY(-2px);
    box-shadow: none;
    border-color: rgb(23 18 28 / 0.12);
}

body.index .cl-home-plans .pricing-table-box .pricingTable-header {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 100%;
    height: 10.75rem !important;
    min-height: 10.75rem !important;
    max-height: 10.75rem !important;
    padding: 0.85rem 1rem 0.9rem !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    position: relative;
    overflow: hidden;
}

body.index .cl-home-plans .pricing-table-box .pricingTable-header::before {
    content: none !important;
    display: none !important;
}

body.index .cl-home-plans .pricing-table-box .title {
    flex: 0 0 auto;
    width: 100%;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #17121c !important;
    text-transform: none !important;
    margin: 0 0 0.4rem !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3 !important;
    min-height: 1.3em;
    max-height: 1.3em;
}

.cl-home-plans .pricing-area {
    margin: 0;
    padding: 0;
}

.cl-home-plans .pricing-area > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    margin: 0 !important;
}

.cl-home-plans .pricing-area > .row > [class*="col-"] {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: none !important;
}

/* Mobile: horizontal swipe carousel (not stacked) */
@media (max-width: 767.98px) {
    .cl-home-plans .cl-plans__cards {
        margin-inline: 0;
        padding-inline: 0;
        max-width: none;
        width: 100%;
    }

    .cl-home-plans .pricing-area {
        margin-inline: 0;
    }

    .cl-home-plans .pricing-area > .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch;
        gap: 0.85rem;
        margin: 0 !important;
        padding: 0.25rem max(1.1rem, env(safe-area-inset-right, 0px)) 1rem max(1.1rem, env(safe-area-inset-left, 0px));
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        /* proximity — avoid sticky page-scroll fights on mobile */
        scroll-snap-type: x proximity;
        scroll-padding-inline: max(1.1rem, env(safe-area-inset-left, 0px));
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
        scrollbar-width: none;
    }

    .cl-home-plans .pricing-area > .row::-webkit-scrollbar {
        display: none;
    }

    .cl-home-plans .pricing-area > .row > [class*="col-"] {
        flex: 0 0 min(18.5rem, 82vw) !important;
        width: min(18.5rem, 82vw) !important;
        max-width: min(18.5rem, 82vw) !important;
        height: auto !important;
        align-self: stretch;
        scroll-snap-align: center;
        scroll-snap-stop: normal;
        display: flex;
        flex-direction: column;
    }

    .cl-home-plans .pricing-area > .row > [class*="col-"] > div {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
    }

    .cl-home-plans .pricing-area > .row > [class*="col-"] .pricing-table-box {
        flex: 1 1 auto;
        height: 100%;
        min-height: 28.5rem;
        max-height: none;
    }

    body.index .cl-home-plans .pricing-table-box .title {
        font-size: 1.08rem !important;
    }

    body.index .cl-home-plans .pricing-table-box .pricingTable-header {
        height: 10.25rem !important;
        min-height: 10.25rem !important;
        max-height: 10.25rem !important;
        padding: 0.75rem 0.9rem 0.8rem !important;
    }

    .cl-home-plans .pricing-area > .row > [data-cl-plan="trial"] .pricing-table-box {
        box-shadow: none;
        border-color: rgb(139 24 116 / 0.16);
    }
}

@media (min-width: 768px) {
    .cl-home-plans .pricing-area > .row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
        overflow: visible;
        scroll-snap-type: none;
        padding: 0;
    }
}

@media (min-width: 1200px) {
    .cl-home-plans .pricing-area > .row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: stretch;
    }
}

/* Billing period — pill tabs (no outer box, no visible radios) */
.cl-home-plans .cl-plans-freq {
    margin-bottom: 1.75rem !important;
}

.cl-home-plans .btn-group-toggle.btn-group-custom {
    display: inline-flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0 !important;
    margin: 0 auto;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.cl-home-plans .btn-group-toggle.btn-group-custom::before,
.cl-home-plans .btn-group-toggle.btn-group-custom::after {
    content: none !important;
    display: none !important;
}

.cl-home-plans .btn-group-toggle.btn-group-custom input[type="radio"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.cl-home-plans .btn-group-toggle.btn-group-custom label.btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 999px !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    line-height: 1.25;
    color: #5f5666 !important;
    background: #fff !important;
    border: 1.5px solid rgb(139 24 116 / 0.14) !important;
    cursor: pointer;
    box-shadow: 0 2px 8px rgb(23 18 28 / 0.04);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cl-home-plans .btn-group-toggle.btn-group-custom label.btn:hover {
    border-color: rgb(139 24 116 / 0.35) !important;
    color: #8b1874 !important;
    transform: translateY(-1px);
}

.cl-home-plans .btn-group-toggle.btn-group-custom label.btn.active,
.cl-home-plans .btn-group-toggle.btn-group-custom label.btn.is-active {
    color: #fff !important;
    background: linear-gradient(120deg, #8b1874, #5c0f4d) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 22px rgb(139 24 116 / 0.28) !important;
}

@media (max-width: 767.98px) {
    .cl-home-plans .cl-plans-freq {
        padding-inline: max(1.25rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
        box-sizing: border-box;
    }

    .cl-home-plans .btn-group-toggle.btn-group-custom {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
        gap: 0.4rem;
        box-sizing: border-box;
    }

    .cl-home-plans .btn-group-toggle.btn-group-custom label.btn {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0.48rem 0.28rem !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
    }
}

.cl-home-plans .pricing-table-box {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgb(23 18 28 / 0.06);
}

.cl-home-plans .pricingTable-header {
    text-align: center;
}

.cl-home-plans .pricing-price {
    display: inline-flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem 0.45rem;
    min-height: 2.35rem;
    line-height: 1.15;
    direction: rtl;
}

body.index .cl-home-plans .price-value {
    display: none;
    font-size: 1.85rem !important;
    font-weight: 900 !important;
    line-height: 1.1;
    color: #8b1874 !important;
    margin: 0;
}

body.index .cl-home-plans .price-value.d-inline-block {
    display: inline-block !important;
}

/* Hide IRR / payment currency code if still present */
.cl-home-plans .pricing-price-currency[style*="display: none"],
.cl-home-plans .pricing-price-currency.is-code {
    display: none !important;
}

.cl-home-plans .pricing-price-currency {
    display: inline !important;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: #5f5666;
    white-space: nowrap;
}

.cl-home-plans .pricing-details {
    flex: 1 1 auto;
    width: 100%;
    margin-top: 0.55rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #5f5666;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.9em;
}

/* Trial / free cards: price-value may sit outside .pricing-price */
body.index .cl-home-plans .pricingTable-header > .price-value.d-inline-block {
    flex: 0 0 auto;
    min-height: 2.35rem;
}

.cl-home-plans ul.pricing-content {
    list-style: none;
    margin: 0;
    padding: 0 1rem !important;
    flex: 1 1 auto;
}

body.index .cl-home-plans .pricing-table-box .pricing-content {
    padding: 0 1rem !important;
    margin: 0 !important;
}

body.index .cl-home-plans ul.pricing-content li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0 !important;
    border-bottom: 1px solid rgb(23 18 28 / 0.06) !important;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #17121c;
    text-transform: none !important;
}

body.index .cl-home-plans ul.pricing-content li:last-child,
.cl-home-plans ul.pricing-content li:last-child {
    border-bottom: none !important;
    padding-bottom: 0.55rem !important;
}

.cl-home-plans .pricing-area .container {
    width: 100%;
    max-width: none;
    padding: 0 1rem;
    margin: 0;
}

.cl-home-plans .pricing-area .container.cl-plan-actions {
    padding-top: 0.15rem;
    padding-bottom: 0;
}

/* Only one line before buy button */
.cl-home-plans .pricing-area .container.cl-plan-cta {
    margin-top: 0 !important;
    padding-top: 0.7rem !important;
    padding-bottom: 0.85rem !important;
    border-top: 1px solid rgb(23 18 28 / 0.08) !important;
    box-shadow: none !important;
}

body.index[data-theme-style="dark"] .cl-home-plans .pricing-area .container.cl-plan-cta,
body.index.c_darkmode .cl-home-plans .pricing-area .container.cl-plan-cta {
    border-top-color: rgb(255 255 255 / 0.12);
}

.cl-home-plans .pricing-area .container.cl-plan-cta .mt-3 {
    margin-top: 0.45rem !important;
}

.cl-home-plans .pricing-area .cl-plan-actions + .cl-plan-cta,
.cl-home-plans .pricing-area .cl-plan-actions + .container {
    margin-top: 0;
}

.cl-home-plans .btn-primary.btn-lg.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 0.55rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(120deg, #8b1874, #5c0f4d) !important;
    border: 0 !important;
    box-shadow: none;
    text-decoration: none !important;
}

.cl-home-plans .cl-plan-actions .btn-primary.btn-lg.btn-block {
    min-height: 2.35rem;
    box-shadow: none;
}

.cl-home-plans .collapse:not(.show) {
    display: none !important;
}

.cl-home-plans .collapse.show {
    display: block !important;
}

.cl-home-plans .d-none {
    display: none !important;
}

.cl-home-plans [data-plan-monthly="false"].d-none,
.cl-home-plans [data-plan-annual="false"].d-none {
    display: none !important;
}

/* Dark mode — pricing cards on homepage */
body.index[data-theme-style="dark"] .cl-home-plans .pricing-table-box,
body.index.c_darkmode .cl-home-plans .pricing-table-box,
body.index[data-theme-style="dark"] .cl-home-plans .btn-group-toggle.btn-group-custom label.btn,
body.index.c_darkmode .cl-home-plans .btn-group-toggle.btn-group-custom label.btn {
    background: #2d2238 !important;
    border-color: rgb(255 255 255 / 0.12) !important;
    color: #f4eef7 !important;
}

body.index[data-theme-style="dark"] .cl-home-plans .btn-group-toggle.btn-group-custom label.btn.active,
body.index[data-theme-style="dark"] .cl-home-plans .btn-group-toggle.btn-group-custom label.btn.is-active,
body.index.c_darkmode .cl-home-plans .btn-group-toggle.btn-group-custom label.btn.active,
body.index.c_darkmode .cl-home-plans .btn-group-toggle.btn-group-custom label.btn.is-active {
    color: #fff !important;
    background: linear-gradient(120deg, #8b1874, #5c0f4d) !important;
}

body.index[data-theme-style="dark"] .cl-home-plans .title,
body.index[data-theme-style="dark"] .cl-home-plans .price-value,
body.index[data-theme-style="dark"] .cl-home-plans .pricing-content,
body.index[data-theme-style="dark"] .cl-home-plans .pricing-details,
body.index.c_darkmode .cl-home-plans .title,
body.index.c_darkmode .cl-home-plans .price-value,
body.index.c_darkmode .cl-home-plans .pricing-content,
body.index.c_darkmode .cl-home-plans .pricing-details {
    color: #f4eef7 !important;
}

body.index[data-theme-style="dark"] .cl-home-plans ul.pricing-content li,
body.index.c_darkmode .cl-home-plans ul.pricing-content li,
body.index[data-theme-style="dark"] .cl-home-plans .pricing-table-box .pricing-content li,
body.index.c_darkmode .cl-home-plans .pricing-table-box .pricing-content li {
    color: #f4eef7 !important;
    border-bottom-color: rgb(255 255 255 / 0.1) !important;
}

body.index[data-theme-style="dark"] .cl-home-plans ul.pricing-content li .text-muted,
body.index.c_darkmode .cl-home-plans ul.pricing-content li .text-muted,
body.index[data-theme-style="dark"] .cl-home-plans .pricing-features,
body.index.c_darkmode .cl-home-plans .pricing-features,
body.index[data-theme-style="dark"] .cl-home-plans .pricing-features li,
body.index.c_darkmode .cl-home-plans .pricing-features li {
    color: #d8cce3 !important;
}
