/* ========================================
   CONTENT PAGE STYLES (articles, hubs, guides)
   tokens.css provides design tokens, reset & base typography
   ======================================== */

/* ========================================
   STICKY HEADER
   ======================================== */
.dg-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
.dg-header.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.06);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.dg-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dg-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--navy);
}
.dg-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--navy);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.dg-logo-mark::before {
  content: '';
  position: absolute;
  top: 6px; left: 7px;
  width: 18px; height: 2px;
  background: rgba(255,255,255,0.5);
  box-shadow: 0 5px 0 rgba(255,255,255,0.3), 0 10px 0 rgba(255,255,255,0.5), 0 15px 0 rgba(255,255,255,0.3);
}
.dg-header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.dg-header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.dg-header-nav a:hover { color: var(--navy); }
.dg-header-cta {
  display: inline-flex;
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--navy);
  border-radius: var(--radius);
  transition: background 0.2s;
}
.dg-header-cta:hover { background: var(--navy-light); }

@media (max-width: 768px) {
  .dg-header-nav { display: none; }
}

/* ========================================
   BREADCRUMB
   ======================================== */
.dg-breadcrumb {
  padding-top: 5rem;
  background: var(--off-white);
}
.dg-breadcrumb nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.dg-breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.dg-breadcrumb a:hover { color: var(--green); }
.dg-breadcrumb span { margin: 0 0.4rem; }

/* ========================================
   ARTICLE HERO
   ======================================== */
.article-hero {
  background: var(--off-white);
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}
.article-hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.article-category {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--space-sm);
}
.article-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: var(--space-sm);
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.article-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ========================================
   ARTICLE BODY
   ======================================== */
.article-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-lg) 1.5rem var(--space-xl);
}

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  line-height: 1.25;
  color: var(--navy);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.article-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  line-height: 1.3;
  color: var(--navy);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.article-body p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-body p:first-child,
.article-body > p:first-of-type {
  font-size: 1.12rem;
  color: var(--text);
}

.article-body a {
  color: var(--green);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(22, 163, 74, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}
.article-body a:hover {
  text-decoration-color: var(--green);
}

.article-body ul,
.article-body ol {
  margin-bottom: var(--space-md);
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

.article-body em {
  font-style: italic;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-lg) 0;
}

/* Blockquote / Callout */
.article-body blockquote {
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body blockquote p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 0.98rem;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0 var(--space-lg);
  font-size: 0.92rem;
}

.article-body thead th {
  text-align: left;
  font-weight: 600;
  color: var(--navy);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
  background: var(--off-white);
}

.article-body tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.article-body tbody tr:hover {
  background: rgba(248, 247, 244, 0.5);
}

/* Inline CTA Box */
.article-cta {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  text-align: center;
}

.article-cta p {
  color: var(--text);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.article-cta .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.article-cta .cta-btn:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.article-cta .cta-btn svg {
  width: 16px;
  height: 16px;
}

/* Key Takeaway Box */
.key-takeaway {
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.key-takeaway p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.key-takeaway strong {
  color: var(--amber);
}

/* Example Scenario Box */
.example-box {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
}

.example-box-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--space-xs);
}

.example-box p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.example-box p:last-child {
  margin-bottom: 0;
}

/* ========================================
   ARTICLE FIGURES & IMAGES
   ======================================== */
.article-body figure {
  margin: var(--space-md) 0 var(--space-lg);
  padding: 0;
}

.article-body figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.article-body figcaption {
  margin-top: var(--space-xs);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ========================================
   FAQ SECTION
   ======================================== */
.article-faq {
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
}

.article-faq h2 {
  margin-top: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--space-sm) 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding-bottom: var(--space-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ========================================
   RELATED ARTICLES
   ======================================== */
.related-articles {
  background: var(--off-white);
  padding: var(--space-xl) 0;
}

.related-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.related-inner h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.related-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.08);
}

.related-card-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.related-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.related-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* ========================================
   BOTTOM CTA BANNER
   ======================================== */
.bottom-cta {
  background: var(--navy);
  padding: var(--space-xl) 0;
  text-align: center;
}

.bottom-cta-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.bottom-cta h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
  margin-bottom: var(--space-xs);
}

.bottom-cta p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.bottom-cta .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s;
}

.bottom-cta .cta-btn:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}

/* ========================================
   FOOTER
   ======================================== */
.dg-footer {
  background: var(--navy);
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.dg-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.dg-footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
}
.dg-footer-links {
  display: flex;
  gap: 1.5rem;
}
.dg-footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
}
.dg-footer-links a:hover { color: rgba(255,255,255,0.8); }
.dg-footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
}
@media (max-width: 640px) {
  .dg-footer-inner { flex-direction: column; text-align: center; }
}

/* ========================================
   BLOG INDEX — LISTING PAGE
   ======================================== */
.blog-hero {
  background: var(--off-white);
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.blog-hero-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.blog-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--navy);
  margin-bottom: var(--space-xs);
}

.blog-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.blog-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) 1.5rem var(--space-xl);
}

.blog-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  transition: box-shadow 0.2s;
}

.blog-featured:hover {
  box-shadow: 0 8px 32px rgba(26, 35, 50, 0.06);
}

.blog-featured-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--space-xs);
}

.blog-featured h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: var(--space-xs);
}

.blog-featured p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.blog-featured-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
}

.blog-featured-link svg {
  width: 16px;
  height: 16px;
}

.blog-featured-visual {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: var(--space-lg);
  text-align: center;
}

.blog-featured-visual .pillar-icon {
  font-size: 3rem;
  margin-bottom: var(--space-xs);
}

.blog-featured-visual p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Filter Bar */
.blog-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.blog-filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.blog-filter-btn:hover {
  color: var(--navy);
  border-color: var(--navy-muted);
  background: var(--off-white);
}

.blog-filter-btn.active {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.blog-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 100px;
  background: rgba(0,0,0,0.06);
  color: var(--text-muted);
  padding: 0 0.3rem;
}

.blog-filter-btn.active .blog-filter-count {
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

/* Card hide/show for filtering */
.blog-card[data-hidden="true"] {
  display: none;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.08);
}

.blog-card-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.blog-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

/* ========================================
   PRINT
   ======================================== */
@media print {
  .dg-header,
  .dg-footer,
  .bottom-cta,
  .article-cta,
  .related-articles { display: none; }

  .article-body { max-width: 100%; }
}
