/* ==========================================================================
   BLOG.CSS — MBGPLG.COM Public Blog & Nutrition Education Center
   Typography: Plus Jakarta Sans & Inter, Modern Cards, Key Takeaways Callouts,
   Nutrition Tables, Author Bio & Social Share Suites
   ========================================================================== */

:root {
  --blog-navy: #0f172a;
  --blog-navy-light: #1e293b;
  --blog-green: #059669;
  --blog-green-hover: #047857;
  --blog-green-light: #d1fae5;
  --blog-blue: #0284c7;
  --blog-blue-light: #e0f2fe;
  --blog-purple: #9333ea;
  --blog-purple-light: #f3e8ff;
  --blog-amber: #d97706;
  --blog-amber-light: #fef3c7;
  --blog-border: #e2e8f0;
  --blog-bg-light: #f8fafc;
  --blog-card-bg: #ffffff;

  --font-blog-head: 'Plus Jakarta Sans', sans-serif;
  --font-blog-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 35px rgba(15, 23, 42, 0.12);
}

/* ─── BASE STYLING ─── */
.blog-page-body {
  font-family: var(--font-blog-body);
  background: var(--blog-bg-light);
  color: #334155;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--header-h, 72px) + 2rem) 1.25rem 2.5rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   1. HERO FEATURED ARTICLE BANNER
   ══════════════════════════════════════════════════════════════════════════ */
.blog-hero-section {
  padding: 0 0 1.5rem;
}

.featured-article-card {
  background: #ffffff;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.featured-article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.featured-img-wrap {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  background: #0f172a;
}
.featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.featured-article-card:hover .featured-img-wrap img {
  transform: scale(1.04);
}
.featured-badge-pill {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: #059669;
  color: #ffffff;
  font-family: var(--font-blog-head);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

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

.article-meta-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.85rem;
}
.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
}

.featured-title {
  font-family: var(--font-blog-head);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--blog-navy);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.featured-title a:hover {
  color: var(--blog-green);
}

.featured-excerpt {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(5, 150, 105, 0.2);
}
.author-info h5 {
  font-family: var(--font-blog-head);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--blog-navy);
  margin: 0;
}
.author-info span {
  font-size: 0.72rem;
  color: #64748b;
}

/* ══════════════════════════════════════════════════════════════════════════
   2. CATEGORY PILLS & SEARCH TOOLBAR
   ══════════════════════════════════════════════════════════════════════════ */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.blog-category-pills {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: none;
}
.blog-category-pills::-webkit-scrollbar { display: none; }

.blog-pill-btn {
  background: #ffffff;
  border: 1px solid var(--blog-border);
  font-family: var(--font-blog-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.blog-pill-btn:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.blog-pill-btn.active {
  background: var(--blog-navy);
  color: #ffffff;
  border-color: var(--blog-navy);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.blog-search-box {
  position: relative;
  min-width: 260px;
}
.blog-search-input {
  width: 100%;
  font-family: var(--font-blog-body);
  font-size: 0.85rem;
  padding: 0.55rem 0.85rem 0.55rem 2.2rem;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-full);
  background: #ffffff;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
}
.blog-search-input:focus {
  border-color: var(--blog-green);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
.blog-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

/* ══════════════════════════════════════════════════════════════════════════
   3. ARTICLE GRID
   ══════════════════════════════════════════════════════════════════════════ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease;
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: #cbd5e1;
}

.article-card-thumb {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: #1e293b;
}
.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.article-card:hover .article-card-thumb img {
  transform: scale(1.05);
}

.article-category-tag {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-family: var(--font-blog-head);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.article-card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-meta {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.article-card-title {
  font-family: var(--font-blog-head);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--blog-navy);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.65rem;
}
.article-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.article-card-title a:hover {
  color: var(--blog-green);
}

.article-card-desc {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
}

.read-more-link {
  font-family: var(--font-blog-head);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--blog-green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s ease;
}
.read-more-link:hover {
  gap: 0.5rem;
  color: var(--blog-green-hover);
}

/* ══════════════════════════════════════════════════════════════════════════
   4. ARTICLE DETAIL PAGE STYLING
   ══════════════════════════════════════════════════════════════════════════ */
.article-detail-wrap {
  max-width: 820px;
  margin: 2rem auto 4rem;
  background: #ffffff;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-xl);
  padding: 3rem 3.5rem;
  box-shadow: var(--shadow-md);
}

/* Breadcrumb */
.blog-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}
.blog-breadcrumbs a {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
}
.blog-breadcrumbs a:hover { color: var(--blog-green); }

.detail-header-badge {
  display: inline-block;
  background: #d1fae5;
  color: #059669;
  font-family: var(--font-blog-head);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.detail-article-title {
  font-family: var(--font-blog-head);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--blog-navy);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.detail-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--blog-border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-hero-img-box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.25rem;
  border: 1px solid var(--blog-border);
}
.detail-hero-img-box img {
  width: 100%;
  height: auto;
  display: block;
}
.img-caption {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  padding: 0.5rem;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

/* Key Takeaways Box */
.takeaways-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #059669;
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  margin-bottom: 2.25rem;
}
.takeaways-box h4 {
  font-family: var(--font-blog-head);
  font-size: 0.98rem;
  font-weight: 800;
  color: #065f46;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.takeaways-box ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: #166534;
}
.takeaways-box li {
  margin-bottom: 0.35rem;
}

/* Article Body Typography */
.article-rich-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}
.article-rich-content h2 {
  font-family: var(--font-blog-head);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--blog-navy);
  margin: 2.25rem 0 1rem;
  letter-spacing: -0.01em;
}
.article-rich-content h3 {
  font-family: var(--font-blog-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blog-navy);
  margin: 1.75rem 0 0.75rem;
}
.article-rich-content p {
  margin-bottom: 1.35rem;
}

/* Nutrition Matrix Table */
.nutrition-table-box {
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-md);
}
.nutrition-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.nutrition-table th {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  font-weight: 800;
  font-family: var(--font-blog-head);
  color: var(--blog-navy);
  border-bottom: 1px solid var(--blog-border);
  text-align: left;
}
.nutrition-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

/* Quote Callout */
.quote-callout {
  border-left: 4px solid var(--blog-blue);
  background: #f0f9ff;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: #0369a1;
  font-size: 1.05rem;
}

/* Author Profile Card */
.author-profile-card {
  background: #f8fafc;
  border: 1px solid var(--blog-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 3rem 0 2rem;
}
.author-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  font-weight: 900;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Social Share Bar */
.social-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-top: 1px solid var(--blog-border);
  border-bottom: 1px solid var(--blog-border);
  margin-top: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.social-share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: var(--font-blog-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.btn-share-wa { background: #25d366; color: #ffffff; }
.btn-share-wa:hover { background: #1ebc59; }
.btn-share-fb { background: #1877f2; color: #ffffff; }
.btn-share-fb:hover { background: #1464cc; }
.btn-share-x  { background: #0f172a; color: #ffffff; }
.btn-share-x:hover  { background: #1e293b; }
.btn-share-copy { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.btn-share-copy:hover { background: #e2e8f0; }

/* ══════════════════════════════════════════════════════════════════════════
   5. NEWSLETTER CARD
   ══════════════════════════════════════════════════════════════════════════ */
.newsletter-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  margin-bottom: 4rem;
  box-shadow: var(--shadow-lg);
}
.newsletter-card h3 {
  font-family: var(--font-blog-head);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.newsletter-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0.5rem;
}
.newsletter-input {
  flex: 1;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  font-family: var(--font-blog-body);
  font-size: 0.85rem;
  outline: none;
}
.newsletter-input:focus {
  border-color: #10b981;
}
.btn-newsletter {
  background: #059669;
  color: #ffffff;
  font-family: var(--font-blog-head);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-newsletter:hover {
  background: #047857;
}

/* ══════════════════════════════════════════════════════════════════════════
   6. RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .featured-article-card { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .article-detail-wrap { padding: 2rem 1.5rem; }
}

@media (max-width: 640px) {
  .blog-container { padding: calc(var(--header-h, 60px) + 1.25rem) 1rem 2rem; }
  .article-grid { grid-template-columns: 1fr; }
  .blog-toolbar { flex-direction: column; align-items: stretch; }
  .blog-search-box { min-width: 100%; }
  .featured-title { font-size: 1.35rem; }
  .detail-article-title { font-size: 1.65rem; }
  .newsletter-form { flex-direction: column; }
  .article-bottom-cta-box { flex-direction: column; align-items: stretch; }
  .article-top-nav-bar { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════════════════════
   7. BACK CTA BUTTONS (TOP & BOTTOM)
   ══════════════════════════════════════════════════════════════════════════ */
.article-top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-blog-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-full);
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  color: #0A2540;
  font-family: var(--font-blog-head);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.btn-blog-back-pill:hover {
  background: #0A2540;
  color: #FFFFFF;
  border-color: #0A2540;
  transform: translateX(-3px);
  box-shadow: 0 4px 10px rgba(10, 37, 64, 0.15);
}

.article-bottom-cta-box {
  margin: 3rem 0 2rem;
  padding: 1.5rem 1.75rem;
  background: #F8FAFC;
  border-radius: var(--radius-lg);
  border: 1.5px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-blog-back-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  background: #0A2540;
  color: #FFFFFF;
  font-family: var(--font-blog-head);
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.12);
}
.btn-blog-back-cta:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.25);
}

.btn-blog-all-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.72rem 1.35rem;
  border-radius: 10px;
  background: #FFFFFF;
  color: #059669;
  border: 1.5px solid #059669;
  font-family: var(--font-blog-head);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-blog-all-cta:hover {
  background: #ECFDF5;
  transform: translateY(-2px);
}

.cta-note {
  font-size: 0.82rem;
  color: #64748B;
  font-weight: 600;
}
