/*
 * Shared FAQ accordion for the review pages
 * (client-stories, customer reviews, video reviews, whatsapp reviews).
 *
 * Works on the existing markup of every page without editing each item:
 * each page's FAQ container just gets the `.faq-acc` class, and this targets
 * its `[class*="faq-item"]` children (cs--faq-item / cr--faq-item /
 * cvr-faq-item / wcr-faq-item). Question = <h3> (clickable header),
 * answer = <p> (collapsible body). One item open at a time; first open.
 */

.faq-acc [class*="faq-item"] > h3 {
  position: relative;
  padding-right: 36px;
  margin-bottom: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* Chevron — points down when closed, up when open. */
.faq-acc [class*="faq-item"] > h3::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #3b3b79;
  border-bottom: 2px solid #3b3b79;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.25s ease;
}

.faq-acc [class*="faq-item"].faq-open > h3::after {
  transform: translateY(-35%) rotate(-135deg);
}

/* Collapsible answer (paragraphs and lists animate via max-height). */
.faq-acc [class*="faq-item"] > p,
.faq-acc [class*="faq-item"] > ul,
.faq-acc [class*="faq-item"] > ol {
  max-height: 0;
  overflow: hidden;
  margin: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease;
}

.faq-acc [class*="faq-item"].faq-open > p,
.faq-acc [class*="faq-item"].faq-open > ul,
.faq-acc [class*="faq-item"].faq-open > ol {
  max-height: 1600px;
  opacity: 1;
  margin-top: 10px;
}

/* Tables ignore max-height/overflow, so toggle display to avoid an empty gap. */
.faq-acc [class*="faq-item"] > table {
  display: none;
}
.faq-acc [class*="faq-item"].faq-open > table {
  display: table;
  margin-top: 10px;
}

/* Table answers moved into FAQ items (e.g. Review Summary). */
.faq-acc [class*="faq-item"] > table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Roboto';
}
.faq-acc [class*="faq-item"] > table th,
.faq-acc [class*="faq-item"] > table td {
  border: 1px solid #e0e0ea;
  padding: 12px 16px;
  text-align: left;
  font-size: 16px;
  vertical-align: top;
}
.faq-acc [class*="faq-item"] > table th {
  background: #3b3b79;
  color: #fff;
  font-weight: 700;
}
.faq-acc [class*="faq-item"] > table tr:nth-child(even) td {
  background: #f6f6fb;
}
@media screen and (max-width: 768px) {
  .faq-acc [class*="faq-item"] > table th,
  .faq-acc [class*="faq-item"] > table td { padding: 10px; font-size: 14px; }
}

.faq-acc [class*="faq-item"] > h3:focus-visible {
  outline: 2px solid #3b3b79;
  outline-offset: 2px;
}
