/* ==========================================================================
   MAILOZA — SERVICE DETAIL STYLES  (page-scoped, W4)
   Loaded ONLY on the 6 services/*.php detail pages via
   $page_styles = ['pages/service-detail.css'] (see app/includes/head.php).

   These styles are the page-scoped layer for the SHARED service-detail template
   (app/includes/service-detail-template.php). They style ONLY the bespoke blocks
   that template emits — the standard component primitives (.hero, .card-grid,
   .feature-card, .platform-grid, .process, .faq, .cta-banner, .section-header,
   .breadcrumbs, .eyebrow, .badge, .btn) are already styled in style.css /
   components.css and are NOT re-declared here.

   Rules: consumes the design tokens from style.css — NO raw hex, no magic
   numbers, no duplication of base/component CSS. Mobile-first. Status colours
   come from the status tokens so they stay accessible and theme-able.

   NOTE on .problem-grid / .problem-card: the home page (home.css) declares its
   own copy of these, but home.css is NOT loaded on detail pages, so the base
   rules below are scoped to the .problem-grid--service variant the template uses
   and never collide with home.css at runtime.

   Table of contents
     1. Section rhythm + alternating washes (detail-only wrappers)
     2. Breadcrumbs spacing
     3. Hero trust strip (under the hero CTAs)
     4. Problem grid (what's going wrong)
     5. What's included (feature + outcome list)
     6. Deliverables list
     7. When you need this (decision guide: yes / no)
     8. Related services grid
     9. FAQ wrapper width
     10. Shared helpers (relief / note)
     11. Responsive tuning
   ========================================================================== */


/* ==========================================================================
   1. SECTION RHYTHM  (detail-only wrappers; base sections live in style.css)
   Alternating washes give calm, premium separation between bands. The hero,
   related and faq sections sit on the page wash; the others alternate.
   ========================================================================== */
.service-section {
    padding-block: var(--space-9);
}

@media (min-width: 768px) {
    .service-section { padding-block: var(--space-10); }
}

/* Subtle wash on alternate bands so the long page reads as distinct sections. */
.service-section--solution,
.service-section--platforms,
.service-section--deliverables,
.service-section--faq {
    background-color: var(--bg-surface-subtle);
}


/* ==========================================================================
   2. BREADCRUMBS  (orientation strip above the hero)
   ========================================================================== */
.service-detail__crumbs {
    padding-block: var(--space-5) 0;
}


/* ==========================================================================
   3. HERO TRUST STRIP  (directly under the hero CTAs)
   A scannable row of what the service covers — labels, not promises.
   ========================================================================== */
.service-hero-trust {
    padding-block: var(--space-6) var(--space-2);
}

.service-hero-trust__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
    padding: var(--space-5) 0 0;
    margin: 0;
    list-style: none;
    border-top: 1px solid var(--border-default);
}

.service-hero-trust__item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-body);
}

.service-hero-trust__icon {
    display: inline-flex;
    color: var(--teal-700);
}
.service-hero-trust__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }


/* ==========================================================================
   4. PROBLEM GRID  (what's going wrong · business impact · risk)
   Scoped to the --service variant so it never collides with home.css.
   ========================================================================== */
.problem-grid--service {
    display: grid;
    gap: var(--gap-grid);
    grid-template-columns: 1fr;
    margin-top: var(--space-8);
    padding: 0;
    list-style: none;
}

.problem-grid--service .problem-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.problem-grid--service .problem-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-8);
    height: var(--space-8);
    border-radius: var(--radius-md);
    /* A calm warning tint — named the risk, not alarmist. */
    background-color: var(--warning-50);
    color: var(--warning-700);
}
.problem-grid--service .problem-card__icon .mailoza-icon { width: var(--icon-lg); height: var(--icon-lg); }

.problem-grid--service .problem-card__title {
    font-size: var(--text-h4);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

.problem-grid--service .problem-card__desc {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-body);
}

@media (min-width: 768px) {
    .problem-grid--service { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .problem-grid--service { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* ==========================================================================
   5. WHAT'S INCLUDED  (feature · technical scope · business outcome)
   A two-column list of checked features, each with an optional outcome line.
   ========================================================================== */
.included-grid {
    display: grid;
    gap: var(--gap-grid);
    grid-template-columns: 1fr;
    margin-top: var(--space-8);
    padding: 0;
    list-style: none;
}

.included-card {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-6);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.included-card__check {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-7);
    height: var(--space-7);
    border-radius: var(--radius-pill);
    background-color: var(--teal-100);
    color: var(--teal-700);
}
.included-card__check .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

.included-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.included-card__title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

.included-card__desc {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-body);
}

/* The outcome line is the business payoff — set apart with a small label. */
.included-card__outcome {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
    margin-top: var(--space-1);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-default);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

.included-card__outcome-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--teal-700);
}

@media (min-width: 768px) {
    .included-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ==========================================================================
   6. DELIVERABLES LIST  (what the customer receives)
   A clean, checked two-column list — concrete and scannable.
   ========================================================================== */
.deliverables-list {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr;
    max-width: var(--container-max);
    margin: var(--space-8) auto 0;
    padding: 0;
    list-style: none;
}

.deliverables-list__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

.deliverables-list__icon {
    flex: none;
    display: inline-flex;
    margin-top: 2px;
    color: var(--success-600);
}
.deliverables-list__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

@media (min-width: 768px) {
    .deliverables-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ==========================================================================
   7. WHEN YOU NEED THIS  (decision guide: start here / a different service)
   Two calm cards — a teal "yes" and a neutral "consider another service".
   Never a hard sell; helps the visitor self-route honestly.
   ========================================================================== */
.when-grid {
    display: grid;
    gap: var(--gap-grid);
    grid-template-columns: 1fr;
    margin-top: var(--space-8);
}

.when-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.when-card--yes {
    border-color: var(--teal-500);
    background-color: var(--teal-50);
}

.when-card__title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

.when-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-7);
    height: var(--space-7);
    border-radius: var(--radius-pill);
}
.when-card__badge .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

.when-card__badge--yes {
    background-color: var(--teal-100);
    color: var(--teal-700);
}
.when-card__badge--no {
    background-color: var(--neutral-100);
    color: var(--text-secondary);
}

.when-card__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.when-card__row {
    position: relative;
    padding-left: var(--space-5);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-body);
}

/* A small marker dot rather than a list bullet, so the rows align cleanly. */
.when-card__row::before {
    content: "";
    position: absolute;
    top: 0.6em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: var(--radius-pill);
    background-color: var(--border-strong);
}
.when-card--yes .when-card__row::before {
    background-color: var(--teal-600);
}

@media (min-width: 768px) {
    .when-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ==========================================================================
   8. RELATED SERVICES  (links to the other 5 services)
   Compact routing cards built on the shared .card surface language.
   ========================================================================== */
.related-grid {
    display: grid;
    gap: var(--gap-grid);
    grid-template-columns: 1fr;
    margin-top: var(--space-8);
    padding: 0;
    list-style: none;
}

.related-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: border-color var(--duration-base) var(--ease-standard),
                box-shadow var(--duration-base) var(--ease-standard),
                transform var(--duration-base) var(--ease-standard);
}

.related-card:hover,
.related-card:focus-within {
    border-color: var(--teal-500);
    box-shadow: var(--elevation-2);
    transform: translateY(-2px);
}

.related-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-8);
    height: var(--space-8);
    border-radius: var(--radius-md);
    background-color: var(--blue-50);
    color: var(--blue-700);
}
.related-card__icon .mailoza-icon { width: var(--icon-lg); height: var(--icon-lg); }

.related-card__title {
    font-size: var(--text-h4);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

/* Stretched link: the whole card is clickable, the title stays the named target. */
.related-card__link {
    color: inherit;
}
.related-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}
.related-card { position: relative; }
.related-card__link:hover { color: var(--blue-700); }

.related-card__desc {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--text-body);
}

@media (min-width: 768px) {
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* ==========================================================================
   9. FAQ WRAPPER  (constrain the disclosure list to a comfortable measure)
   ========================================================================== */
.service-faq {
    max-width: var(--container-narrow);
    margin: var(--space-8) auto 0;
}


/* ==========================================================================
   10. SHARED HELPERS  (relief line under the problem grid; deliverables note)
   ========================================================================== */
.service-section__relief {
    max-width: var(--measure);
    margin: var(--space-7) auto 0;
    text-align: center;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
}

.service-section__note {
    max-width: var(--measure);
    margin: var(--space-7) auto 0;
    text-align: center;
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}


/* ==========================================================================
   11. RESPONSIVE TUNING
   ========================================================================== */
/* On small screens, stack the included-card icon above its body so the text
   keeps a comfortable measure without crowding against the check mark. */
@media (max-width: 479.98px) {
    .included-card {
        flex-direction: column;
        gap: var(--space-3);
    }
}


/* ==========================================================================
   12. HERO BAND  (2-column split: text + framed illustration)
   The hero now uses the shared .hero-split pattern (visual.css): hero text in
   the left column, the framed illustration in the right (or a single column
   when no illustration is set). This band only supplies the gradient + glow
   depth behind it. Tokens only.
   ========================================================================== */
.service-hero-band {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(180deg,
        var(--visual-gradient-from),
        var(--bg-surface) 78%);
}

.service-hero-band .accent-glow { z-index: 0; }
