/* ══════════════════════════════════════════════════════════
   FAQ.CSS – Preguntas Frecuentes Tarjeta Digital RapiCredit
══════════════════════════════════════════════════════════ */

/* ── CONTAINER ── */
.faq-container {
  max-width: 860px !important;
}

/* ── BUSCADOR ── */
.faq-search {
  margin-bottom: 32px;
}
.faq-search__inner {
  position: relative;
  display: flex;
  align-items: center;
}
.faq-search__icon {
  position: absolute;
  left: 18px;
  color: var(--blue);
  font-size: 1rem;
  pointer-events: none;
}
.faq-search__input {
  width: 100%;
  padding: 16px 52px;
  border: 2px solid var(--blue-5);
  border-radius: 100px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-search__input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(65,72,245,0.10);
}
.faq-search__input::placeholder { color: var(--text-light); }
.faq-search__clear {
  position: absolute;
  right: 16px;
  width: 30px; height: 30px;
  border: none;
  background: var(--blue-6);
  border-radius: 50%;
  color: var(--blue);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.faq-search__clear:hover { background: var(--blue-5); }

/* ── RESULTADOS DE BÚSQUEDA ── */
.faq-results-header {
  font-size: 0.85rem;
  color: var(--text-medium);
  padding: 12px 4px 16px;
  border-bottom: 1px solid var(--blue-6);
  margin-bottom: 8px;
}
.faq-results-header strong { color: var(--navy); }
.faq-no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
}
.faq-no-results i {
  font-size: 2.5rem;
  color: var(--blue-5);
  margin-bottom: 16px;
  display: block;
}
.faq-no-results p { font-size: 0.9rem; line-height: 1.6; }
.faq-no-results strong { color: var(--navy); }

/* ── TABS DE CATEGORÍA ── */
.faq-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding-bottom: 4px;
}
.faq-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--blue-5);
  border-radius: 100px;
  background: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.faq-tab i { font-size: 0.75rem; }
.faq-tab:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-6);
}
.faq-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(65,72,245,0.25);
}

/* ── SECCIONES FAQ ── */
.faq-section {
  margin-bottom: 48px;
  scroll-margin-top: 90px;
}
.faq-section__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--blue-6);
}
.faq-section__icon {
  width: 44px; height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.faq-section__title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy);
  flex: 1;
  margin: 0;
}
.faq-section__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--blue-6);
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ── LISTA DE PREGUNTAS ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid var(--blue-6);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
}
.faq-item {
  border-bottom: 1px solid var(--blue-6);
}
.faq-item:last-child { border-bottom: none; }

/* ── PREGUNTA (BOTÓN) ── */
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  transition: background 0.18s;
}
.faq-q:hover { background: var(--blue-6); }
.faq-item.open .faq-q { background: linear-gradient(90deg, #f0f2ff 0%, #f8f9ff 100%); }
.faq-q span {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.45;
  flex: 1;
}
.faq-item.open .faq-q span { color: var(--blue); }
.faq-chevron {
  font-size: 0.75rem;
  color: var(--blue);
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* ── RESPUESTA ── */
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), padding 0.25s;
  padding: 0 24px;
}
.faq-item.open .faq-a {
  max-height: 2000px;
  padding: 0 24px 22px;
}
.faq-a p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-medium);
  margin-bottom: 10px;
}
.faq-a p:last-child { margin-bottom: 0; }
.faq-a p strong { color: var(--navy); }

/* ── BULLETS ── */
.faq-bullets {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.faq-bullets li {
  font-size: 0.88rem;
  color: var(--text-medium);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}
.faq-bullets li::before {
  content: '–';
  position: absolute;
  left: 4px;
  color: var(--blue);
  font-weight: 700;
}

/* ── STEPS (pasos numerados) ── */
.faq-steps {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.6;
}
.faq-steps li span {
  min-width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-2) 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── TABLA COMPARATIVA ── */
.faq-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
@media (max-width: 600px) {
  .faq-compare { grid-template-columns: 1fr; }
}
.faq-compare__col {
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.83rem;
}
.faq-compare__col--no { border: 1.5px solid #ffcdd2; }
.faq-compare__col--yes { border: 1.5px solid #c8e6c9; }
.faq-compare__header {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.faq-compare__col--no .faq-compare__header { background: #ffebee; color: #c62828; }
.faq-compare__col--yes .faq-compare__header { background: #e8f5e9; color: #2e7d32; }
.faq-compare__col ul {
  list-style: none;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.faq-compare__col ul li {
  font-size: 0.82rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* ── NOTAS / CALLOUTS ── */
.faq-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin: 12px 0;
  font-size: 0.87rem;
}
.faq-note > i {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.faq-note p, .faq-note ul { margin: 0; font-size: 0.87rem; }
.faq-note p + ul, .faq-note div > p { margin-top: 6px; }
.faq-note--warning {
  background: #fffbf0;
  border: 1px solid #f0c040;
}
.faq-note--warning > i { color: #c08000; }
.faq-note--info {
  background: #f0f4ff;
  border: 1px solid var(--blue-5);
}
.faq-note--info > i { color: var(--blue); }
.faq-note--danger {
  background: #fff0f0;
  border: 1px solid #ffb3b3;
}
.faq-note--danger > i { color: #d32f2f; }
.faq-note--danger p { color: var(--text-dark); }

/* ── LINK DENTRO DE RESPUESTAS ── */
.faq-link {
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
  word-break: break-all;
}
.faq-link:hover { text-decoration: underline; }

/* ── MARK (resaltado de búsqueda) ── */
mark {
  background: #fff176;
  color: var(--navy);
  border-radius: 3px;
  padding: 0 2px;
}

/* ── CTA CONTACTO ── */
.faq-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin: 48px 0 32px;
  flex-wrap: wrap;
}
.faq-cta__icon {
  width: 56px; height: 56px;
  min-width: 56px;
  background: rgba(255,255,255,0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--mint);
}
.faq-cta__content { flex: 1; min-width: 200px; }
.faq-cta__content strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.faq-cta__content p { font-size: 0.88rem; color: rgba(255,255,255,0.75); margin: 0; }
.faq-cta__btn {
  background: var(--mint) !important;
  color: var(--navy) !important;
  border-color: transparent !important;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-cta__btn:hover {
  background: #5cffc0 !important;
  transform: translateY(-2px);
}
.faq-cta__btn i { font-size: 1.1rem; }

/* ── LINKS A DOCUMENTOS ── */
.faq-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .faq-docs { grid-template-columns: 1fr; }
}
.faq-doc-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1.5px solid var(--blue-5);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}
.faq-doc-link:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(65,72,245,0.1);
  transform: translateY(-2px);
}
.faq-doc-link > i:first-child {
  font-size: 1.4rem;
  color: var(--blue);
  flex-shrink: 0;
}
.faq-doc-link div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.faq-doc-link strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}
.faq-doc-link span {
  font-size: 0.76rem;
  color: var(--text-light);
  line-height: 1.4;
}
.faq-doc-link > i:last-child {
  color: var(--blue);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── FOOTER ── */
.tyc-footer {
  background: var(--navy);
  padding: 40px 0;
  text-align: center;
  margin-top: 0;
}
.tyc-footer .container { max-width: 860px; }
.tyc-footer__logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  margin-bottom: 14px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.tyc-footer p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .faq-tabs { gap: 6px; }
  .faq-tab { padding: 7px 12px; font-size: 0.78rem; }
  .faq-q { padding: 14px 16px; }
  .faq-q span { font-size: 0.87rem; }
  .faq-item.open .faq-a { padding: 0 16px 18px; }
  .faq-cta { padding: 22px 20px; gap: 14px; }
  .faq-cta__icon { display: none; }
}
