/* ==========================================================================
   Singing Coach AI — guide pages (SEO pack) + /guides hub, v2 design
   Loaded after site.css; styles the pack's original main markup
   (h2 / .answer / .grid / .card / .step / tables) as native v2.
   ========================================================================== */

/* ---------- Guide hero ---------- */
.guide-hero { background: var(--sky-tint); padding: 4rem 0 3.2rem; }
.guide-hero .kicker { margin-bottom: 1rem; }
.guide-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 900; max-width: 20em; margin-bottom: 1rem; }
.guide-hero .lead { margin-bottom: 1.9rem; }
.guide-hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }

/* ---------- Guide body: the pack's original <main> sections ---------- */
main > section:not(.guide-hero):not(.keep-learning):not(.cta-final):not(.hub-section) {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.2rem 24px 0;
}
main > section:nth-last-of-type(2):not(.guide-hero) { padding-bottom: 3rem; }

main > section h2 {
  font-weight: 900;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  margin: 1.2rem 0 0.9rem;
}
main > section .answer { font-size: 1.1rem; color: var(--ink); max-width: 50em; }

/* The pack's .band "answer" strip → tinted panel */
main > section.band > div {
  max-width: none !important;
  margin: 0 !important;
  background: var(--sky-tint);
  border-radius: var(--r-lg);
  padding: 1.6rem 1.9rem !important;
}
main > section.band h2 { margin-top: 0; }

/* Card grids */
main > section .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-top: 1.4rem;
}
main > section .card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 1.35rem;
}
main > section .card h3, main > section .step h3 { font-size: 1.02rem; font-weight: 800; margin: 0 0 0.4rem; }
main > section .card p, main > section .step p { color: var(--muted); font-weight: 600; font-size: 0.97rem; }

/* Step cards (stacked, numbered) */
main > section { counter-reset: step; }
main > section .step {
  counter-increment: step;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 1.35rem 1.35rem 1.35rem 4.3rem;
  margin-top: 1rem;
  max-width: 46em;
  position: relative;
}
main > section .step::before {
  content: counter(step);
  position: absolute;
  left: 1.15rem;
  top: 1.3rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sky);
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--sky-edge);
}

/* Lists → leaf checkmarks */
main > section > ul { list-style: none; margin: 1.1rem 0 0; padding: 0; max-width: 50em; }
main > section > ul > li { padding: 0.42rem 0 0.42rem 2.1rem; position: relative; font-weight: 600; color: var(--ink); }
main > section > ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* Tables (a few pages) — scroll inside their own box, never the page */
main > section table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin-top: 1.3rem;
  font-size: 0.98rem;
}
main > section th, main > section td {
  border: 2px solid var(--line);
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  min-width: 10rem;
}
main > section th { background: var(--sky-tint); color: var(--ink-strong); font-weight: 800; }
main > section td { background: #fff; font-weight: 600; }

/* In-content link grids (plain anchors in the pack) → link cards */
main > section .link-grid { margin-top: 1.4rem; }
main > section .link-grid a:not([class]) {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 0.95rem 1.15rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink-strong);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
main > section .link-grid a:not([class])::after { content: '→'; margin-left: auto; color: var(--sky); font-weight: 900; }
main > section .link-grid a:not([class]):hover { transform: translateY(-3px); box-shadow: 0 5px 0 var(--line); border-color: var(--sky); }

/* ---------- Keep learning (restyled pack footer) ---------- */
.keep-learning { background: var(--tint); border-top: 2px solid var(--line); padding: 3rem 0; margin-top: 3.5rem; }
.keep-learning .kicker { margin-bottom: 1.1rem; }
.keep-learning .guide-disclaimer { color: var(--muted); font-weight: 600; font-size: 0.95rem; max-width: 46em; margin: 0 0 1.2rem; }

/* ---------- /guides hub ---------- */
.hub-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2.5rem; align-items: center; }
.hub-hero-grid .mascot { width: clamp(130px, 15vw, 190px); flex: 0 0 auto; }
.hub-search { max-width: 620px; margin-top: 1.9rem; }
.hub-count { margin: 0.7rem 0 0; font-weight: 800; font-size: 0.92rem; color: var(--sky-deep); }
.hub-section { padding: 2.7rem 0 0; }
.hub-section h2 { display: flex; align-items: baseline; gap: 0.85rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.hub-section .hub-n { font-size: 0.9rem; font-weight: 800; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.hub-section .hub-sub { color: var(--muted); font-weight: 600; margin-bottom: 1.5rem; max-width: 46em; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .guide-hero { padding: 3rem 0 2.6rem; }
  .hub-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .hub-hero-grid .mascot { order: -1; width: 112px; }
  main > section .step { padding-left: 4rem; }
  .keep-learning { margin-top: 2.6rem; }
}
