/**
 * iProply — Service pages (/services and /services/{slug}).
 * Builds on the tokens in style.css; scoped under .svc- to avoid collisions.
 */

.svc-container {
    width: min(1200px, 100% - 2.5rem);
    margin-inline: auto;
}

/* ============================================
   CONTENT BUILDER BLOCKS
   ============================================
   Blocks reuse the section primitives above so builder-authored content is
   visually indistinguishable from the original hand-written sections. */

/* Headings keep their chosen semantic level; size and rhythm follow the level.
   Top margins mirror the original .svc-prose spacing so a heading that is now a
   sibling block sits exactly where it did when it was nested in the prose. */
.svc-builder__heading {
    margin: 2.4rem 0 0.85rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.24;
    color: var(--navy-900);
}

.svc-builder__heading:first-child { margin-top: 0; }

h1.svc-builder__heading { font-size: clamp(1.9rem, 4.2vw, 2.85rem); line-height: 1.14; }
h2.svc-builder__heading { font-size: clamp(1.6rem, 3.2vw, 2.35rem); line-height: 1.2; }
h3.svc-builder__heading { font-size: clamp(1.2rem, 2.3vw, 1.5rem); margin-top: 1.9rem; }
h4.svc-builder__heading { font-size: 1.16rem; font-weight: 600; margin-top: 1.7rem; }
h5.svc-builder__heading { font-size: 1.03rem; font-weight: 600; margin-top: 1.5rem; }
h6.svc-builder__heading {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy-700);
    margin-top: 1.5rem;
}

/* The centred wrapper controls its own spacing. */
.svc-head .svc-builder__heading { margin: 0; }

/* Left-aligned heading wrapper (eyebrow without centring). */
.svc-head--start { max-width: none; margin-inline: 0; text-align: left; }

/* Each paragraph is its own block, so the container carries no top margin —
   inter-paragraph rhythm comes from the <p> margins inside it. */
.svc-builder__text { margin-top: 0; }

.svc-builder__action,
.svc-builder__link { margin: 1.5rem 0 0; }

.svc-builder__list {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
    font-size: 1.03rem;
    line-height: 1.75;
    color: var(--text-primary);
}

.svc-builder__list li + li { margin-top: 0.4rem; }

.svc-builder__image { margin: 1.75rem 0; }

.svc-builder__image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 42rem;
    object-fit: cover;
    border-radius: 18px;
}

.svc-builder__image figcaption {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Stat rows outside the dark hero need readable colours. */
.svc-builder__stats { border-top-color: var(--border); }
.svc-builder__stats dt { color: var(--navy-900); }
.svc-builder__stats dd { color: var(--text-secondary); }

/* Blocks that follow a full-width component need breathing room. */
.svc-grid + .svc-builder__heading,
.svc-benefits + .svc-builder__heading,
.svc-steps + .svc-builder__heading,
.svc-faq + .svc-builder__heading { margin-top: 3rem; }

.svc-btn--secondary { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.svc-btn--secondary:hover { background: var(--navy-600); }
.svc-btn--text {
    padding-inline: 0;
    border-color: transparent;
    background: transparent;
    color: var(--navy-600);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.svc-btn--text:hover { transform: none; color: var(--navy-900); }

.svc-container--narrow {
    width: min(820px, 100% - 2.5rem);
}

/* ============================================
   SHARED PRIMITIVES
   ============================================ */

.svc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
    font-family: var(--font-family);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-100);
}

.svc-head {
    max-width: 46rem;
    margin: 0 auto 2.75rem;
    text-align: center;
}

.svc-head h2,
.svc-section__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.2vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy-900);
}

.svc-section {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
    background: var(--background);
}

.svc-section--soft {
    background: var(--cream);
}

.svc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.6rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.svc-btn:hover {
    transform: translateY(-2px);
}

.svc-btn--primary {
    background: var(--navy-900);
    color: #fff;
    box-shadow: 0 12px 28px rgba(4, 20, 39, 0.22);
}

.svc-btn--primary:hover {
    background: var(--navy-700);
}

.svc-btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.svc-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.18);
}

.svc-btn--outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.svc-btn--outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ============================================
   BREADCRUMB
   ============================================ */

.svc-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.svc-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.svc-breadcrumb li + li::before {
    content: "/";
    margin-right: 0.5rem;
    opacity: 0.45;
}

.svc-breadcrumb a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}

.svc-breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.svc-breadcrumb li[aria-current] {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

/* ============================================
   HERO
   ============================================ */

.svc-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
    background: linear-gradient(140deg, var(--navy-900) 0%, var(--navy-700) 55%, #0b2c4d 100%);
    color: #fff;
    isolation: isolate;
}

.svc-hero__glow {
    position: absolute;
    inset: auto -10% -45% auto;
    width: min(640px, 70vw);
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.4) 0%, transparent 68%);
    filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}

.svc-hero--platform .svc-hero__glow { background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 68%); }
.svc-hero--marketing .svc-hero__glow { background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, transparent 68%); }
.svc-hero--support .svc-hero__glow { background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, transparent 68%); }

.svc-hero__inner {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}

.svc-hero h1 {
    margin: 0 0 1rem;
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 4.6vw, 3.15rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: #fff;
}

.svc-hero__lead {
    max-width: 42rem;
    margin: 0 0 2rem;
    font-size: clamp(1rem, 1.5vw, 1.14rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}

.svc-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.svc-hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 1.25rem;
    margin: 2.5rem 0 0;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.svc-hero__stats dt {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold-200);
}

.svc-hero__stats dd {
    margin: 0.3rem 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.68);
}

/* Hub variant has no media column. */
.svc-hero--hub .svc-hero__hubcopy {
    max-width: 46rem;
}

/* ── Hero media ─────────────────────────────── */

.svc-hero__figure {
    position: relative;
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.4);
}

.svc-hero__figure img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.svc-hero__figure--illustration {
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.svc-illustration {
    display: block;
    width: 100%;
    height: auto;
}

.svc-illustration__badge {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--gold-200);
    font-size: 1.25rem;
    backdrop-filter: blur(6px);
}

/* ============================================
   PROSE (detailed explanation)
   ============================================ */

.svc-prose {
    margin-top: 1.75rem;
    font-size: 1.03rem;
    line-height: 1.78;
    color: var(--text-primary);
}

.svc-prose > *:first-child {
    margin-top: 0;
}

.svc-prose p {
    margin: 0 0 1.15rem;
}

.svc-prose h2 {
    margin: 2.4rem 0 0.85rem;
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
    font-weight: 700;
    line-height: 1.28;
    color: var(--navy-900);
}

.svc-prose h3 {
    margin: 1.9rem 0 0.7rem;
    font-family: var(--font-heading);
    font-size: 1.14rem;
    font-weight: 600;
    color: var(--navy-700);
}

.svc-prose ul,
.svc-prose ol {
    margin: 0 0 1.15rem;
    padding-left: 1.4rem;
}

.svc-prose li {
    margin-bottom: 0.5rem;
}

.svc-prose a {
    color: var(--navy-600);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================
   CARD GRIDS
   ============================================ */

.svc-grid {
    display: grid;
    gap: 1.25rem;
}

.svc-grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.svc-card {
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(4, 20, 39, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.svc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(4, 20, 39, 0.1);
}

.svc-card--outline {
    background: transparent;
    box-shadow: none;
}

.svc-card h3 {
    margin: 1rem 0 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--navy-900);
}

.svc-card p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.62;
    color: var(--text-secondary);
}

.svc-card__icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-600));
    color: var(--gold-200);
    font-size: 1.15rem;
}

.svc-card__icon--soft {
    background: var(--warm-100);
    color: var(--navy-700);
}

/* ============================================
   BENEFITS
   ============================================ */

.svc-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
    gap: 1.5rem 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.svc-benefits li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.svc-benefits i {
    flex-shrink: 0;
    margin-top: 0.28rem;
    color: var(--success);
    font-size: 1.1rem;
}

.svc-benefits h3 {
    margin: 0 0 0.35rem;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--navy-900);
}

.svc-benefits p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.62;
    color: var(--text-secondary);
}

/* ============================================
   STEPS
   ============================================ */

.svc-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: svc-step;
}

.svc-steps li {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}

.svc-steps__num {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    margin-bottom: 0.9rem;
    border-radius: 50%;
    background: var(--navy-900);
    color: var(--gold-200);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
}

.svc-steps h3 {
    margin: 0 0 0.45rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy-900);
}

.svc-steps p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================
   CTA BAND
   ============================================ */

.svc-cta {
    padding: clamp(3rem, 6vw, 4.5rem) 0;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-600) 100%);
    color: #fff;
}

.svc-cta__inner {
    max-width: 44rem;
    margin-inline: auto;
    text-align: center;
}

.svc-cta h2 {
    margin: 0 0 0.85rem;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    font-weight: 700;
    line-height: 1.24;
    color: #fff;
}

.svc-cta p {
    margin: 0 0 2rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.8);
}

.svc-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

.svc-cta .svc-btn--primary {
    background: var(--gold-200);
    color: var(--navy-900);
    box-shadow: 0 12px 28px rgba(250, 204, 21, 0.28);
}

.svc-cta .svc-btn--primary:hover {
    background: var(--gold-300);
}

/* ============================================
   FAQ
   ============================================ */

.svc-faq {
    display: grid;
    gap: 0.85rem;
}

.svc-faq__item {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.svc-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    list-style: none;
}

.svc-faq__item summary::-webkit-details-marker {
    display: none;
}

.svc-faq__item summary h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--navy-900);
}

.svc-faq__item summary i {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.svc-faq__item[open] summary i {
    transform: rotate(180deg);
}

.svc-faq__item[open] summary {
    border-bottom: 1px solid var(--border);
}

.svc-faq__answer {
    padding: 1.15rem 1.4rem;
}

.svc-faq__answer p {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.72;
    color: var(--text-secondary);
}

/* ============================================
   RELATED / HUB CARDS
   ============================================ */

.svc-related {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(4, 20, 39, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.svc-related:hover {
    transform: translateY(-3px);
    border-color: var(--navy-600);
    box-shadow: 0 16px 36px rgba(4, 20, 39, 0.12);
}

.svc-related h3 {
    margin: 1rem 0 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--navy-900);
}

.svc-related p {
    flex: 1;
    margin: 0 0 1.1rem;
    font-size: 0.93rem;
    line-height: 1.62;
    color: var(--text-secondary);
}

.svc-related__more {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy-600);
}

.svc-related:hover .svc-related__more i {
    transform: translateX(3px);
}

.svc-related__more i {
    transition: transform 0.2s ease;
}

.svc-related--featured {
    border-color: rgba(250, 204, 21, 0.5);
}

.svc-related__all {
    margin: 2.5rem 0 0;
    text-align: center;
}

.svc-related__all a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--navy-700);
    text-decoration: none;
}

.svc-related__all a:hover {
    text-decoration: underline;
}

.svc-empty {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
}

/* ============================================
   ADMIN PREVIEW BAR
   ============================================ */

.svc-preview-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--warning);
    color: #1c1812;
    font-size: 0.9rem;
    font-weight: 600;
}

.svc-preview-bar a {
    color: #1c1812;
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 900px) {
    .svc-hero__inner {
        grid-template-columns: 1.15fr 1fr;
    }

    .svc-hero--hub .svc-hero__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 899px) {
    .svc-hero__media {
        order: -1;
    }

    .svc-hero__figure {
        max-width: 32rem;
        margin-inline: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .svc-btn,
    .svc-card,
    .svc-related,
    .svc-related__more i,
    .svc-faq__item summary i {
        transition: none;
    }

    .svc-btn:hover,
    .svc-card:hover,
    .svc-related:hover {
        transform: none;
    }
}
