/* ============================================
   Blog Styles — kushdhody.com
   Extends base.css + style.css
   ============================================ */

/* --- Blog Hero --- */
.blog-hero {
  padding: clamp(6rem, 12vw, 10rem) var(--page-gutter, 2rem) clamp(3rem, 6vw, 5rem);
  text-align: center;
  background: var(--color-bg);
  position: relative;
}

.blog-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 720px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold, #B8860B) 50%, transparent);
  opacity: 0.3;
}

.blog-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  color: var(--color-heading, #1A1A2E);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.blog-hero-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 2vw, 1.175rem);
  color: var(--color-muted, #666);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Blog Grid --- */
.blog-grid-section {
  padding: clamp(2rem, 4vw, 4rem) var(--page-gutter, 2rem) clamp(3rem, 6vw, 6rem);
  max-width: 1100px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 2rem;
}

/* --- Blog Card --- */
.blog-card {
  background: var(--color-card-bg, #fff);
  border: 1px solid var(--color-border, rgba(26, 26, 46, 0.08));
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26, 26, 46, 0.1);
}

.blog-card-body {
  padding: 1.75rem 1.75rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.blog-card-category {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold, #B8860B);
  background: rgba(184, 134, 11, 0.08);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
}

.blog-card-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  color: var(--color-muted, #888);
}

.blog-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-heading, #1A1A2E);
  margin: 0 0 0.75rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--color-gold, #B8860B);
}

.blog-card-excerpt {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  color: var(--color-text, #444);
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex: 1;
}

.blog-card-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gold, #B8860B);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.25s ease;
}

.blog-card-link:hover {
  gap: 0.6rem;
}

/* --- Article Page --- */
.article-header {
  padding: clamp(6rem, 12vw, 9rem) var(--page-gutter, 2rem) clamp(2rem, 4vw, 3rem);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.article-back {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--color-muted, #888);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.article-back:hover {
  color: var(--color-gold, #B8860B);
}

.article-category {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold, #B8860B);
  background: rgba(184, 134, 11, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1.25rem;
}

.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  font-weight: 600;
  color: var(--color-heading, #1A1A2E);
  margin: 0 0 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--color-muted, #888);
}

.article-meta-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-muted, #ccc);
  display: inline-block;
}

.article-author {
  font-weight: 500;
  color: var(--color-heading, #1A1A2E);
}

/* --- Article Body --- */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) var(--page-gutter, 2rem) clamp(3rem, 6vw, 5rem);
}

.article-body p {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  color: var(--color-text, #333);
  line-height: 1.75;
  margin: 0 0 1.5rem;
}

.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--color-heading, #1A1A2E);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-heading, #1A1A2E);
  margin: 2rem 0 0.75rem;
}

.article-body a {
  color: var(--color-gold, #B8860B);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.article-body a:hover {
  opacity: 0.75;
}

.article-body ul,
.article-body ol {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  color: var(--color-text, #333);
  line-height: 1.75;
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

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

/* --- Pull Quote --- */
.pull-quote {
  border-left: 3px solid var(--color-gold, #B8860B);
  padding: 1.25rem 0 1.25rem 1.75rem;
  margin: 2.5rem 0;
  background: rgba(184, 134, 11, 0.03);
  border-radius: 0 8px 8px 0;
}

.pull-quote p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.125rem, 2vw, 1.3125rem) !important;
  font-style: italic;
  color: var(--color-heading, #1A1A2E) !important;
  line-height: 1.65 !important;
  margin: 0 !important;
}

/* --- Callout Block --- */
.callout-block {
  background: var(--color-card-bg, #fff);
  border: 1px solid var(--color-border, rgba(26, 26, 46, 0.08));
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.callout-block-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold, #B8860B);
  margin: 0 0 0.75rem;
}

.callout-block p {
  font-size: 0.9375rem !important;
  margin-bottom: 0.5rem !important;
}

.callout-block p:last-child {
  margin-bottom: 0 !important;
}

/* --- Share / CTA --- */
.article-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--color-border, rgba(26, 26, 46, 0.08));
}

.article-share-top {
  margin: 0 0 1.5rem;
  padding: 0 0 1.5rem;
  border-top: none;
  border-bottom: 1px solid var(--color-border, rgba(26, 26, 46, 0.08));
  gap: 0.625rem;
}

.article-share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-share-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted, #888);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #1A1A2E;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.share-btn:hover {
  background: #2D2D44;
  opacity: 1;
}

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

.share-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-surface-2, #F5F4F0);
  color: var(--color-text-muted, #5C5C6E);
}

.share-btn-icon:hover {
  background: var(--color-accent, #B8860B);
  color: #fff;
  opacity: 1;
}

.share-btn-icon svg {
  width: 16px;
  height: 16px;
}

/* --- At a Glance Box --- */
.at-a-glance {
  border-left: 3px solid var(--color-accent, #B8860B);
  padding: 1.125rem 1.5rem;
}

.at-a-glance-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.175rem;
}

.at-a-glance-list li {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text, #1A1A2E);
}

.at-a-glance-list li strong {
  color: var(--color-heading, #1A1A2E);
}

[data-theme="dark"] .share-btn {
  background: #D4A017;
  color: #1A1A2E;
}

[data-theme="dark"] .share-btn:hover {
  background: #E0B030;
  color: #1A1A2E;
  opacity: 1;
}

[data-theme="dark"] .share-btn-icon {
  background: var(--color-surface-2, #1C1C30);
  color: var(--color-text-muted, #9E9EB0);
}

[data-theme="dark"] .share-btn-icon:hover {
  background: var(--color-accent, #D4A017);
  color: #0F0F1A;
}

[data-theme="dark"] .at-a-glance-list li {
  color: #C8C8D2;
}

[data-theme="dark"] .at-a-glance-list li strong {
  color: #E5E5EA;
}

/* --- Related Posts --- */
.related-posts {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--page-gutter, 2rem) clamp(3rem, 6vw, 5rem);
}

.related-posts-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-heading, #1A1A2E);
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border, rgba(26, 26, 46, 0.08));
}

.related-placeholder {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  color: var(--color-muted, #888);
  font-style: italic;
}

/* ============================================
   Dark Mode Overrides
   ============================================ */
[data-theme="dark"] .blog-hero {
  background: var(--color-bg);
}

[data-theme="dark"] .blog-card {
  background: var(--color-card-bg, #1e1e30);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .blog-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .blog-hero-title,
[data-theme="dark"] .blog-card-title,
[data-theme="dark"] .blog-card-title a,
[data-theme="dark"] .article-title,
[data-theme="dark"] .article-body h2,
[data-theme="dark"] .article-body h3,
[data-theme="dark"] .article-author,
[data-theme="dark"] .related-posts-title {
  color: #F0F0F5;
}

[data-theme="dark"] .blog-hero-subtitle,
[data-theme="dark"] .blog-card-excerpt,
[data-theme="dark"] .article-body p,
[data-theme="dark"] .article-body ul,
[data-theme="dark"] .article-body ol {
  color: #B0B0C0;
}

[data-theme="dark"] .blog-card-date,
[data-theme="dark"] .article-meta,
[data-theme="dark"] .article-back,
[data-theme="dark"] .article-share-label,
[data-theme="dark"] .related-placeholder {
  color: #888899;
}

[data-theme="dark"] .blog-card-category,
[data-theme="dark"] .article-category {
  background: rgba(184, 134, 11, 0.15);
}

[data-theme="dark"] .article-meta-sep {
  background: #555;
}

[data-theme="dark"] .pull-quote {
  background: rgba(184, 134, 11, 0.05) !important;
}

[data-theme="dark"] .article-body .pull-quote p,
[data-theme="dark"] .pull-quote p {
  color: #E8E8F0 !important;
}

[data-theme="dark"] .callout-block {
  background: var(--color-card-bg, #1e1e30);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .callout-block p {
  color: #B0B0C0;
}

[data-theme="dark"] .blog-hero::after {
  opacity: 0.2;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .blog-card-body {
    padding: 1.25rem;
  }

  .article-header {
    text-align: left;
  }

  .article-meta {
    justify-content: flex-start;
  }

  .article-share {
    flex-direction: column;
    align-items: flex-start;
  }
}
