/* ============================================================
   KRISHNARAJ ENTERPRISES — BLOG (blog.css)
   Loaded only by pages under /blog/. Uses the tokens already
   defined in ke.css so the blog reads as part of the site.
   ============================================================ */

/* ---- Blog hero: deliberately shorter than a page hero ------- */
.blog-hero {
  position: relative;
  background-color: var(--navy-deep);
  padding: var(--section-pad-lg) 0 var(--section-pad-md);
  overflow: hidden;
}
.blog-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(3,26,54,0) 0%, rgba(243,106,33,.07) 100%);
  pointer-events: none;
}
.blog-hero__inner { position: relative; z-index: 2; max-width: 720px; }
.blog-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--orange);
  border: 1px solid rgba(243,106,33,.35);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.blog-hero__title {
  color: #fff; font-size: clamp(1.9rem, 2.4vw + .9rem, 2.85rem);
  line-height: 1.12; letter-spacing: -.02em; margin-bottom: 14px;
}
.blog-hero__desc {
  color: rgba(255,255,255,.82); font-size: 1.0125rem;
  line-height: 1.65; max-width: 620px;
}

/* ---- Category filter row ------------------------------------ */
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.blog-cat {
  font-size: .8125rem; font-weight: 600; color: var(--text-body);
  padding: 7px 14px; border: 1px solid var(--border-color);
  border-radius: 999px; background: var(--white);
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}
.blog-cat:hover { color: var(--navy); border-color: var(--navy); }
.blog-cat.is-active { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }

/* ---- Card grid ---------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.blog-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--cool-grey); }
/* display:flex above would otherwise beat the UA [hidden] rule, so a filtered-out
   card would keep its box while reporting hidden === true. */
.blog-card[hidden] { display: none !important; }
.blog-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--light-grey); overflow: hidden; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-smooth); }
.blog-card:hover .blog-card__media img { transform: scale(1.04); }
.blog-card__tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: rgba(3,26,54,.86); padding: 5px 10px; border-radius: var(--radius-xs);
}
.blog-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.blog-card__title { font-size: 1.0625rem; line-height: 1.35; color: var(--navy-deep); margin-bottom: 8px; }
.blog-card:hover .blog-card__title { color: var(--navy); }
.blog-card__excerpt { font-size: .9rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 14px; flex: 1; }
.blog-card__meta {
  font-size: .75rem; color: var(--text-muted); letter-spacing: .04em;
  display: flex; align-items: center; gap: 8px; margin-top: auto;
}
.blog-card__more { font-size: .8125rem; font-weight: 700; color: var(--orange-strong); margin-top: 12px; }

/* Featured card takes a full row (image beside text), so the other cards
   always fill complete rows below it */
.blog-card--featured { grid-column: 1 / -1; flex-direction: row; }
.blog-card--featured .blog-card__media { flex: 0 0 58%; aspect-ratio: 16 / 9; }
.blog-card--featured .blog-card__body { justify-content: center; padding: 32px 36px; }
.blog-card--featured .blog-card__title { font-size: 1.35rem; }
.blog-card--featured .blog-card__excerpt { font-size: .95rem; flex: 0 0 auto; }

/* ---- Article layout ----------------------------------------- */
.article-head { background: var(--off-white); border-bottom: 1px solid var(--border-light); padding: var(--section-pad-md) 0; }
.article-head__inner { max-width: 760px; }
.article-crumbs { font-size: .8125rem; color: var(--text-muted); margin-bottom: 14px; }
.article-crumbs a { color: var(--text-muted); }
.article-crumbs a:hover { color: var(--navy); }
.article-tag {
  display: inline-block; font-size: .6875rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--orange-strong); background: var(--orange-subtle);
  padding: 5px 11px; border-radius: var(--radius-xs); margin-bottom: 14px;
}
.article-title {
  font-size: clamp(1.75rem, 2.2vw + .9rem, 2.5rem);
  line-height: 1.16; letter-spacing: -.02em; color: var(--navy-deep); margin-bottom: 14px;
}
.article-standfirst { font-size: 1.075rem; line-height: 1.65; color: var(--text-body); margin-bottom: 18px; }
.article-meta {
  font-size: .8125rem; color: var(--text-muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 14px; border-top: 1px solid var(--border-color);
}
.article-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-light); }

.article-body { max-width: 760px; }
.article-body > * + * { margin-top: 1.05em; }
.article-body h2 {
  font-size: clamp(1.3rem, .9vw + 1.05rem, 1.65rem);
  color: var(--navy-deep); line-height: 1.25;
  margin-top: 2em; margin-bottom: .1em; scroll-margin-top: 110px;
}
.article-body h3 {
  font-size: 1.0625rem; color: var(--navy-deep); font-weight: 700;
  margin-top: 1.5em; margin-bottom: .1em;
}
.article-body p { font-size: 1rem; line-height: 1.75; color: var(--text-body); }
.article-body ul, .article-body ol { padding-left: 20px; }
.article-body li {
  position: relative; font-size: 1rem; line-height: 1.7;
  color: var(--text-body); margin-bottom: 8px; padding-left: 16px; list-style: none;
}
.article-body li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--orange);
}
.article-body ol { counter-reset: n; }
.article-body ol li { counter-increment: n; }
.article-body ol li::before {
  content: counter(n); top: 0; width: auto; height: auto; border-radius: 0;
  background: none; color: var(--orange); font-weight: 700; font-size: .875rem;
}
.article-body a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--orange); }
.article-body strong { color: var(--text-dark); font-weight: 600; }

.article-figure { margin-top: 1.6em; }
.article-figure img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border-light); }
.article-figure figcaption { font-size: .8125rem; color: var(--text-muted); margin-top: 8px; }

/* Pull-out note for practical takeaways */
.article-note {
  background: var(--steel-bg);
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  margin-top: 1.6em;
}
.article-note__title {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 8px;
}
.article-note p, .article-note li { font-size: .95rem; }

/* Spec table used where real numbers are quoted */
.article-table-wrap { overflow-x: auto; margin-top: 1.6em; }
.article-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 420px; }
.article-table th, .article-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-color); }
.article-table th { background: var(--light-grey); color: var(--navy-deep); font-weight: 700; font-size: .8125rem; letter-spacing: .04em; }
.article-table td { color: var(--text-body); }

/* End-of-article CTA */
.article-cta {
  margin-top: 2.2em; padding: 24px;
  background: var(--navy-deep); border-radius: var(--radius-md); color: #fff;
}
.article-cta h2 { color: #fff; margin: 0 0 8px; font-size: 1.2rem; }
.article-cta p { color: rgba(255,255,255,.8); font-size: .95rem; margin-bottom: 16px; }
.article-cta .btn { margin-right: 10px; }
/* Buttons keep their own colours; .article-body a would otherwise turn them navy and underlined */
.article-body a.btn { text-decoration: none; }
.article-body a.btn-primary, .article-body a.btn-primary:hover { color: #fff; }
.article-body a.btn-outline-white { color: #fff; }
.article-body a.btn-outline-white:hover { color: var(--navy-deep); }

/* Related reading cards are styled in ke.css so service pages can link to
   articles without loading this stylesheet. */

/* ---- Responsive --------------------------------------------- */
@media screen and (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-card--featured .blog-card__media { flex-basis: 52%; }
  .blog-card--featured .blog-card__body { padding: 22px 24px; }
  .blog-card--featured .blog-card__title { font-size: 1.15rem; }
}
@media screen and (max-width: 768px) {
  .blog-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .blog-card--featured { flex-direction: column; }
  .blog-card--featured .blog-card__media { flex: none; }
  .blog-card__body { padding: 16px 16px 18px; }
  .article-body h2 { margin-top: 1.7em; }
  .article-cta { padding: 20px 18px; }
  .article-cta .btn { width: 100%; justify-content: center; margin: 0 0 10px; }
}
