/* ============================================================
   BLOG.CSS – Shared styles for blog preview cards + articles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ----------- TOKENS (self-contained fallbacks) ----------- */
:root {
  --blog-gold:     #b38b3f;
  --blog-charcoal: #1c1a17;
  --blog-cream:    #f9f6f0;
  --blog-muted:    #7a7065;
  --blog-border:   rgba(163,123,52,.15);
  --blog-radius:   4px;
  --blog-serif:    'Cormorant Garamond', Georgia, serif;
  --blog-sans:     'DM Sans', system-ui, sans-serif;
  --blog-shadow:   0 8px 32px rgba(0,0,0,.07);
}

/* ============================================================
   BLOG PREVIEW SECTION  (embedded in portal & address pages)
   ============================================================ */
.blog-section {
  padding: 96px 64px;
  background: var(--bg-alt, #f4f1eb);
}
.blog-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
}
.blog-section-header .eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blog-gold);
  margin-bottom: 12px;
}
.blog-section-header h2 {
  margin: 0;
}
.blog-view-all {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blog-gold);
  border-bottom: 1px solid var(--blog-gold);
  text-decoration: none;
  transition: opacity .2s;
  white-space: nowrap;
  align-self: flex-end;
  padding-bottom: 2px;
}
.blog-view-all:hover { opacity: .7; }

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

/* Card */
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 0.5px solid var(--blog-border);
  border-radius: var(--blog-radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--blog-shadow);
  border-color: var(--blog-gold);
}

/* Image placeholder */
.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--blog-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card-img-placeholder {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blog-muted);
  opacity: .5;
}
.blog-card-img-placeholder svg {
  width: 32px;
  height: 32px;
  stroke: var(--blog-muted);
  opacity: .3;
  display: block;
  margin: 0 auto 8px;
}

/* Card body */
.blog-card-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blog-gold);
  border: 0.5px solid var(--blog-gold);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  width: fit-content;
}
.blog-card-title {
  font-family: var(--blog-serif);
  font-size: 18px;
  line-height: 1.3;
  color: var(--blog-charcoal);
  margin: 0 0 10px;
  font-weight: 500;
}
.blog-card-excerpt {
  font-family: var(--blog-sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--blog-muted);
  flex: 1;
  margin: 0 0 20px;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--blog-muted);
  border-top: 0.5px solid var(--blog-border);
  padding-top: 16px;
  margin-top: auto;
}
.blog-card-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--blog-muted); opacity: .4; }

/* Responsive – blog section */
@media (max-width: 1200px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } .blog-section { padding: 72px 48px; } }
@media (max-width: 900px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .blog-grid { grid-template-columns: 1fr; } .blog-section { padding: 64px 24px; } .blog-section-header { flex-direction: column; align-items: flex-start; gap: 16px; } }


/* ============================================================
   INDIVIDUAL BLOG ARTICLE PAGE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.blog-page {
  font-family: var(--blog-sans);
  background: #fff;
  color: var(--blog-charcoal);
  font-size: 16px;
  line-height: 1.7;
}

/* BLOG NAV */
.blog-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--blog-border);
}
.blog-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  color: var(--blog-charcoal);
}
.blog-nav-brand svg { width: 16px; height: 16px; stroke: var(--blog-charcoal); }
.blog-nav-logo {
  font-family: var(--blog-serif);
  font-size: 18px;
  color: var(--blog-charcoal);
  text-decoration: none;
}
.blog-nav-cta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--blog-gold);
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: var(--blog-radius);
  transition: opacity .2s;
}
.blog-nav-cta:hover { opacity: .85; }

/* ARTICLE HERO */
.article-hero {
  padding: 120px 5% 64px;
  max-width: 860px;
  margin: 0 auto;
}
.article-hero .blog-tag { margin-bottom: 20px; }
.article-title {
  font-family: var(--blog-serif);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  font-weight: 500;
  color: var(--blog-charcoal);
  margin-bottom: 20px;
}
.article-subtitle {
  font-size: 18px;
  color: var(--blog-muted);
  line-height: 1.6;
  margin-bottom: 28px;
  font-weight: 300;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--blog-muted);
  padding-bottom: 24px;
  border-bottom: 0.5px solid var(--blog-border);
}
.article-meta strong { color: var(--blog-charcoal); }

/* AUTHOR / EDITORIAL BOX */
.article-author {
  margin: 18px 0 0;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(179, 139, 63, 0.08);
  border: 0.5px solid var(--blog-border);
  border-radius: var(--blog-radius);
}
.article-author .author-line {
  font-size: 12px;
  color: var(--blog-charcoal);
}
.article-author .author-line strong {
  color: var(--blog-charcoal);
  font-weight: 600;
}
.article-author .author-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--blog-muted);
}
.article-author .author-note a {
  color: var(--blog-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(179, 139, 63, 0.35);
}
.article-author .author-note a:hover { opacity: 0.85; }

/* ARTICLE FEATURED IMAGE */
.article-featured-img {
  max-width: 860px;
  margin: 0 auto 56px;
  padding: 0 5%;
}
.article-featured-img figure {
  width: 100%;
  background: var(--blog-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0.5px solid var(--blog-border);
  border-radius: var(--blog-radius);
  overflow: hidden;
}
.article-featured-img figure img {
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
  image-rendering: auto;
  display: block;
}
.img-placeholder-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blog-muted);
  opacity: .5;
  text-align: center;
}
.img-placeholder-label svg {
  width: 40px; height: 40px;
  stroke: var(--blog-muted);
  opacity: .3;
  display: block;
  margin: 0 auto 10px;
}
.article-featured-img figcaption {
  font-size: 12px;
  color: var(--blog-muted);
  margin-top: 12px;
  text-align: center;
  padding: 0 5%;
}

/* ARTICLE LAYOUT – content + sticky TOC */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5% 80px;
  align-items: start;
}

/* CONTENT */
.article-content { min-width: 0; }

/* Summary box */
.article-summary {
  background: var(--blog-cream);
  border-left: 3px solid var(--blog-gold);
  padding: 24px 28px;
  margin-bottom: 40px;
  border-radius: 0 var(--blog-radius) var(--blog-radius) 0;
}
.article-summary h2 {
  font-family: var(--blog-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blog-gold);
  margin-bottom: 14px;
}
.article-summary ul {
  list-style: none;
  padding: 0;
}
.article-summary ul li {
  font-size: 14px;
  color: var(--blog-charcoal);
  padding: 5px 0;
  padding-left: 18px;
  position: relative;
}
.article-summary ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blog-gold);
  font-size: 12px;
}

.article-content h2 {
  font-family: var(--blog-serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  margin: 48px 0 16px;
  color: var(--blog-charcoal);
  line-height: 1.2;
  padding-top: 8px;
  border-top: 0.5px solid var(--blog-border);
}
.article-content h2:first-of-type { border-top: none; margin-top: 0; }
.article-content h3 {
  font-family: var(--blog-serif);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 500;
  margin: 32px 0 12px;
  color: var(--blog-charcoal);
}
.article-content p {
  font-size: 16px;
  line-height: 1.8;
  color: #3d3830;
  margin-bottom: 20px;
}
.article-content ul, .article-content ol {
  margin: 0 0 20px 20px;
}
.article-content li {
  font-size: 15px;
  line-height: 1.7;
  color: #3d3830;
  margin-bottom: 8px;
}
.article-content strong { color: var(--blog-charcoal); font-weight: 600; }
.article-content em { color: var(--blog-gold); font-style: italic; }

/* Inline image */
.article-inline-img {
  margin: 32px 0;
  width: 100%;
  min-height: 260px;
  background: var(--blog-cream);
  border: 0.5px solid var(--blog-border);
  border-radius: var(--blog-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.article-inline-img img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  border-radius: var(--blog-radius);
  image-rendering: auto;
  display: block;
}

/* Data table */
.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
}
.article-table th {
  background: var(--blog-charcoal);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .06em;
}
.article-table td {
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--blog-border);
  color: #3d3830;
}
.article-table tr:nth-child(even) td { background: var(--blog-cream); }
.article-table td strong { color: var(--blog-gold); }

/* CTA box */
.article-cta {
  background: var(--blog-charcoal);
  color: #fff;
  padding: 32px 36px;
  border-radius: var(--blog-radius);
  margin: 48px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.article-cta h3 { font-family: var(--blog-serif); font-size: 22px; font-weight: 400; margin-bottom: 6px; }
.article-cta p  { font-size: 13px; color: rgba(255,255,255,.6); margin: 0; }
.article-cta a  {
  white-space: nowrap;
  background: var(--blog-gold);
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--blog-radius);
  flex-shrink: 0;
  transition: opacity .2s;
}
.article-cta a:hover { opacity: .85; }

/* STICKY TOC */
.article-toc {
  position: sticky;
  top: 84px;
}
.article-toc h2 {
  font-family: var(--blog-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blog-muted);
  margin-bottom: 16px;
}
.toc-list {
  list-style: none;
  padding: 0;
  border-left: 2px solid var(--blog-border);
}
.toc-list li { padding: 0; }
.toc-list a {
  display: block;
  padding: 8px 0 8px 16px;
  font-size: 13px;
  color: var(--blog-muted);
  text-decoration: none;
  transition: color .2s, border-color .2s;
  border-left: 2px solid transparent;
  margin-left: -2px;
  line-height: 1.4;
}
.toc-list a:hover,
.toc-list a.active {
  color: var(--blog-charcoal);
  border-left-color: var(--blog-gold);
}
.toc-list .toc-sub a { font-size: 12px; padding-left: 28px; }

/* Related posts */
.related-posts {
  background: var(--blog-cream);
  padding: 64px 5%;
}
.related-posts h2 {
  font-family: var(--blog-serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 32px;
  color: var(--blog-charcoal);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* BLOG FOOTER */
.blog-footer {
  background: var(--blog-charcoal);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 32px 5%;
  font-size: 12px;
}
.blog-footer a { color: var(--blog-gold); text-decoration: none; }

/* RESPONSIVE – article */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-toc { position: relative; top: 0; background: var(--blog-cream); padding: 24px; margin-bottom: 40px; border-radius: var(--blog-radius); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .article-hero { padding: 96px 5% 40px; }
  .article-cta { flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
}

/* TOC scroll spy JS hook */
.toc-list a.active {
  color: var(--blog-charcoal);
  font-weight: 500;
  border-left-color: var(--blog-gold);
}

/* FAQ SECTION */
.article-faq {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 0.5px solid var(--blog-border);
}
.article-faq h2 {
  border-top: none !important;
  margin-top: 0 !important;
  margin-bottom: 32px !important;
}
.article-faq .faq-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.article-faq .faq-item {
  border: 0.5px solid var(--blog-border);
  border-radius: var(--blog-radius);
  background: #fff;
  transition: border-color 0.3s ease;
}
.article-faq .faq-item:hover {
  border-color: var(--blog-gold);
}
.article-faq .faq-item summary {
  padding: 20px 24px;
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--blog-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--blog-charcoal);
}
.article-faq .faq-item summary::-webkit-details-marker {
  display: none;
}
.article-faq .faq-item summary::after {
  content: '+';
  font-family: var(--blog-sans);
  font-size: 24px;
  color: var(--blog-gold);
  transition: transform 0.3s ease;
}
.article-faq .faq-item[open] summary::after {
  transform: rotate(45deg);
}
.article-faq .faq-content {
  padding: 0 24px 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--blog-muted);
}
.article-faq .faq-content p {
  margin-bottom: 0 !important;
}

@media (max-width: 640px) {
  .faq-item summary {
    font-size: 16px;
    padding: 16px 20px;
  }
  .faq-content {
    padding: 0 20px 20px;
    font-size: 14px;
  }
}
