/* pages.css — shared styles for category, course review and guide pages.
   Uses the design tokens defined in style.css (--green, --text, --border, …). */

/* ── Breadcrumb + category hero (migrated from category.php inline CSS) ── */
.breadcrumb { max-width:1200px; margin:0 auto; padding:1rem 1.5rem 0; font-size:0.82rem; color:var(--text3); }
.breadcrumb a { color:var(--text2); }
.breadcrumb a:hover { color:var(--green); }
.cat-hero { max-width:1200px; margin:0 auto; padding:1.25rem 1.5rem 0.5rem; }
.cat-hero h1 { font-size:2rem; line-height:1.2; letter-spacing:-0.5px; color:var(--text); }
.cat-hero .lead { margin-top:0.6rem; font-size:1.05rem; color:var(--text2); max-width:760px; }
.editorial { background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:1.5rem 1.75rem; box-shadow:var(--shadow-sm); }
.editorial p { color:var(--text2); margin-bottom:0.85rem; line-height:1.65; }
.editorial p:last-child { margin-bottom:0; }
.editorial strong { color:var(--text); }
.cat-section-title { font-size:1.25rem; font-weight:800; color:var(--text); margin:2rem 0 1rem; letter-spacing:-0.3px; }
.faq-item { background:var(--white); border:1px solid var(--border); border-radius:var(--radius-sm); padding:1.1rem 1.35rem; margin-bottom:0.75rem; box-shadow:var(--shadow-sm); }
.faq-item h3 { font-size:1rem; color:var(--text); margin-bottom:0.4rem; }
.faq-item p { font-size:1rem; color:var(--text2); line-height:1.7; }
.related-grid { display:flex; flex-wrap:wrap; gap:0.6rem; }
.related-chip { display:inline-flex; align-items:center; gap:0.4rem; background:var(--white); border:1px solid var(--border2); border-radius:999px; padding:0.5rem 1rem; font-size:0.9rem; font-weight:600; color:var(--text2); box-shadow:var(--shadow-sm); }
.related-chip:hover { border-color:var(--green); color:var(--green); }

/* ── Card title link ── */
.card-title a { color:inherit; text-decoration:none; }
.card-title a:hover { color:var(--green); }
.card-logo-link { display:block; }
.cta-soft { background:var(--white) !important; color:var(--green) !important; border:1px solid var(--green) !important; }

/* ── Editor's picks strip (category pages) ── */
.editor-picks { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0.75rem; }
.editor-pick { display:flex; flex-direction:column; gap:0.35rem; background:var(--white); border:1px solid var(--border); border-radius:var(--radius-sm); padding:1rem 1.1rem; box-shadow:var(--shadow-sm); }
.editor-pick:hover { border-color:var(--green); }
.ep-badge { align-self:flex-start; background:var(--green-pale); color:var(--green-dark); font-weight:800; font-size:0.78rem; padding:0.15rem 0.5rem; border-radius:6px; }
.ep-title { font-weight:700; color:var(--text); font-size:0.98rem; line-height:1.3; }
.ep-arrow { font-size:0.82rem; color:var(--green); font-weight:600; }

/* ── Popular guides strip (homepage) ── */
.guide-strip-section { max-width:1200px; margin:1rem auto 0; padding:0 1.5rem 1rem; }
.guide-strip-inner { background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:1.5rem 1.75rem; box-shadow:var(--shadow-sm); }
.guide-strip-head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:1rem; }
.guide-strip-head h2 { font-size:1.25rem; font-weight:800; color:var(--text); }
.guide-strip-all { font-size:0.9rem; font-weight:600; color:var(--green); }
.guide-strip-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:0.85rem; }
.guide-strip-card { display:flex; flex-direction:column; gap:0.4rem; background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-sm); padding:1rem 1.1rem; }
.guide-strip-card:hover { border-color:var(--green); }
.guide-strip-kicker { font-size:0.7rem; text-transform:uppercase; letter-spacing:0.6px; color:var(--text3); font-weight:700; }
.guide-strip-title { font-weight:700; color:var(--text); font-size:0.98rem; line-height:1.3; }
.guide-strip-desc { font-size:0.85rem; color:var(--text2); line-height:1.5; }
.guide-strip-link { font-size:0.82rem; color:var(--green); font-weight:600; margin-top:auto; }

/* ── Guides hub ── */
.guides-hub { max-width:1200px; margin:0 auto; padding:1rem 1.5rem 3rem; }
.guide-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:1rem; }
.guide-card { display:flex; flex-direction:column; gap:0.55rem; background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:1.4rem 1.5rem; box-shadow:var(--shadow-sm); }
.guide-card:hover { border-color:var(--green); box-shadow:var(--shadow-md); }
.guide-card-kicker { font-size:0.72rem; text-transform:uppercase; letter-spacing:0.6px; color:var(--text3); font-weight:700; }
.guide-card-title { font-size:1.12rem; font-weight:800; color:var(--text); line-height:1.3; }
.guide-card-desc { font-size:0.92rem; color:var(--text2); line-height:1.55; }
.guide-card-link { font-size:0.88rem; color:var(--green); font-weight:700; margin-top:auto; }

/* ── Course review page ── */
.course-page, .guide-page { max-width:760px; margin:0 auto; padding:0.5rem 1.5rem 3rem; }
/* Keep sticky-header (z-index:200) from covering sections when TOC anchors jump. */
.course-page [id], .guide-page [id] { scroll-margin-top:88px; }
.course-head h1 { font-size:2rem; line-height:1.2; letter-spacing:-0.5px; color:var(--text); margin-top:0.5rem; }
.featured-in { margin-top:0.6rem; font-size:0.9rem; color:var(--text2); }
.featured-in a { color:var(--green); font-weight:600; }
.course-hero { display:grid; grid-template-columns:minmax(0,320px) 1fr; gap:1.5rem; align-items:start; background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:1.5rem; box-shadow:var(--shadow-sm); margin-top:1.25rem; }
.course-hero-media { position:relative; display:flex; align-items:center; justify-content:center; aspect-ratio:16/9; overflow:hidden; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--green-pale); }
.course-hero-media::before { content:attr(data-ph); position:absolute; font-weight:800; font-size:3rem; color:var(--green); }
.course-hero-img { position:relative; z-index:1; width:100%; height:100%; object-fit:cover; }
.course-hero-top { display:flex; align-items:center; gap:0.5rem; margin-bottom:0.6rem; }
.course-badge { background:var(--orange); color:#fff; font-weight:700; font-size:0.72rem; padding:0.18rem 0.5rem; border-radius:6px; }
.course-rating { display:flex; align-items:center; gap:0.4rem; margin-bottom:0.6rem; font-size:0.95rem; }
.course-rating .stars { color:#f5a623; }
.course-rating .rating-num { font-weight:700; color:var(--text); }
.course-rating .review-count { color:var(--text3); font-size:0.85rem; }
.course-price { font-size:1.05rem; margin-bottom:0.35rem; }
.cp-main, .cp-free { font-weight:800; color:var(--green-dark); font-size:1.4rem; }
.cp-orig { color:var(--text3); text-decoration:line-through; font-size:0.9rem; }
.cp-disc { color:var(--green); font-weight:700; font-size:0.85rem; }
.course-editorial-score { font-size:0.92rem; color:var(--text2); margin-bottom:0.9rem; }
.course-editorial-score strong { color:var(--text); }
.course-cta { display:inline-block; background:var(--green); color:#fff; font-weight:700; padding:0.75rem 1.4rem; border-radius:var(--radius-sm); text-decoration:none; box-shadow:var(--shadow-sm); }
.course-cta:hover { background:var(--green-dark); }
.course-cta-disabled { background:var(--border2); color:var(--text3); cursor:not-allowed; box-shadow:none; }
.course-cta-note { font-size:0.78rem; color:var(--text3); margin-top:0.5rem; }
.course-cta-repeat { text-align:center; margin:2rem 0; padding:1.5rem; background:var(--green-pale); border-radius:var(--radius); }
.course-section { margin-top:2.5rem; }
/* One consistent section-heading size across course + guide pages. */
.course-section h2, .guide-ranked h2, .guide-conclusion h2 { font-size:1.4rem; font-weight:800; color:var(--text); margin-bottom:1rem; letter-spacing:-0.3px; }
.glance-table, .compare-table { width:100%; border-collapse:collapse; background:var(--white); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; font-size:0.93rem; }
.glance-table th { text-align:left; width:150px; vertical-align:top; padding:0.7rem 1rem; color:var(--text2); font-weight:700; background:var(--bg); border-bottom:1px solid var(--border); }
.glance-table td { padding:0.7rem 1rem; color:var(--text); border-bottom:1px solid var(--border); }
.glance-sub { color:var(--text3); font-weight:400; font-size:0.85rem; }
.glance-list { margin:0; padding-left:1.1rem; }
.glance-list li { margin-bottom:0.2rem; }
.topics-list { columns:2; column-gap:2rem; padding-left:1.1rem; }
.topics-list li { margin-bottom:0.35rem; color:var(--text2); }
.course-review-body p { color:var(--text2); line-height:1.75; margin-bottom:1rem; font-size:1.02rem; }
.course-review-body a { color:var(--green); font-weight:600; }
.course-review-body em { color:var(--text); }
.related-courses { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:0.75rem; }
.related-course { display:flex; gap:0.7rem; align-items:center; background:var(--white); border:1px solid var(--border); border-radius:var(--radius-sm); padding:0.7rem; box-shadow:var(--shadow-sm); }
.related-course:hover { border-color:var(--green); }
.related-course img { width:64px; height:40px; object-fit:cover; border-radius:4px; flex-shrink:0; }
.rc-title { font-weight:700; color:var(--text); font-size:0.9rem; line-height:1.3; }
.rc-meta { font-size:0.78rem; color:var(--text3); }

/* ── Guide page ── */
.guide-head h1 { font-size:2.1rem; line-height:1.2; letter-spacing:-0.5px; color:var(--text); margin-top:0.5rem; }
.guide-lead { margin-top:0.8rem; font-size:1.12rem; color:var(--text2); line-height:1.65; }
.guide-byline { margin-top:0.9rem; font-size:0.82rem; color:var(--text3); }
.guide-toc { margin-top:1.75rem; padding:0.9rem 1.25rem; background:var(--white); border:1px solid var(--border); border-radius:var(--radius-sm); font-size:0.9rem; box-shadow:var(--shadow-sm); display:flex; flex-wrap:wrap; align-items:center; gap:0.35rem 1.1rem; }
.guide-toc strong { color:var(--text); }
.guide-toc a { color:var(--green); font-weight:600; }

/* "How we picked" reads as a lighter intro callout, not a wall of body text. */
.guide-how { background:var(--green-pale); border:1px solid var(--border); border-radius:var(--radius); padding:1.35rem 1.6rem; }
.guide-how h2 { margin-bottom:0.6rem; }
.guide-how p { color:var(--text2); line-height:1.75; font-size:1rem; margin:0; }

/* Ranked picks — fixed-size cropped thumbnails so lazy-loading never reflows
   or lets an image overflow into neighbouring content. */
.guide-ranked { margin-top:2.5rem; }
.guide-pick { display:grid; grid-template-columns:44px 132px 1fr; gap:1.1rem 1.25rem; align-items:start; background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:1.5rem; box-shadow:var(--shadow-sm); margin-bottom:1.25rem; }
.guide-pick-rank { font-size:1.7rem; font-weight:800; color:var(--green); line-height:1; text-align:center; }
.guide-pick-img { position:relative; display:flex; align-items:center; justify-content:center; width:132px; aspect-ratio:16/9; overflow:hidden; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--green-pale); }
/* Fallback letter shows through when the thumbnail image is missing / fails. */
.guide-pick-img::before { content:attr(data-ph); position:absolute; font-weight:800; font-size:1.6rem; color:var(--green); }
.guide-pick-img img { position:relative; z-index:1; display:block; width:100%; height:100%; object-fit:cover; border:0; }
.guide-pick-body { min-width:0; }
.guide-pick-title { font-size:1.15rem; font-weight:800; color:var(--text); line-height:1.3; }
.guide-pick-title a { color:inherit; text-decoration:none; }
.guide-pick-title a:hover { color:var(--green); }
.guide-pick-meta { font-size:0.8rem; color:var(--text3); margin:0.3rem 0 0.65rem; }
.guide-pick-take { color:var(--text2); line-height:1.75; font-size:1rem; margin-bottom:0.65rem; }
.guide-pick-more { font-size:0.88rem; color:var(--green); font-weight:700; }
.compare-table th, .compare-table td { padding:0.65rem 0.9rem; border-bottom:1px solid var(--border); text-align:left; color:var(--text); }
.compare-table thead th { background:var(--bg); font-weight:800; color:var(--text2); }
.compare-table tbody th { font-weight:700; color:var(--text); background:var(--bg); }
.table-scroll { overflow-x:auto; }
.guide-conclusion p { color:var(--text2); line-height:1.75; margin-bottom:1rem; font-size:1rem; }

/* ── Responsive ── */
@media (max-width:760px) {
  .course-hero { grid-template-columns:1fr; }
  .guide-pick { grid-template-columns:44px 1fr; gap:0.6rem 1rem; padding:1.25rem; }
  .guide-pick-img { grid-column:1 / -1; width:100%; aspect-ratio:16/6; margin-top:0.5rem; }
  .topics-list { columns:1; }
}
