/* ==========================================================================
   blog.css — Novu AI Blog Styles
   Covers: blog index page + individual article pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   BLOG HERO
   -------------------------------------------------------------------------- */
.blog-hero {
  padding: clamp(120px, 18vw, 180px) 0 clamp(48px, 7vw, 80px);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201,168,76,.07) 0%, transparent 65%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.blog-hero-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
  margin: 0.5rem 0 1rem;
  letter-spacing: -0.02em;
}

.blog-hero-title em {
  font-style: italic;
  background: linear-gradient(135deg, #c9a84c, #f0d080 50%, #b8860b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero-desc {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   BLOG GRID (index page)
   -------------------------------------------------------------------------- */
.blog-grid-section {
  padding-block: clamp(56px, 9vw, 112px);
}

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

/* --------------------------------------------------------------------------
   BLOG CARD
   -------------------------------------------------------------------------- */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.28s ease, box-shadow 0.28s ease, transform 0.28s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c9a84c, #f0d080, #b8860b);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.blog-card:hover {
  border-color: rgba(201,168,76,.3);
  box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 0 0 1px rgba(201,168,76,.1);
  transform: translateY(-4px);
}

.blog-card:hover::before { opacity: 1; }

.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, rgba(201,168,76,.08), rgba(201,168,76,.03));
}

/* Placeholder when no image */
.blog-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(201,168,76,.1) 0%, rgba(201,168,76,.03) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(201,168,76,.4);
  font-size: 2.5rem;
}

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

.blog-card-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a84c;
}

.blog-card-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.blog-card-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

.blog-card-read-more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #c9a84c;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s ease;
}

.blog-card:hover .blog-card-read-more { gap: 0.5rem; }

/* --------------------------------------------------------------------------
   ARTICLE PAGE
   -------------------------------------------------------------------------- */
.article-hero {
  padding: clamp(120px, 18vw, 180px) 0 clamp(40px, 6vw, 64px);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201,168,76,.07) 0%, transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.article-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.article-back:hover { color: #c9a84c; }

.article-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 0.75rem;
}

.article-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}

/* --------------------------------------------------------------------------
   ARTICLE BODY
   -------------------------------------------------------------------------- */
.article-body-section {
  padding-block: clamp(48px, 7vw, 96px);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.article-content {
  min-width: 0;
}

/* Article typography */
.article-content h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 400;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.article-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.75rem 0 0.5rem;
}

.article-content p {
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

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

.article-content ul,
.article-content ol {
  margin: 0 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-content li {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-muted);
  padding-left: 0.5rem;
}

.article-content ul li::marker {
  color: #c9a84c;
}

/* Pull quote / callout */
.article-content blockquote {
  border-left: 3px solid #c9a84c;
  padding: 0.75rem 1.25rem;
  margin: 1.75rem 0;
  background: rgba(201,168,76,.06);
  border-radius: 0 10px 10px 0;
}

.article-content blockquote p {
  color: var(--text);
  font-style: italic;
  margin: 0;
}

/* CTA block inside article */
.article-cta-block {
  background: var(--surface);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 14px;
  padding: 1.75rem;
  margin: 2.5rem 0;
  text-align: center;
}

.article-cta-block p {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   ARTICLE SIDEBAR
   -------------------------------------------------------------------------- */
.article-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.sidebar-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 1rem;
}

.sidebar-toc {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-toc a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  display: block;
  transition: color 0.2s, background 0.2s;
  line-height: 1.4;
}

.sidebar-toc a:hover {
  color: #c9a84c;
  background: rgba(201,168,76,.08);
}

.sidebar-related-post {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.sidebar-related-post:last-child { border-bottom: none; }

.sidebar-related-title {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.35;
  transition: color 0.2s;
}

.sidebar-related-post:hover .sidebar-related-title { color: #c9a84c; }

.sidebar-related-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   BLOG CTA SECTION
   -------------------------------------------------------------------------- */
.blog-cta-section {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--border);
}

.blog-cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.blog-cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 110%, rgba(201,168,76,.08), transparent 70%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   LIGHT MODE
   -------------------------------------------------------------------------- */
[data-theme='light'] .blog-card-category,
[data-theme='light'] .article-category,
[data-theme='light'] .sidebar-card-title,
[data-theme='light'] .blog-card-read-more {
  color: #966b00;
}

[data-theme='light'] .blog-card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,.1), 0 0 0 1px rgba(180,135,11,.15);
}

[data-theme='light'] .blog-hero-title em,
[data-theme='light'] .article-content ul li::marker {
  color: #966b00;
}

[data-theme='light'] .article-content blockquote {
  border-color: #966b00;
  background: rgba(180,135,11,.05);
}

[data-theme='light'] .article-cta-block {
  border-color: rgba(180,135,11,.2);
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
}

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

/* --------------------------------------------------------------------------
   MOBILE MENU (blog page uses #mobile-menu-blog)
   -------------------------------------------------------------------------- */
#mobile-menu-blog {
  display: none;
  padding: var(--space-6, 1.5rem) var(--space-5, 1.25rem);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
#mobile-menu-blog[aria-hidden='false'] { display: block; }
#mobile-menu-blog ul { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
#mobile-menu-blog a {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0;
  transition: color 0.2s ease;
  text-decoration: none;
}
#mobile-menu-blog a:hover { color: var(--text); }
#mobile-menu-blog .btn { margin-top: 1rem; }
