/* -------------------------------------------------------------------------- */
/* FAQ — Figma frame 17:396 (CEqlbeRjRpITLLtOzvvVUQ)                        */
/* -------------------------------------------------------------------------- */

.faq-page--figma {
  overflow-x: hidden;
  background: #fff;
}

/* ----- Hero (rounded plate + photo + gradient, matches About flow) ----- */
.faq-figma-hero {
  padding: var(--page-hero-gutter) 0 0;
}

.faq-figma-hero__plate {
  position: relative;
  max-width: 1420px;
  margin: 0 auto;
  min-height: min(550px, 85vh);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.11);
}

.faq-figma-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/figma-faq/faq-hero.jpg");
  background-size: cover;
  background-position: center 35%;
  pointer-events: none;
}

.faq-figma-hero__gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    60.29deg,
    rgba(255, 255, 255, 0.83) 40.98%,
    rgba(255, 255, 255, 0) 72.62%
  );
}

.faq-figma-hero .figma-container.faq-figma-hero__inner {
  margin-left: 0;
  margin-right: 0;
  position: relative;
  z-index: 1;
  padding-top: var(--hero-plate-inner-pt);
  padding-bottom: var(--hero-plate-inner-pb);
  padding-inline: var(--figma-inline);
  max-width: 720px;
}

.faq-figma-hero__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #231f1e;
}

.faq-figma-hero__title-accent {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--color-red);
}

.faq-figma-hero__lead {
  margin: 0;
  max-width: 630px;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(35, 31, 30, 0.7);
}

/* ----- Accordion ----- */
.faq-accordion {
  padding: var(--section-y-md) 0 var(--section-y-lg);
  background: #fff;
}

.faq-accordion__inner {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.faq-category {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.faq-category:last-child {
  margin-bottom: 0;
}

.faq-category__title {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.35;
  color: #231f1e;
  margin: 0 0 1rem;
  text-transform: capitalize;
}

.faq-category__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.faq-item.is-open {
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
}

.faq-category__list .faq-item:first-child .faq-item__trigger {
  background: #fff8f9;
}

.faq-item__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  padding: 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  color: #231f1e;
  cursor: pointer;
  border: none;
  background: #fafafa;
  min-height: 3.25rem;
}

.faq-item.is-open .faq-item__trigger {
  background: #fff8f9;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.faq-item__trigger:hover {
  color: var(--color-red-dark);
}

.faq-item__q {
  flex: 1;
  min-width: 0;
}

.faq-item__chevron {
  flex-shrink: 0;
  color: rgba(35, 31, 30, 0.45);
  transition: transform 0.2s ease;
}

.faq-item__chevron.is-open {
  transform: rotate(180deg);
  color: #231f1e;
}

.faq-item__panel {
  background: #fafafa;
  overflow: hidden;
  padding: 0 1rem;
}

.faq-item.is-open .faq-item__panel {
  padding: 0.25rem 1rem 1rem;
  /* Smooth slide-down on open (close is instant via [hidden]). */
  animation: faq-panel-slide-down 360ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.faq-item__panel p,
.faq-item__answer {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(35, 31, 30, 0.7);
  margin: 0;
  max-width: none;
}

@keyframes faq-panel-slide-down {
  from {
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    max-height: 520px; /* Arbitrary large value to allow content to expand */
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-item__panel a,
.faq-item__answer a {
  color: var(--color-red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-item__panel a:hover,
.faq-item__answer a:hover {
  color: #231f1e;
}

/* ----- Testimonials ----- */
.faq-testimonials {
  padding: var(--section-y-lg) 0;
  background: #fff;
}

.faq-testimonials__layout {
  display: grid;
  grid-template-columns: minmax(0, 305px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}

.faq-testimonials__photo {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(35, 31, 30, 0.12);
  background: #f4f4f4;
}

.faq-testimonials__photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.faq-testimonials__dots {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.75rem 0 0;
  position: relative;
  z-index: 2;
}

.faq-testimonials__dot {
  width: 10px;
  height: 10px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: rgba(35, 31, 30, 0.2);
}

.faq-testimonials__dot.is-active {
  background: var(--color-red);
}

.faq-testimonials__right {
  min-width: 0;
  margin-top: 80px;
  margin-bottom: 80px;
}

.faq-testimonials__title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  color: #231f1e;
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
}

.faq-testimonials__title-accent {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: rgba(201, 34, 47, 1);
}

.faq-testimonials__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

.faq-testimonial-card {
  margin: 0;
  padding: 1.25rem 1rem;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.faq-testimonial-card p {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: #231f1e;
  margin: 0 0 1rem;
}

.faq-testimonial-card footer {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 500;
  color: rgba(201, 34, 47, 1);
  text-transform: capitalize;
}

/* ----- CTA (uses home.css figma-cta tokens) ----- */
.faq-figma-cta {
  padding-bottom: var(--section-y-lg);
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .faq-testimonials__cards {
    grid-template-columns: 1fr;
  }

  .faq-testimonial-card {
    min-height: 0;
  }
}

@media (max-width: 900px) {
  .faq-testimonials__layout {
    grid-template-columns: 1fr;
  }

  /* DOM order is photo → cards → dots; visually show photo → dots → cards */
  .faq-testimonials__photo {
    order: 1;
    max-width: min(22rem, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .faq-testimonials__dots {
    order: 2;
    margin-top: 0;
    margin-bottom: 0;
    max-width: min(22rem, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .faq-testimonials__right {
    order: 3;
    margin-top: 0;
    margin-bottom: 0;
  }

  .faq-testimonials__title {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .faq-testimonials {
    padding: 2.25rem 0;
  }

  .faq-testimonials__layout {
    gap: 1.25rem;
  }

  .faq-testimonials__photo {
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(35, 31, 30, 0.12);
  }

  .faq-testimonials__dots {
    padding-top: 0.65rem;
  }

  .faq-testimonials__dot {
    width: 10px;
    height: 10px;
    padding: 5px;
  }

  .faq-testimonials__cards {
    gap: 0.85rem;
  }

  .faq-testimonial-card {
    border-radius: 16px;
    padding: 1rem 0.9rem;
  }

  .faq-testimonial-card p,
  .faq-testimonial-card footer {
    font-size: 0.9375rem;
  }
}

@media (max-width: 700px) {
  .faq-figma-hero .figma-container.faq-figma-hero__inner {
    padding-top: 2.5rem;
  }
}

@media (max-width: 640px) {
  .faq-figma-hero__plate {
    min-height: min(420px, 75vh);
    border-radius: 16px;
  }

  .faq-figma-hero__gradient {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.88) 45%,
      rgba(255, 255, 255, 0.65) 100%
    );
  }

  .faq-item__trigger {
    padding: 0.75rem 0.85rem;
    font-size: 0.8125rem;
  }

  .faq-item__panel {
    padding: 0 0.85rem;
  }

  .faq-item.is-open .faq-item__panel {
    padding: 0.2rem 0.85rem 0.85rem;
    max-height: 520px;
  }

  .faq-figma-cta .figma-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .faq-figma-cta .figma-btn--solid {
    width: 100%;
    text-align: center;
  }

  .faq-figma-cta .figma-cta__talk {
    text-align: center;
  }
}
