/* =====================================================================
   FAQ · preguntas frecuentes  (CSS propio de este módulo)
   Estructura:  [ banner + buscador ] ~transición~ [ sección clara: temas · tarjetas · cierre ]
   Solo usa de la web global: la barra de navegación, el pie y el fondo
   de banner del <body> (styles.css). Todo lo demás está definido aquí
   y cuelga de body.fq-page, así que no afecta a otras páginas.
   ===================================================================== */

.fq-page {
  --fq-blue: #5ca8ff;
  --fq-ink: #0f1424;          /* texto sobre fondo claro */
  --fq-muted: #5a6582;
  --fq-paper: #ffffff;        /* fondo de la sección clara (debe ser igual al de la transición) */
  --fq-card: #f3f7ff;
  --fq-line: #e2e9f7;
  --fq-radius: 28px;
}

/* Colores por tema (los comparten los botones de tema y las tarjetas).
   --tone: acento · --tint: fondo de etiqueta/icono · --tag: texto de etiqueta (legible sobre blanco)
   --from/--to: degradado del botón de tema · --edge: borde · --glow: sombra */
.fq-c-gen   { --tone: #5ca8ff; --tint: #e6f0ff; --tag: #1f4fb8; --from: #f7faff; --to: #dfecff; --edge: #cfe0fb; --glow: 47, 102, 214; }
.fq-c-shop  { --tone: #f5b700; --tint: #fff3c4; --tag: #7a5200; --from: #fffdf2; --to: #fff6cf; --edge: #f6e8a8; --glow: 214, 160, 0; }
.fq-c-staff { --tone: #b07cff; --tint: #f1e8ff; --tag: #6428c4; --from: #fbf8ff; --to: #eee2ff; --edge: #dccbfa; --glow: 140, 84, 230; }
.fq-c-ban   { --tone: #ff5d5d; --tint: #ffe4e1; --tag: #a3221b; --from: #fff8f7; --to: #ffe3df; --edge: #f6c9c4; --glow: 214, 60, 60; }

/* sin esto, el display de algunos contenedores ignora el atributo hidden */
.fq-page [hidden] { display: none !important; }
.fq-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ===== 1. BANNER (el fondo es el banner global del <body>) ===== */
.fq-banner {
  position: relative;
  padding: 140px 20px clamp(120px, 15vw, 180px);
  text-align: center;
  color: #fff;
  animation: rise .7s ease both;
}
.fq-banner h1 {
  font-family: 'Oxanium', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 8.5vw, 64px);
  line-height: 1.08;
  text-shadow: 0 4px 18px rgba(0, 0, 0, .5);
}
.fq-banner h1 span { color: var(--fq-blue); }
.fq-banner p.fq-sub {
  max-width: 640px;
  margin: 14px auto 0;
  font-size: clamp(15px, 3.6vw, 18px);
  color: #d5daf0;
}

/* buscador */
.fq-search {
  position: relative;
  max-width: 560px;
  margin: 26px auto 0;
}
.fq-search input {
  width: 100%;
  height: 54px;
  padding: 0 52px;
  font: inherit;
  font-size: 16px;                       /* 16px: evita el zoom automático en iOS */
  color: #fff;
  background: rgba(16, 18, 30, .72);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  -webkit-appearance: none; appearance: none;
  transition: border-color .25s, box-shadow .25s;
}
.fq-search input::placeholder { color: #aab1cf; }
.fq-search input::-webkit-search-cancel-button { display: none; }
.fq-search input:hover { border-color: rgba(92, 168, 255, .55); }
.fq-search input:focus-visible { outline: 2px solid var(--fq-blue); outline-offset: 2px; border-color: var(--fq-blue); }
.fq-search-ico {
  position: absolute; left: 18px; top: 50%;
  width: 20px; height: 20px; transform: translateY(-50%);
  fill: none; stroke: var(--fq-blue); stroke-width: 2.2; stroke-linecap: round;
  pointer-events: none;
}
.fq-clear {
  position: absolute; right: 8px; top: 50%;
  display: grid; place-items: center;
  width: 38px; height: 38px; transform: translateY(-50%);
  color: #c9cde4; background: rgba(255, 255, 255, .08);
  border-radius: 12px; cursor: pointer; transition: background .2s, color .2s;
}
.fq-clear:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.fq-clear:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fq-clear svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ===== OLA divisoria (igual que Inicio y Sugerencias): dos capas · quieta en PC, con movimiento en móvil ===== */
.fq-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;          /* -1px: sin línea entre la ola y la sección clara */
  height: clamp(70px, 10vw, 120px);
  overflow: hidden;
  pointer-events: none;
}
.fq-wave svg {
  position: absolute;
  bottom: 0; left: 0;
  display: block;
  width: 200%; height: 100%;                /* el dibujo se repite 2 veces: -50% encaja sin saltos */
}
.fq-wave .back  { fill: rgba(255, 255, 255, .45); }
.fq-wave .front { fill: var(--fq-paper); }
@media (max-width: 759px) {                /* movimiento SOLO en móvil */
  .fq-wave svg { animation: fqDrift 16s linear infinite; }
  .fq-wave .back { animation-duration: 26s; animation-direction: reverse; }
}
@keyframes fqDrift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .fq-wave svg { animation: none; } }

/* ===== 3. SECCIÓN CLARA ===== */
.fq-light {
  background: var(--fq-paper);
  color: var(--fq-ink);
  padding: 20px 14px 50px;
}
.fq-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

/* --- 3a. Temas (también son los filtros) --- */
.fq-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fq-cat {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 120px;
  padding: 16px;
  font: inherit;
  text-align: left;
  color: var(--fq-ink);
  background: linear-gradient(135deg, var(--from), var(--to));
  border: 1px solid var(--edge);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(var(--glow), .12);
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}
.fq-cat::before {                       /* resplandor suave detrás del mob */
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(var(--glow), .24), transparent 68%);
  pointer-events: none;
}
.fq-cat:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(var(--glow), .22); }
.fq-cat:focus-visible { outline: 3px solid var(--fq-ink); outline-offset: 3px; }
.fq-cat[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--tone), 0 18px 40px rgba(var(--glow), .22); }
.fq-cat-name { position: relative; z-index: 1; font-size: clamp(16px, 4.2vw, 20px); font-weight: 800; line-height: 1.15; letter-spacing: -.3px; }
.fq-cat-name::before {                  /* pequeño detalle de color, como en Sugerencias */
  content: "";
  display: block;
  width: 30px; height: 5px;
  margin-bottom: 10px;
  border-radius: 99px;
  background: var(--tone);
}
.fq-cat-count { position: relative; z-index: 1; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--fq-muted); }
.fq-mob {
  position: absolute; right: 10px; top: 10px; z-index: 1;
  width: 60px; height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(var(--glow), .28));
  transition: transform .3s ease;
}
.fq-cat:hover .fq-mob,
.fq-cat[aria-pressed="true"] .fq-mob { transform: scale(1.08) rotate(-3deg); }

/* --- 3b. Estado del filtro --- */
.fq-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 0 4px; }
.fq-status { font-size: 14px; font-weight: 600; color: var(--fq-muted); }
.fq-reset {
  padding: 7px 14px;
  font: inherit; font-size: 13px; font-weight: 700;
  color: var(--fq-ink); background: var(--fq-card);
  border: 1px solid var(--fq-line); border-radius: 99px;
  cursor: pointer; transition: border-color .2s;
}
.fq-reset:hover { border-color: var(--fq-blue); }
.fq-reset:focus-visible { outline: 2px solid var(--fq-blue); outline-offset: 2px; }

/* --- 3c. Tarjetas de preguntas (acordeón con <details>) --- */
.fq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;                   /* al abrir una tarjeta, las vecinas no se estiran */
}
.fq-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--fq-line);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(36, 60, 120, .07);
  transition: transform .3s ease, border-color .3s, box-shadow .3s;
}
.fq-card::before {                      /* tinte del tema, solo cuando está abierta */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--from), #fff 70%);
  opacity: 0;
  transition: opacity .3s;
}
.fq-card:hover { transform: translateY(-3px); border-color: var(--edge); box-shadow: 0 16px 36px rgba(var(--glow), .16); }
.fq-card[open] { border-color: var(--tone); box-shadow: 0 16px 36px rgba(var(--glow), .18); }
.fq-card[open]::before { opacity: 1; }

.fq-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: 20px 22px;
  list-style: none;
  cursor: pointer;
}
.fq-card summary::-webkit-details-marker { display: none; }
.fq-card summary:focus-visible { outline: 3px solid var(--fq-ink); outline-offset: -4px; border-radius: 22px; }
.fq-tag {
  grid-column: 1;
  justify-self: start;
  padding: 3px 10px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: var(--tag); background: var(--tint);
  border-radius: 99px;
}
.fq-q {
  grid-column: 1;
  font-size: clamp(15.5px, 3.9vw, 17.5px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--fq-ink);
}
.fq-card summary::after {               /* icono + que gira a × al abrir */
  content: "+";
  grid-column: 2; grid-row: 1 / span 2;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  font-size: 22px; font-weight: 600; line-height: 1;
  color: var(--tag); background: var(--tint);
  border-radius: 50%;
  transition: transform .3s, background .3s;
}
.fq-card[open] summary::after { transform: rotate(45deg); background: var(--tone); color: #0f1424; }

.fq-a { padding: 0 22px 22px; animation: fqIn .3s ease both; }
.fq-a p { max-width: 64ch; font-size: 15px; line-height: 1.6; color: var(--fq-muted); }
.fq-a strong { color: var(--fq-ink); }
.fq-a a {
  font-weight: 700; color: var(--fq-ink);
  text-decoration: underline; text-decoration-color: var(--tone); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.fq-a a:hover { background: var(--tint); }
@keyframes fqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* sin resultados */
.fq-empty {
  padding: 34px 22px;
  text-align: center;
  background: var(--fq-card);
  border: 1px dashed #c5d4f0;
  border-radius: 22px;
}
.fq-empty h3 { font-size: 19px; font-weight: 800; }
.fq-empty p { margin-top: 6px; font-size: 15px; color: var(--fq-muted); }
.fq-empty a { font-weight: 700; color: #1f4fb8; text-decoration: underline; text-underline-offset: 3px; }

/* ===== 4. BLOQUE FINAL (mismo diseño que el bloque azul de Sugerencias, con la abejita) ===== */
.fq-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(96px, 28%, 190px);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 30px 14px 30px 24px;
  background: linear-gradient(135deg, #f7faff, #dfecff);
  border: 1px solid #cfe0fb;
  border-radius: var(--fq-radius);
  box-shadow: 0 10px 30px rgba(47, 102, 214, .12);
}
.fq-cta::before {
  content: "";
  position: absolute; right: -50px; top: 50%;
  width: 300px; height: 300px; transform: translateY(-50%);
  background: radial-gradient(circle, rgba(92, 168, 255, .3), transparent 68%);
  pointer-events: none;
}
.fq-cta-copy { position: relative; z-index: 1; min-width: 0; }
.fq-cta h2 { font-size: clamp(22px, 5.2vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -.4px; }
.fq-cta p { margin-top: 8px; font-size: 15.5px; color: var(--fq-muted); }
.fq-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.fq-btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 15px; font-weight: 800; white-space: nowrap;
  color: #06101f; background: var(--fq-blue);
  border: 1px solid var(--fq-blue); border-radius: 14px;
  box-shadow: 0 8px 24px rgba(92, 168, 255, .45);
  transition: transform .25s, filter .25s, border-color .25s;
}
.fq-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.fq-btn.ghost { background: #fff; border-color: #cfe0fb; box-shadow: none; }
.fq-btn.ghost:hover { border-color: var(--fq-blue); filter: none; }
.fq-btn:focus-visible { outline: 3px solid var(--fq-ink); outline-offset: 3px; }
.fq-bee {
  position: relative; z-index: 1;
  width: 100%; height: auto;
  filter: drop-shadow(0 12px 12px rgba(30, 70, 160, .25));
  animation: fqFloat 5s ease-in-out infinite;
}
@keyframes fqFloat { 50% { transform: translateY(-6px); } }

/* ===== 4b. PIE: fondo blanco continuo y, por encima, la caja oscura del footer ===== */
.fq-foot {
  display: flow-root;
  padding: 10px 14px 34px;
  background: var(--fq-paper);             /* mismo blanco que la sección clara: se ve continuo */
}
.fq-foot footer {
  margin: 0 auto;                          /* el espacio lo da .fq-foot */
  background: #10121e;                     /* sólido: sobre blanco el translúcido original se vería gris */
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 18px 44px rgba(16, 24, 56, .28);
}

/* ===== 5. TABLET ===== */
@media (min-width: 760px) {
  .fq-light { padding: 30px 20px 60px; }
  .fq-inner { gap: 26px; }
  .fq-cats { gap: 18px; }
  .fq-cat { min-height: 140px; padding: 20px; }
  .fq-mob { right: 14px; top: 12px; width: 84px; height: 84px; }
  .fq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .fq-card summary { padding: 22px 26px; }
  .fq-a { padding: 0 26px 24px; }
  .fq-cta { padding: 38px 24px 38px 40px; }
}

/* ===== 6. ESCRITORIO ===== */
@media (min-width: 1000px) {
  .fq-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fq-cat { min-height: 180px; }
  .fq-mob { width: 112px; height: 112px; }
}

/* ===== 7. MÓVIL PEQUEÑO Y MOVIMIENTO REDUCIDO ===== */
@media (max-width: 420px) {
  .fq-cta { grid-template-columns: minmax(0, 1fr) 84px; padding: 24px 8px 24px 20px; }
  .fq-actions { gap: 10px; }
  .fq-btn { padding: 11px 18px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .fq-banner, .fq-a, .fq-bee { animation: none; }
  .fq-card, .fq-cat, .fq-mob, .fq-btn { transition: none; }
}