/* ==========================================================================
   MAILOZA — RESOURCES STYLES  (page-scoped, W9)
   Loaded ONLY on the resources hub (resources.php) and the 10 resource-*.php
   article pages via $page_styles = ['pages/resources.css'] (see head.php).

   These styles are the page-scoped layer for the resources hub and the SHARED
   article template (app/includes/article-template.php). They style ONLY the
   bespoke blocks those files emit — the standard component primitives (.hero,
   .card-grid, .feature-card, .faq, .cta-banner, .section-header, .alert,
   .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. The article body
   uses a comfortable measure and relaxed line-height so long-form prose reads
   well on every screen.

   Table of contents
     1. Section rhythm + alternating washes (shared by hub + article)
     2. Breadcrumbs + intro-note spacing
     3. Hub: featured guides grid
     4. Hub: topic categories grid
     5. Hub: full article grid (all 10)
     6. Hub: recommended starting points (if -> then)
     7. Hub: shared note
     8. Article: meta strip (category / read time)
     9. Article: long-form prose (intro + body sections)
     10. Article: key points overview
     11. Article: common mistakes list
     12. Article: when-to-get-expert-help list
     13. Article: related services grid
     14. Article: related articles cards
     15. FAQ wrapper width
     16. Responsive tuning
   ========================================================================== */


/* ==========================================================================
   1. SECTION RHYTHM  (resources-only wrappers; base sections live in style.css)
   ========================================================================== */
.resources-section,
.article-section {
    padding-block: var(--space-9);
}

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

/* Alternating washes give calm, premium separation between bands. */
.resources-section--categories,
.resources-section--start,
.resources-section--faq,
.article-section--key-points,
.article-section--expert,
.article-section--articles,
.article-section--faq {
    background-color: var(--bg-surface-subtle);
}


/* ==========================================================================
   2. BREADCRUMBS + INTRO-NOTE SPACING
   ========================================================================== */
.article__crumbs {
    padding-top: var(--space-6);
}

/* The honesty banner sits directly under the hub hero. */
.resources-intro-note {
    padding-top: var(--space-7);
}


/* ==========================================================================
   3. HUB — FEATURED GUIDES  (routing cards on the .card surface language)
   ========================================================================== */
.resources-featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .resources-featured { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .resources-featured { grid-template-columns: repeat(4, 1fr); }
}

.resources-featured-card {
    position: relative;
    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);
}

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

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

.resources-featured-card__badge {
    align-self: flex-start;
}

.resources-featured-card__title {
    margin: 0;
    font-size: var(--text-h4);
    line-height: var(--leading-snug);
}

.resources-featured-card__link {
    color: var(--text-primary);
    text-decoration: none;
}
.resources-featured-card__link:hover { color: var(--text-link); }

/* The whole card is clickable via the title link (stretched link). */
.resources-featured-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.resources-featured-card__desc {
    margin: 0;
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.resources-featured-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: auto;
    color: var(--action-secondary);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}
.resources-featured-card__cta-icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }


/* ==========================================================================
   4. HUB — TOPIC CATEGORIES
   ========================================================================== */
.resources-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 600px) {
    .resources-categories { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .resources-categories { grid-template-columns: repeat(4, 1fr); }
}

.resources-category {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.resources-category__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-600);
}
.resources-category__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

.resources-category__title {
    margin: 0 0 var(--space-1);
    font-size: var(--text-lg);
    line-height: var(--leading-snug);
}

.resources-category__desc {
    margin: 0;
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}


/* ==========================================================================
   5. HUB — FULL ARTICLE GRID  (all 10)
   ========================================================================== */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .resources-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .resources-grid { grid-template-columns: repeat(3, 1fr); }
}

.resources-grid-card {
    position: relative;
    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);
}

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

.resources-grid-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.resources-grid-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(--teal-50);
    color: var(--teal-700);
}
.resources-grid-card__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

.resources-grid-card__title {
    margin: 0;
    font-size: var(--text-h4);
    line-height: var(--leading-snug);
}

.resources-grid-card__link {
    color: var(--text-primary);
    text-decoration: none;
}
.resources-grid-card__link:hover { color: var(--text-link); }

.resources-grid-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.resources-grid-card__desc {
    margin: 0;
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.resources-grid-card__meta {
    margin: auto 0 0;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}


/* ==========================================================================
   6. HUB — RECOMMENDED STARTING POINTS  (if -> then, mirrors decision-guide)
   ========================================================================== */
.resources-start {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr;
    max-width: var(--container-narrow);
    margin: var(--space-8) auto 0;
    padding: 0;
    list-style: none;
}

.resources-start__row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.resources-start__if,
.resources-start__then {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.resources-start__tag {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-secondary);
}
.resources-start__tag--then { color: var(--teal-700); }

.resources-start__if-text {
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
}

.resources-start__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-500);
}
.resources-start__arrow .mailoza-icon { width: var(--icon-lg); height: var(--icon-lg); }

.resources-start__link {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--action-secondary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
.resources-start__link:hover { color: var(--text-link-hover); }


/* ==========================================================================
   7. HUB — SHARED NOTE
   ========================================================================== */
.resources-section__note {
    max-width: var(--container-narrow);
    margin: var(--space-6) auto 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}


/* ==========================================================================
   8. ARTICLE — META STRIP  (category / read time, under the hero)
   ========================================================================== */
.article-meta {
    padding-top: var(--space-6);
}

.article-meta__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-meta__item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
}
.article-meta__icon { color: var(--teal-600); display: inline-flex; }
.article-meta__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }


/* ==========================================================================
   9. ARTICLE — LONG-FORM PROSE  (intro + detailed body sections)
   The reading layer: a comfortable measure and relaxed line-height so the bulk
   of each article is genuinely readable on mobile and desktop alike.
   ========================================================================== */
.article-prose {
    color: var(--text-body);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

.article-prose p {
    margin: 0 0 var(--space-5);
    max-width: var(--measure);
}

.article-intro p {
    color: var(--text-primary);
}

/* Spacing rhythm between body blocks (each opens with an H2). */
.article-block + .article-block {
    margin-top: var(--space-8);
}

.article-block__title {
    margin: 0 0 var(--space-4);
    font-size: var(--text-h2);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

.article-block__subtitle {
    margin: var(--space-6) 0 var(--space-3);
    font-size: var(--text-h4);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

.article-list {
    margin: 0 0 var(--space-5);
    padding-left: var(--space-6);
    max-width: var(--measure);
}

.article-list li {
    margin-bottom: var(--space-2);
    line-height: var(--leading-relaxed);
}

.article-list--ordered { list-style: decimal; }

/* Inline callout: a calm aside inside the prose flow (info, not alarm). */
.article-callout {
    display: flex;
    gap: var(--space-3);
    max-width: var(--measure);
    margin: 0 0 var(--space-5);
    padding: var(--space-4) var(--space-5);
    background-color: var(--blue-50);
    border-left: 3px solid var(--blue-500);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    color: var(--text-primary);
}
.article-callout__icon {
    flex: none;
    color: var(--blue-600);
    display: inline-flex;
}
.article-callout__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }


/* ==========================================================================
   10. ARTICLE — KEY POINTS OVERVIEW
   ========================================================================== */
.article-key-points {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .article-key-points { grid-template-columns: repeat(2, 1fr); }
}

.article-key-point {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.article-key-point__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-7);
    height: var(--space-7);
    border-radius: var(--radius-md);
    background-color: var(--teal-50);
    color: var(--teal-700);
}
.article-key-point__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

.article-key-point__title {
    margin: 0 0 var(--space-1);
    font-size: var(--text-lg);
    line-height: var(--leading-snug);
}

.article-key-point__desc {
    margin: 0;
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}


/* ==========================================================================
   11. ARTICLE — COMMON MISTAKES
   ========================================================================== */
.article-mistakes-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

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

.article-mistake {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-left: 3px solid var(--warning-600);
    border-radius: var(--radius-md);
}

.article-mistake__icon {
    flex: none;
    color: var(--warning-700);
    display: inline-flex;
}
.article-mistake__icon .mailoza-icon { width: var(--icon-lg); height: var(--icon-lg); }

.article-mistake__title {
    margin: 0 0 var(--space-1);
    font-size: var(--text-lg);
    line-height: var(--leading-snug);
}

.article-mistake__desc {
    margin: 0;
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}


/* ==========================================================================
   12. ARTICLE — WHEN TO GET EXPERT HELP
   ========================================================================== */
.article-expert-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
    margin: var(--space-8) 0 var(--space-6);
    padding: 0;
    list-style: none;
}

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

.article-expert {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.article-expert__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-7);
    height: var(--space-7);
    border-radius: var(--radius-md);
    background-color: var(--blue-50);
    color: var(--blue-600);
}
.article-expert__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

.article-expert__title {
    margin: 0 0 var(--space-1);
    font-size: var(--text-lg);
    line-height: var(--leading-snug);
}

.article-expert__desc {
    margin: 0;
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}


/* ==========================================================================
   13. ARTICLE — RELATED SERVICES GRID
   ========================================================================== */
.article-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

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

.article-related-card {
    position: relative;
    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);
}

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

.article-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(--teal-50);
    color: var(--teal-700);
}
.article-related-card__icon .mailoza-icon { width: var(--icon-lg); height: var(--icon-lg); }

.article-related-card__title {
    margin: 0;
    font-size: var(--text-h4);
    line-height: var(--leading-snug);
}

.article-related-card__link {
    color: var(--text-primary);
    text-decoration: none;
}
.article-related-card__link:hover { color: var(--text-link); }

.article-related-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

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


/* ==========================================================================
   14. ARTICLE — RELATED ARTICLES CARDS
   ========================================================================== */
.article-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-grid);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .article-cards { grid-template-columns: repeat(3, 1fr); }
}

.article-card {
    position: relative;
    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-md);
    transition: border-color var(--duration-base) var(--ease-standard),
                box-shadow var(--duration-base) var(--ease-standard),
                transform var(--duration-base) var(--ease-standard);
}

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

.article-card__kicker {
    display: inline-flex;
    color: var(--action-secondary);
}
.article-card__kicker .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

.article-card__title {
    margin: 0;
    font-size: var(--text-lg);
    line-height: var(--leading-snug);
}

.article-card__link {
    color: var(--text-primary);
    text-decoration: none;
}
.article-card__link:hover { color: var(--text-link); }

.article-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.article-card__desc {
    margin: 0;
    color: var(--text-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}


/* ==========================================================================
   15. FAQ WRAPPER WIDTH  (constrain long-form FAQ for readability)
   ========================================================================== */
.resources-faq,
.article-faq {
    max-width: var(--container-narrow);
    margin: var(--space-8) auto 0;
}


/* ==========================================================================
   16. RESPONSIVE TUNING
   ========================================================================== */
@media (max-width: 600px) {
    /* Stack the recommended starting-point rows; rotate the arrow to point down. */
    .resources-start__row {
        grid-template-columns: 1fr;
        gap: var(--space-3);
        text-align: left;
    }
    .resources-start__arrow {
        justify-self: start;
        transform: rotate(90deg);
    }

    /* Slightly smaller body type on very small screens keeps the measure comfortable. */
    .article-prose { font-size: var(--text-base); }
    .article-block__title { font-size: var(--text-h3); }
}


/* ==========================================================================
   ARTICLE HERO BAND  (2-column split: text + framed illustration)
   The article 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.
   ========================================================================== */
.article-hero-band {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(180deg,
        var(--visual-gradient-from),
        var(--bg-surface) 78%);
}

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


/* ==========================================================================
   HERO TEXTURE BAND  (W16 — faint grid + soft glow depth, no illustration)
   --------------------------------------------------------------------------
   A calm depth band so the resources hub does not open on flat white. The
   shared hero-basic component is untouched. Tokens only.
   ========================================================================== */
.resources-hero-band {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(180deg,
        var(--visual-gradient-from),
        var(--bg-surface) 80%);
}

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

.resources-hero-band > .hero { position: relative; z-index: 1; }
