/*
 * Redesigned program detail page — page layout (SOUTHVILLE-1103 / FE3).
 *
 * Matches the Lovable reference export: a max-w-6xl (72rem) centred container,
 * tailwind-equivalent spacing/typography, translated into plain CSS scoped under
 * `.new-design` and consuming the FE1 design tokens. Data is dynamic, so every
 * section omits/reflows when empty and the whole layout is responsive.
 */

/* --- Container ---------------------------------------------------------- */
.new-design .nd-detail { max-width: 72rem; margin: 0 auto; padding: 0 var(--space-2); }

/* Header, base .nd-icon sizing and the footer are shared redesign chrome and now
   live in the design system (design_system/header.css + base.css) so the picker
   (FE2) and detail (FE3) pages share them — moved in SOUTHVILLE-1102. */

/* --- Back link ---------------------------------------------------------- */
.new-design .nd-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: var(--space-2) 0 0; padding: 8px 12px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.875rem;
  border-radius: var(--radius-md); transition: background-color 0.15s ease, color 0.15s ease;
}
.new-design .nd-back:hover { background-color: var(--brand-accent); color: #fff; }

/* --- Hero (section 1) --------------------------------------------------- */
.new-design .nd-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4);
  align-items: start; padding: var(--space-6) 0 var(--space-4);
}
.new-design .nd-hero__content:only-child { grid-column: 1 / -1; }
.new-design .nd-hero__title { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; line-height: 1.1; margin: 0 0 12px; }
.new-design .nd-hero__tagline { color: var(--text-muted); margin: 0 0 var(--space-3); }
.new-design .nd-hero__facts {
  list-style: none; margin: 0 0 var(--space-3); padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: 0.875rem; color: var(--text-muted);
}
.new-design .nd-hero__facts li { display: inline-flex; align-items: center; gap: 4px; }
/* SOUTHVILLE-1121: the standard header text is authored in the back-end rich-text
   editor and renders through .nd-rich-text, so the admin's markup (<strong>, lists,
   …) comes through. The wrapper adds spacing before the sign-up form, and — per
   Daniel's revision — the muted text colour so this header reads as a sub-heading
   matching the tagline above (.nd-hero__tagline) rather than as dark body copy.
   font-family / size / line-height already match the tagline via the base; only the
   colour differed. The compound selector outranks .nd-rich-text's own colour. */
.new-design .nd-hero__ready { margin: 0 0 var(--space-1); }
.new-design .nd-hero__ready.nd-rich-text { color: var(--text-muted); }
/* SOUTHVILLE-1137: the detail page always renders the registration header left-aligned.
   The same authored HTML is shown centred on the old email step, which follows the
   editor's alignment; the detail page overrides any authored alignment. Uses !important to
   beat the inline text-align admins set for the email page (both the hero and closing band). */
.new-design .nd-hero__ready, .new-design .nd-hero__ready *,
.new-design .nd-closing__heading, .new-design .nd-closing__heading * {
  text-align: left !important;
}
.new-design .nd-hero__cta-blurb { color: var(--text-muted); margin: 0 0 var(--space-2); }
/* Fixed 4:3 frame (reference ratio) — any uploaded image fills it at consistent
   dimensions, cropped to cover rather than stretching the layout. */
.new-design .nd-hero__media { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.new-design .nd-hero__image { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- Sign-up form ------------------------------------------------------- */
/* SOUTHVILLE-1122: stack the button directly below the input, both full width
   (align-items: stretch), constrained to a matching max-width. */
.new-design .nd-signup { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-2); max-width: 28rem; }
.new-design .nd-signup__input {
  padding: 10px var(--space-2);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); font-family: var(--font-body); font-size: 0.875rem;
}

/* --- Info cards (section 2): top row of 3, bottom row of 2 -------------- */
/* SOUTHVILLE-1119: the remaining cards fill the row — track count = number of
   cards rendered (--nd-cols, set in the view), so 1 -> full, 2 -> half, 3 -> third. */
.new-design .nd-info-cards { display: grid; grid-template-columns: repeat(var(--nd-cols, 1), 1fr); gap: var(--space-2); }
.new-design .nd-info-cards--primary { padding: var(--space-5) 0; }
.new-design .nd-info-cards--secondary { padding: 0 0 var(--space-5); }
.new-design .nd-info-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; align-items: flex-start; gap: var(--space-1);
}
.new-design .nd-info-card .nd-icon { width: 1.25rem; height: 1.25rem; color: var(--green); margin-top: 2px; }
.new-design .nd-info-card__label { font-size: 0.875rem; font-weight: 600; color: var(--text); margin: 0; }
.new-design .nd-info-card__text { font-size: 0.875rem; color: var(--text-muted); margin: 2px 0 0; }

/* --- Two-column rows (sections 3 & 4) ----------------------------------- */
.new-design .nd-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; padding-bottom: var(--space-4); }
.new-design .nd-split__col:only-child { grid-column: 1 / -1; }

/* --- What you'll get (section 3) ---------------------------------------- */
/* Program long description (rich text from the admin editor): page font, no
   border; the editor decides whether it reads as bullets or paragraphs
   (SOUTHVILLE-1103 revision). */
.new-design .nd-rich-text { font-family: var(--font-body); color: var(--text); line-height: 1.6; }
.new-design .nd-rich-text p { margin: 0 0 var(--space-1); }
.new-design .nd-rich-text ul, .new-design .nd-rich-text ol { margin: 0 0 var(--space-1); padding-left: 1.25rem; }
.new-design .nd-rich-text li { margin-bottom: 4px; }
.new-design .nd-rich-text > :last-child { margin-bottom: 0; }
.new-design .nd-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--text); }
.new-design .nd-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Testimonial + stats (section 4) ------------------------------------ */
.new-design .nd-testimonial { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); height: 100%; }
.new-design .nd-testimonial .nd-icon { width: 1.5rem; height: 1.5rem; color: var(--text-muted); }
.new-design .nd-testimonial__quote { margin: 0; font-size: 1.125rem; font-style: italic; line-height: 1.5; }
.new-design .nd-testimonial__author { color: var(--text-muted); font-weight: 600; }
.new-design .nd-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
/* SOUTHVILLE-1135: keep the number's default green on .nd-stat so it INHERITS down to the
   number. The rich-text label may wrap the number in a heading, strong or span and set its
   own colour inline; colouring .nd-stat (rather than hard-coding the colour on the number
   rule) lets that inline colour win in every markup shape — instead of a colour forced on a
   nested strong overriding a colour set on an ancestor span, which rendered the number dark. */
.new-design .nd-stat { padding: var(--space-1); border-radius: var(--radius-md); transition: transform 0.2s ease, box-shadow 0.2s ease; color: var(--green); }
.new-design .nd-stat:hover { transform: scale(1.03); box-shadow: var(--shadow-card); }
.new-design .nd-stat :is(h1, h2, h3, h4, strong, b) {
  display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.1;
}
.new-design .nd-stat p { margin: 2px 0 0; font-size: 0.75rem; color: var(--text-muted); line-height: 1.35; }
/* Equal-height testimonial + stats cards (grid stretch; cards fill their column). */
.new-design .nd-social-proof { gap: var(--space-2); align-items: stretch; }
.new-design .nd-social-proof .nd-split__col { display: flex; }
.new-design .nd-social-proof .nd-card { flex: 1; }

/* --- FAQ accordion: styles moved to design_system/faq.css (SOUTHVILLE-1111),
       shared by the detail page and the picker. ------------------------- */

/* --- Closing CTA band (section 6) --------------------------------------- */
.new-design .nd-closing { padding: var(--space-5) 0; }
.new-design .nd-closing__inner { max-width: 48rem; margin: 0 auto; }
/* SOUTHVILLE-1121: authored rich text — renders through .nd-rich-text, no imposed
   typography (see the hero __ready note above). Wrapper adds spacing only. */
.new-design .nd-closing__heading { margin: 0 0 var(--space-1); }
.new-design .nd-closing__blurb { color: var(--text-muted); margin: 0 0 var(--space-3); }
/* (max-width now on the base .nd-signup — SOUTHVILLE-1122) */
/* Sign-up button: subtle shadow lift on hover (final form styling: SOUTHVILLE-1104). */
.new-design .nd-signup .nd-button--primary:hover { box-shadow: var(--shadow-card-hover); }

/* Rich-text fields render their mce HTML; keep inner paragraphs flush. */
.new-design .nd-hero__tagline p,
.new-design .nd-hero__cta-blurb p,
.new-design .nd-closing__blurb p { margin: 0; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 768px) {
  .new-design .nd-hero,
  .new-design .nd-split { grid-template-columns: 1fr; }
  .new-design .nd-info-cards--primary { grid-template-columns: 1fr; }
  .new-design .nd-hero__title { font-size: 1.875rem; }
}
@media (max-width: 640px) {
  .new-design .nd-info-cards--secondary { grid-template-columns: 1fr; }
  .new-design .nd-header__phone-number { display: none; }
  .new-design .nd-header__company-logo,
  .new-design .nd-header__brand { height: 64px; }
}
