/* ================================================
   CFA Grid Accordion — Stylesheet v1.0.2
   ================================================ */

/* ── Grid wrapper ─────────────────────────────── */
.cfa-grid {
  width: 100%;
  gap: 16px;
  /* CRITICAL FIX: each column is independent — no row height sharing */
  align-items: start !important;
  align-content: start !important;
}

/* Every card must self-align to top, ignoring its row partner */
.cfa-item {
  align-self: start !important;
  background-color: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  transition:
    background-color 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius    0.38s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow       0.38s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: background-color;
}

/* Active / open card */
.cfa-item.cfa-active {
  background-color: #3d8ec9;
}

/* ── Header button ─────────────────────────────── */
.cfa-header {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  outline-offset: 3px;
}

.cfa-header:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
  border-radius: 10px;
}

/* ── Question text ─────────────────────────────── */
.cfa-question {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  color: #1a1a2e;
  flex: 1;
  transition: color 0.3s ease;
}

.cfa-item.cfa-active .cfa-question {
  color: #ffffff;
}

/* ── Chevron icon ──────────────────────────────── */
.cfa-icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a2e;
  margin-top: 1px;
  transition:
    color     0.35s ease,
    transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.cfa-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  display: block;
}

.cfa-item.cfa-active .cfa-icon {
  color: #ffffff;
  transform: rotate(180deg);
}

/* ── Divider line ──────────────────────────────── */
.cfa-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
  margin: 0 22px;
  transform: scaleX(0);
  transform-origin: left center;
  transition:
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1) 0.05s,
    opacity   0.3s  ease;
  opacity: 0;
  will-change: transform, opacity;
}

.cfa-item.cfa-active .cfa-divider {
  transform: scaleX(1);
  opacity: 1;
}

/* ── Answer body ───────────────────────────────── */
.cfa-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: max-height;
}

.cfa-item.cfa-active .cfa-body {
  max-height: 800px;
}

/* ── Content inner ─────────────────────────────── */
.cfa-content {
  padding: 14px 22px 22px;
  color: #f0f0f0;
  font-size: 15px;
  line-height: 1.72;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity   0.3s ease 0.12s,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.08s;
  will-change: opacity, transform;
}

.cfa-item.cfa-active .cfa-content {
  opacity: 1;
  transform: translateY(0);
}

.cfa-content p              { margin: 0 0 10px; color: inherit; }
.cfa-content p:last-child   { margin-bottom: 0; }
.cfa-content ul,
.cfa-content ol             { margin: 6px 0 0 18px; padding: 0; }
.cfa-content li             { margin-bottom: 5px; color: inherit; }
.cfa-content strong         { color: inherit; font-weight: 700; }
.cfa-content a              { color: inherit; text-decoration: underline; }

/* ── Responsive columns ────────────────────────── */
@media (max-width: 1024px) {
  .cfa-grid[data-cols-tablet="1"] { grid-template-columns: 1fr !important; }
  .cfa-grid[data-cols-tablet="2"] { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 767px) {
  .cfa-grid[data-cols-mobile="1"] { grid-template-columns: 1fr !important; }
  .cfa-grid[data-cols-mobile="2"] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Elementor editor preview ──────────────────── */
.elementor-editor-active .cfa-body    { max-height: none !important; }
.elementor-editor-active .cfa-content { opacity: 1 !important; transform: none !important; }
