/* ExamRankers blog: list (/blog) and article (/blog/<slug>) pages.
   Uses the theme tokens from style.css (--navy, --blue, --cyan, ...). */

/* ---------- hero ---------- */
.blog-hero {
  background: linear-gradient(120deg, #060d2e 0%, #0b1437 55%, #0e1f5b 100%);
  position: relative; overflow: hidden; color: #fff;
  padding: 64px 0 36px;
}
.blog-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 80% 20%, rgba(26,86,219,.35) 0%, transparent 55%);
}
.blog-hero > .container { position: relative; }
.blog-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; margin: 14px 0 12px; }
.blog-hero .lead-text { color: rgba(255,255,255,.72); font-size: 1.05rem; max-width: 620px; margin: 0 auto; }
.blog-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.4); margin: 0; font-family: inherit; font-size: .85rem; }
.blog-hero .breadcrumb * { font-family: inherit; }
.blog-hero .breadcrumb a { color: rgba(255,255,255,.7); text-decoration: none; }
.blog-hero .breadcrumb a:hover { color: #fff; }
.blog-hero .breadcrumb .active { color: rgba(255,255,255,.45); }

/* category chips */
.blog-cats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.blog-cat {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px; font-size: .85rem; font-weight: 500;
  color: rgba(255,255,255,.85); background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14); text-decoration: none; transition: .15s;
}
.blog-cat:hover { background: rgba(255,255,255,.14); color: #fff; }
.blog-cat.active { background: #fff; color: var(--navy); border-color: #fff; }
.blog-cat .count {
  font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.14);
}
.blog-cat.active .count { background: var(--light); color: var(--blue); }

/* ---------- covers (posts have no image yet: branded gradient + icon) ---------- */
.post-cover {
  position: relative; display: flex; align-items: flex-end;
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  padding: 16px; color: #fff; isolation: isolate;
}
.post-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.post-cover .cover-icon {
  position: absolute; right: -10px; top: -14px; font-size: 7rem; opacity: .16; line-height: 1;
}
.post-cover .cover-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,.18); backdrop-filter: blur(4px);
  padding: 4px 10px; border-radius: 999px;
}
.cover-0 { background: linear-gradient(135deg, #1a56db, #0b1437); }
.cover-1 { background: linear-gradient(135deg, #0891b2, #0b1437); }
.cover-2 { background: linear-gradient(135deg, #7c3aed, #1e0a4f); }
.cover-3 { background: linear-gradient(135deg, #16a34a, #0b3b2e); }
.cover-4 { background: linear-gradient(135deg, #ea580c, #4a1d0b); }
.cover-5 { background: linear-gradient(135deg, #db2777, #3b0a2a); }

/* ---------- cards ---------- */
.post-card {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 12px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(11,20,55,.1); border-color: #cbd5e1; }
.post-card .post-body { padding: 16px 6px 6px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }
.post-cat-badge {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--blue); background: var(--light); padding: 3px 10px; border-radius: 999px; text-decoration: none;
}
.post-card h2, .post-card h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.35; margin: 10px 0 8px; }
.post-card h2 a, .post-card h3 a { color: var(--text); text-decoration: none; }
/* whole card is clickable via the title link */
.post-card h2 a::after, .post-card h3 a::after { content: ''; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card .post-summary {
  color: var(--muted); font-size: .92rem; line-height: 1.6; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .read-more { margin-top: auto; font-size: .88rem; font-weight: 500; color: var(--blue); }
.post-card:hover .read-more i { transform: translateX(3px); }
.post-card .read-more i { display: inline-block; transition: transform .2s; }

/* featured (first post on page 1) */
.post-featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; padding: 14px; align-items: center; }
.post-featured .post-cover { aspect-ratio: auto; height: 100%; min-height: 300px; }
.post-featured .post-body { padding: 10px 14px 10px 0; }
.post-featured h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.post-featured .post-summary { -webkit-line-clamp: 4; font-size: 1rem; }
.featured-tag { font-size: .75rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 767.98px) {
  .post-featured { grid-template-columns: 1fr; gap: 0; }
  .post-featured .post-cover { min-height: 200px; }
  .post-featured .post-body { padding: 16px 6px 6px; }
}

/* ---------- pagination ---------- */
.blog-pagination .page-link { border-radius: 10px !important; margin: 0 3px; border: 1px solid var(--border); color: var(--text); min-width: 42px; text-align: center; }
.blog-pagination .page-item.active .page-link { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- empty state ---------- */
.blog-empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--border); border-radius: 16px; color: var(--muted); }
.blog-empty i { font-size: 2.6rem; color: #cbd5e1; }

/* ---------- CTA band ---------- */
.blog-cta { background: var(--light); border-radius: 20px; padding: 36px; }
.blog-cta h2 { font-weight: 800; font-size: 1.6rem; color: var(--navy); }
.blog-cta .form-control { border-radius: 10px; }

/* ---------- article ---------- */
.article-hero { padding: 48px 0 76px; }
.article-hero h1 { max-width: 820px; margin-left: auto; margin-right: auto; }
.article-hero .post-meta { justify-content: center; color: rgba(255,255,255,.65); }
.article-hero .post-meta .dot { background: rgba(255,255,255,.35); }
.article-hero .post-cat-badge { background: rgba(6,182,212,.15); color: var(--cyan); border: 1px solid rgba(6,182,212,.3); }

.article-wrap { max-width: 760px; margin: 0 auto; }
.article-cover { margin-top: -48px; position: relative; }
.article-cover .post-cover { aspect-ratio: 21 / 8; border-radius: 18px; box-shadow: 0 18px 40px rgba(11,20,55,.18); }
.article-body { font-size: 1.08rem; line-height: 1.8; color: #334155; }
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin-bottom: 1.25rem; }
.article-body h2 { font-size: 1.55rem; font-weight: 800; color: var(--navy); margin: 2.2rem 0 .9rem; }
.article-body h3 { font-size: 1.25rem; font-weight: 700; color: var(--navy); margin: 1.8rem 0 .7rem; }
.article-body a { color: var(--blue); text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.3rem; margin-bottom: 1.25rem; }
.article-body li { margin-bottom: .4rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; }
.article-body blockquote { border-left: 4px solid var(--blue); background: var(--light); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--navy); margin: 1.5rem 0; }
.article-body table { width: 100%; margin-bottom: 1.25rem; border-collapse: collapse; font-size: .95rem; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 8px 12px; }
.article-body pre, .article-body code { background: #0f172a; color: #e2e8f0; border-radius: 8px; font-size: .88rem; }
.article-body code { padding: 2px 6px; }
.article-body pre { padding: 14px; overflow-x: auto; }

.article-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.article-share .label { font-size: .85rem; font-weight: 500; color: var(--muted); margin-right: 4px; }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--text); background: #fff; text-decoration: none; transition: .15s;
}
.share-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.article-cta {
  background: linear-gradient(120deg, #0b1437, #0e1f5b); color: #fff;
  border-radius: 18px; padding: 30px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.article-cta h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
.article-cta p { color: rgba(255,255,255,.7); margin: 0; }
