/* Preguntas frecuentes — acordeón + búsqueda */

.faq-page-panel {
  text-align: left;
}

.faq-toc {
  margin-bottom: 1.25rem;
}

.faq-search-wrap {
  margin: 0 0 1.5rem;
}

.faq-search {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--color-input-border, #d9dbbc);
  border-radius: 10px;
  font: inherit;
  font-size: 0.98rem;
  background: #fff;
  color: var(--color-text-dark);
}

.faq-search:focus {
  outline: none;
  border-color: var(--color-brand-gold, #B9984B);
  box-shadow: 0 0 0 3px rgba(185, 152, 75, 0.15);
}

.faq-search-empty {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--color-text-medium, #6b7280);
}

.faq-cat {
  margin: 0 0 1.75rem;
  /* Ancla del índice: cabecera sticky no debe tapar el título */
  scroll-margin-top: calc(var(--header-height, 96px) + 16px);
}

.faq-cat.is-hidden {
  display: none;
}

.faq-cat__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.2rem;
  color: var(--color-text-dark);
}

.faq-cat__title i {
  color: var(--color-brand-gold, #B9984B);
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--color-input-border, #d9dbbc);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.faq-item.is-hidden {
  display: none;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--color-text-dark);
  font-size: 0.98rem;
  line-height: 1.4;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item__q {
  flex: 1 1 auto;
}

.faq-item__chevron {
  flex-shrink: 0;
  color: var(--color-brand-gold, #B9984B);
  transition: transform .18s ease;
}

.faq-item[open] .faq-item__chevron {
  transform: rotate(180deg);
}

.faq-item[open] summary {
  border-bottom: 1px solid rgba(185, 152, 75, 0.18);
  background: rgba(185, 152, 75, 0.05);
}

.faq-item__a {
  padding: 14px 16px 16px;
  color: var(--color-text-medium, #6b7280);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-item__a p {
  margin: 0;
}

.faq-cta {
  margin-top: 8px;
  padding: clamp(24px, 3.5vw, 36px) clamp(16px, 3vw, 24px);
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--color-brand-gold, #B9984B), var(--color-brand-gold-dark, #947A3C));
  color: #fff;
}

.faq-cta h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.35rem;
}

.faq-cta p {
  margin: 0 auto 16px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}

.faq-cta a:not(.faq-cta__btn) {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.faq-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--color-brand-gold-dark, #947A3C);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #fff;
}

.faq-cta__btn:hover {
  background: #f8f4ea;
  color: var(--color-brand-gold-dark, #947A3C);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .faq-toc .legal-toc__list {
    columns: 1;
  }
}
