/* ============================================================
   Coastal Photo — Blog stylesheet
   Shared between blog.html (index) and blog/*.html (posts)
   ============================================================ */

/* ---------------------------------------------------------------
   Blog-scoped surface + accent tokens
   The global theme sets --slate-light and --cedar to near-white, so
   boxes and accent borders disappear on the white article body.
   These give callouts, summaries, and sections a perceptible (AA)
   separation without changing site-wide tokens.
--------------------------------------------------------------- */
:root {
  --blog-surface:       #EEF3F5;  /* subtle cool tint, ~AA boundary vs #fff */
  --blog-surface-line:  #C3D2D6;  /* 3:1+ divider on white for non-text contrast */
  --blog-accent:        var(--color-gold);   /* muted coastal accent (#52686F) */
}

/* ---------------------------------------------------------------
   Breadcrumbs (shared — index + post, light variant for dark hero)
--------------------------------------------------------------- */
.breadcrumb {
  margin-bottom: var(--s-5);
}
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.78rem;
}
.breadcrumb__list li {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.breadcrumb__list a {
  color: var(--white-72);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumb__list a:hover { color: var(--white); }
.breadcrumb__sep { color: var(--white-55); }
.breadcrumb__current {
  color: var(--cedar);
  font-weight: 600;
}

/* ---------------------------------------------------------------
   Blog index — hero
--------------------------------------------------------------- */
.blog-hero {
  background: var(--evergreen);
  padding: calc(var(--nav-height, 72px) + var(--s-16)) 0 var(--s-16);
}
.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--s-4);
}
.blog-hero__sub {
  font-size: 1.05rem;
  color: var(--white-72);
  max-width: 560px;
  line-height: 1.7;
}

/* ---------------------------------------------------------------
   Blog index — article grid
--------------------------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-8);
  margin-top: var(--s-12);
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius-card-lg);
  border: 1px solid var(--card-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.blog-card__body {
  padding: var(--s-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.blog-card__tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--s-2);
}
.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.45;
}
.blog-card__excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: var(--s-4);
  border-top: 1px solid var(--card-border);
}
.blog-card__read {
  margin-left: auto;
  font-weight: 600;
  color: var(--forest);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Blog post — hero
--------------------------------------------------------------- */
.blog-post-hero {
  background: var(--evergreen);
  padding: calc(var(--nav-height, 72px) + var(--s-16)) 0 var(--s-14);
}
.blog-post-hero__back {
  font-size: 0.8rem;
  color: var(--white-55);
  text-decoration: none;
  display: inline-block;
  margin-bottom: var(--s-5);
  transition: color 0.15s;
}
.blog-post-hero__back:hover { color: var(--white); }
.blog-post-hero__crumbs {
  font-size: 0.8rem;
  color: var(--white-55);
  margin-bottom: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5ch;
}
.blog-post-hero__crumbs a {
  color: var(--white-55);
  text-decoration: none;
  transition: color 0.15s;
}
.blog-post-hero__crumbs a:hover { color: var(--white); }
.blog-post-hero__crumbs [aria-current="page"] { color: var(--white); }
.blog-post-hero__tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cedar);
  margin-bottom: var(--s-3);
}
.blog-post-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--s-5);
  max-width: 760px;
}
.blog-post-hero__meta {
  font-size: 0.8rem;
  color: var(--white-55);
}

/* ---------------------------------------------------------------
   Blog post — body / prose
--------------------------------------------------------------- */
.blog-post-body {
  padding: var(--s-16) 0 var(--s-24);
  background: var(--white);
}
.blog-post-body .prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: var(--s-10) 0 var(--s-4);
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: var(--s-8) 0 var(--s-3);
}
.prose p {
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.85;
  margin-bottom: var(--s-5);
}
.prose ul {
  padding-left: var(--s-6);
  margin-bottom: var(--s-5);
}
.prose ul li {
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.8;
  margin-bottom: var(--s-2);
}

.blog-callout {
  background: var(--blog-surface);
  border: 1px solid var(--blog-surface-line);
  border-left: 4px solid var(--blog-accent);
  border-radius: 0 var(--radius-card-lg) var(--radius-card-lg) 0;
  padding: var(--s-5) var(--s-6);
  margin: var(--s-8) 0;
}
.blog-callout p { margin: 0; font-weight: 500; color: var(--charcoal); }

.blog-footer-cta {
  background: var(--evergreen);
  border-radius: var(--radius-card-lg);
  padding: var(--s-10);
  text-align: center;
  margin-top: var(--s-16);
}
.blog-footer-cta h2 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: var(--s-3);
}
.blog-footer-cta p {
  color: var(--white-72);
  margin-bottom: var(--s-6);
}

/* ---------------------------------------------------------------
   Shared utility — button row for CTAs
--------------------------------------------------------------- */
.button-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------
   Blog index — lead intro + toolbar
--------------------------------------------------------------- */
.blog-lead {
  max-width: 760px;
  margin: 0 0 var(--s-10);
}
.blog-lead p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--charcoal);
  margin-bottom: var(--s-4);
}
.blog-lead p:last-child { margin-bottom: 0; }
.blog-lead a {
  color: var(--forest);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Category filter chips */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-10);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--blog-surface-line);
}
.blog-filter {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--charcoal);
  background: var(--blog-surface);
  border: 1px solid var(--blog-surface-line);
  border-radius: 999px;
  padding: var(--s-2) var(--s-5);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.blog-filter:hover {
  border-color: var(--evergreen);
  color: var(--evergreen);
}
.blog-filter.is-active {
  background: var(--evergreen);
  border-color: var(--evergreen);
  color: var(--white);
}
.blog-card.is-hidden { display: none; }
.blog-empty {
  display: none;
  color: var(--muted);
  font-size: 0.95rem;
  padding: var(--s-8) 0;
}

/* ---------------------------------------------------------------
   Blog index — featured post
--------------------------------------------------------------- */
.blog-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--s-8);
  align-items: center;
  background: var(--evergreen);
  border-radius: var(--radius-card-lg);
  padding: clamp(var(--s-8), 4vw, var(--s-12));
  margin-bottom: var(--s-12);
  text-decoration: none;
  color: var(--white);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-featured:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.blog-featured__label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--evergreen);
  background: var(--cedar);
  border-radius: 999px;
  padding: 0.25rem var(--s-3);
  margin-bottom: var(--s-4);
}
.blog-featured__tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cedar);
  margin-bottom: var(--s-3);
}
.blog-featured__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--s-4);
}
.blog-featured__excerpt {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--white-72);
  margin-bottom: var(--s-5);
}
.blog-featured__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.8rem;
  color: var(--white-55);
}
.blog-featured__read {
  margin-left: auto;
  font-weight: 600;
  color: var(--cedar);
}

@media (max-width: 768px) {
  .blog-featured {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
}

/* ---------------------------------------------------------------
   Section heading for index groupings
--------------------------------------------------------------- */
.blog-section-head {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: var(--s-4) 0 var(--s-6);
}

/* ---------------------------------------------------------------
   Blog index — explore (services + areas internal links)
--------------------------------------------------------------- */
.blog-explore {
  margin-top: var(--s-20);
  padding-top: var(--s-12);
  border-top: 1px solid var(--card-border);
}
.blog-explore__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-8);
  margin-top: var(--s-6);
}
.blog-explore__col h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: var(--s-4);
}
.blog-explore__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
}
.blog-explore__col li a {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--charcoal);
  background: var(--blog-surface);
  border: 1px solid var(--blog-surface-line);
  border-radius: 999px;
  padding: var(--s-2) var(--s-4);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.blog-explore__col li a:hover {
  border-color: var(--evergreen);
  background: var(--white);
  color: var(--evergreen);
}

/* ---------------------------------------------------------------
   Blog post — author byline
--------------------------------------------------------------- */
.blog-post-hero__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  font-size: 0.8rem;
  color: var(--white-72);
  margin-top: var(--s-3);
}
.blog-post-hero__byline strong { color: var(--white); font-weight: 600; }
.blog-post-hero__byline span { color: var(--white-55); }

/* ---------------------------------------------------------------
   Blog post — key takeaways / shareable summary
--------------------------------------------------------------- */
.blog-summary {
  background: var(--blog-surface);
  border: 1px solid var(--blog-surface-line);
  border-left: 4px solid var(--evergreen);
  border-radius: 0 var(--radius-card-lg) var(--radius-card-lg) 0;
  padding: var(--s-6) var(--s-7);
  margin: 0 0 var(--s-10);
}
.blog-summary__title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--evergreen);
  margin-bottom: var(--s-3);
}
.blog-summary ul {
  margin: 0;
  padding-left: var(--s-5);
}
.blog-summary li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--charcoal);
  margin-bottom: var(--s-2);
}
.blog-summary li:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------
   Blog post — comparison tables
--------------------------------------------------------------- */
.blog-table-wrap {
  overflow-x: auto;
  margin: var(--s-8) 0;
  border: 1px solid var(--blog-surface-line);
  border-radius: var(--radius-card-lg);
}
.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 480px;
}
.blog-table caption {
  caption-side: bottom;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: left;
  padding: var(--s-3) var(--s-5);
}
.blog-table th,
.blog-table td {
  text-align: left;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--blog-surface-line);
  line-height: 1.6;
  vertical-align: top;
}
.blog-table thead th {
  background: var(--evergreen);
  color: var(--white);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.blog-table tbody th {
  background: var(--blog-surface);
  font-weight: 600;
  color: var(--charcoal);
  width: 34%;
}
.blog-table tbody tr:last-child th,
.blog-table tbody tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------
   Blog post — inline CTA band (mid-article)
--------------------------------------------------------------- */
.blog-inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  background: var(--blog-surface);
  border: 1px solid var(--blog-surface-line);
  border-left: 4px solid var(--blog-accent);
  border-radius: 0 var(--radius-card-lg) var(--radius-card-lg) 0;
  padding: var(--s-6) var(--s-7);
  margin: var(--s-10) 0;
}
.blog-inline-cta p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--charcoal);
  flex: 1 1 260px;
}
.blog-inline-cta .btn { flex: 0 0 auto; }

/* ---------------------------------------------------------------
   Blog post — related posts
--------------------------------------------------------------- */
.blog-related {
  background: var(--blog-surface);
  border-top: 1px solid var(--blog-surface-line);
  padding: var(--s-16) 0;
}
.blog-related__head {
  max-width: 760px;
  margin: 0 auto var(--s-8);
}
.blog-related__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
}
.blog-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-6);
  max-width: 1080px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------
   Readability refinements
--------------------------------------------------------------- */
.prose .blog-callout p,
.prose ol li {
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.8;
}
.prose ol {
  padding-left: var(--s-6);
  margin-bottom: var(--s-5);
}
.prose ol li { margin-bottom: var(--s-3); }
.prose a:not(.btn) {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.prose a:not(.btn):hover { text-decoration-thickness: 2px; }
.prose > p:first-of-type {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--charcoal);
}

@media (max-width: 640px) {
  .blog-post-body { padding: var(--s-12) 0 var(--s-16); }
  .blog-inline-cta { flex-direction: column; align-items: flex-start; }
}
