/* =========================================================
   NASDAN — Blog listing page
   Extends tokens.css / main.css. Section-specific styles only —
   shared components (nav, footer, buttons) live in main.css.
   ========================================================= */

/* =========================================================
   HERO — compact utility header + category filter rail
   ========================================================= */
.blog-hero {
  position: relative; padding-block: var(--sp-9) var(--sp-8);
  background: var(--white); border-bottom: 1px solid var(--ink-100);
  overflow: hidden;
}
/* Same top lining-strip treatment as the "Get a quote" hero
   (.start-hero-stripe in request-quote.css) -- a plain white hero with a
   thin brand-gradient strip along the top edge instead of a full-bleed
   navy background. */
.blog-hero-stripe {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--nasdan-amber) 0%, var(--nasdan-amber) 25%, var(--nasdan-navy) 25%, var(--nasdan-navy) 60%, var(--nasdan-navy-600) 60%, var(--nasdan-navy-600) 80%, var(--nasdan-amber-700) 80%, var(--nasdan-amber-700) 100%);
}
.blog-hero-inner { max-width: 720px; margin-bottom: var(--sp-7); }
.blog-hero-eyebrow { display: inline-flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); color: var(--nasdan-amber); }
.eyebrow-mark { width: 8px; height: 8px; background: var(--nasdan-amber); flex: none; border-radius: 2px; }
.blog-hero-headline { font-size: var(--fs-h1); font-weight: var(--fw-light); letter-spacing: var(--ls-tight); line-height: var(--lh-tight); color: var(--ink-900); margin-bottom: var(--sp-4); max-width: 20ch; }
.blog-hero-headline em { color: var(--nasdan-amber); font-style: normal; }
.blog-hero-lead { font-size: var(--fs-body); max-width: 58ch; color: var(--ink-500); }

/* Single-row sliding filter rail -- flex-nowrap + native horizontal
   scroll instead of flex-wrap, since the tag list only grows over time
   and wrapping to multiple rows doesn't scale. Scrollbar is hidden and
   replaced with an edge fade (mask-image) that a small JS listener
   (main.js, [data-filter-rail]) toggles off on whichever side has
   nothing left to scroll to. */
.filter-rail {
  display: flex; gap: var(--sp-3); flex-wrap: nowrap;
  overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-block: 2px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 28px, black calc(100% - 28px), transparent 100%);
}
.filter-rail::-webkit-scrollbar { display: none; }
.filter-rail.is-at-start {
  -webkit-mask-image: linear-gradient(to right, black 0, black calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, black 0, black calc(100% - 28px), transparent 100%);
}
.filter-rail.is-at-end {
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 28px, black 100%);
  mask-image: linear-gradient(to right, transparent 0, black 28px, black 100%);
}
.filter-rail.is-at-start.is-at-end { -webkit-mask-image: none; mask-image: none; }
.filter-pill {
  display: inline-flex; align-items: center; padding: 0.55rem 1.1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--ink-200); font-size: 0.875rem; font-weight: var(--fw-medium); color: var(--ink-700);
  background: var(--white); cursor: pointer; transition: all var(--dur-base) var(--ease-out);
  flex: none; white-space: nowrap;
}
.filter-pill:hover { border-color: var(--nasdan-navy-600); color: var(--nasdan-navy); }
.filter-pill.is-active { background: var(--nasdan-navy); border-color: var(--nasdan-navy); color: var(--white); }

/* =========================================================
   FEATURED POST — asymmetric navy visual + content
   ========================================================= */
.blog-featured-section { padding-block: var(--sp-8); }
.blog-feature { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--ink-100); box-shadow: var(--shadow-md); }
.blog-feature-visual {
  position: relative; min-height: 400px; background: linear-gradient(150deg, var(--nasdan-navy) 0%, var(--nasdan-navy-700) 100%); overflow: hidden;
}
.blog-feature-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.blog-feature-visual::after {
  content: ""; position: absolute; bottom: -20%; right: -10%; width: 65%; height: 65%;
  background: radial-gradient(circle, rgba(255,193,7,0.24), transparent 70%); pointer-events: none;
}
.featured-badge {
  position: absolute; top: var(--sp-6); left: var(--sp-6); z-index: 1;
  background: var(--nasdan-amber); color: var(--nasdan-navy); font-size: var(--fs-label); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider); text-transform: uppercase; padding: 0.45rem 0.95rem; border-radius: var(--radius-pill);
}
/* When a featured post has a cover_image, it's an unstyled <img> dropped
   into this relatively-positioned, fixed-height box -- absolute-fill +
   object-fit keeps it cropped to the box (rather than rendering at its own
   intrinsic size and blowing out the card) and sitting behind the badge. */
.blog-feature-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blog-feature-body { padding: var(--sp-8); display: flex; flex-direction: column; justify-content: center; }
.blog-feature-body > .btn-nasdan { align-self: flex-start; }
.post-tag { display: block; font-size: var(--fs-label); font-weight: var(--fw-semibold); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--nasdan-amber); margin-bottom: var(--sp-4); }
.blog-feature-body h2 { font-size: var(--fs-h2); font-weight: var(--fw-light); letter-spacing: var(--ls-snug); color: var(--ink-900); margin-bottom: var(--sp-4); max-width: 22ch; }
.blog-feature-body p { color: var(--ink-500); margin-bottom: var(--sp-6); max-width: 48ch; }

.post-meta { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); font-size: 0.8438rem; color: var(--ink-400); }
.post-meta-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--nasdan-navy); color: var(--nasdan-amber);
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: var(--fw-semibold); flex: none;
}
.post-meta strong { color: var(--ink-700); font-weight: var(--fw-medium); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-200); flex: none; }

/* =========================================================
   POST GRID
   ========================================================= */
.blog-grid-section { padding-block: var(--sp-8); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); }
.post-card {
  border: 1px solid var(--ink-100); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); background: var(--white);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card-media { position: relative; height: 160px; overflow: hidden; display: block; }
.post-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card-media::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px); background-size: 18px 18px; }
.post-card--navy .post-card-media { background: linear-gradient(150deg, var(--nasdan-navy), var(--nasdan-navy-600)); }
.post-card--amber .post-card-media { background: linear-gradient(150deg, var(--nasdan-amber-600), var(--nasdan-amber)); }
.post-card--amber .post-card-media::before { background-image: radial-gradient(rgba(11,22,63,0.14) 1px, transparent 1px); }
.post-card--cloud .post-card-media { background: linear-gradient(150deg, var(--cloud-300), var(--cloud)); }
.post-card--cloud .post-card-media::before { background-image: radial-gradient(rgba(11,22,63,0.10) 1px, transparent 1px); }
.post-card-media-tag {
  position: absolute; bottom: var(--sp-4); left: var(--sp-4); background: var(--white); color: var(--nasdan-navy);
  font-size: 0.75rem; font-weight: var(--fw-semibold); letter-spacing: var(--ls-wide); text-transform: uppercase;
  padding: 0.35rem 0.75rem; border-radius: var(--radius-pill); z-index: 1;
}
.post-card-body { padding: var(--sp-6); flex: 1; display: flex; flex-direction: column; }
.post-card-body h3 { font-size: 1.0625rem; font-weight: var(--fw-medium); color: var(--ink-900); line-height: var(--lh-snug); margin-bottom: var(--sp-3); }
.post-card-body h3 a { color: inherit; }
.post-card-body h3 a:hover { color: var(--nasdan-navy-600); }
/* Clamped to a fixed number of lines so every card's description occupies
   the same visual space regardless of how long the underlying excerpt is
   (excerpts in the DB range from ~100 to ~265 characters). Same pattern as
   .resource-body p on the homepage blog slider. */
.post-card-body p {
  font-size: 0.9125rem; color: var(--ink-500); margin-bottom: var(--sp-5); flex: 1;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.post-card-meta { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.8125rem; color: var(--ink-400); margin-top: auto; }
.post-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-200); flex: none; }

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination-nasdan { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-8); }
.page-btn {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink-200); color: var(--ink-700); font-size: 0.875rem; font-weight: var(--fw-medium);
  transition: all var(--dur-base) var(--ease-out);
}
.page-btn:hover { border-color: var(--nasdan-navy); color: var(--nasdan-navy); }
.page-btn.is-active { background: var(--nasdan-navy); border-color: var(--nasdan-navy); color: var(--white); pointer-events: none; }
.page-btn.page-btn-ellipsis { border-color: transparent; cursor: default; }
.page-btn.prev, .page-btn.next { width: auto; border-radius: var(--radius-pill); padding: 0 var(--sp-4); gap: var(--sp-2); }
.page-btn svg { width: 14px; height: 14px; flex: none; }

/* =========================================================
   SUBSCRIBE — reuses the site's .cta-panel card, right slot
   swapped for an email form instead of link cards
   ========================================================= */
.subscribe-card { position: relative; z-index: 1; background: rgba(255,255,255,0.06); border: 1px solid var(--paper-border); border-radius: var(--radius-md); padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.subscribe-card-label { font-size: 0.8125rem; font-weight: var(--fw-medium); color: var(--paper-300); }
.subscribe-card input {
  font-family: var(--font-sans); font-size: 0.9375rem; color: var(--ink-900); background: var(--white);
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 0.8rem 1rem;
}
.subscribe-card input:focus { outline: none; box-shadow: var(--shadow-focus); }
.subscribe-card .btn-nasdan { justify-content: center; margin-top: var(--sp-1); }
.subscribe-card-note { font-size: 0.75rem; color: var(--paper-500); margin: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1199.98px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991.98px) {
  .blog-feature { grid-template-columns: 1fr; }
  .blog-feature-visual { min-height: 260px; }
}

@media (max-width: 767.98px) {
  .blog-hero { padding-block: var(--sp-7) var(--sp-6); }
  .blog-hero-headline { max-width: 100%; font-size: clamp(1.75rem, 1.5rem + 2.2vw, 2.25rem); }
  .post-grid { grid-template-columns: 1fr; }
  .blog-feature-body { padding: var(--sp-7) var(--sp-6); }
  .subscribe-form { flex-direction: column; }
}
