/* Kinlig FAQ premium: sin bordes, apertura estilo Apple, degradado vino */
:root {
  --faq-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --faq-ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --faq-wine-gradient: linear-gradient(
    128deg,
    rgba(18, 4, 8, 0.98) 0%,
    rgba(52, 14, 28, 0.94) 38%,
    rgba(98, 26, 42, 0.82) 72%,
    rgba(142, 38, 54, 0.68) 100%
  );
  --faq-wine-glow: 0 10px 40px rgba(0, 0, 0, 0.42), 0 0 36px rgba(145, 41, 48, 0.28);
}

.faq-page .doc-hero {
  margin-bottom: 1.5rem;
}
.faq-page .doc-hero h1 {
  margin-bottom: 0.5rem;
}
.faq-page .doc-hero .lead {
  margin-top: 0.35rem;
}
.faq-page {
  position: relative;
  overflow: hidden;
}
.faq-page::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -20%;
  width: 55%;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(145, 41, 48, 0.18) 0%, transparent 68%);
  pointer-events: none;
}
.faq-page__layout {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .faq-page__layout { grid-template-columns: 1fr; }
}

.faq-toc {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
@media (max-width: 900px) {
  .faq-toc {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .faq-toc::-webkit-scrollbar { display: none; }
}
.faq-toc__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
@media (max-width: 900px) {
  .faq-toc__label { display: none; }
}
.faq-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@media (max-width: 900px) {
  .faq-toc__list { flex-direction: row; }
}
.faq-toc__link {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  transition: color 0.35s var(--faq-ease), background 0.4s var(--faq-ease), transform 0.35s var(--faq-ease);
  white-space: nowrap;
}
.faq-toc__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}
.faq-toc__link.is-active {
  color: #fff;
  background: var(--faq-wine-gradient);
  box-shadow: 0 4px 20px rgba(145, 41, 48, 0.25);
}

.faq-mount { min-width: 0; }
.faq-group {
  margin-bottom: 2rem;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.faq-group__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 0.4rem;
  padding: 0;
  border: none;
  background: none;
}
.faq-group__index {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-light);
  opacity: 0.85;
}
.faq-group__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
}
.faq-group__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Acordeón · reposo casi plano · abierto = degradado vino */
.faq-item {
  position: relative;
  isolation: isolate;
  border: none;
  border-radius: 17px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  transform: translateZ(0);
  transition:
    transform 0.45s var(--faq-ease),
    box-shadow 0.5s var(--faq-ease),
    background 0.45s var(--faq-ease);
}
.faq-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--faq-wine-gradient);
  opacity: 0;
  transition: opacity 0.5s var(--faq-ease);
  pointer-events: none;
}
.faq-item:hover:not([open]) {
  background: rgba(255, 255, 255, 0.04);
}
.faq-item[open] {
  background: transparent;
  transform: translateY(-1px);
  box-shadow: var(--faq-wine-glow);
}
.faq-item[open]::before {
  opacity: 1;
}

.faq-item summary {
  position: relative;
  z-index: 1;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 20px 22px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--text);
  transition: color 0.35s var(--faq-ease), padding 0.45s var(--faq-ease);
}
.faq-item[open] summary {
  color: #fff;
  padding-bottom: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item__chev {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border: none;
  border-right: 2px solid var(--brand-light);
  border-bottom: 2px solid var(--brand-light);
  background: transparent;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: 0.7;
  transition: transform 0.5s var(--faq-ease), opacity 0.35s var(--faq-ease), border-color 0.35s var(--faq-ease);
}
.faq-item[open] summary .faq-item__chev {
  transform: rotate(-135deg);
  margin-top: 3px;
  opacity: 1;
  border-color: rgba(255, 220, 225, 0.9);
}

/* Cuerpo · expansión suave (grid 0fr → 1fr) */
.faq-item__collapse {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.52s var(--faq-ease);
}
.faq-item[open] .faq-item__collapse {
  grid-template-rows: 1fr;
}
.faq-item__collapse-inner {
  overflow: hidden;
  min-height: 0;
}
.faq-item__body {
  padding: 0 22px 22px;
  font-size: 16px;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s var(--faq-ease) 0.06s, transform 0.48s var(--faq-ease) 0.04s, color 0.35s var(--faq-ease);
}
.faq-item[open] .faq-item__body {
  opacity: 1;
  transform: translateY(0);
  color: rgba(255, 255, 255, 0.82);
}
.faq-item__body p { margin: 0 0 0.75rem; }
.faq-item__body p:last-child { margin-bottom: 0; }
.faq-item__body strong { color: #fff; font-weight: 600; }
.faq-item__body ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}
.faq-item__body li { margin-bottom: 0.35rem; }

.faq-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.25rem;
}

.faq-cta-bar:not(.kit-board) {
  margin-top: 3.5rem;
  padding: 2rem 2.25rem;
  border-radius: 20px;
  border: none;
  background: var(--faq-wine-gradient);
  box-shadow: var(--faq-wine-glow);
}
.faq-cta-bar__text {
  max-width: 420px;
  margin: 0 auto;
}
.faq-cta-bar__text h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: 0.02em;
  color: #fff;
}
.faq-cta-bar__text p {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
}
.faq-cta-bar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.faq-cta-bar .doc-btn-primary {
  padding: 12px 22px;
  font-size: 11px;
}
.faq-cta-bar .doc-btn-ghost {
  padding: 12px 18px;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.2);
}
.faq-cta-bar .doc-btn-ghost:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-item::before,
  .faq-item summary,
  .faq-item__chev,
  .faq-item__collapse,
  .faq-item__body,
  .faq-toc__link {
    transition: none !important;
  }
  .faq-item[open] {
    transform: none;
  }
  .faq-item__body {
    opacity: 1;
    transform: none;
  }
  .faq-item .faq-item__collapse {
    grid-template-rows: 1fr;
  }
  .faq-item:not([open]) .faq-item__collapse {
    grid-template-rows: 0fr;
  }
}
