/* ---------------------------------------------------------------------------
   Blog styles for AJ Commercial Cleaning Services.

   Loaded only by /blog and /blog/*, on top of site-shared.css. It reuses that
   file's design tokens (--blue, --ink, --muted, --line, --soft) and its header,
   top bar and footer classes, so the blog inherits the site's look without
   duplicating chrome CSS.

   Blog pages are plain static HTML — they do not load the x-dc runtime — so a
   few utilities the other pages declare inline (.btn-primary, the flex page
   shell) are defined here instead.
--------------------------------------------------------------------------- */

.page-shell {
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.blog-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

/* ---------- breadcrumbs ---------- */

.crumbs {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue-dark); text-decoration: underline; }
.crumbs span { margin: 0 6px; }
.crumbs [aria-current="page"] { color: var(--ink); margin: 0; }

/* ---------- index header ---------- */

.blog-head { max-width: 760px; margin: 0 0 40px; }

.blog-head h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 16px;
}

.blog-standfirst {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.62;
  color: var(--muted);
  margin: 0;
}

/* ---------- post cards ---------- */

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

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: #cddef4;
  box-shadow: 0 14px 34px rgba(15, 46, 82, .10);
}

.post-card-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--soft);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 0 auto;
}

.post-card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
}

.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue-dark); }

.post-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
}

.post-cat {
  align-self: flex-start;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--blue-dark);
  background: var(--soft);
  border-radius: 999px;
  padding: 5px 11px;
}

.post-meta {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- article ---------- */

.post { max-width: 780px; margin: 0 auto; }

.post-head { margin-bottom: 30px; }

.post-head h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  color: var(--ink);
  margin: 14px 0 16px;
}

.post-standfirst {
  font-size: clamp(17px, 1.5vw, 19.5px);
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 18px;
}

.post-hero {
  margin: 0 0 34px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--soft);
}

.post-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* ---------- table of contents ---------- */

.toc {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0 0 34px;
}

.toc-h {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 5px 0; font-size: 15.5px; line-height: 1.5; }
.toc a { color: var(--blue-dark); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- article body ---------- */

.post-body {
  font-size: 17.5px;
  line-height: 1.72;
  color: #24405f;
}

.post-body h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(23px, 2.4vw, 28px);
  line-height: 1.25;
  color: var(--ink);
  margin: 44px 0 14px;
  scroll-margin-top: 24px;
}

.post-body h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 19.5px;
  line-height: 1.35;
  color: var(--ink);
  margin: 30px 0 10px;
}

.post-body p { margin: 0 0 18px; }

.post-body ul,
.post-body ol { margin: 0 0 20px; padding-left: 24px; }

.post-body li { margin: 8px 0; }

.post-body a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--blue); }

.post-body strong { color: var(--ink); font-weight: 600; }

.post-body blockquote {
  margin: 26px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--blue);
  color: var(--ink);
}

.post-body blockquote p { margin: 0; font-size: 18.5px; line-height: 1.6; }

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}

/* ---------- call to action ---------- */

.post-cta {
  margin: 52px 0 0;
  padding: 32px 34px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 100%);
  color: #fff;
}

.post-cta h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 10px;
  color: #fff;
}

.post-cta p {
  margin: 0 0 22px;
  font-size: 16.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
  max-width: 60ch;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 28px;
  border-radius: 10px;
  background: #fff;
  color: var(--blue-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}

.btn-primary:hover { transform: translateY(-1px); background: #eef5ff; color: var(--blue-dark); }

/* ---------- related ---------- */

.related { margin-top: 60px; }

.related h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 22px;
}

.related .post-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.related .post-card h3 { font-size: 18px; }
.related .post-card p { font-size: 15px; }

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .blog-main { padding: 28px 16px 56px; }
  .post-grid { grid-template-columns: 1fr; gap: 24px; }
  .post-cta { padding: 26px 22px; }
  .post-body { font-size: 17px; }
  .toc { padding: 18px 20px; }
}

/* ---------- related services ---------- */
/* Links an article to the service pages it is about. */

.related-services { margin-top: 44px; }

.related-services h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 18px;
}

.svc-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

.svc-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.svc-link:hover {
  border-color: #cddef4;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 46, 82, .08);
}

.svc-link-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 16.5px;
  color: var(--blue-dark);
}

.svc-link-desc { font-size: 14.5px; line-height: 1.5; color: var(--muted); }

/* ---------- byline ---------- */

.post-meta { flex-wrap: wrap; row-gap: 4px; }
.post-author { font-weight: 600; color: var(--ink); }
.post-updated { color: var(--muted); }

/* ---------- tablet ---------- */

@media (max-width: 1100px) and (min-width: 721px) {
  .blog-main { padding: 34px 22px 64px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
  .related .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post { max-width: 100%; }
  .post-body { font-size: 17px; }
}

@media (max-width: 720px) {
  .related-services { margin-top: 36px; }
  .svc-links { grid-template-columns: 1fr; }
  .post-cta h2, .related-services h2 { font-size: 21px; }
}
