/* ==========================================================================
   FAQ HUB PAGE (faq.html) — search bar, sticky section index, per-service
   sections, and extra hover/lift polish layered on top of the shared
   .faq/.faq-item/.faq-q/.faq-a accordion (css/buttons-cards.css, js/faq.js).
   ========================================================================== */

/* Tighten the gap to the search bar right below — .page-hero is shared with
   15 other pages, so this overrides just the bottom padding on this page. */
.faq-page .page-hero { padding-bottom: 10px; }

/* ---- Search bar ---- */
.faq-search-wrap { max-width: 32rem; margin: 0 auto; position: relative; }
.faq-search-wrap .search-ico {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-size: 0.9rem; pointer-events: none;
}
.faq-search-wrap input {
  width: 100%; font-family: inherit; font-size: 0.85rem;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: var(--radius-xl); border: 1px solid var(--border);
  background: var(--surface-raised); color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-search-wrap input::placeholder { color: var(--text-faint); }
.faq-search-wrap input:focus {
  outline: none; border-color: var(--red-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.faq-search-count { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.6rem; min-height: 1.1em; }

/* ---- Layout: sticky index + content column ---- */
.faq-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
@media (min-width: 1024px) { .faq-layout { grid-template-columns: 19rem 1fr; gap: 3rem; } }

.faq-index {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-2xl);
  padding: 0.75rem;
}
@media (min-width: 1024px) {
  .faq-index { position: sticky; top: 5.5rem; max-height: calc(100vh - 7rem); overflow-y: auto; }
}
.faq-index-title {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 0.5rem 0.75rem;
}
.faq-index ul { display: flex; flex-direction: column; gap: 0.15rem; }
.faq-index a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-lg);
  font-size: 0.84rem; font-weight: 650; color: var(--text);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.faq-index a .count { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; flex-shrink: 0; }
.faq-index a:hover { background: var(--surface-raised); color: var(--red-600); transform: translateX(3px); }
.faq-index a.active { background: var(--surface-raised); color: var(--red-600); box-shadow: inset 3px 0 0 var(--red-600); }

/* Mobile/tablet: index becomes a horizontal scrolling pill row above the content */
@media (max-width: 1023px) {
  .faq-index { display: flex; overflow-x: auto; gap: 0.5rem; padding: 0.75rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .faq-index::-webkit-scrollbar { display: none; }
  .faq-index-title { display: none; }
  .faq-index ul { flex-direction: row; }
  .faq-index a { white-space: nowrap; background: var(--surface-raised); border: 1px solid var(--border-soft); border-radius: 999px; }
  .faq-index a .count { display: none; }
  .faq-index a:hover, .faq-index a.active { box-shadow: none; border-color: rgba(239, 68, 68, 0.35); }
}

/* ---- Per-service sections in the content column ---- */
.faq-section { margin-bottom: 3rem; scroll-margin-top: 5.5rem; }
.faq-section:last-child { margin-bottom: 0; }
.faq-section-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.25rem; }
.faq-section-head .ico {
  height: 2.6rem; width: 2.6rem; border-radius: var(--radius-xl); background: var(--red-50); color: var(--red-600);
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0;
}
html[data-theme="dark"] .faq-section-head .ico { background: rgba(239, 68, 68, 0.14); }
.faq-section-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--text-strong); letter-spacing: -0.01em; }
.faq-section-head .go-link { margin-left: auto; font-size: 0.8rem; font-weight: 700; color: var(--red-600); white-space: nowrap; flex-shrink: 0; }
html[data-theme="dark"] .faq-section-head .go-link { color: #fca5a5; }

/* ---- Extra hover/lift polish on top of the shared accordion ---- */
.faq-page .faq-item { transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.faq-page .faq-item:hover { border-color: rgba(239, 68, 68, 0.35); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.faq-page .faq-item.open { border-color: rgba(239, 68, 68, 0.45); }
.faq-page .faq-q { transition: background 0.2s ease, color 0.2s ease; }
.faq-page .faq-item:hover .faq-q, .faq-page .faq-item.open .faq-q { background: var(--red-50); color: var(--red-600); }
html[data-theme="dark"] .faq-page .faq-item:hover .faq-q,
html[data-theme="dark"] .faq-page .faq-item.open .faq-q { background: rgba(239, 68, 68, 0.1); }
@media (prefers-reduced-motion: reduce) {
  .faq-page .faq-item { transition: none; transform: none !important; }
}

/* ---- Search-driven states ---- */
.faq-hidden { display: none !important; }
mark.faq-hl { background: rgba(239, 68, 68, 0.2); color: inherit; border-radius: 3px; padding: 0 0.1em; }
.faq-no-results { display: none; text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.faq-no-results.show { display: block; }
.faq-no-results .ico { font-size: 2rem; margin-bottom: 0.75rem; }
