/* ============================================================
   PRIME MOTOR — How to Enroll Page Stylesheet
   ============================================================ */

/* ---- HOW IT WORKS — Timeline Steps ---- */
.steps-section { background: var(--clr-bg-soft, #F7F9F7); }

.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

/* Vertical connector line */
.steps-grid::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 56px;
  bottom: 56px;
  width: 2px;
  background: linear-gradient(to bottom, var(--clr-primary) 0%, var(--clr-gold) 100%);
  opacity: 0.2;
  z-index: 0;
}

/* ---- Step Card ---- */
.step-card {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  padding: 1.75rem 0;
  position: relative;
  z-index: 1;
}

.step-card:not(:last-child) {
  border-bottom: 1px dashed var(--clr-border, #E5E7EB);
}

.step-number {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--clr-white);
  border: 2px solid var(--clr-border, #E5E7EB);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.step-number-digit {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-primary);
  line-height: 1;
}

.step-number-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-text-muted, #6B7280);
  line-height: 1;
}

.step-card:hover .step-number {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 4px rgba(27,94,32,0.1);
}

.step-content { flex: 1; min-width: 0; padding-top: 0.625rem; }

.step-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--clr-primary-pale, #E8F5E9);
  color: var(--clr-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.step-title {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--clr-dark, #111827);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.step-desc {
  font-size: 0.925rem;
  color: var(--clr-text-muted, #6B7280);
  line-height: 1.75;
  margin-bottom: 0.875rem;
}

.step-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.875rem;
}

.step-checklist li {
  display: block;
  position: relative;
  padding-left: 1.375rem;
  font-size: 0.875rem;
  color: var(--clr-text, #1F2937);
  line-height: 1.6;
}

.step-checklist li > i {
  position: absolute;
  left: 0;
  top: 0.28rem;
  color: var(--clr-primary);
  font-size: 0.7rem;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--clr-gold-pale, #FFF8E1);
  color: #92400e;
  border: 1px solid rgba(249,168,37,0.3);
  border-radius: var(--r-md, 8px);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
}

.step-badge i { color: var(--clr-gold-dark, #F9A825); }

/* ---- PRIME MOTOR HIGHLIGHT STEP (Step 2) ---- */
.step-card--highlight .step-number {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  box-shadow: 0 4px 18px rgba(27,94,32,0.35);
}

.step-card--highlight .step-number-digit { color: var(--clr-gold); }
.step-card--highlight .step-number-label { color: rgba(255,255,255,0.7); }

.school-highlight-card {
  background: linear-gradient(135deg, var(--clr-primary-dark, #0A3D12) 0%, var(--clr-primary, #1B5E20) 50%, var(--clr-primary-light, #388E3C) 100%);
  border-radius: var(--r-xl, 16px);
  padding: 1.5rem 1.75rem;
  color: #fff;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(27,94,32,0.3);
  position: relative;
  overflow: hidden;
}

.school-highlight-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,215,0,0.07);
}

.school-highlight-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255,215,0,0.4);
  object-fit: contain;
  background: rgba(255,255,255,0.12);
  padding: 6px;
  flex-shrink: 0;
}

.school-highlight-text { flex: 1; min-width: min(220px, 100%); }

.school-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,215,0,0.2);
  border: 1px solid rgba(255,215,0,0.4);
  color: var(--clr-gold);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

.school-highlight-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.school-highlight-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.72);
}

.school-highlight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.school-highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  padding: 4px 10px;
}

.school-highlight-pill i { font-size: 0.6rem; color: var(--clr-gold); }

.school-highlight-cta {
  flex-shrink: 0;
}

/* ---- AGE TABLE ---- */
.age-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;  /* smooth momentum scroll on iOS */
  border-radius: var(--r-lg, 12px);
  border: 1px solid var(--clr-border, #E5E7EB);
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  /* subtle scroll-hint shadow on right edge when content overflows */
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(255,255,255,0), #fff 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.12), transparent),
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.12), transparent) 100% 0;
  background-repeat: no-repeat;
  background-color: #fff;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}

.age-table {
  width: 100%;
  min-width: 420px;   /* prevents columns from squashing — triggers scroll instead */
  border-collapse: collapse;
  font-size: 0.875rem;
}

.age-table thead tr {
  background: var(--clr-primary);
  color: #fff;
}

.age-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.age-table td {
  padding: 0.65rem 1rem;
  color: var(--clr-text, #1F2937);
  vertical-align: middle;
  border-bottom: 1px solid var(--clr-border, #E5E7EB);
}

.age-table tbody tr:last-child td { border-bottom: none; }
.age-table tbody tr:nth-child(even) td { background: var(--clr-bg, #F0F2F0); }
.age-table tbody tr:hover td { background: var(--clr-primary-pale, #E8F5E9); }

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-primary-pale);
  color: var(--clr-primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 999px;
}

/* ---- FAQ SECTION ---- */
.faq-section { background: var(--clr-white); }

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.faq-item {
  border: 1.5px solid var(--clr-border, #E5E7EB);
  border-radius: var(--r-xl, 16px);
  background: var(--clr-white);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item.open {
  border-color: var(--clr-primary);
  box-shadow: 0 4px 20px rgba(27,94,32,0.1);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.faq-question-text {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-dark, #111827);
  line-height: 1.4;
  flex: 1;
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--clr-bg, #F0F2F0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.3s;
}

.faq-item.open .faq-icon {
  background: var(--clr-primary);
  color: #fff;
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--clr-text-muted, #6B7280);
  line-height: 1.8;
  border-top: 1px solid var(--clr-border, #E5E7EB);
  padding-top: 1rem;
}

.faq-answer-inner strong { color: var(--clr-dark); }

.faq-answer-inner a {
  color: var(--clr-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- COST BREAKDOWN CARD ---- */
.cost-card {
  background: var(--clr-primary-pale);
  border: 1px solid rgba(27,94,32,0.15);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(27,94,32,0.2);
}

.cost-row:last-child { border-bottom: none; }
.cost-label { color: var(--clr-text); font-weight: 500; }
.cost-value { font-weight: 700; color: var(--clr-primary); }

/* ---- QUICK LINKS STRIP ---- */
.quick-links-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.quick-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--clr-border);
  background: var(--clr-white);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-primary);
  text-decoration: none;
  transition: all 0.2s;
}

.quick-link-btn:hover {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}

.quick-link-btn i { font-size: 0.75rem; }

/* ============================================================
   RESPONSIVE — How to Enroll
   Breakpoints: 1024 → 768 → 640 → 480 → 430 → 375
   ============================================================ */

/* ── Tablet landscape ≤ 1024px ─────────────────────────────── */
@media (max-width: 1024px) {
  .steps-grid { max-width: 100%; }
}

/* ── Tablet portrait / iPad Mini ≤ 768px ───────────────────── */
@media (max-width: 768px) {
  /* Connector line centered on the 56px step-number */
  .steps-grid::before { left: 28px; top: 48px; bottom: 48px; }

  .step-number       { width: 56px; height: 56px; }
  .step-number-digit { font-size: 1.2rem; }

  .step-card  { gap: 1rem; padding: 1.5rem 0; }

  /* School highlight card — stack to single column */
  .school-highlight-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
  }
  .school-highlight-text { min-width: unset; width: 100%; }
  .school-highlight-cta  { width: 100%; }
  .school-highlight-cta .btn { width: 100%; justify-content: center; }

  .faq-grid { grid-template-columns: 1fr; }
}

/* ── Large phones ≤ 640px ──────────────────────────────────── */
@media (max-width: 640px) {
  /* Connector line centered on the 48px step-number */
  .steps-grid::before { left: 24px; }

  .step-number       { width: 48px; height: 48px; }
  .step-number-digit { font-size: 1.05rem; }
  .step-number-label { font-size: 0.5rem; }

  .step-card    { gap: 0.875rem; padding: 1.25rem 0; }
  .step-content { padding-top: 0.2rem; }

  .step-title { font-size: 0.95rem; }
  .step-desc  { font-size: 0.84rem; line-height: 1.7; }

  .step-checklist li   { font-size: 0.8rem; }
  .step-badge          { font-size: 0.73rem; }

  /* School highlight */
  .school-highlight-card  { padding: 1.25rem; gap: 0.875rem; }
  .school-highlight-logo  { width: 54px; height: 54px; }
  .school-highlight-name  { font-size: 0.95rem; }
  .school-highlight-pill  { font-size: 0.66rem; padding: 3px 8px; }

  /* Quick links */
  .quick-links-strip { gap: 0.5rem; justify-content: center !important; }
  .quick-link-btn    { font-size: 0.75rem; padding: 0.45rem 0.875rem; }
}

/* ── Phones ≤ 480px ─────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Hide connector line — not enough room to align it cleanly */
  .steps-grid::before { display: none; }

  .step-number       { width: 44px; height: 44px; }
  .step-number-digit { font-size: 0.95rem; }

  .step-card    { gap: 0.75rem; padding: 1.1rem 0; }
  .step-content { padding-top: 0.1rem; }

  .step-tag   { font-size: 0.62rem; padding: 2px 9px; }
  .step-title { font-size: 0.92rem; margin-bottom: 0.35rem; }
  .step-desc  { font-size: 0.8rem; margin-bottom: 0.7rem; }

  .step-checklist      { gap: 0.3rem; }
  .step-checklist li   { font-size: 0.78rem; }

  /* Badge: go full-width so long text doesn't clip */
  .step-badge {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.73rem;
    line-height: 1.5;
    padding: 6px 12px;
  }

  /* School highlight */
  .school-highlight-card { padding: 1.1rem; border-radius: var(--r-lg, 12px); }
  .school-highlight-logo { width: 50px; height: 50px; }
  .school-highlight-name { font-size: 0.9rem; }
  .school-highlight-sub  { font-size: 0.72rem; }
  .school-highlight-pills { gap: 0.25rem; margin-top: 0.5rem; }
  .school-highlight-pill  { font-size: 0.63rem; padding: 2px 7px; }

  /* Cost breakdown */
  .cost-card  { padding: 0.875rem 1rem; }
  .cost-label,
  .cost-value { font-size: 0.8rem; }

  /* Quick links */
  .quick-link-btn { font-size: 0.73rem; padding: 0.4rem 0.75rem; }
}

/* ── Small phones ≤ 430px (iPhone 14 Pro Max, Pixel 7) ─────── */
@media (max-width: 430px) {
  .step-number       { width: 40px; height: 40px; }
  .step-number-digit { font-size: 0.9rem; }
  /* Hide "STEP" label — saves vertical space inside the circle */
  .step-number-label { display: none; }

  .step-card    { gap: 0.625rem; padding: 1rem 0; }

  .step-tag   { font-size: 0.59rem; }
  .step-title { font-size: 0.88rem; }
  .step-desc  { font-size: 0.78rem; line-height: 1.68; margin-bottom: 0.6rem; }

  .step-checklist li   { font-size: 0.76rem; gap: 0.375rem; }
  .step-checklist li i { font-size: 0.62rem; margin-top: 0.28rem; }

  .step-badge { font-size: 0.69rem; padding: 5px 10px; }

  /* School highlight */
  .school-highlight-card { padding: 1rem; gap: 0.75rem; }
  .school-highlight-logo { width: 46px; height: 46px; padding: 4px; }
  .school-highlight-badge { font-size: 0.58rem; }
  .school-highlight-name  { font-size: 0.85rem; }
  .school-highlight-pills { gap: 0.2rem; }
  .school-highlight-pill  { font-size: 0.58rem; padding: 2px 6px; }

  /* Quick links — wrap tightly, all centered */
  .quick-links-strip { gap: 0.375rem; }
  .quick-link-btn    { font-size: 0.67rem; padding: 0.375rem 0.7rem; }

  /* FAQ */
  .faq-question      { padding: 0.9rem 1rem; }
  .faq-question-text { font-size: 0.8rem; }
  .faq-answer-inner  { padding: 0.875rem 1rem 1rem; font-size: 0.8rem; }
  .faq-icon          { width: 24px; height: 24px; font-size: 0.62rem; }
}

/* ── Tiny phones ≤ 375px (iPhone SE, small Android) ────────── */
@media (max-width: 375px) {
  .step-number       { width: 36px; height: 36px; }
  .step-number-digit { font-size: 0.82rem; }

  .step-card  { gap: 0.5rem; padding: 0.875rem 0; }

  .step-tag   { font-size: 0.55rem; padding: 2px 7px; }
  .step-title { font-size: 0.82rem; line-height: 1.3; }
  .step-desc  { font-size: 0.76rem; line-height: 1.65; }

  .step-checklist li { font-size: 0.74rem; }
  .step-badge        { font-size: 0.66rem; }

  /* School highlight */
  .school-highlight-card  { padding: 0.875rem; }
  .school-highlight-logo  { width: 42px; height: 42px; }
  .school-highlight-name  { font-size: 0.8rem; }
  .school-highlight-pill  { font-size: 0.55rem; padding: 2px 5px; }

  /* Quick links — stack if needed */
  .quick-link-btn { font-size: 0.64rem; padding: 0.35rem 0.65rem; }

  /* FAQ */
  .faq-question      { padding: 0.75rem 0.875rem; }
  .faq-question-text { font-size: 0.76rem; }
  .faq-answer-inner  { padding: 0.75rem 0.875rem 0.875rem; font-size: 0.76rem; }
  .faq-icon          { width: 22px; height: 22px; font-size: 0.6rem; }
}
