/* ============================================================
   COMPONENT: Blog Preview (Home teaser)
   FILE: assets/css/blog-preview.css
   Depends on: blog-preview.html.
   Loaded after faq.css (Phase 1.0 §6, in build order).

   Global Card System: `.surface--solid` (surfaces.css) supplies
   the card's white background, hairline border, radius and
   resting shadow — same convention case-studies.css/
   portfolio.css already use. Only card-specific layout (badge,
   icon, meta line) is added here, scoped under
   .blog-preview__card — nothing here redefines the surface
   system itself.

   Section background is white, continuing the white/light-gray
   alternation already established by ... Pricing (white) ->
   FAQ (light-gray) -> Blog Preview (white) here.

   Badge: reuses the existing pill-badge visual convention
   (.pricing__badge / .services__badge — gold-on-gold-tint pill,
   uppercase small text) under its own class name so no shared
   selector is redefined.

   Card = informational (a plain <li>, not a link): same
   convention case-studies.css uses, since these are content-
   category previews rather than individual article pages. The
   path to the full Blog/Resources page is the single
   .blog-preview__cta below the grid instead, styled with
   nothing but the existing global .btn / .btn--primary /
   .btn--lg classes from buttons.css — no new button variant is
   introduced here.

   Meta / status line: `.blog-preview__meta` is the documented
   slot for the Published Date / Last Updated Date pair Stage
   5.11 calls for once real articles exist (see blog-preview.html
   content note). Today it holds only `.blog-preview__status`
   ("Coming soon") so no fabricated date is ever rendered as
   fact — styling is intentionally neutral/muted so it reads as
   a status note, not a data point, and swaps in cleanly later.

   No new JavaScript: this section has no motion hook, matching
   the "static HTML/CSS is enough, do not add JavaScript" rule
   Case Studies/Portfolio already follow for this kind of grid.
   The hover states below are pure CSS `:hover`.

   RTL readiness (Stage 5.11 scope only): logical properties
   (text-align: start, margin-inline / padding-inline) are used
   instead of physical left/right, matching case-studies.css's
   convention, so this section reads correctly if an ancestor
   later sets dir="rtl" for Urdu content — no separate RTL
   stylesheet or breakpoint system is introduced.
   ============================================================ */

.blog-preview {
  background-color: var(--color-white);
  padding-block: var(--space-10);
}

.blog-preview__inner {
  text-align: center;
}

.blog-preview__heading {
  margin: 0 0 var(--space-2);
  color: var(--color-navy);
  font-size: var(--text-h3);
}

.blog-preview__subheading {
  max-width: 640px;
  margin-inline: auto;
  margin-block: 0 var(--space-6);
  color: var(--color-dark-gray);
  font-size: var(--text-body);
}

/* ------------------------------------------------------------
   GRID
   Single column on mobile, 2 columns on tablet, 4 across on
   desktop for the four content-category cards — mirrors the
   column-count progression already used by Portfolio (4-up
   desktop), since this teaser holds four cards, matching the
   four content types Stage 5.11 names.
------------------------------------------------------------ */
.blog-preview__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);

  list-style: none;
}

/* ------------------------------------------------------------
   CARD
------------------------------------------------------------ */
.blog-preview__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4);
  text-align: start;

  transition:
    border-color var(--duration-fast) var(--ease-premium),
    box-shadow var(--duration-fast) var(--ease-premium),
    transform var(--duration-fast) var(--ease-premium);
}

.blog-preview__card:hover {
  border-color: rgba(var(--color-navy-rgb), 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-preview__badge {
  margin: 0;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background-color: rgba(var(--color-gold-rgb), 0.12);
  color: var(--color-gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.blog-preview__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background-color: rgba(var(--color-navy-rgb), 0.06);
  color: var(--color-navy);
}

.blog-preview__icon svg {
  width: 24px;
  height: 24px;
}

.blog-preview__title {
  margin: 0;
  color: var(--color-navy);
  font-size: 1.125rem;
  line-height: var(--line-height-heading);
}

.blog-preview__text {
  margin: 0;
  color: var(--color-dark-gray);
  font-size: var(--text-small);
  line-height: var(--line-height-body);
}

.blog-preview__meta {
  margin: var(--space-1) 0 0;
  padding-block-start: var(--space-1);
  border-block-start: var(--border-hairline);
  width: 100%;
}

.blog-preview__status {
  color: var(--color-dark-gray);
  opacity: 0.65;
  font-size: 0.75rem;
  font-style: italic;
}

/* ------------------------------------------------------------
   CTA
   Reuses the existing global .btn system exactly as Case
   Studies' CTA does — centered below the grid as the section's
   single, clear path to the full Blog/Resources page.
------------------------------------------------------------ */
.blog-preview__cta-wrap {
  margin-block-start: var(--space-6);
}

/* ------------------------------------------------------------
   RESPONSIVE
   Breakpoint values copied from tokens.css's documented
   reference values, same convention case-studies.css/
   portfolio.css use.
------------------------------------------------------------ */

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .blog-preview__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

/* Desktop and up: 4 across */
@media (min-width: 1024px) {
  .blog-preview {
    padding-block: var(--space-12);
  }

  .blog-preview__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
  }

  .blog-preview__card {
    padding: var(--space-5);
  }

  .blog-preview__cta-wrap {
    margin-block-start: var(--space-8);
  }
}

/* Small mobile: tighten spacing, keep cards compact, no overflow */
@media (max-width: 479px) {
  .blog-preview {
    padding-block: var(--space-8);
  }

  .blog-preview__grid {
    gap: var(--space-3);
  }

  .blog-preview__card {
    padding: var(--space-3);
  }
}

/* ------------------------------------------------------------
   REDUCED MOTION
   Same convention as case-studies.css/portfolio.css: the hover
   lift is removed for users who have requested less motion,
   while state changes that aren't motion (border/shadow) remain.
------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .blog-preview__card:hover {
    transform: none;
  }
}

.blog-preview__status {
  color: var(--color-gold);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 3px;
}

.blog-preview__status:hover {
  color: var(--color-navy);
  text-decoration: underline;
}
