/* ==========================================================================
   Passed Stage 1 Page Styles
   Brand: DIT (NUI Driving Instructor Training)
   Primary: #508916 (green)
   Mobile-first responsive design
   Focus: Journey planning, decisions, timeline, checklist
   ========================================================================== */

/* ---------- Shared ---------- */
.ps1-page {
  --ps1-green: #508916;
  --ps1-green-light: #e8f5d6;
  --ps1-green-dark: #3a6610;
  --ps1-text: #242427;
  --ps1-text-muted: #6c6d74;
  --ps1-border: #e5e5e7;
  --ps1-bg-alt: #f7f7f7;
  --ps1-radius: 8px;
}

.ps1-page .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.ps1-page section {
  padding: 3rem 0;
}

.ps1-page section:nth-child(even):not(.ps1-hero):not(.lead-capture):not(.ps1-checklist-section) {
  background: var(--ps1-bg-alt);
}

/* ---------- Hero ---------- */
.ps1-page .ps1-hero {
  background: linear-gradient(135deg, var(--ps1-green-dark) 0%, var(--ps1-green) 100%) !important;
  color: #fff;
  padding: 2rem 0 3rem;
}

.ps1-hero .breadcrumb {
  margin-bottom: 1.5rem;
}

.ps1-hero .breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.ps1-hero .breadcrumb li::after {
  content: '>';
  margin: 0 0.5rem;
  opacity: 0.7;
}

.ps1-hero .breadcrumb li:last-child::after {
  content: '';
  margin: 0;
}

.ps1-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.ps1-hero .breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.ps1-hero h1 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.ps1-hero .hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 750px;
  opacity: 0.95;
}

/* ---------- TLDR / Quick Answer ---------- */
.ps1-tldr {
  background: var(--ps1-green-light);
  border-left: 4px solid var(--ps1-green);
  padding: 1.5rem;
  border-radius: var(--ps1-radius);
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ps1-text);
}

.ps1-tldr strong {
  color: var(--ps1-green-dark);
}

.ps1-tldr a {
  color: var(--ps1-green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ps1-tldr a:hover {
  color: var(--ps1-green);
}

/* ---------- Section headings ---------- */
.ps1-page h2 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ps1-text);
  margin: 0 0 1rem;
  line-height: 1.3;
}

.ps1-page h2 em {
  font-style: normal;
  color: var(--ps1-green);
}

.ps1-page .section-intro {
  color: var(--ps1-text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 750px;
}

/* ---------- Content Block ---------- */
.ps1-content-block {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ps1-text);
}

.ps1-content-block p {
  margin-bottom: 1rem;
}

.ps1-content-block a {
  color: var(--ps1-green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ps1-content-block a:hover {
  color: var(--ps1-green);
}

/* ---------- Priorities List ---------- */
.ps1-priorities {
  padding-left: 1.5rem;
  margin: 1rem 0 1.5rem;
}

.ps1-priorities li {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  color: var(--ps1-text);
}

.ps1-priorities strong {
  color: var(--ps1-green-dark);
}

/* ---------- Decision Cards ---------- */
.ps1-decisions {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ps1-decision-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ps1-border);
  border-radius: var(--ps1-radius);
  padding: 1.5rem 1.5rem 1.5rem 3.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.ps1-decision-card__number {
  position: absolute;
  left: 1rem;
  top: 1.35rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ps1-green);
  color: #fff;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(80, 137, 22, 0.3);
}

.ps1-decision-card h3 {
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ps1-text);
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.ps1-decision-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ps1-text-muted);
  margin: 0 0 0.75rem;
}

.ps1-decision-card p:last-child {
  margin-bottom: 0;
}

.ps1-decision-card a {
  color: var(--ps1-green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ps1-decision-card a:hover {
  color: var(--ps1-green);
}

/* ---------- Centre List (inside decision card) ---------- */
.ps1-centre-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.ps1-centre-list li {
  font-size: 0.85rem;
  color: var(--ps1-text);
  padding: 0.2rem 0 0.2rem 1rem;
  position: relative;
}

.ps1-centre-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ps1-green);
}

@media (min-width: 480px) {
  .ps1-centre-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Timeline ---------- */
.ps1-timeline {
  position: relative;
  padding-left: 2.5rem;
}

.ps1-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ps1-green-light);
  border-radius: 2px;
}

.ps1-timeline-step {
  position: relative;
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.ps1-timeline-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ps1-timeline-step:last-child {
  padding-bottom: 0;
}

.ps1-timeline-step__marker {
  position: absolute;
  left: -2.5rem;
  width: 30px;
  height: 30px;
  background: var(--ps1-green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(80, 137, 22, 0.3);
}

.ps1-timeline-step strong {
  display: block;
  font-size: 1rem;
  color: var(--ps1-text);
  margin-bottom: 0.25rem;
}

.ps1-timeline-step p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ps1-text-muted);
  margin: 0;
}

/* ---------- Checklist Section ---------- */
.ps1-checklist-section {
  background: var(--ps1-bg-alt) !important;
}

.ps1-checklist {
  max-width: 700px;
}

/* Checklist Progress Bar */
.ps1-progress {
  margin-bottom: 1.5rem;
}

.ps1-progress__bar {
  height: 8px;
  background: var(--ps1-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.ps1-progress__fill {
  height: 100%;
  background: var(--ps1-green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.ps1-progress[data-complete="true"] .ps1-progress__fill {
  background: linear-gradient(90deg, var(--ps1-green) 0%, var(--ps1-green-dark) 100%);
}

.ps1-progress__text {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ps1-text-muted);
}

.ps1-progress[data-complete="true"] .ps1-progress__text {
  color: var(--ps1-green-dark);
}

/* Checklist List */
.ps1-checklist__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ps1-checklist__item {
  margin-bottom: 0.5rem;
}

.ps1-checklist__toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  background: #fff;
  border: 2px solid var(--ps1-border);
  border-radius: var(--ps1-radius);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.ps1-checklist__toggle:hover {
  border-color: var(--ps1-green);
  background: rgba(80, 137, 22, 0.02);
}

.ps1-checklist__toggle:focus-visible {
  outline: 2px solid var(--ps1-green);
  outline-offset: 2px;
}

/* Checkbox visual */
.ps1-checklist__box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ps1-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: background 0.15s, border-color 0.15s;
}

.ps1-checklist__box::after {
  content: '';
  display: block;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s;
}

.ps1-checklist__item[data-checked="true"] .ps1-checklist__box {
  background: var(--ps1-green);
  border-color: var(--ps1-green);
}

.ps1-checklist__item[data-checked="true"] .ps1-checklist__box::after {
  transform: rotate(45deg) scale(1);
}

.ps1-checklist__item[data-checked="true"] .ps1-checklist__toggle {
  border-color: var(--ps1-green-light);
  background: rgba(80, 137, 22, 0.04);
}

.ps1-checklist__item[data-checked="true"] .ps1-checklist__label {
  text-decoration: line-through;
  color: var(--ps1-text-muted);
}

/* Checklist content */
.ps1-checklist__content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ps1-checklist__label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ps1-text);
  line-height: 1.4;
}

.ps1-checklist__detail {
  font-size: 0.8rem;
  color: var(--ps1-text-muted);
  line-height: 1.5;
}

/* Noscript fallback */
.ps1-noscript {
  background: #fff;
  border: 1px solid var(--ps1-border);
  border-radius: var(--ps1-radius);
  padding: 1.5rem;
}

.ps1-noscript ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0 0;
}

.ps1-noscript li {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

/* ---------- FAQ Accordion ---------- */
.ps1-page .faq-accordion {
  margin-top: 1.5rem;
}

.ps1-page .faq-accordion__item {
  border: 1px solid var(--ps1-border);
  border-radius: var(--ps1-radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.ps1-page .faq-accordion__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ps1-text);
  text-align: left;
  line-height: 1.4;
  transition: background 0.15s;
}

.ps1-page .faq-accordion__question:hover {
  background: rgba(80, 137, 22, 0.04);
}

.ps1-page .faq-accordion__question:focus-visible {
  outline: 2px solid var(--ps1-green);
  outline-offset: -2px;
}

.ps1-page .faq-accordion__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
  margin-left: 1rem;
}

.ps1-page .faq-accordion__icon::before,
.ps1-page .faq-accordion__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: var(--ps1-green);
  border-radius: 1px;
  transition: transform 0.25s ease;
}

.ps1-page .faq-accordion__icon::before {
  transform: translate(-50%, -50%);
}

.ps1-page .faq-accordion__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.ps1-page .faq-accordion__item[data-open="true"] .faq-accordion__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.ps1-page .faq-accordion__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.ps1-page .faq-accordion__answer-inner {
  padding: 0 1.25rem 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ps1-text-muted);
}

.ps1-page .faq-accordion__answer-inner a {
  color: var(--ps1-green-dark);
  text-decoration: underline;
}

.ps1-page .faq-accordion__answer-inner a:hover {
  color: var(--ps1-green);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ps1-page .faq-accordion__answer {
    transition: none;
  }
  .ps1-page .faq-accordion__icon::before,
  .ps1-page .faq-accordion__icon::after {
    transition: none;
  }
  .ps1-progress__fill {
    transition: none;
  }
  .ps1-checklist__box,
  .ps1-checklist__box::after,
  .ps1-checklist__toggle {
    transition: none;
  }
  .ps1-timeline-step {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .ps1-page section {
    padding: 2rem 0;
  }

  .ps1-decision-card {
    padding: 1.25rem 1.25rem 1.25rem 3rem;
  }

  .ps1-decision-card__number {
    left: 0.75rem;
    top: 1.1rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
  }

  .ps1-timeline {
    padding-left: 2rem;
  }

  .ps1-timeline::before {
    left: 12px;
  }

  .ps1-timeline-step__marker {
    left: -2rem;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .ps1-checklist__toggle {
    padding: 0.75rem;
  }

  .ps1-centre-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
