/* ==========================================================================
   NGYNN Clean: blog pages (/blog and /blog/{slug})

   Loaded ON TOP of styles.css, which owns the design tokens, nav, footer and
   buttons. Only what the blog adds lives here — article typography, listing
   cards and the in-post CTA. The pages themselves are rendered by the Laravel
   app (resources/views/blog/) and served under this domain by the Apache
   /blog proxy, but the CSS ships with the static site so both surfaces share
   one source of truth for the look.
   ========================================================================== */

/* ---------- Listing hero ---------- */

.blog-hero {
  background: var(--navy);
  border-radius: 0 0 0 44px;
  padding: 64px 0 56px;
}

.blog-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 18px 0 14px;
  color: #fff;
}

.blog-hero__sub {
  max-width: 640px;
  color: var(--on-navy);
  font-size: 18px;
  line-height: 1.65;
}

/* ---------- Listing grid ---------- */

.blog-list { padding: 48px 0 72px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 28px;
}

.blog-card {
  border: 1px solid var(--line);
  border-radius: var(--leaf-md);
  overflow: hidden;
  background: #fff;
  transition: border-color .15s ease;
}

.blog-card:hover { border-color: var(--water); }

.blog-card__link { display: block; color: inherit; }
.blog-card__link:hover { color: inherit; }

.blog-card__cover {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.blog-card__body { padding: 22px 24px 26px; }

.blog-card__date {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.blog-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 10px;
}

.blog-card__excerpt {
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.blog-card__more { font-weight: 600; color: var(--blue); font-size: 15px; }

.blog-empty {
  color: var(--text);
  font-size: 17px;
  padding: 24px 0 40px;
}

/* ---------- Pager ---------- */

.blog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 48px;
  font-size: 15px;
}

.blog-pager__link { font-weight: 600; }
.blog-pager__count { color: var(--muted); }

/* ---------- Post ---------- */

.blog-post { padding: 48px 0 80px; background: #fff; }

/* A measured column: long-form body copy is far easier to read at roughly
   70 characters per line than at the 1160px the marketing sections use. */
.blog-post__inner { max-width: 760px; }

.blog-crumbs {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
}

.blog-post__title {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 14px;
}

.blog-post__meta {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 30px;
}

.blog-post__cover {
  width: 100%;
  height: auto;
  border-radius: var(--leaf-md);
  margin-bottom: 36px;
}

/* ---------- Post body typography ----------
   These rules style author-written HTML coming out of the TipTap editor, so
   they have to cover every tag the sanitiser allows rather than classes we
   control. See clean_description_html() in the backend for that list. */

.blog-post__body { color: var(--text-3); font-size: 17.5px; line-height: 1.75; }

.blog-post__body h2 {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 42px 0 14px;
}

.blog-post__body h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 12px;
}

.blog-post__body p { margin-bottom: 20px; }

.blog-post__body ul,
.blog-post__body ol { margin: 0 0 22px 22px; }

.blog-post__body li { margin-bottom: 10px; }

.blog-post__body a { text-decoration: underline; }

.blog-post__body blockquote {
  border-left: 4px solid var(--leaf);
  background: var(--tint-leaf);
  padding: 16px 22px;
  margin: 0 0 24px;
  border-radius: 3px 12px 12px 3px;
  color: var(--leaf-ink);
}

.blog-post__body img {
  border-radius: var(--leaf-sm);
  margin: 12px 0 26px;
  height: auto;
}

.blog-post__body strong { color: var(--ink); }

/* ---------- In-post CTA ---------- */

.blog-cta {
  margin: 52px 0 32px;
  padding: 34px 32px;
  border-radius: var(--leaf-md);
  background: var(--tint);
}

.blog-cta__title {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 8px;
}

.blog-cta__sub { color: var(--text); font-size: 16px; line-height: 1.6; margin-bottom: 20px; }

.blog-cta__links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.blog-cta__phone { font-weight: 600; color: var(--text-2); }

.blog-post__back { margin-top: 34px; font-weight: 600; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .blog-hero { padding: 44px 0 30px; }
  .blog-list { padding: 34px 0 54px; }
  .blog-grid { grid-template-columns: 1fr; gap: 22px; }
  .blog-post { padding: 32px 0 56px; }
  .blog-post__body { font-size: 16.5px; }
  .blog-cta { padding: 26px 22px; }
}
