/* Pricing page only. Tokens, header and layout reset come from site.css. */
.sp-pricing {
    --sp-primary: #2235DD;
    --sp-primary-dark: #1a2bc6;
    --sp-accent: #3564e4;
    --sp-ink: #05060F;
    --sp-muted: #5b6079;
    --sp-surface: #ffffff;
    --sp-page: #f0f1fd;
    --sp-line: #e4e7fd;
    --sp-success: #10b981;
    --sp-danger: #ef4444;
    --sp-font-display: 'Cairo', sans-serif;
    --sp-font-body: 'IBM Plex Sans Arabic', sans-serif;
    --sp-radius: 18px;
    --sp-shadow: 0 12px 40px rgba(34, 53, 221, .16);

    font-family: var(--sp-font-body);
    background: var(--sp-page);
    color: var(--sp-ink);
    padding: clamp(90px, 12vw, 140px) 20px clamp(60px, 8vw, 100px);
}

body.dark-theme .sp-pricing {
    --sp-primary: #5b8af5;
    --sp-primary-dark: #4a79e4;
    --sp-accent: #5b8af5;
    --sp-ink: #e4e7fd;
    --sp-muted: #b8bbd5;
    --sp-surface: #1a1d2e;
    --sp-page: #0a0b14;
    --sp-line: #262a42;
    --sp-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

.sp-pricing * { box-sizing: border-box; }
.sp-wrap { max-width: 1200px; margin: 0 auto; }

.sp-head { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.sp-badge {
    display: inline-block; padding: 8px 18px; border-radius: 999px;
    background: rgba(34, 53, 221, .1); color: var(--sp-primary);
    font-weight: 700; font-size: .85rem; margin-bottom: 18px;
}
body.dark-theme .sp-badge { background: rgba(91, 138, 245, .15); }
.sp-head h1 {
    font-family: var(--sp-font-display); font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.2; margin: 0 0 14px;
    color: var(--sp-ink);
}
.sp-head p { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--sp-muted); margin: 0 auto; max-width: 680px; }

.sp-controls { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin: 30px 0 8px; }
.sp-toggle { display: inline-flex; background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: 999px; padding: 4px; box-shadow: 0 2px 8px rgba(34,53,221,.08); }
.sp-toggle button {
    border: 0; background: transparent; color: var(--sp-muted); cursor: pointer;
    font-family: var(--sp-font-body); font-weight: 700; font-size: .9rem;
    padding: 9px 18px; border-radius: 999px; transition: all .2s ease; white-space: nowrap;
}
.sp-toggle button.is-active { background: var(--sp-primary); color: #fff; }
.sp-save {
    display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 6px;
    background: var(--sp-success); color: #fff; border-radius: 999px;
    padding: 2px 9px; font-size: .68rem; font-weight: 800;
}

.sp-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; align-items: stretch; }
@media (max-width: 1080px) { .sp-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .sp-cards { grid-template-columns: 1fr; } }

.sp-card {
    background: var(--sp-surface); border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius); padding: 26px 22px;
    display: flex; flex-direction: column; position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}
.sp-card:hover { transform: translateY(-6px); box-shadow: var(--sp-shadow); }
.sp-card.is-featured { border-color: var(--sp-primary); border-width: 2px; box-shadow: var(--sp-shadow); }
.sp-ribbon {
    position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%);
    background: var(--sp-primary); color: #fff; font-size: .72rem; font-weight: 800;
    padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
[dir="rtl"] .sp-ribbon { transform: translateX(50%); }

.sp-card h3 { font-family: var(--sp-font-display); font-size: 1.35rem; font-weight: 800; margin: 6px 0 4px; color: var(--sp-ink); }
.sp-card .sp-tagline { color: var(--sp-muted); font-size: .88rem; min-height: 40px; margin: 0 0 16px; }
.sp-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sp-amount { font-family: var(--sp-font-display); font-size: clamp(1.9rem, 4vw, 2.4rem); font-weight: 900; color: var(--sp-ink); line-height: 1; }
.sp-unit { color: var(--sp-muted); font-size: .85rem; font-weight: 600; }
.sp-per-year { color: var(--sp-muted); font-size: .78rem; min-height: 18px; margin-bottom: 18px; }

.sp-cta {
    display: block; text-align: center; text-decoration: none; border-radius: 12px;
    padding: 12px 16px; font-weight: 800; font-size: .95rem; transition: all .2s ease;
    background: var(--sp-primary); color: #fff; border: 2px solid var(--sp-primary);
}
.sp-cta:hover { background: var(--sp-primary-dark); border-color: var(--sp-primary-dark); color: #fff; }
.sp-cta.is-ghost { background: transparent; color: var(--sp-primary); }
.sp-cta.is-ghost:hover { background: var(--sp-primary); color: #fff; }

.sp-list { list-style: none; padding: 0; margin: 20px 0 0; }
.sp-list li { display: flex; gap: 9px; align-items: flex-start; font-size: .88rem; color: var(--sp-ink); margin-bottom: 9px; line-height: 1.45; }
.sp-list li span.sp-tick { color: var(--sp-success); font-weight: 900; flex: 0 0 auto; }
.sp-list li.sp-lead { font-weight: 700; color: var(--sp-muted); }

.sp-table-wrap { margin-top: clamp(50px, 7vw, 80px); background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: var(--sp-radius); overflow: hidden; }
.sp-table-scroll { overflow-x: auto; }
table.sp-table { width: 100%; border-collapse: collapse; min-width: 720px; }
table.sp-table th, table.sp-table td { padding: 13px 16px; text-align: start; border-bottom: 1px solid var(--sp-line); font-size: .88rem; }
table.sp-table thead th { background: rgba(34, 53, 221, .06); font-family: var(--sp-font-display); font-weight: 800; color: var(--sp-ink); position: sticky; top: 0; }
body.dark-theme table.sp-table thead th { background: rgba(91, 138, 245, .12); }
table.sp-table td.sp-center, table.sp-table th.sp-center { text-align: center; }
table.sp-table tbody tr:hover { background: rgba(34, 53, 221, .04); }
tr.sp-group td { background: var(--sp-page); font-family: var(--sp-font-display); font-weight: 800; color: var(--sp-primary); font-size: .8rem; letter-spacing: .03em; }
.sp-yes { color: var(--sp-success); font-weight: 900; }
.sp-no { color: var(--sp-muted); opacity: .55; font-weight: 700; }

.sp-faq { margin-top: clamp(50px, 7vw, 80px); }
.sp-faq h2, .sp-table-title {
    font-family: var(--sp-font-display); font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900; text-align: center; margin: 0 0 26px; color: var(--sp-ink);
}
.sp-faq details { background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.sp-faq summary { cursor: pointer; font-weight: 700; color: var(--sp-ink); list-style: none; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq p { color: var(--sp-muted); margin: 12px 0 0; font-size: .92rem; line-height: 1.7; }

.sp-final { margin-top: clamp(50px, 7vw, 80px); text-align: center; background: linear-gradient(135deg, var(--sp-primary), var(--sp-accent)); border-radius: var(--sp-radius); padding: clamp(34px, 5vw, 56px) 24px; color: #fff; }
.sp-final h2 { font-family: var(--sp-font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; margin: 0 0 10px; color: #fff; }
.sp-final p { margin: 0 0 22px; opacity: .92; }
.sp-final a { display: inline-block; background: #fff; color: var(--sp-primary); text-decoration: none; font-weight: 800; padding: 14px 30px; border-radius: 12px; }
.sp-final a:hover { transform: translateY(-2px); }
.sp-note { text-align: center; color: var(--sp-muted); font-size: .82rem; margin-top: 18px; }

/* The pricing section is full bleed like the homepage's sections. */
.sp-pricing {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.entry-content > .sp-pricing,
.entry-content .sp-pricing {
    max-width: 100% !important;
    width: 100% !important;
}

/* The landing header is fixed, so the first section clears it. */
body .sp-pricing { padding-top: clamp(110px, 14vw, 170px); }

/* The site header the theme prints is hidden; ours is the visible one. */
.landing-header { z-index: 1200; }

/* Astra wraps content in a container with side padding on inner pages. */
.ast-container,
.ast-page-builder-template .site-content > .ast-container,
.site-content .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}




/* site.css already clears the fixed header on themed pages, so the section only
   needs its own breathing room. */
body.sp-themed .sp-pricing { padding-top: clamp(16px, 3vw, 36px); }

/* ── Period switch: cross-fade the amounts instead of rebuilding the grid ── */
.sp-pricing .sp-price,
.sp-pricing .sp-per-year {
    transition: opacity .14s ease, transform .14s ease;
}

.sp-pricing .sp-price.is-swapping,
.sp-pricing .sp-per-year.is-swapping {
    opacity: 0;
    transform: translateY(-4px);
}

/* The featured plan's button is filled, so its label has to stay white. */
.sp-pricing .sp-card.is-featured .sp-cta,
.sp-pricing .sp-cta:not(.is-ghost),
.sp-pricing a.sp-cta:not(.is-ghost) {
    color: #fff !important;
    background: linear-gradient(135deg, #2235DD, #3564e4) !important;
    border-color: transparent !important;
}

.sp-pricing .sp-cta:not(.is-ghost):hover {
    color: #fff !important;
    filter: brightness(1.06);
}

/* The ghost buttons keep brand-coloured text on a transparent ground. */
.sp-pricing .sp-cta.is-ghost { color: var(--sp-primary) !important; }
.sp-pricing .sp-cta.is-ghost:hover {
    background: var(--sp-primary) !important;
    color: #fff !important;
}
