/*
 * Block: accordion  —  rebuilt from the prototype FAQ (kitchen-sink .faq/.faqs).
 * Root: section.accordion-area > .accordion > .accordion-section.
 * ------------------------------------------------------------------
 * The generic accordion COMPONENT (css/components/accordion.css) is the
 * "hairline, no box" treatment shared by how-to-apply and course-list
 * accordions. This block gives the pagebuilder accordion the prototype's
 * boxed-FAQ look instead, scoped under .accordion-area so the shared
 * component is untouched for its other consumers.
 *
 * Mechanics preserved: app.js toggles .accordion-section-active on the
 * .accordion-section and aria-expanded on the inner <button>. The panel
 * animates via max-height. The FontAwesome <i> stays in the markup but is
 * hidden; a token plus/cross marker replaces it (real markup has no svg).
 */

.accordion-area .accordion {
  max-width: 900px;
}

/* each item = a bordered FAQ box; blue border when open */
.accordion-area .accordion-section {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  color: var(--text);
  transition: border-color var(--transition);
}
.accordion-area .accordion-section:last-of-type {
  border-bottom: 2px solid var(--line);
}
.accordion-area .accordion-section-active {
  border-color: var(--blue);
}

/* clickable header: question (+ optional subtitle) left, plus/cross right */
.accordion-area .accordion-section-title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1rem;
  padding: 1.15rem 1.35rem;
  cursor: pointer;
}
.accordion-area .accordion-section-title h3 {
  grid-column: 1;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}
.accordion-area .accordion-section-title button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--text-heading);
  text-decoration: none;
}
/* hide the FontAwesome glyph; the CSS marker replaces it */
.accordion-area .accordion-section-title button i {
  display: none;
}
.accordion-area .accordion-section-title p {
  grid-column: 1;
  margin: 0.35rem 0 0 0;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* plus that rotates to a cross on open (two currentColor bars) */
.accordion-area .accordion-section-title::after {
  content: "";
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--blue);
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform var(--transition);
}
.accordion-area .accordion-section-active .accordion-section-title::after {
  transform: rotate(45deg);
}

/* answer: collapsed to max-height 0, animates open */
.accordion-area .accordion-section-content {
  display: block;
  max-height: 0;
  overflow: hidden;
  padding: 0 1.35rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text-muted);
  transition: max-height var(--transition);
}
.accordion-area .accordion-section-active .accordion-section-content {
  max-height: 60rem;
  padding-bottom: 1.3rem;
}
