/* ==========================================================================
   Shared FAQ Section
   Used by Home, Pricing, Solutions and Sectors.
   ========================================================================== */

#faq-container,
#pricing-faq-container {
  content-visibility: auto;
  contain: content;
  contain-intrinsic-size: 680px;
}

.shared-faq-section {
  background: transparent;
}

.shared-faq-container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.shared-faq-header {
  max-width: 48rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.shared-faq-title {
  margin: 0;
  color: var(--gray-50);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.shared-faq-title-highlight {
  background: linear-gradient(
    96deg,
    var(--marketing-violet-gradient),
    var(--marketing-purple-gradient) 55%,
    var(--marketing-pink-gradient)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.shared-faq-subtitle {
  margin: 1rem auto 0;
  max-width: 42rem;
  color: var(--gray-300);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
}

.shared-faq-list {
  display: grid;
  gap: 1rem;
  max-width: 56rem;
  margin-inline: auto;
}

.shared-faq-list--columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  max-width: 68rem;
}

.shared-faq-item {
  position: relative;
  overflow: hidden;
  color: var(--gray-50);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background-color: rgba(15, 23, 42, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-rows: auto 0fr;
}

.shared-faq-item[open] {
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

/* Hover affordances apply only on devices that truly hover, so touch screens
   never get a stuck hover state (replaces the old JS-injected mobile override). */
@media (hover: hover) {
  .shared-faq-item:hover {
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  }

  .shared-faq-question:hover {
    background-color: rgba(255, 255, 255, 0.03);
  }
}

.shared-faq-item[open] {
  grid-template-rows: auto 1fr;
}

.shared-faq-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 4px;
  height: 100%;
  border-radius: 0.75rem 0 0 0.75rem;
  background: linear-gradient(to bottom, var(--indigo-700), var(--indigo-500));
  transform: translateY(-100%);
  transition: transform 400ms cubic-bezier(0.33, 1, 0.68, 1);
}

.shared-faq-item[open]::before {
  transform: translateY(0);
}

.shared-faq-question {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  color: var(--gray-50);
  cursor: pointer;
  list-style: none;
  transition:
    color 300ms ease-out,
    background-color 300ms ease-out;
  -webkit-user-select: none;
  user-select: none;
}

.shared-faq-item[open] .shared-faq-question {
  color: var(--brand-lavender-300);
  font-weight: 600;
}

.shared-faq-question::-webkit-details-marker {
  display: none;
}

.shared-faq-question::marker {
  content: '';
}

.shared-faq-question:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--indigo-200),
    0 0 0 4px var(--indigo-700);
  border-radius: 0.25rem;
}

.shared-faq-icon {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 1.1rem;
  color: var(--indigo-400);
  transition: transform 500ms cubic-bezier(0.33, 1, 0.68, 1);
}

.shared-faq-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shared-faq-item[open] .shared-faq-icon {
  transform: rotate(180deg);
}

.shared-faq-answer {
  overflow: hidden;
  min-height: 0;
  padding: 0 1.25rem;
  color: var(--gray-300);
  opacity: 0;
  transition:
    opacity 300ms ease-out,
    padding 500ms cubic-bezier(0.33, 1, 0.68, 1);
}

.shared-faq-answer p {
  margin: 0;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
}

.sectors-page main .shared-faq-answer p {
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
}

.shared-faq-item[open] .shared-faq-answer {
  padding-top: 0.5rem;
  padding-bottom: 1.25rem;
  opacity: 1;
}

@media (max-width: 768px) {
  .shared-faq-header {
    margin-bottom: 2.5rem;
  }

  .shared-faq-list--columns {
    grid-template-columns: 1fr;
  }

  .shared-faq-question {
    padding: 1rem;
  }

  .shared-faq-item[open] .shared-faq-answer {
    padding-right: 1rem;
    padding-bottom: 1rem;
    padding-left: 1rem;
  }
}
