/* ==========================================================================
   NAGDEV PRODUCTS — BLOG & EDITORIAL DESIGN SYSTEM
   Matches: Cormorant Garamond headings, Inter body, Forest & Gold palette
   ========================================================================== */

/* ── Container Utilities ─────────────────────────────────────────────────── */
.container-narrow {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md, 1.25rem);
  padding-right: var(--space-md, 1.25rem);
}

.container-mid {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md, 1.25rem);
  padding-right: var(--space-md, 1.25rem);
}

/* ── Blog Hero Section (blog.html) ───────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, var(--forest, #0B3D1E) 0%, var(--forest-mid, #0F4A24) 100%);
  color: var(--warm-white, #FDFAF5);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(212, 165, 55, 0.25);
}

.blog-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(184, 132, 26, 0.18) 0%, rgba(11, 61, 30, 0) 70%);
  pointer-events: none;
}

.blog-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-light, #D4A537);
  font-weight: 600;
  margin-bottom: 1rem;
}

.blog-hero-title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 1.25rem;
  max-width: 800px;
}

.blog-hero-sub {
  font-size: 1.125rem;
  color: #D4E0D8;
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

/* Search and Filter Controls */
.blog-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.blog-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.blog-search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.blog-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.blog-search-box input:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--gold-light, #D4A537);
  box-shadow: 0 0 0 3px rgba(212, 165, 55, 0.2);
}

.blog-search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-filter-btn {
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #E2ECE5;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.2s ease;
}

.blog-filter-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.blog-filter-btn.active {
  background: var(--gold, #B8841A);
  color: #fff;
  border-color: var(--gold-light, #D4A537);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(184, 132, 26, 0.35);
}

/* ── Featured Post Card ──────────────────────────────────────────────────── */
.featured-post-section {
  padding: 3.5rem 0 2rem;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-light, #EDE8DF);
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,0.12));
}

.featured-media {
  position: relative;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--ivory-dark, #EDE7D9);
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-card:hover .featured-media img {
  transform: scale(1.04);
}

.featured-content {
  padding: 2.5rem 2.5rem 2.5rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest, #0B3D1E);
  background: var(--forest-subtle, #EBF2ED);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.featured-title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(1.75rem, 2.5vw, 2.35rem);
  font-weight: 600;
  color: var(--charcoal, #1A1A1A);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.featured-excerpt {
  font-size: 1rem;
  color: var(--text-body, #2C2C2C);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted, #888888);
  margin-bottom: 1.5rem;
}

/* ── Blog Card Grid ──────────────────────────────────────────────────────── */
.blog-grid-section {
  padding: 2rem 0 5rem;
}

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

.blog-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border-light, #EDE8DF);
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,0.06));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
}

.blog-card-media {
  position: relative;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--ivory-dark, #EDE7D9);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.05);
}

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

.blog-card-category {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest, #0B3D1E);
  margin-bottom: 0.6rem;
}

.blog-card-title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--charcoal, #1A1A1A);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 0.925rem;
  color: var(--text-mid, #555555);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light, #EDE8DF);
  padding-top: 1rem;
  font-size: 0.825rem;
  color: var(--text-muted, #888888);
}

.blog-read-link {
  color: var(--forest, #0B3D1E);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s ease;
}

.blog-card:hover .blog-read-link {
  color: var(--gold, #B8841A);
}

/* ── Single Article Styles (blog/*.html & blog-post.html) ─────────────────── */
.blog-article {
  padding-bottom: 5rem;
}

.blog-article-header {
  padding: 3.5rem 0 2rem;
  text-align: left;
}

.breadcrumb-nav {
  font-size: 0.85rem;
  color: var(--text-muted, #888888);
  margin-bottom: 1.25rem;
}

.breadcrumb-nav a {
  color: var(--forest, #0B3D1E);
  font-weight: 500;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

.blog-category-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--forest-subtle, #EBF2ED);
  color: var(--forest, #0B3D1E);
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.blog-article-title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--charcoal, #1A1A1A);
  margin-bottom: 1.5rem;
}

.blog-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-mid, #555555);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light, #EDE8DF);
}

.blog-meta-bar .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.blog-hero-figure {
  margin: 1.5rem 0 3rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
  aspect-ratio: 1200 / 630;
  background: #000;
}

.blog-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Article Typography */
.blog-content-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-body, #2C2C2C);
}

.blog-content-body p {
  margin-bottom: 1.6rem;
}

.blog-content-body p.lead-paragraph {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #111;
  font-weight: 400;
  padding-bottom: 0.5rem;
}

.blog-content-body h2 {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--forest, #0B3D1E);
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--gold-pale, #F5E8CC);
}

.blog-content-body h3 {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--charcoal, #1A1A1A);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-content-body ul, 
.blog-content-body ol {
  margin-bottom: 1.6rem;
  padding-left: 1.5rem;
}

.blog-content-body li {
  margin-bottom: 0.6rem;
  list-style: disc;
}

.blog-content-body ol li {
  list-style: decimal;
}

.blog-content-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  border-left: 4px solid var(--gold, #B8841A);
  background: var(--ivory, #F4EFE4);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--charcoal-soft, #3A3A3A);
}

/* Data Tables inside blog posts */
.blog-data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,0.06));
  border: 1px solid var(--border-light, #EDE8DF);
}

.blog-data-table th {
  background: var(--forest, #0B3D1E);
  color: #ffffff;
  text-align: left;
  padding: 0.9rem 1.15rem;
  font-weight: 600;
}

.blog-data-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-light, #EDE8DF);
  color: var(--text-body, #2C2C2C);
}

.blog-data-table tr:nth-child(even) td {
  background: var(--ivory, #F4EFE4);
}

/* Tags Wrapper */
.blog-tags-wrapper {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light, #EDE8DF);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tags-label {
  font-weight: 600;
  color: var(--text-mid, #555555);
  font-size: 0.875rem;
}

.blog-tag-pill {
  font-size: 0.8rem;
  background: var(--ivory, #F4EFE4);
  color: var(--forest, #0B3D1E);
  border: 1px solid var(--border, #E0D9CE);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

/* Formulator CTA Box */
.blog-cta-box {
  margin-top: 3.5rem;
  background: linear-gradient(135deg, var(--forest, #0B3D1E) 0%, var(--forest-mid, #0F4A24) 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
}

.blog-cta-box h3 {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.85rem;
  color: var(--gold-light, #D4A537);
  margin-bottom: 0.75rem;
}

.blog-cta-box p {
  color: #D4E0D8;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 650px;
}

.blog-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Related Website Link Card (Bottom CTA) ────────────────────────────── */
.blog-related-link-card {
  margin-top: 3rem;
  background: #ffffff;
  border-radius: 12px;
  border: 2px solid var(--gold, #B8841A);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,0.06));
}

.related-link-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest, #0B3D1E);
  margin-bottom: 0.35rem;
}

.related-link-title {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--charcoal, #1A1A1A);
  margin: 0 0 0.25rem;
}

.related-link-text {
  font-size: 0.925rem;
  color: var(--text-mid, #555555);
  margin: 0;
}

.related-link-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Responsive Rules ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-content {
    padding: 1.5rem;
  }
  .blog-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-search-box {
    max-width: 100%;
  }
  .blog-related-link-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .related-link-btn {
    width: 100%;
    justify-content: center;
  }
}
