/* ============================================================
   Smith & Weidinger — blog templates.

   These pages are rendered by the child theme's template parts,
   not by Elementor, so the selectors here need no `.elementor`
   prefix and no specificity ladder.
   ============================================================ */

/* ------------------------------------------------------------
   SHARED
   ------------------------------------------------------------ */
.sw-article,
.sw-archive {
  padding-block: clamp(3rem, 6vw, 5rem);
  background: var(--sw-bone);
}

.sw-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--sw-ink-muted);
}
.sw-crumbs a { color: var(--sw-ink-muted); text-decoration: none; }
.sw-crumbs a:hover { color: var(--sw-forest); }
.sw-crumbs span { color: var(--sw-line); }

/* ------------------------------------------------------------
   SINGLE POST
   The measure is capped at 68ch: long-form legal writing is hard
   enough without a 120-character line.
   ------------------------------------------------------------ */


.sw-article-head { margin-top: 2rem; }
.sw-article-title {
  margin: 1rem 0 0;
  font-family: var(--sw-font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--sw-ink);
}
.sw-article-head .sw-rule { margin-top: 1.75rem; }
.sw-article-head .sw-lede { margin-top: 1.5rem; }

.sw-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.5rem;
  font-family: var(--sw-font-sans);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sw-ink-muted);
}

.sw-article-figure {
  margin: 2.5rem 0 0;
  border-radius: var(--sw-r-md);
  overflow: hidden;
  border: 1px solid var(--sw-line);
}
.sw-article-figure img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* --- article body -------------------------------------------- */
.prose-article {
  width: 100%;
  margin-top: 2.5rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--sw-ink);
}
.prose-article h2 {
  font-family: var(--sw-font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
  scroll-margin-top: 8rem;
  color: var(--sw-ink);
}
.prose-article h3 {
  font-family: var(--sw-font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  scroll-margin-top: 8rem;
  color: var(--sw-ink);
}
.prose-article p { margin: 0 0 1.25rem; }
.prose-article strong { font-weight: 650; color: var(--sw-ink); }
.prose-article a {
  color: var(--sw-forest);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose-article a:hover { text-decoration-thickness: 2px; }
.prose-article blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--sw-copper);
  font-family: var(--sw-font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--sw-ink-muted);
}
.prose-article ul, .prose-article ol { margin: 1.25rem 0; padding-left: 1.5rem; }
.prose-article ul { list-style: disc; }
.prose-article ol { list-style: decimal; }
.prose-article li { margin-bottom: 0.5rem; }

/* --- article foot + CTA --------------------------------------- */
.sw-article-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--sw-line); }
.sw-article-foot .sw-link svg { width: 16px; height: 16px; }

.sw-article-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding: 2rem;
  border-radius: var(--sw-r-lg);
  background: var(--sw-forest-deep);
}
.sw-article-cta-head {
  margin: 0;
  font-family: var(--sw-font-serif);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--sw-on-forest);
}
.sw-article-cta-sub {
  margin: 0.5rem 0 0;
  max-width: 34rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sw-on-forest-muted);
}

/* ------------------------------------------------------------
   ARCHIVE / SEARCH
   ------------------------------------------------------------ */
.sw-archive-head { max-width: 48rem; }
.sw-archive-title {
  margin: 1rem 0 0;
  font-family: var(--sw-font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--sw-ink);
}
.sw-archive-head .sw-rule { margin-top: 1.5rem; }
.sw-archive-head .sw-lede { margin-top: 1.5rem; }
.sw-archive-empty { margin-top: 3rem; }

.sw-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
}
@media (max-width: 1024px) { .sw-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .sw-post-grid { grid-template-columns: 1fr; } }

.sw-post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FFFFFF;
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-r-md);
  overflow: hidden;
}
.sw-post-thumb { display: block; overflow: hidden; background: var(--sw-bone-2); }
.sw-post-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .5s ease-out;
}
.sw-post-card:hover .sw-post-thumb img { transform: scale(1.02); }

.sw-post-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 1.75rem; }
.sw-post-body .sw-eyebrow { margin: 0; }
.sw-post-title {
  margin: 0.75rem 0 0;
  font-family: var(--sw-font-serif);
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.3;
}
.sw-post-title a { color: var(--sw-ink); text-decoration: none; }
.sw-post-title a:hover { color: var(--sw-forest); }
.sw-post-excerpt {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--sw-ink-muted);
}
.sw-post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.5rem;
}
.sw-post-foot .sw-link svg { width: 16px; height: 16px; }
.sw-post-time {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sw-ink-muted);
  white-space: nowrap;
}

/* Whole card is the click target; the visible link keeps the affordance. */
.sw-post-card { position: relative; }
.sw-post-title a::after { content: ""; position: absolute; inset: 0; }

/* --- pagination ----------------------------------------------- */
.sw-archive .pagination,
.sw-archive .navigation.pagination { margin-top: 3rem; }
.sw-archive .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.sw-archive .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-r-sm);
  font-size: 0.9375rem;
  color: var(--sw-ink);
  text-decoration: none;
}
.sw-archive .page-numbers:hover { border-color: var(--sw-forest); color: var(--sw-forest); }
.sw-archive .page-numbers.current { background: var(--sw-forest); border-color: var(--sw-forest); color: var(--sw-bone); }
.sw-archive .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The UA stylesheet centres <hr> with margin-inline:auto. The brand rule is a
   left-aligned mark, so it opts out explicitly outside centred headers. */
.sw-article-head .sw-rule,
.sw-archive-head .sw-rule { margin-inline: 0; }

/* ============================================================
   BLOG LAYOUT — content column + sidebar
   ============================================================ */
.sw-blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 1024px) {
  .sw-blog-layout { grid-template-columns: 1fr; gap: 3rem; }
}
.sw-blog-main { min-width: 0; }

/* The single-post column takes the full grid track; .prose-article still holds
   the body copy to its own measure. */
.sw-archive .sw-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .sw-archive .sw-post-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------
   SIDEBAR
   ------------------------------------------------------------ */
.sw-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 7.5rem; /* clears the sticky header */
}
@media (max-width: 1024px) { .sw-sidebar { position: static; } }

.sw-side-box {
  padding: 1.75rem;
  background: #FFFFFF;
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-r-md);
}
.sw-side-box .sw-eyebrow { margin: 0 0 1.25rem; }

/* --- author --------------------------------------------------- */
.sw-author-head { display: flex; align-items: center; gap: 0.875rem; }
.sw-author-avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  flex: 0 0 auto;
}
.sw-author-name {
  margin: 0;
  font-family: var(--sw-font-serif);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--sw-ink);
}
.sw-author-role {
  margin: 0.1875rem 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--sw-ink-muted);
}
.sw-author-bio {
  margin: 1.125rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--sw-ink-muted);
}
.sw-side-author .sw-link { margin-top: 1.25rem; }
.sw-side-author .sw-link svg { width: 16px; height: 16px; }

/* --- consultation CTA ----------------------------------------- */
.sw-side-cta {
  background: var(--sw-forest-deep);
  border-color: var(--sw-forest-deep);
}
.sw-side-cta-head {
  margin: 0;
  font-family: var(--sw-font-serif);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--sw-on-forest);
}
.sw-side-cta-sub {
  margin: 0.625rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sw-on-forest-muted);
}
.sw-side-phone {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--sw-font-serif);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1;
  color: var(--sw-on-forest);
  text-decoration: none;
}
.sw-side-phone:hover { color: var(--sw-copper-light); }
.sw-side-btn { display: flex; width: 100%; margin-top: 1.25rem; }
.sw-side-cta-note {
  margin: 0.875rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sw-on-forest-muted);
}

/* --- categories ------------------------------------------------ */
.sw-cat-list { list-style: none; margin: 0; padding: 0; }
.sw-cat-list li + li { border-top: 1px solid var(--sw-line); }
.sw-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  color: var(--sw-ink);
  text-decoration: none;
}
.sw-cat-list a:hover { color: var(--sw-forest); }
.sw-cat-count {
  min-width: 1.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--sw-bone-2);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: var(--sw-ink-muted);
}
.sw-cat-list li.is-current a { color: var(--sw-forest); font-weight: 600; }
.sw-cat-list li.is-current .sw-cat-count {
  background: var(--sw-forest);
  color: var(--sw-bone);
}

/* The sidebar is 20rem wide; the button's default tracking pushes the label
   onto a second line there, so it tightens rather than wraps. */
/* Must out-rank `a.sw-btn` (0,1,1) from components.css, hence the tag. */
a.sw-btn.sw-side-btn {
  padding-inline: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-align: center;
}
