/* ============================================================
   EduTrack — Blog / Articles pages
   Shared header/footer come from landing.css (flat brand system)
   Brand: Navy #0B2E5C + Bright Blue #1E6FE0 (flat only)
   ============================================================ */

.blog-main {
  min-height: 60vh;
  background: var(--bg, #F8FAFC);
}

/* ---------- Blog hero ---------- */
.blog-hero {
  background: var(--navy, #0B2E5C);
  color: var(--white, #fff);
  padding: 5rem 0 4rem;
  text-align: center;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #dbe7ff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}

.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 900;
  margin: 0 0 0.8rem;
}

.blog-hero-lead {
  max-width: 720px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.9;
}

.blog-search {
  display: flex;
  gap: 0.5rem;
  max-width: 640px;
  margin: 0 auto;
  background: var(--white, #fff);
  border-radius: 16px;
  padding: 0.4rem;
  box-shadow: 0 18px 40px rgba(11, 46, 92, 0.35);
}

.blog-search i {
  align-self: center;
  color: var(--muted, #64748B);
  font-size: 1.1rem;
  padding-inline-start: 0.9rem;
}

.blog-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink, #475569);
  font-family: inherit;
  font-size: 0.98rem;
  padding: 0.75rem 0.6rem;
}

.blog-search .btn {
  border-radius: 12px;
  white-space: nowrap;
}

/* ---------- Blog section / grid ---------- */
.blog-section {
  padding: 4.5rem 0;
}

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

.blog-card {
  border-radius: 18px;
  background: var(--white, #fff);
  border: 1px solid var(--line, #E2E8F0);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(11, 46, 92, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(11, 46, 92, 0.12);
  border-color: var(--blue, #1E6FE0);
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.blog-card-thumb {
  position: relative;
  height: 148px;
  background: var(--navy, #0B2E5C);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
}

.blog-card-thumb i {
  font-size: 2.6rem;
}

.blog-card-cat {
  position: absolute;
  top: 1rem;
  inset-inline-start: 1rem;
  background: var(--white, #fff);
  color: var(--navy, #0B2E5C);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

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

.blog-card-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted, #64748B);
  font-size: 0.8rem;
  font-weight: 700;
}

.blog-card-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }

.blog-card-body h2 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--navy, #0B2E5C);
  line-height: 1.6;
  margin: 0;
}

.blog-card-body h2:hover { color: var(--blue, #1E6FE0); }

.blog-card-body p {
  color: var(--ink, #475569);
  font-size: 0.92rem;
  line-height: 1.9;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-more {
  margin-top: auto;
  padding-top: 0.4rem;
  color: var(--blue, #1E6FE0);
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------- Empty state ---------- */
.blog-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted, #64748B);
}

.blog-empty i { font-size: 3rem; opacity: 0.5; }
.blog-empty h3 { color: var(--navy, #0B2E5C); font-weight: 900; margin: 1rem 0 0.4rem; }

/* ---------- Pagination (bootstrap-5 pills) ---------- */
.blog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.blog-pagination .pagination { gap: 0.35rem; }

.blog-pagination .page-link {
  border: 1px solid var(--line, #E2E8F0);
  color: var(--navy, #0B2E5C);
  font-weight: 700;
  border-radius: 10px !important;
  padding: 0.5rem 0.85rem;
  min-width: 42px;
  text-align: center;
}

.blog-pagination .page-item.active .page-link {
  background: var(--blue, #1E6FE0);
  border-color: var(--blue, #1E6FE0);
  color: #fff;
}

/* ---------- CTA band ---------- */
.blog-cta {
  background: var(--navy-soft, #EAF0F8);
  text-align: center;
  padding: 4.5rem 0;
}

.blog-cta h2 {
  color: var(--navy, #0B2E5C);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 0.6rem;
}

.blog-cta p {
  color: var(--muted, #64748B);
  max-width: 640px;
  margin: 0 auto 1.6rem;
}

/* ---------- Article post ---------- */
.article-post {
  padding: 3rem 0 4.5rem;
  background: var(--white, #fff);
}

.container-narrow { max-width: 820px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted, #64748B);
  margin-bottom: 2rem;
}

.breadcrumb a { color: var(--muted, #64748B); text-decoration: none; font-weight: 700; }
.breadcrumb a:hover { color: var(--blue, #1E6FE0); }
.breadcrumb i { font-size: 0.7rem; opacity: 0.6; }
.breadcrumb span { color: var(--navy, #0B2E5C); font-weight: 800; }

.article-cat {
  display: inline-block;
  background: var(--blue-soft, #EAF2FD);
  color: var(--blue, #1E6FE0);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.article-head h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--navy, #0B2E5C);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.article-lead {
  font-size: 1.1rem;
  color: var(--muted, #64748B);
  line-height: 2;
  margin: 0 0 1.6rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line, #E2E8F0);
}

.article-author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy, #0B2E5C);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.article-meta div { display: flex; flex-direction: column; }
.article-meta strong { color: var(--navy, #0B2E5C); font-weight: 900; font-size: 0.92rem; }
.article-meta div span { color: var(--muted, #64748B); font-size: 0.82rem; }

.article-body {
  padding: 2rem 0 1rem;
  color: var(--ink, #475569);
  font-size: 1.05rem;
  line-height: 2.1;
}

.article-body p { margin: 0 0 1.4rem; }
.article-body h2 {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--navy, #0B2E5C);
  margin: 2.2rem 0 1rem;
  padding-inline-start: 0.9rem;
  border-inline-start: 4px solid var(--blue, #1E6FE0);
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--navy, #0B2E5C);
  margin: 1.8rem 0 0.8rem;
}

.article-body ul, .article-body ol {
  margin: 0 0 1.4rem;
  padding-inline-start: 1.6rem;
}

.article-body li { margin-bottom: 0.5rem; }
.article-body li::marker { color: var(--blue, #1E6FE0); font-weight: 900; }
.article-body strong { color: var(--navy, #0B2E5C); font-weight: 900; }

.article-body a {
  color: var(--blue, #1E6FE0);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Article footer ---------- */
.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0 0.4rem;
  border-top: 1px solid var(--line, #E2E8F0);
  font-size: 0.9rem;
}

.article-tags, .article-share { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted, #64748B); font-weight: 700; }

.article-tag {
  background: var(--navy-soft, #EAF0F8);
  color: var(--navy, #0B2E5C);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.article-share a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line, #E2E8F0);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy, #0B2E5C);
  text-decoration: none;
  transition: all 0.25s ease;
}

.article-share a:hover { background: var(--blue, #1E6FE0); border-color: var(--blue, #1E6FE0); color: #fff; }

/* ---------- Related ---------- */
.blog-related { background: var(--bg, #F8FAFC); }

@media (max-width: 640px) {
  .blog-hero { padding: 3.5rem 0 3rem; }
  .blog-search { flex-direction: column; padding: 0.6rem; }
  .blog-search i { display: none; }
  .blog-search .btn { width: 100%; }
  .article-footer { flex-direction: column; align-items: flex-start; }
}
