/*
 * Knowledge Library — Homepage Stylesheet
 * Matches the "25 Books. Every chapter, a lesson." hero design.
 *
 * @package KnowledgeLibrary
 */

/* ── HERO ───────────────────────────────────────────────────────────────── */
.kl-hero {
  background: var(--navy);
  padding: 5rem 2.5rem 4.5rem;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
}
.kl-hero-inner {
  max-width: 1100px; margin: 0 auto; width: 100%;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: center;
}

/* Label */
.kl-hero-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--spice); margin-bottom: 2rem;
}
.kl-hero-dash { color: var(--spice); font-weight: 700; letter-spacing: 0; }

/* Headline */
.kl-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 1.75rem;
}
.kl-hero-headline em {
  font-style: italic;
  color: var(--spice);
}

/* Description */
.kl-hero-desc {
  font-size: 16px; color: rgba(255,255,255,0.55);
  line-height: 1.75; max-width: 480px;
  margin-bottom: 2.5rem;
}

/* CTA buttons */
.kl-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.kl-btn-primary {
  background: var(--spice); color: #fff;
  padding: 14px 28px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500;
  text-decoration: none; display: inline-block;
  transition: background 0.15s, transform 0.1s;
  font-family: var(--font-body);
}
.kl-btn-primary:hover { background: #c04f27; transform: translateY(-1px); color: #fff; }
.kl-btn-secondary {
  background: transparent; color: rgba(255,255,255,0.75);
  padding: 13px 28px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500;
  text-decoration: none; display: inline-block;
  border: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
  font-family: var(--font-body);
}
.kl-btn-secondary:hover { border-color: rgba(255,255,255,0.55); color: #fff; transform: translateY(-1px); }

/* ── AUTHOR CARD ────────────────────────────────────────────────────────── */
.kl-author-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  backdrop-filter: blur(6px);
}
.kl-author-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 1.5rem; }
.kl-author-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--spice); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.kl-author-photo { width: 60px; height: 60px; object-fit: cover; }
.kl-author-initials {
  font-family: var(--font-display); font-size: 20px; color: #fff; font-weight: 700;
}
.kl-author-name { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.kl-author-role { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5; }

.kl-author-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.5rem; }
.kl-author-tag {
  font-size: 11px; padding: 4px 12px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
}

.kl-author-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--spice-light); text-decoration: none;
  transition: color 0.15s;
}
.kl-author-link:hover { color: var(--spice); }
.kl-author-link svg { flex-shrink: 0; }

/* ── LIBRARY SECTION ────────────────────────────────────────────────────── */
.kl-library {
  padding: 5rem 2.5rem;
  background: var(--cream);
}
.kl-library-inner { max-width: 1100px; margin: 0 auto; }

.kl-section-label {
  font-size: 11px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; color: var(--spice); margin-bottom: 8px;
}
.kl-section-title {
  font-family: var(--font-display); font-size: 34px;
  color: var(--ink); letter-spacing: -0.5px; margin-bottom: 8px;
}
.kl-section-sub { font-size: 14px; color: var(--ink-light); margin-bottom: 2rem; }

/* Filter tabs */
.kl-filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 2rem; }
.kl-filter {
  padding: 6px 16px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white); color: var(--ink-mid);
  font-family: var(--font-body); transition: all 0.15s;
}
.kl-filter.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.kl-filter:hover:not(.active) { border-color: var(--navy); }

/* Books grid */
.kl-books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kl-book-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
  text-decoration: none !important;
}
.kl-book-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.09); }

.kl-book-card-cover {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.kl-cover-tax   { background: #E6F1FB; }
.kl-cover-mgmt  { background: #E1F5EE; }
.kl-cover-trade { background: #FEF3E2; }
.kl-cover-bank  { background: #FAECE7; }
.kl-cover-agile { background: #EEEDFE; }
.kl-book-card-img  { width: 100%; height: 100%; object-fit: cover; }
.kl-book-card-icon { font-size: 42px; }
.kl-book-card-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--spice); color: #fff;
  font-size: 9px; font-weight: 600; padding: 3px 8px;
  border-radius: var(--radius-pill); letter-spacing: 0.3px;
}

.kl-book-card-body { padding: 14px; }
.kl-book-card-subject { font-size: 10px; font-weight: 500; color: var(--spice); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.kl-book-card-title   { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.4; margin-bottom: 4px; }
.kl-book-card-meta    { font-size: 11px; color: var(--ink-light); margin-bottom: 6px; }
.kl-book-card-price   { font-size: 12px; font-weight: 500; color: var(--spice); }

/* No books fallback */
.kl-no-books { font-size: 14px; color: var(--ink-light); padding: 3rem 0; text-align: center; }

/* Pagination */
.kl-pagination { margin-top: 2.5rem; display: flex; justify-content: center; gap: 6px; }
.kl-pagination .page-numbers {
  padding: 7px 14px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--border);
  font-size: 13px; color: var(--ink-mid); text-decoration: none;
  transition: all 0.15s;
}
.kl-pagination .page-numbers.current,
.kl-pagination .page-numbers:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.footer { background: var(--navy-deep); padding: 2rem 2.5rem 1.5rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 1.5rem;
}
.footer-brand-name { font-family: var(--font-display); font-size: 18px; color: #fff; margin-bottom: 8px; }
.footer-brand-name em { color: var(--spice); font-style: normal; }
.footer-desc { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.7; max-width: 240px; }
.footer-col-title { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.6); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: rgba(255,255,255,0.75); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.25); }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: 11px; color: rgba(255,255,255,0.25); text-decoration: none; }
.footer-legal a:hover { color: rgba(255,255,255,0.5); }

/* ── HERO STATS ─────────────────────────────────────────────────────────── */
.hero-stats {
  max-width: 1100px;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat {
  padding: 1.5rem 0;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.hero-stat:last-child { border-right: none; }
.stat-num { font-family: var(--font-display); font-size: 28px; color: #fff; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: rgba(255,255,255,0.4); }

/* ── SHARED SECTION LAYOUT ──────────────────────────────────────────────── */
.section { padding: 4rem 2.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-alt  { background: #fff; }
.section-sand { background: var(--sand); }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--spice); margin-bottom: 8px; }
.section-title { font-family: var(--font-display); font-size: 28px; color: var(--ink); letter-spacing: -0.3px; line-height: 1.2; }
.section-sub { font-size: 14px; color: var(--ink-light); line-height: 1.7; max-width: 520px; margin-top: 8px; }
.see-all { font-size: 13px; color: var(--spice); text-decoration: none; font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 4px; transition: gap 0.15s; }
.see-all:hover { gap: 8px; }

/* ── HOW IT WORKS ───────────────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 2rem;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 22px; left: 10%; right: 10%;
  height: 1px;
  background: rgba(0,0,0,0.08);
  z-index: 0;
}
.step-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-family: var(--font-display); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step-title { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.step-desc  { font-size: 12px; color: var(--ink-light); line-height: 1.65; }

/* ── WHAT YOU CAN BUY ───────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 2rem;
}
.prod-card {
  background: var(--cream);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.prod-icon {
  width: 40px; height: 40px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
}
.prod-icon.blue   { background: #E6F1FB; }
.prod-icon.green  { background: #E1F5EE; }
.prod-icon.amber  { background: #FEF3E2; }
.prod-icon.purple { background: #EEEDFE; }
.prod-icon.coral  { background: #FAECE7; }
.prod-icon.teal   { background: #E1F5EE; }
.prod-content { flex: 1; }
.prod-title { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.prod-desc  { font-size: 11px; color: var(--ink-light); line-height: 1.5; margin-bottom: 8px; }
.prod-price { font-size: 13px; font-weight: 500; color: var(--spice); }

/* ── MEMBERSHIP PLANS ───────────────────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 2rem;
}
.plan-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.plan-card.featured { background: var(--navy); border-color: var(--navy); }
.plan-badge { display: inline-block; font-size: 10px; font-weight: 500; padding: 3px 10px; border-radius: var(--radius-pill); margin-bottom: 14px; }
.plan-badge.default { background: var(--sand); color: var(--ink-mid); }
.plan-badge.popular { background: var(--spice); color: #fff; }
.plan-name { font-family: var(--font-display); font-size: 20px; color: var(--ink); margin-bottom: 4px; }
.plan-card.featured .plan-name { color: #fff; }
.plan-price { font-size: 28px; font-weight: 500; color: var(--spice); line-height: 1; margin-bottom: 4px; }
.plan-card.featured .plan-price { color: var(--spice-light); }
.plan-period { font-size: 12px; color: var(--ink-light); margin-bottom: 20px; }
.plan-card.featured .plan-period { color: rgba(255,255,255,0.4); }
.plan-divider { height: 1px; background: rgba(0,0,0,0.07); margin-bottom: 16px; }
.plan-card.featured .plan-divider { background: rgba(255,255,255,0.1); }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.plan-feat { font-size: 12px; color: var(--ink-mid); display: flex; align-items: center; gap: 8px; }
.plan-card.featured .plan-feat { color: rgba(255,255,255,0.7); }
.plan-feat::before {
  content: '✓';
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--sand); color: var(--navy);
  font-size: 9px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.plan-card.featured .plan-feat::before { background: rgba(255,255,255,0.1); color: #fff; }
.feat-off { opacity: 0.4; }
.feat-off::before { background: transparent !important; border: 1px solid rgba(0,0,0,0.12); content: '' !important; }
.plan-btn {
  width: 100%; padding: 10px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: var(--font-body); transition: all 0.15s; border: none;
  display: block; text-align: center; text-decoration: none;
}
.plan-btn.outline { background: transparent; border: 1px solid rgba(0,0,0,0.15); color: var(--ink); }
.plan-btn.outline:hover { background: var(--sand); }
.plan-btn.solid { background: var(--spice); color: #fff; }
.plan-btn.solid:hover { background: #c04f27; }
.plan-btn.ghost-white { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.6); }
.plan-btn.ghost-white:hover { background: rgba(255,255,255,0.07); color: #fff; }

/* ── TESTIMONIAL ────────────────────────────────────────────────────────── */
.testimonial { padding: 4rem 2.5rem; background: var(--navy); text-align: center; }
.testimonial-inner { max-width: 640px; margin: 0 auto; }
.test-mark { font-family: var(--font-display); font-size: 64px; line-height: 0.5; color: var(--spice); margin-bottom: 20px; display: block; }
.test-quote { font-family: var(--font-display); font-size: 20px; color: #fff; line-height: 1.55; margin-bottom: 24px; font-style: italic; }
.test-author { font-size: 12px; color: rgba(255,255,255,0.4); }
.test-author span { color: var(--spice); }

/* ── CTA STRIP ──────────────────────────────────────────────────────────── */
.cta-strip { padding: 4rem 2.5rem; background: var(--cream); border-top: 1px solid rgba(0,0,0,0.07); text-align: center; }
.cta-strip-inner { max-width: 560px; margin: 0 auto; }
.cta-title { font-family: var(--font-display); font-size: 32px; color: var(--ink); letter-spacing: -0.3px; margin-bottom: 10px; }
.cta-title em { color: var(--spice); font-style: normal; }
.cta-sub { font-size: 14px; color: var(--ink-light); margin-bottom: 28px; line-height: 1.7; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-ink { background: var(--ink); color: #fff; border: none; padding: 13px 28px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 500; cursor: pointer; font-family: var(--font-body); transition: background 0.15s; text-decoration: none; display: inline-block; }
.btn-ink:hover { background: var(--navy); color: #fff; }
.btn-outline-ink { background: transparent; color: var(--ink-mid); border: 1px solid rgba(0,0,0,0.15); padding: 13px 28px; border-radius: var(--radius-pill); font-size: 14px; cursor: pointer; font-family: var(--font-body); transition: all 0.15s; text-decoration: none; display: inline-block; }
.btn-outline-ink:hover { border-color: var(--navy); color: var(--navy); }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .kl-hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .kl-author-card { max-width: 400px; }
  .kl-books-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .kl-hero { padding: 3rem 1.25rem 3rem; min-height: auto; }
  .kl-hero-headline { font-size: 38px; }
  .kl-library { padding: 3rem 1.25rem; }
  .kl-books-grid { grid-template-columns: repeat(2, 1fr); }
  .footer { padding: 2rem 1.25rem 1.5rem; }
  .footer-top { grid-template-columns: 1fr; }
  /* Hamburger and mobile nav handled by theme.css */
  .nav { padding: 0 1.25rem; }
  .section { padding: 2.5rem 1.25rem; }
  .steps-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .testimonial { padding: 2.5rem 1.25rem; }
  .cta-strip { padding: 2.5rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
