/* ============================================================================
   Kayakriti — Blog (index + single-post)
   Built fresh — does not inherit the old kayakriti.in WordPress theme.
   Magazine-style cards on the index, calm reading layout on each post.
   ============================================================================ */

/* ============================ INDEX ============================ */

.kb-index {
  background: linear-gradient(180deg, var(--surface) 0%, var(--page-bg) 100%);
  padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 80px);
}
.kb-index-head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}
.kb-index-head .eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 14px;
}
.kb-index-head h1 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 500;
}
.kb-index-head .lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-3, var(--muted));
  margin: 0;
}

/* Featured (most-recent) post — full-width banner card */
.kb-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl, 22px);
  overflow: hidden;
  margin-bottom: clamp(48px, 6vw, 80px);
  box-shadow: 0 18px 50px -20px rgba(14, 30, 53, 0.12);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.kb-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px -20px rgba(14, 30, 53, 0.20);
}
.kb-featured-image {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--surface);
}
.kb-featured-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease);
}
.kb-featured:hover .kb-featured-image img { transform: scale(1.04); }
.kb-featured-body {
  padding: clamp(24px, 4vw, 56px) clamp(24px, 4vw, 48px) clamp(24px, 4vw, 56px) 0;
}
.kb-featured-meta {
  display: flex; gap: 10px; align-items: center;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.kb-featured-meta .kb-eyebrow {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
}
.kb-featured-meta .kb-dot { opacity: 0.4; }
.kb-featured-title {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 600;
}
.kb-featured-title a { color: inherit; text-decoration: none; }
.kb-featured-excerpt {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--body);
  margin: 0 0 24px;
}
.kb-read-more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  transition: gap 200ms var(--ease);
}
.kb-read-more:hover { gap: 12px; }
.kb-read-more::after {
  content: '→'; transition: transform 200ms var(--ease);
}

/* Card grid for remaining posts */
.kb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}
@media (max-width: 980px) { .kb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kb-grid { grid-template-columns: minmax(0, 1fr); } }

.kb-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl, 18px);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.kb-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 125, 210, 0.4);
  box-shadow: 0 18px 50px -16px rgba(14, 30, 53, 0.15);
}
.kb-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
}
.kb-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease);
}
.kb-card:hover .kb-card-image img { transform: scale(1.04); }
.kb-card-body {
  padding: 22px 22px 26px;
  display: flex; flex-direction: column;
  flex: 1;
}
.kb-card-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.kb-card-title {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 12px;
  font-weight: 600;
}
.kb-card-excerpt {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--body);
  margin: 0 0 18px;
  flex: 1;
}
.kb-card-more {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 200ms var(--ease);
}
.kb-card:hover .kb-card-more { gap: 10px; }
.kb-card-more::after { content: '→'; }


/* ============================ POST ============================ */

.kb-post {
  background: var(--page-bg);
  padding-bottom: clamp(48px, 6vw, 80px);
}

/* Heading section — clean light surface, title above the banner image */
.kb-post-head {
  background: linear-gradient(180deg, var(--surface) 0%, var(--page-bg) 100%);
  padding: clamp(36px, 5vw, 64px) 0 clamp(20px, 3vw, 32px);
}
.kb-post-head-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
.kb-post-breadcrumb {
  font-size: 13.5px;
  margin-bottom: 18px;
  display: flex; gap: 8px; align-items: center;
  color: var(--muted);
}
.kb-post-breadcrumb a { color: var(--blue); text-decoration: none; }
.kb-post-breadcrumb a:hover { text-decoration: underline; }
.kb-post-breadcrumb span { opacity: 0.5; }
.kb-post-meta-top {
  display: inline-flex; gap: 10px; align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.kb-post-meta-top .kb-dot { opacity: 0.45; color: var(--muted); }
.kb-post-head h1 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

/* Featured banner — full-width image card under the title, like old WP layout */
.kb-post-featured {
  max-width: 1180px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  padding: 0 clamp(20px, 4vw, 48px);
  /* So the inner image has its own rounded card */
}
.kb-post-featured img {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  aspect-ratio: 16 / 8;
  border-radius: var(--r-2xl, 22px);
  box-shadow: 0 24px 60px -20px rgba(14, 30, 53, 0.20);
}

/* Article body — 900px gives ~80-85 chars/line on desktop, comfortable
   reading width without feeling cramped. Used to be 760px. */
.kb-post-body {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) clamp(20px, 4vw, 32px) 0;
}
.kb-post-byline {
  display: flex; gap: 14px; align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.kb-post-byline-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
}
.kb-post-byline-avatar img { width: 100%; height: 100%; object-fit: cover; }
.kb-post-byline-text { line-height: 1.35; }
.kb-post-byline-text strong { color: var(--ink); display: block; font-size: 14px; }
.kb-post-byline-text span { color: var(--muted); font-size: 12.5px; }
.kb-post-excerpt {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-3, var(--body));
  font-style: italic;
  margin: 0 0 36px;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--blue);
}
.kb-post-section { margin-bottom: 36px; }
.kb-post-section h2 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 600;
}
.kb-post-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 22px 0 10px;
}
/* Body typography mirrors `.kp-section p` in page-templates.css so blog
   posts read with the same rhythm as the surgery pages (16.5 px /
   line-height 1.3 / 14 px bottom margin). Keep the homepage / splash
   untouched — those live outside `.kb-post-section`. */
.kb-post-section p {
  font-size: 16.5px;
  line-height: 1.3;
  color: var(--body);
  margin: 0 0 14px;
}
.kb-post-section p strong { color: var(--ink); font-weight: 600; }
.kb-post-section ul,
.kb-post-section ol {
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
}
.kb-post-section ul li,
.kb-post-section ol li {
  position: relative;
  padding-left: 18px;             /* 12px icon + 6px gap (matches .prose) */
  margin-bottom: 6px;
  font-size: 16.5px;
  line-height: 1.3;
  color: var(--body);
}
.kb-post-section ul li::before {
  /* Kayakriti bullet-point icon, brand-blue. CSS mask recipe identical
     to `.prose ul li::before` in styles.css so prose and blog share
     one visual bullet. */
  content: '';
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 12px;
  height: 12px;
  background-color: var(--blue, #2D7DD2);
  -webkit-mask: url('../img/icons/bullet_point_icon.png') no-repeat center / contain;
          mask: url('../img/icons/bullet_point_icon.png') no-repeat center / contain;
  border-radius: 0;
}
.kb-post-section ol { counter-reset: ol-counter; }
.kb-post-section ol li::before {
  counter-increment: ol-counter;
  content: counter(ol-counter) '.';
  position: absolute; left: 0; top: 0;
  font-weight: 700;
  color: var(--blue);
}
.kb-post-section figure {
  margin: 28px 0;
  border-radius: var(--r-xl, 18px);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface);
}
.kb-post-section figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Closing CTA */
.kb-post-cta {
  margin-top: 48px;
  padding: 32px clamp(20px, 4vw, 40px);
  background: linear-gradient(135deg, var(--surface) 0%, var(--tint, #E6F0FB) 100%);
  border: 1px solid rgba(45, 125, 210, 0.2);
  border-radius: var(--r-xl, 18px);
  text-align: center;
}
.kb-post-cta h3 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 600;
}
.kb-post-cta p {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 18px;
}
.kb-post-cta .btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--r-pill, 999px);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

/* Related posts at the bottom */
.kb-related {
  max-width: 1180px;
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding: 0 clamp(20px, 4vw, 48px);
}
.kb-related-head {
  text-align: center;
  margin-bottom: 32px;
}
.kb-related-head h2 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.kb-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 880px) { .kb-related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .kb-related-grid { grid-template-columns: 1fr; } }
