/* ==========================================================================
   Deep 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: linear-gradient(180deg, var(--bg-1) 0%, #fff 100%);
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border-3);
}

.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: var(--ink);
}

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

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

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

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

.blog-card {
  border: 1px solid var(--border-1);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}

.blog-card:hover { transform: translateY(-3px); }

.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;
  letter-spacing: .04em;
  text-transform: uppercase;
  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(--ink);
  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 1200px 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(--ink);
  margin-bottom: 14px;
}

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

.blog-post__cover {
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
}

/* ---------- 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(--ink);
  margin: 42px 0 14px;
}

.blog-post__body h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  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: 3px solid var(--blue);
  background: var(--bg-1);
  padding: 16px 22px;
  margin: 0 0 24px;
  border-radius: 0 12px 12px 0;
  color: var(--text-3);
}

.blog-post__body img {
  border-radius: 14px;
  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: 20px;
  background: linear-gradient(135deg, var(--tint) 0%, var(--tint-2) 100%);
  border: 1px solid var(--border-4);
}

.blog-cta__title {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  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; }
}
