/* ============================================================
   FABLE5 — Inner Pages Override
   (cloned from nursery-one — visual identity unchanged in Phase 1)
   Loads AFTER all shared CSS (service-page.css etc.)
   Only fable5-specific adjustments for inner pages.
   ============================================================ */


/* ============================================================
   §1  CTA SECTION — BASE FIX
   ─────────────────────────────────────────────────────────
   03-sections-home.css is not loaded in this template.
   We must re-declare the structural base for .cta-section
   so the overlay positions correctly.
============================================================ */
.cta-section {
    position: relative;
    padding: 100px 0;
    background-size: cover;
    background-position: center;
}

.cta-section .cta-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section .cta-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 14px;
}

.cta-section .cta-eyebrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    border-radius: 2px;
    opacity: 0.5;
}

.cta-section .cta-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
}

.cta-section .cta-subtitle {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto 36px;
}

.cta-section .cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}


/* ============================================================
   §2  SERVICE CTA — FABLE5 STYLE
   ─────────────────────────────────────────────────────────
   Completely replaces the dark industrial CTA.
   Current design: blue gradient + yellow bar + pill buttons.
   Loads AFTER service-page.css — wins the cascade.
============================================================ */
.cta-service {
    background: linear-gradient(
        145deg,
        #0f2347 0%,
        #1b3d6e 60%,
        #1e4880 100%
    ) !important;
    border-top: 4px solid var(--mt-accent) !important;
    padding: 80px 0 !important;
}

.cta-service .cta-overlay {
    background: none !important;
}

/* Eyebrow — yellow on blue */
.cta-service .cta-eyebrow {
    color: var(--mt-accent) !important;
}

.cta-service .cta-eyebrow::after {
    background: var(--mt-accent) !important;
    opacity: 0.6 !important;
}

/* Title — white */
.cta-service .cta-title {
    color: #ffffff !important;
}

/* Subtitle — soft white */
.cta-service .cta-subtitle {
    color: rgba(255, 255, 255, 0.78) !important;
}

/* Primary button — yellow pill, dark text */
.cta-service .btn-light {
    background: var(--mt-accent) !important;
    border-color: var(--mt-accent) !important;
    color: #0f2347 !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    padding: 14px 40px !important;
    font-size: 0.92rem !important;
    box-shadow: 0 6px 28px rgba(245, 197, 24, 0.40) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.cta-service .btn-light:hover {
    background: var(--mt-accent-hover, #d4a800) !important;
    border-color: var(--mt-accent-hover, #d4a800) !important;
    color: #0f2347 !important;
    box-shadow: 0 10px 36px rgba(245, 197, 24, 0.55) !important;
    transform: translateY(-2px) !important;
}

/* Secondary button — white outline pill */
.cta-service .btn-outline-light {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.50) !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    padding: 14px 40px !important;
    font-size: 0.92rem !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
}

.cta-service .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}


/* ============================================================
   §3  FOOTER — FABLE5 OVERRIDES
   ─────────────────────────────────────────────────────────
   Base footer uses var(--mt-brand-primary) for the glow line
   and hover colors. In this template that's dark blue on dark bg —
   invisible. Replace with yellow accent throughout.
============================================================ */

/* Slightly differentiate footer from CTA bottom */
.site-footer {
    background: linear-gradient(180deg, #0a1628 0%, #060e1c 100%) !important;
}

/* Top accent bar — yellow (replaces invisible blue glow) */
.site-footer::before {
    width: 200px !important;
    height: 3px !important;
    background: linear-gradient(
        to right,
        transparent,
        var(--mt-accent),
        transparent
    ) !important;
    opacity: 0.9 !important;
}

/* Link hover → yellow (readable on dark bg) */
.site-footer a:hover,
.footer-links a:hover {
    color: var(--mt-accent) !important;
}

/* Footer heading titles → add yellow left dot */
.site-footer .footer-title,
.site-footer h4,
.site-footer h5,
.site-footer h6 {
    color: #ffffff !important;
}

/* Footer title underline → yellow */
.site-footer .footer-title::after {
    background: var(--mt-accent) !important;
}

/* Bottom copyright line */
.site-footer .footer-muted,
.site-footer .footer-bottom {
    color: rgba(255, 255, 255, 0.45) !important;
}

/* Divider line — subtle yellow tint */
.site-footer .footer-line {
    border-color: rgba(245, 197, 24, 0.15) !important;
}


/* ============================================================
   §4  SERVICE CONTENT — FABLE5 ACCENT ADJUSTMENTS
============================================================ */

/* Summary left border — yellow accent */
.service-summary-block {
    border-left-color: var(--mt-accent) !important;
}

.service-summary-icon {
    background: rgba(245, 197, 24, 0.12) !important;
    border-color: rgba(245, 197, 24, 0.28) !important;
    color: var(--mt-accent-dark, #d4a800) !important;
}

/* Eyebrow in media blocks — brand blue */
.service-media-eyebrow {
    color: var(--mt-brand-primary) !important;
}

/* Hero bottom accent line — yellow */
.service-hero::after {
    background: linear-gradient(
        90deg,
        transparent,
        var(--mt-accent) 30%,
        var(--mt-accent) 70%,
        transparent
    ) !important;
}

/* Breadcrumb links — brand blue */
.breadcrumb-section .breadcrumb-item a {
    color: var(--mt-brand-primary) !important;
}

.breadcrumb-section .breadcrumb-item a:hover {
    color: var(--mt-brand-primary-hover) !important;
}


/* ============================================================
   §5  SERVICE — HERO CTA + NEW BLOCK TYPES (T3 extension)
   ─────────────────────────────────────────────────────────
   Renders the optional buttons emitted by web/service.php:
     · service-hero-cta            (hero footer button group)
     · service-cta-banner          (cta_banner block_type)
     · service-features-list       (features_list block_type)
   All rules use --mt-* tokens only. Frontend tokens, no --erp-*.
============================================================ */

/* ── Hero CTA buttons ─────────────────────────────────────── */
.service-hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--mt-space-3);
    margin-top: var(--mt-space-6);
}

.service-hero-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: var(--mt-weight-bold);
    line-height: 1.2;
    border: 2px solid transparent;
    border-radius: var(--mt-radius-pill);
    text-decoration: none;
    transition:
        background var(--mt-duration-fast) ease,
        color var(--mt-duration-fast) ease,
        border-color var(--mt-duration-fast) ease,
        transform var(--mt-duration-fast) var(--mt-ease-default),
        box-shadow var(--mt-duration-fast) ease;
}

.service-hero-cta-btn:hover {
    transform: translateY(-2px);
}

/* Primary = fable5 amber pill (matches .cta-service .btn-light + .svclist-cta
   -btn-primary + the fbl-svc body). Parent-class specificity also defeats the
   .section-sm a rule in 01-foundation.css that would force navy link colour. */
.service-hero-cta .service-hero-cta-btn--primary {
    background: var(--mt-accent);
    color: #0a1628;
    box-shadow: 0 6px 24px rgba(245, 197, 24, 0.40);
}

.service-hero-cta .service-hero-cta-btn--primary:hover {
    background: var(--mt-accent-hover, #d4a800);
    color: #0a1628;
    box-shadow: 0 10px 32px rgba(245, 197, 24, 0.52);
}

.service-hero-cta .service-hero-cta-btn--outline {
    background: transparent;
    color: var(--mt-white);
    border-color: var(--mt-white);
}

.service-hero-cta .service-hero-cta-btn--outline:hover {
    background: var(--mt-white);
    color: var(--mt-primary);
}


/* ── CTA banner block ─────────────────────────────────────── */
.service-cta-banner {
    background: var(--mt-primary);
    color: var(--mt-white);
    text-align: center;
    padding: var(--mt-section-py-sm) 0;
}

.service-cta-banner-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--mt-space-6);
}

.service-cta-banner-title {
    color: var(--mt-white);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: var(--mt-weight-black);
    line-height: var(--mt-leading-tight);
    margin: 0 0 var(--mt-space-3);
}

.service-cta-banner-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: var(--mt-leading-normal);
    max-width: 580px;
    margin: 0 auto var(--mt-space-6);
}

.service-cta-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: var(--mt-weight-bold);
    line-height: 1.2;
    border: 2px solid transparent;
    border-radius: var(--mt-radius-pill);
    text-decoration: none;
    transition:
        background var(--mt-duration-fast) ease,
        color var(--mt-duration-fast) ease,
        border-color var(--mt-duration-fast) ease,
        transform var(--mt-duration-fast) var(--mt-ease-default),
        box-shadow var(--mt-duration-fast) ease;
}

.service-cta-banner-btn:hover {
    transform: translateY(-2px);
}

.service-cta-banner-btn--primary {
    background: var(--mt-accent);
    color: var(--mt-primary-dark);
    box-shadow: 0 4px 14px rgba(245, 197, 24, 0.30);
}

.service-cta-banner-btn--primary:hover {
    background: var(--mt-accent-hover);
    color: var(--mt-primary-dark);
    box-shadow: 0 8px 22px rgba(245, 197, 24, 0.42);
}

.service-cta-banner-btn--outline {
    background: transparent;
    color: var(--mt-white);
    border-color: var(--mt-white);
}

.service-cta-banner-btn--outline:hover {
    background: var(--mt-white);
    color: var(--mt-primary);
}


/* ── Features list block ──────────────────────────────────── */
.service-features-list {
    padding: var(--mt-section-py) 0;
}

.service-features-list-title {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: var(--mt-weight-black);
    color: var(--mt-text-heading);
    line-height: var(--mt-leading-tight);
    max-width: 760px;
    margin: 0 auto var(--mt-space-3);
}

.service-features-list-intro {
    text-align: center;
    color: var(--mt-text-muted);
    font-size: 1rem;
    line-height: var(--mt-leading-normal);
    max-width: 680px;
    margin: 0 auto var(--mt-space-10);
}

.service-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--mt-space-6);
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--mt-space-6);
}

.service-features-card {
    background: var(--mt-white);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius-lg);
    padding: var(--mt-space-6);
    box-shadow: var(--mt-shadow-card);
    transition:
        transform var(--mt-duration-normal) var(--mt-ease-default),
        box-shadow var(--mt-duration-normal) var(--mt-ease-default);
}

.service-features-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mt-shadow-card-hover);
}

.service-features-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--mt-primary-soft);
    color: var(--mt-primary);
    font-size: 1.1rem;
    margin-bottom: var(--mt-space-4);
}

.service-features-card-title {
    font-size: 1.05rem;
    font-weight: var(--mt-weight-bold);
    color: var(--mt-text-heading);
    line-height: var(--mt-leading-tight);
    margin: 0 0 var(--mt-space-2);
}

.service-features-card-text {
    color: var(--mt-text-body);
    font-size: var(--mt-text-sm);
    line-height: var(--mt-leading-normal);
    margin: 0;
}


/* ── Responsive (max-width breakpoints) ───────────────────── */
@media (max-width: 768px) {
    .service-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .service-features-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   §6  REGISTRATION FORM UX (T2 — 2026-05-01)
   ─────────────────────────────────────────────────────────
   Targets the form rendered by web/partials/_form_module_render.php
   (form-module__* class names). Scoping uses the data-field-key
   attribute where possible to avoid bleeding into other forms.

   Includes:
     · step section heading visibility
     · tighter mobile spacing + grouped radio/checkbox options
     · consent_* card-like wrappers
     · collapsible collectors (.nrs-collector-block) styled by
       fable5-forms.js
============================================================ */

/* ── Step section heading — visible separator between steps ─ */
.form-module__section-title {
    color: var(--mt-primary);
    font-size: 1rem;
    font-weight: var(--mt-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--mt-border-light);
    padding-bottom: 8px;
    margin: 24px 0 18px;
}

/* ── Tighter mobile spacing between fields ─────────────────── */
@media (max-width: 575px) {
    .form-module__field {
        margin-bottom: 14px;
    }
}

/* ── Radio / checkbox group: tighter visual grouping ──────── */
.form-module__options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0 4px;
}

/* ── Dynamic-page top spacing — REMOVED (2026-06-08, UI-12a) ──
   The legacy `.nrs-page-body` wrapper was retired when web/page.php
   adopted the single `.web-page-shell` wrapper (P-1 fix); page.php no
   longer injects `.nrs-page-body`, so this rule was dead CSS. */

/* ── Section title bars (injected by fable5-forms.js) ────── */
/* The renderer does not emit step titles for registration_pack;
   fable5-forms.js inserts these bars before known anchor fields. */
.nrs-form-section-title {
    margin: 24px 0 12px;
    padding: 10px 16px;
    background: var(--mt-primary-soft);
    border-left: 4px solid var(--mt-primary);
    border-radius: var(--mt-radius-md);
    font-size: var(--mt-text-sm);
    font-weight: var(--mt-weight-bold);
    color: var(--mt-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Consent items: card-like wrapper ─────────────────────── */
/* Targeted via .nrs-consent-field (added by fable5-forms.js) instead
   of [data-field-key^="consent_"] to guarantee specificity wins over
   any rule in form-module.css (which is emitted inline by the renderer
   AFTER this stylesheet loads in the document head). */
.nrs-consent-field {
    background: var(--mt-off-white);
    border-left: 3px solid var(--mt-primary);
    border-radius: var(--mt-radius-md);
    padding: 12px 16px;
    margin-bottom: 8px;
}

.nrs-consent-field .form-module__label {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--mt-text-dark);
}

/* ── Collector block (injected by fable5-forms.js) ────────── */
.nrs-collector-block {
    background: var(--mt-white);
    border: 1px solid var(--mt-border-light);
    border-radius: var(--mt-radius-md);
    padding: 16px;
    margin-bottom: 14px;
}

.nrs-collector-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--mt-border-light);
}

.nrs-collector-block-title {
    font-size: 0.78rem;
    font-weight: var(--mt-weight-semibold);
    color: var(--mt-text-medium);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nrs-collector-remove {
    font-size: 0.78rem;
    color: var(--mt-danger);
    text-decoration: none;
    font-weight: var(--mt-weight-semibold);
}

.nrs-collector-remove:hover {
    text-decoration: underline;
}

/* ── Add-collector button ─────────────────────────────────── */
.nrs-add-collector-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    background: transparent;
    color: var(--mt-primary);
    border: 1px dashed var(--mt-primary);
    border-radius: var(--mt-radius-pill);
    font-size: 0.85rem;
    font-weight: var(--mt-weight-semibold);
    cursor: pointer;
    margin: 8px 0 18px;
    transition:
        background var(--mt-duration-fast) ease,
        color var(--mt-duration-fast) ease,
        border-style var(--mt-duration-fast) ease;
}

.nrs-add-collector-btn:hover {
    background: var(--mt-primary);
    color: var(--mt-white);
    border-style: solid;
}

/* File upload feedback notices */
.nrs-file-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.5;
}
.nrs-file-notice--warn {
    background: #fff8e1;
    border: 1px solid #f0c040;
    color: #7a5c00;
}
.nrs-file-notice--ok {
    background: #f0faf4;
    border: 1px solid #5cb85c;
    color: #2d6a2d;
}
.nrs-file-notice__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.nrs-file-notice__text small {
    opacity: 0.85;
}


/* ============================================================
   §7  SERVICE DETAIL — FABLE5 PAGE CANVAS  (Family 1)
   ─────────────────────────────────────────────────────────
   `.services-page` is the wrapper div that ONLY service.php emits
   (verified: not used by service_list.php / projects.php /
   products.php) → zero bleed into other page families.

   The Service Detail BODY is fable5-NATIVE (`.fbl-svc-*`, §7.2),
   rendered through service.php's template-ownership seam →
   web/templates/fable5/partials/service_detail.php.

   The universal-body skin that used to live here (`.services-page
   .service-*` overrides for transition/breadcrumb/summary/media/
   text/features, the old §7 + §7.1) was REMOVED 2026-06-17: on
   fable5 those universal `.service-*` elements are no longer emitted
   (the seam renders the native body), so the rules matched nothing —
   a dead duplicate of §7.2. Only the page canvas below remains; it
   backs the native body AND the universal Service Hero (unchanged —
   §1 service-page.css + §4 accent line + §5 amber CTA).

   NOTE — if this template's service_detail.php is ever removed,
   service.php falls back to the universal `.service-*` body; restore
   a dark `.services-page .service-*` skin (git history) before doing so.
============================================================ */

/* ── Page base — dark canvas behind all content (hero + native body) ── */
.services-page {
    background: #0a1628;
}


/* ============================================================
   §7.2  SERVICE DETAIL BODY — TEMPLATE-OWNED (fable5-native)
   ─────────────────────────────────────────────────────────
   Styles the fable5-native body emitted by
   web/templates/fable5/partials/service_detail.php (`.fbl-svc-*`),
   delegated by web/service.php's template-ownership seam.

   This is the TRUE fable5 Service Detail layer: it uses dedicated
   `.fbl-svc-*` classes, so the universal web/assets/css/service-page.css
   (`.service-*`) NEVER applies to the body — fable5 fully owns the
   structure + skin here. The record-owned Service Hero (`.service-hero`)
   is UNCHANGED (still styled by §1 service-page.css + §4 accent + hero CSS).

   No --erp-*; --mt-* tokens + fable5 dark hexes only.
   Palette: base #0a1628 · alt #0c1d38 · raised #122c52 ·
   accent var(--mt-accent) · text #fff / rgba(255,255,255,.78).
   Page canvas is already dark via `.services-page` (§7).
============================================================ */

/* ── Breadcrumb ── */
.fbl-svc-breadcrumb {
    background: #0c1d38;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 0;
    font-size: 0.82rem;
}
.fbl-svc-breadcrumb a {
    color: var(--mt-accent);
    text-decoration: none;
    font-weight: 500;
}
.fbl-svc-breadcrumb a:hover {
    color: var(--mt-accent-hover, #d4a800);
    text-decoration: underline;
}
.fbl-svc-breadcrumb-sep { color: rgba(255, 255, 255, 0.30); margin: 0 8px; }
.fbl-svc-breadcrumb-current { color: rgba(255, 255, 255, 0.55); }

/* ── About (summary) — raised dark card, amber edge ── */
.fbl-svc-about { padding: clamp(40px, 5vw, 64px) 0; background: #0a1628; }
.fbl-svc-about-card {
    background: #122c52;
    border-left: 4px solid var(--mt-accent);
    border-radius: 0 16px 16px 0;
    padding: clamp(28px, 4vw, 40px);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.fbl-svc-about-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.fbl-svc-about-icon {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(245, 197, 24, 0.12);
    border: 1px solid rgba(245, 197, 24, 0.28);
    border-radius: 12px;
    color: var(--mt-accent);
    font-size: 1.1rem;
}
.fbl-svc-about-title { margin: 0; font-size: 1.2rem; font-weight: 800; color: #fff; }
.fbl-svc-about-text { color: rgba(255, 255, 255, 0.78); font-size: 0.97rem; line-height: 1.85; }
.fbl-svc-about-text a { color: var(--mt-accent); }
.fbl-svc-about-text a:hover { color: var(--mt-accent-hover, #d4a800); }

/* ── Content blocks ── */
.fbl-svc-blocks { background: #0a1628; }
.fbl-svc-blocks .container { padding-top: clamp(8px, 2vw, 24px); padding-bottom: clamp(40px, 6vw, 80px); }

/* Shared block typography */
.fbl-svc-eyebrow {
    display: inline-block;
    font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
    font-weight: 700; color: var(--mt-accent); margin-bottom: 10px;
}
.fbl-svc-block-title {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 800; color: #fff;
    line-height: 1.25; margin: 0 0 16px;
}
.fbl-svc-block-text { color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; line-height: 1.85; }
.fbl-svc-block-text a { color: var(--mt-accent); }
.fbl-svc-block-text a:hover { color: var(--mt-accent-hover, #d4a800); }

/* Text-only block — fable5 reading width */
.fbl-svc-text {
    max-width: 860px; margin: 0 auto;
    padding: clamp(40px, 5vw, 64px) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.fbl-svc-text:last-child { border-bottom: 0; }

/* Text + Image block — two-column, alternating */
.fbl-svc-media {
    display: flex; align-items: center; gap: clamp(32px, 5vw, 64px);
    padding: clamp(40px, 5vw, 72px) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.fbl-svc-media:last-child { border-bottom: 0; }
.fbl-svc-media--rev { flex-direction: row-reverse; }
.fbl-svc-media-body { flex: 1 1 0; min-width: 0; }
.fbl-svc-media-fig {
    flex: 0 0 42%; max-width: 42%; margin: 0;
    background: #0c1d38; border-radius: 16px; overflow: hidden;
}
.fbl-svc-media-fig img {
    display: block; width: 100%; height: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.30);
}
/* Graceful missing/broken image — NEVER a white box */
.fbl-svc-media-fig--hidden { display: none; }

@media (max-width: 768px) {
    .fbl-svc-media,
    .fbl-svc-media--rev { flex-direction: column; align-items: stretch; }
    .fbl-svc-media-fig { flex-basis: auto; max-width: 100%; width: 100%; }
}


/* ============================================================
   §8  SERVICES LIST — FABLE5 DARK IDENTITY  (Family 2 / Phase S2)
   ─────────────────────────────────────────────────────────
   Scope: all rules target `.svclist-*` classes, which ONLY
   service_list.php emits (verified) → naturally isolated; plus
   this file is fable5-only. service-list.css uses NO !important
   and loads earlier (Layer 4+) — these later rules win; !important
   added for robustness vs the Layer-7 mobile-fix file.

   Conversion = identity only (NO redesign / NO restructure):
     · engineering ORANGE literals  #E05A1A / #C84F16
         → fable5 accent  var(--mt-accent) / --mt-accent-hover
     · light surfaces (breadcrumb / stats / domains / cards / empty)
         → fable5 dark palette (shared with §7):
           base #0a1628 · alt #0c1d38 · raised #122c52
           heading #fff · body rgba(255,255,255,.78) · muted .55
     · the hero + CTA are already dark — only the orange accent swaps.
   No tokens modified; service-list.css NOT edited (overridden here).
============================================================ */

/* ── Hero (already dark — swap orange accent → fable5 yellow) ── */
.svclist-hero::before {
    background: radial-gradient(
        circle,
        rgba(245, 197, 24, 0.12) 0%,
        transparent 65%
    ) !important;
}

.svclist-hero::after {
    background: linear-gradient(
        90deg,
        transparent,
        var(--mt-accent) 30%,
        var(--mt-accent) 70%,
        transparent
    ) !important;
}

.svclist-hero-eyebrow,
.svclist-hero-badge i {
    color: var(--mt-accent) !important;
}

/* ── Breadcrumb (light → dark) ────────────────────────────── */
.svclist-breadcrumb {
    background: #0c1d38 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.svclist-breadcrumb .breadcrumb-item a {
    color: var(--mt-accent) !important;
}

.svclist-breadcrumb .breadcrumb-item a:hover {
    color: var(--mt-accent-hover, #d4a800) !important;
}

.svclist-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.55) !important;
}

.svclist-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.30) !important;
}

/* ── Stats band (light → dark) ────────────────────────────── */
.svclist-stats-band {
    background: #0c1d38 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.svclist-stat-icon {
    background: rgba(245, 197, 24, 0.12) !important;
    border: 1px solid rgba(245, 197, 24, 0.24) !important;
    color: var(--mt-accent) !important;
}

.svclist-stat-value {
    color: #ffffff !important;
}

.svclist-stat-label {
    color: rgba(255, 255, 255, 0.55) !important;
}

.svclist-stat-divider {
    background: rgba(255, 255, 255, 0.12) !important;
}

/* ── Domain sections (light → dark) ───────────────────────── */
.svclist-domains {
    background: #0a1628 !important;
}

.svclist-domain-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.svclist-domain-section:nth-child(even) {
    background: #0c1d38 !important;
}

.svclist-domain-icon {
    background: rgba(245, 197, 24, 0.12) !important;
    border: 1px solid rgba(245, 197, 24, 0.26) !important;
    color: var(--mt-accent) !important;
}

.svclist-domain-title {
    color: #ffffff !important;
}

.svclist-domain-count {
    background: rgba(245, 197, 24, 0.10) !important;
    border: 1px solid rgba(245, 197, 24, 0.24) !important;
    color: var(--mt-accent) !important;
}

.svclist-domain-line {
    background: linear-gradient(
        90deg,
        rgba(245, 197, 24, 0.28),
        transparent
    ) !important;
}

/* ── Service cards (light → dark raised) ──────────────────── */
.svclist-card,
.svclist-domain-section:nth-child(even) .svclist-card {
    background: #122c52 !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-top: 3px solid transparent !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35) !important;
}

.svclist-card::before {
    background: linear-gradient(
        90deg,
        var(--mt-accent),
        rgba(245, 197, 24, 0.40)
    ) !important;
}

.svclist-card:hover {
    border-top-color: var(--mt-accent) !important;
    box-shadow:
        0 10px 34px rgba(0, 0, 0, 0.50),
        0 0 0 1px rgba(245, 197, 24, 0.18) !important;
}

.svclist-card-icon {
    background: rgba(245, 197, 24, 0.12) !important;
    border: 1px solid rgba(245, 197, 24, 0.22) !important;
    color: var(--mt-accent) !important;
}

.svclist-card:hover .svclist-card-icon {
    background: var(--mt-accent) !important;
    border-color: var(--mt-accent) !important;
    color: #0a1628 !important;
    box-shadow: 0 4px 14px rgba(245, 197, 24, 0.40) !important;
}

.svclist-card-title {
    color: #ffffff !important;
}

.svclist-card:hover .svclist-card-title {
    color: var(--mt-accent) !important;
}

.svclist-card-desc {
    color: rgba(255, 255, 255, 0.62) !important;
}

.svclist-card-link {
    color: var(--mt-accent) !important;
}

/* ── Empty state ──────────────────────────────────────────── */
.svclist-empty {
    color: rgba(255, 255, 255, 0.50) !important;
}

.svclist-empty h3 {
    color: rgba(255, 255, 255, 0.80) !important;
}

/* ── List CTA (already dark — align base + swap orange accent) ─ */
.svclist-cta {
    background: #0a1628 !important;
}

.svclist-cta::before {
    background: radial-gradient(
        circle,
        rgba(245, 197, 24, 0.10) 0%,
        transparent 65%
    ) !important;
}

.svclist-cta-eyebrow {
    color: var(--mt-accent) !important;
}

.svclist-cta-btn-primary {
    background: var(--mt-accent) !important;
    border-color: var(--mt-accent) !important;
    color: #0a1628 !important;
    box-shadow: 0 6px 20px rgba(245, 197, 24, 0.35) !important;
}

.svclist-cta-btn-primary:hover {
    background: var(--mt-accent-hover, #d4a800) !important;
    border-color: var(--mt-accent-hover, #d4a800) !important;
    color: #0a1628 !important;
    box-shadow: 0 10px 28px rgba(245, 197, 24, 0.48) !important;
}


/* ============================================================
   §8.1  SERVICE LIST — MANAGED CTA (fable5 skin)
   ─────────────────────────────────────────────────────────
   service_list.php renders an OPTIONAL managed CTA (the shared
   web/partials/cta_section.php → `.cta-section`) when the admin
   configures cta_edit.php?page=service_list. It is wrapped in
   `.svclist-cta-managed`; this skins that `.cta-section` to the
   fable5 dark identity (same palette as §2 `.cta-service`) so the
   managed CTA matches the page. The native fallback CTA
   (`.svclist-cta`, §8) is unaffected. `.cta-section` structural base
   comes from §1; this block is colour/identity only.
============================================================ */
body.tpl-green_template .svclist-cta-managed .cta-section {
    background: linear-gradient(145deg, #0f2347 0%, #1b3d6e 60%, #1e4880 100%) !important;
    border-top: 4px solid var(--mt-accent) !important;
}
body.tpl-green_template .svclist-cta-managed .cta-section .cta-overlay {
    background: none !important;
}
body.tpl-green_template .svclist-cta-managed .cta-eyebrow {
    color: var(--mt-accent) !important;
}
body.tpl-green_template .svclist-cta-managed .cta-eyebrow::after {
    background: var(--mt-accent) !important;
}
body.tpl-green_template .svclist-cta-managed .cta-title {
    color: #ffffff !important;
}
body.tpl-green_template .svclist-cta-managed .cta-subtitle {
    color: rgba(255, 255, 255, 0.78) !important;
}
body.tpl-green_template .svclist-cta-managed .cta-note {
    color: rgba(255, 255, 255, 0.55) !important;
}

/* Primary button — fable5 amber pill */
body.tpl-green_template .svclist-cta-managed .btn-light {
    background: var(--mt-accent) !important;
    border-color: var(--mt-accent) !important;
    color: #0a1628 !important;
    box-shadow: 0 6px 20px rgba(245, 197, 24, 0.35) !important;
}
body.tpl-green_template .svclist-cta-managed .btn-light:hover {
    background: var(--mt-accent-hover, #d4a800) !important;
    border-color: var(--mt-accent-hover, #d4a800) !important;
    color: #0a1628 !important;
    box-shadow: 0 10px 28px rgba(245, 197, 24, 0.48) !important;
}

/* Secondary button — white outline pill */
body.tpl-green_template .svclist-cta-managed .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.50) !important;
    color: #ffffff !important;
}
body.tpl-green_template .svclist-cta-managed .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    color: #ffffff !important;
}


/* ============================================================
   §9  SERVICE 404 — fable5 dark readability  (Family 1 follow-up)
   ─────────────────────────────────────────────────────────
   service_404.php wraps in `.services-page` → inherits the §7 dark
   base. Its bespoke (non `.service-*`) content used light-token text,
   so it read dark-on-dark. Scoped to `.svc-404` (a hook added ONLY on
   service_404.php) — the shared file stays template-neutral; these
   rules live in fable5-pages.css so only fable5 is affected.
============================================================ */
.svc-404 h1,
.svc-404 h2,
.svc-404 h3,
.svc-404 strong { color: #ffffff !important; }

.svc-404 .text-muted,
.svc-404 p { color: rgba(255, 255, 255, 0.66) !important; }

.svc-404 .border.rounded {
    background: #122c52 !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}

.svc-404 .border.rounded i,
.svc-404 .fa-compass { color: var(--mt-accent) !important; }

.svc-404 .btn-outline-primary,
.svc-404 .btn-outline-secondary {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.svc-404 .btn-outline-primary:hover,
.svc-404 .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
}


/* ============================================================
   §10  SEARCH — fable5 dark identity
   ─────────────────────────────────────────────────────────
   search.php carries its own light, token-based inline <style>
   (shared across templates). These rules give the search page the
   fable5 dark identity, scoped under `body.tpl-green_template` so they beat
   the later inline <style> by specificity and affect fable5 ONLY.
   Colour-only (no layout change). Off-brand suggestion text is
   handled in search.php itself.
============================================================ */
body.tpl-green_template .search-hero {
    background: #0c1d38 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.tpl-green_template .search-results-section { background: #0a1628 !important; }

body.tpl-green_template .search-hero__title,
body.tpl-green_template .search-state__title,
body.tpl-green_template .search-group__title,
body.tpl-green_template .search-result-card__title { color: #ffffff !important; }

body.tpl-green_template .search-hero__query { color: var(--mt-accent) !important; }

body.tpl-green_template .search-hero__count,
body.tpl-green_template .search-state__text,
body.tpl-green_template .search-state__suggestions-label,
body.tpl-green_template .search-result-card__excerpt { color: rgba(255, 255, 255, 0.60) !important; }

body.tpl-green_template .search-hero__input {
    background: #122c52 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}
body.tpl-green_template .search-hero__input-icon { color: rgba(255, 255, 255, 0.45) !important; }

body.tpl-green_template .search-state__icon {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.50) !important;
}

body.tpl-green_template .search-group__header { border-bottom-color: rgba(255, 255, 255, 0.12) !important; }
body.tpl-green_template .search-group__count {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.60) !important;
}

body.tpl-green_template .search-result-card {
    background: #122c52 !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    color: rgba(255, 255, 255, 0.78) !important;
}
body.tpl-green_template .search-result-card__thumb {
    background: rgba(245, 197, 24, 0.12) !important;
    color: var(--mt-accent) !important;
}
body.tpl-green_template .search-result-card__arrow { color: rgba(255, 255, 255, 0.45) !important; }

body.tpl-green_template mark.search-highlight {
    background: rgba(245, 197, 24, 0.20) !important;
    color: var(--mt-accent) !important;
}


/* ============================================================
   §11  PRODUCTS — FEATURED SOLUTION SHOWCASE  (P1 · LIGHT)
   ─────────────────────────────────────────────────────────
   Scope: `.prdc-page` (Product Center only — never the homepage
   products module / related products). LIGHT surface retained —
   Fable5 identity delivered through the ACCENT only (spine,
   eyebrow, CTA → fable5 amber). NO dark surface. This is the
   approved P1 light layer, NOT the rejected dark catalog skin.
============================================================ */
body.tpl-green_template .prdc-page .prdc-showcase-inner::before { background: var(--mt-accent) !important; }
body.tpl-green_template .prdc-page .prdc-showcase-eyebrow { color: var(--mt-accent) !important; }

body.tpl-green_template .prdc-page .prdc-showcase-cta.btn-primary {
    background: var(--mt-accent) !important;
    border-color: var(--mt-accent) !important;
    color: #0a1628 !important;
}
body.tpl-green_template .prdc-page .prdc-showcase-cta.btn-primary:hover {
    background: var(--mt-accent-hover, #d4a800) !important;
    border-color: var(--mt-accent-hover, #d4a800) !important;
    color: #0a1628 !important;
}

/* ── Category Navigation (P2 · LIGHT) — Fable5 accent on browse bar ── */
body.tpl-green_template .prdc-page .prdc-nav-item:hover {
    border-color: var(--mt-accent) !important;
    color: var(--mt-accent) !important;
}
body.tpl-green_template .prdc-page .prdc-nav-item.is-active {
    background: var(--mt-accent) !important;
    border-color: var(--mt-accent) !important;
    color: #0a1628 !important;
}

/* ── Category Sections (P3 · LIGHT) — Fable5 accent on section headers ── */
body.tpl-green_template .prdc-page .prdc-cluster-title {
    border-bottom-color: rgba(245, 197, 24, 0.35) !important;
}


/* ============================================================
   §12  PRODUCT CARD (P4 · LIGHT) — Fable5 accent, ALL surfaces
   ─────────────────────────────────────────────────────────
   The product card is the ONE shared renderer used on every
   surface (Product Center / Related / Homepage module / Page
   Builder). Its Fable5 identity is therefore scoped to
   `body.tpl-green_template .prd-card` (NOT .prdc-page) so the card
   reads identically everywhere. LIGHT — accent re-tint only
   (type tag, CTA, hover border → fable5 amber). No dark surface.
============================================================ */
body.tpl-green_template .prd-card:hover { border-color: var(--mt-accent) !important; }
body.tpl-green_template .prd-card-type { color: var(--mt-accent) !important; }

/* CTA outline/ghost button (P4.1): outline amber → hover fill amber + dark text */
body.tpl-green_template .prd-card-cta {
    color: var(--mt-accent) !important;
    border-color: var(--mt-accent) !important;
}
body.tpl-green_template .prd-card:hover .prd-card-cta {
    background: var(--mt-accent) !important;
    border-color: var(--mt-accent) !important;
    color: #0a1628 !important;
}
