/* ===================================
   MANNAE BLOG — Korean Age Guide
   Uses Bootstrap 5 base + mannae.css vars
   =================================== */

/* ---- Featured Image ---- */
.blog-featured-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.blog-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.blog-featured-image:hover img {
  transform: scale(1.01);
}

/* ---- Layout ---- */
.blog-wrapper {
  background: #f8f9fb;
  min-height: 100vh;
}

/* ---- Article Header ---- */
.blog-article-header {
  border-bottom: none;
}

.blog-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.3;
  color: #1a1a2e;
  letter-spacing: -0.02em;
}

.blog-subtitle {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.7;
}

.blog-meta {
  color: #666;
}

.blog-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e7ff;
}

.blog-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e7ff;
  flex-shrink: 0;
}

/* ---- Badges ---- */
.bg-primary-soft { background-color: #e0e7ff; }
.text-primary-custom { color: #4f46e5; font-weight: 600; }
.bg-secondary-soft { background-color: #f1f5f9; }
.text-secondary-custom { color: #64748b; font-weight: 500; }

/* ---- Dividers ---- */
.blog-divider {
  border: none;
  border-top: 2px solid #e2e8f0;
  margin: 2rem 0;
}

.blog-divider-light {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 2.5rem 0;
}

/* ---- Headings ---- */
.blog-h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 1rem;
  margin-top: 0;
  scroll-margin-top: 80px;
}

.blog-h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.75rem;
  scroll-margin-top: 80px;
}

/* ---- Body text ---- */
.blog-wrapper p {
  color: #374151;
  line-height: 1.85;
  margin-bottom: 1.1rem;
}

/* ---- Expert / Author box ---- */
.expert-box {
  background: #f0f4ff;
  border-left: 4px solid #4f46e5;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
}

.expert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ---- TOC ---- */
.toc-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.toc-title {
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.toc-list {
  margin: 0;
  padding-left: 1.25rem;
}

.toc-list li {
  margin-bottom: 0.4rem;
}

.toc-list a {
  color: #4f46e5;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color .15s;
}

.toc-list a:hover { color: #7c3aed; text-decoration: underline; }

/* ---- Formula box ---- */
.formula-box {
  background: #1e293b;
  border-radius: 8px;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.formula-label {
  background: #4f46e5;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}

.formula-box code {
  color: #a5f3fc;
  font-size: 0.9rem;
  background: none;
  padding: 0;
}

/* ---- Tables ---- */
.blog-table-wrap {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid #e2e8f0;
  margin: 1rem 0;
}

.blog-table-wrap .table {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.blog-table-wrap .table thead th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 0.85rem 1rem;
}

.blog-table-wrap .table tbody td {
  padding: 0.8rem 1rem;
  vertical-align: middle;
  color: #374151;
}

.blog-table-wrap .table-hover tbody tr:hover td {
  background-color: #f0f4ff;
}

.text-success-custom { color: #059669; font-weight: 700; }

/* ---- Key insight box ---- */
.key-insight-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: #1e40af;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---- Warning box ---- */
.warning-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: #92400e;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---- CTA Grid ---- */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.cta-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  text-decoration: none;
  transition: box-shadow .2s, border-color .2s, transform .15s;
}

.cta-card:hover {
  box-shadow: 0 4px 16px rgba(79,70,229,.12);
  border-color: #a5b4fc;
  transform: translateY(-2px);
}

.cta-icon { font-size: 1.6rem; flex-shrink: 0; }

.cta-title {
  font-weight: 700;
  color: #1a1a2e;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.cta-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

/* ---- Accordion ---- */
.blog-accordion .accordion-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px !important;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.blog-accordion .accordion-button {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a2e;
  background: #fff;
  padding: 1rem 1.25rem;
}

.blog-accordion .accordion-button:not(.collapsed) {
  background: #f0f4ff;
  color: #4f46e5;
  box-shadow: none;
}

.blog-accordion .accordion-button:focus { box-shadow: none; }

.blog-accordion .accordion-body {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.75;
  padding: 1rem 1.25rem;
  background: #fafafa;
}

/* ---- Links ---- */
.blog-link {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}

.blog-link:hover { color: #7c3aed; }

/* ---- References ---- */
.references-section {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid #e9ecef;
}

.references-list {
  color: #555;
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
}

.references-list li { margin-bottom: 0.4rem; }

/* ---- Author bottom box ---- */
.author-box-bottom {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

/* ---- Bottom CTA buttons ---- */
.btn-primary-custom {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity .2s, transform .15s;
}

.btn-primary-custom:hover {
  opacity: .9;
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline-custom {
  border: 1.5px solid #4f46e5;
  color: #4f46e5;
  border-radius: 8px;
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  background: transparent;
  transition: background .2s, color .2s;
}

.btn-outline-custom:hover {
  background: #f0f4ff;
  color: #4f46e5;
}

/* ---- Misc ---- */
.text-dark-custom { color: #1a1a2e; }
.text-muted-custom { color: #64748b; }

/* ---- Responsive ---- */
@media (max-width: 576px) {
  .cta-grid { grid-template-columns: 1fr; }
  .blog-title { font-size: 1.4rem; }
  .formula-box { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .author-box-bottom { flex-direction: column; }
}
