/* =============================================================================
   OUR PRICING (page-pricing.php, slug "pricing")
   Loads on that page only (functions.php). Every rule is under .pr-page, so nothing here can affect another page.
   Built on the theme: tokens.css, homepage.css (header, footer, .btn-primary) and inner-pages.css (.page-hero, .ip-cta-section).
   ============================================================================= */

.pr-page {
    --pr-hl:    #f0fdff;   /* light-blue highlight of the "Best Value" column */
    --pr-line:  #eceef2;
    --pr-soft:  #f6f7f9;
    --pr-mute:  #8a93a3;
    background: #fff;
}

/* Smooth scroll for the "See Services" link (modern browsers; others jump) */
html:has(.pr-page) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(.pr-page) { scroll-behavior: auto; } }

.pr-wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.pr-hl   { color: var(--color-primary); }

.pr-sr {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── 1. Hero (theme .page-hero) ─────────────────────────────────────────────── */
.pr-hero .page-hero__lead { max-width: 560px; }

/* ── 2. Featured plan ───────────────────────────────────────────────────────── */
.pr-featured-sec { padding: 40px 0 28px; }
.pr-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}
.pr-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}
.pr-featured__title {
    margin: 8px 0 4px;
    font-family: var(--font-head);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-ink);
}
.pr-featured__desc { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--color-body); }
.pr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pr-chips li {
    padding: 4px 10px;
    background: #e1f5ee;
    color: #085041;
    font-size: 13px;
    border-radius: var(--radius-full);
}
.pr-pricebox {
    margin-bottom: 12px;
    padding: 16px 18px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    background: #fff;
}
.pr-pricebox__billed { font-size: 13px; color: var(--color-body); }
.pr-pricebox__price  { font-family: var(--font-head); font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--color-ink); }
.pr-pricebox__price span { font-family: var(--font-body); font-size: 15px; font-weight: 400; color: var(--color-body); }
.pr-pricebox__note   { font-size: 13px; color: var(--pr-mute); }
.pr-featured__ask    { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--color-ink); }
.pr-featured__ask a  { color: inherit; text-decoration: underline; text-decoration-color: #c3c8d0; text-underline-offset: 3px; }
.pr-featured__ask a:hover { text-decoration-color: currentColor; }

/* Full-width pill button used inside cards and tables (theme .btn-primary, centred) */
.pr-page .pr-btn-block { display: flex; justify-content: center; width: 100%; }

/* ── 3. Dark bar ────────────────────────────────────────────────────────────── */
.pr-darkbar { padding: 20px 24px; background: var(--color-bg-dark); text-align: center; }
.pr-darkbar h2 { margin: 0; font-family: var(--font-head); font-size: 24px; font-weight: 700; line-height: 1.3; color: #fff; }

/* ── 5. Plan table ──────────────────────────────────────────────────────────── */
.pr-compare-sec { padding: 28px 0 32px; }
.pr-scroll {
    border: 1px solid var(--pr-line);
    border-radius: 14px;
    overflow-x: auto;
    background: #fff;
}
.pr-scroll:focus-visible { outline: 2px solid var(--color-accent-ink); outline-offset: 2px; }
.pr-plans { --pr-cols: minmax(0, 1.05fr) repeat(3, minmax(0, 1fr)); }
.pr-row {
    display: grid;
    grid-template-columns: var(--pr-cols);
    align-items: stretch;
    border-top: 1px solid var(--pr-line);
}
.pr-row--head { border-top: 0; }
.pr-cell {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-ink);
    border-right: 1px solid var(--pr-line);
}
.pr-cell:last-child { border-right: 0; }
.pr-col-best { background: var(--pr-hl); }
.pr-yes { color: #0f6e56; }
.pr-no  { color: #c3c8d0; }

/* Header row: the "just one service" box, then one cell per plan */
.pr-need { display: flex; flex-direction: column; }
.pr-need--table { align-items: stretch; padding: 20px 14px; background: #fafbfc; }
.pr-need__title { margin-top: 36px; font-size: 16px; font-weight: 600; color: var(--color-ink); }
.pr-need__text  { margin: 6px 0 14px; font-size: 14px; line-height: 1.45; color: var(--color-body); }
.pr-btn-black {
    display: flex; align-items: center; justify-content: center;
    height: 44px; margin-top: auto; padding: 0 20px;
    background: #0b0b0b; color: #fff;
    font-size: 14px; font-weight: 600; text-decoration: none;
    border-radius: var(--radius-full);
    transition: background var(--ease-out), transform var(--ease-out);
}
.pr-btn-black:hover { background: #262626; color: #fff; transform: translateY(-2px); }
.pr-tabs { display: none; }   /* phones only, see the 767px block */

.pr-plancell { flex-direction: column; align-items: stretch; padding: 0 14px 20px; }
.pr-flag {
    height: 24px; margin: 0 -14px;
    padding: 5px 0;
    text-align: center;
    font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 14px; text-transform: uppercase;
}
.pr-col-best .pr-flag { background: var(--color-primary); color: var(--color-on-primary); }
.pr-plancell__body { display: flex; flex: 1; flex-direction: column; padding-top: 20px; }
.pr-plancell__name { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--color-ink); }
.pr-plancell__desc { flex: 1; min-height: 52px; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--color-body); }
.pr-pricebox--sm { margin: 8px 0 14px; padding: 10px; border-radius: 10px; }
.pr-pricebox--sm .pr-pricebox__price  { font-size: 26px; }
.pr-pricebox--sm .pr-pricebox__price span { font-size: 13px; }
.pr-pricebox--sm .pr-pricebox__billed { font-size: 12px; color: var(--pr-mute); }
.pr-plancell .btn-primary { height: 44px; margin-top: auto; padding: 0 var(--space-4); font-size: 14px; }
.pr-foot { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--pr-mute); }

/* ── 6. Individual services ─────────────────────────────────────────────────── */
.pr-svc-sec { padding: 8px 0 40px; scroll-margin-top: 96px; }
.pr-svc-intro { margin-bottom: 18px; text-align: center; }
.pr-eyebrow {
    display: inline-block;
    padding: 4px 12px;
    background: #e9ecf1; color: #555;
    font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
    border-radius: var(--radius-full);
}
.pr-svc-intro h2 { margin: 8px 0 4px; font-family: var(--font-head); font-size: 28px; font-weight: 800; line-height: 1.2; color: var(--color-ink); }
.pr-svc-intro p  { margin: 0; font-size: 15px; color: var(--color-body); }
.pr-svc { border: 1px solid var(--pr-line); border-radius: 14px; overflow: hidden; background: #fff; }
.pr-svc-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, 2fr) minmax(0, .85fr);
    align-items: center;
    border-top: 1px solid var(--pr-line);
    font-size: 14px;
}
.pr-svc-row > div { padding: 12px 14px; }
.pr-svc-row--head { background: var(--pr-soft); border-top: 0; font-size: 13px; color: var(--color-body); }
.pr-svc__name  { font-weight: 600; color: var(--color-ink); }
.pr-svc__price { color: var(--color-ink); }
.pr-mu         { color: var(--pr-mute); }
.pr-svc__inc   { color: #555; }
.pr-svc .btn-primary { height: 40px; padding: 0 var(--space-4); font-size: 13px; }

/* ── 7. Closing banner (theme .ip-cta-section--float) ───────────────────────── */
.pr-closing h2 { font-size: var(--text-h2); line-height: var(--lh-h2); }
.pr-closing .cta-btn-group { display: flex; justify-content: center; }

/* ── Tablet ─────────────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .pr-cell { padding: 10px 10px; font-size: 13px; }
    .pr-plancell { padding: 0 10px 18px; }
    .pr-flag { margin: 0 -10px; }
    .pr-need--table { padding: 18px 10px; }
    .pr-featured { padding: 24px; }
}

/* ── Desktop and tablet: the plan header row pins under the site header while the table scrolls ───────────
   overflow-x:auto on .pr-scroll would make it the sticky container, so here it clips instead (no scrolling box,
   rounded corners kept). The head row is a direct child of .pr-plans, so it releases with the last row. */
@media (min-width: 768px) {
    .pr-scroll { overflow: visible; overflow: clip; }
    .pr-row--head { position: sticky; top: var(--header-h); z-index: 3; background: #fff; transition: box-shadow .2s ease; }
    .pr-row--head.is-pinned { box-shadow: 0 10px 16px -10px rgba(15, 23, 42, .28); }   /* set by pricing-tabs.js only while stuck */
}

/* ── Phone ──────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .pr-wrap { padding: 0 var(--gutter-mobile, 24px); }
    .pr-featured-sec { padding: 28px 0 20px; }
    .pr-featured { grid-template-columns: 1fr; gap: 20px; padding: 22px 20px; }
    .pr-featured__title { font-size: 30px; }
    .pr-pricebox__price { font-size: 36px; }
    .pr-darkbar h2 { font-size: 20px; }

    /* Plan table is replaced by one card per plan, chosen with tabs (see .pr-tabs below) */
    .pr-compare-sec { padding: 20px 0 24px; }
    .pr-scroll { display: none; }
    .pr-tabs { display: block; }
    .pr-need--tabs { margin-bottom: 16px; padding: 18px; background: #fafbfc; border: 1px solid var(--pr-line); border-radius: 14px; }
    .pr-need--tabs .pr-need__title { margin-top: 0; font-size: 17px; }
    .pr-need--tabs .pr-need__text { margin: 6px 0 14px; }
    .pr-need--tabs .pr-btn-black { width: 100%; margin-top: 0; }

    /* Pill switch: hidden until the script runs (then every plan would otherwise be stacked) */
    .pr-tablist { display: none; margin-bottom: 14px; padding: 4px; background: var(--pr-soft); border-radius: var(--radius-full); }
    .pr-tabs.is-tabs .pr-tablist { display: flex; gap: 4px; }
    .pr-tab {
        flex: 1; min-height: 44px; padding: 0 6px;
        background: transparent; color: var(--color-ink);
        border: 0; border-radius: var(--radius-full);
        font: 600 14px/1.2 var(--font-body); cursor: pointer;
        transition: background var(--ease-out), color var(--ease-out);
    }
    .pr-tab[aria-selected="true"] { background: #0b0b0b; color: #fff; }
    .pr-tab:focus-visible { outline: 2px solid var(--color-accent-ink); outline-offset: 2px; }

    .pr-panel { margin-bottom: 24px; }
    .pr-panel[hidden] { display: none; }
    .pr-pcard { padding: 0 18px 18px; background: #fff; border: 1px solid var(--pr-line); border-radius: 14px; overflow: hidden; }
    .pr-panel--best .pr-pcard { background: var(--pr-hl); }
    .pr-pcard__flag {
        margin: 0 -18px; padding: 5px 0;
        background: var(--color-primary); color: var(--color-on-primary);
        text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 14px; text-transform: uppercase;
    }
    .pr-pcard__name { margin: 16px 0 4px; font-family: var(--font-head); font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--color-ink); }
    .pr-pcard__desc { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: var(--color-body); }
    .pr-pcard .pr-pricebox { margin-bottom: 14px; background: #fff; }
    .pr-pcard .btn-primary { height: 48px; }
    .pr-tlist { margin: 8px 0 0; padding: 0; list-style: none; }
    .pr-trow { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--pr-line); font-size: 15px; line-height: 1.35; color: var(--color-ink); }
    .pr-trow__name { flex: 1; min-width: 0; }
    .pr-trow__val { flex: none; text-align: right; font-weight: 600; }
    .pr-trow__val.pr-yes, .pr-trow__val.pr-no { font-size: 18px; font-weight: 400; }

    /* Services become one card per service */
    .pr-svc { border: 0; border-radius: 0; background: transparent; overflow: visible; }
    .pr-svc-row--head { display: none; }
    .pr-svc-row {
        grid-template-columns: 1fr;
        margin-bottom: 12px;
        padding: 6px 0 14px;
        background: #fff;
        border: 1px solid var(--pr-line);
        border-radius: 14px;
    }
    .pr-svc-row > div { padding: 4px 16px; }
    .pr-svc__name { font-size: 17px; }
    .pr-svc__cta { padding-top: 10px !important; }
    .pr-svc-intro h2 { font-size: 24px; }
    .pr-svc-sec { padding-bottom: 28px; }
}
