/* ============================================================
   /faq — Properkey help center (concept "2a")

   Two-column: sticky category sidebar + content (Most Asked featured grid
   then per-category native <details> accordions). Client-side search via
   the faq_search Stimulus controller. Brand tokens per the design spec.
   ============================================================ */

.faq-page {
  --navy: #15223f;
  --blue: #2748c9;
  --orange: #f15a22;
  --orange-hover: #d94d18;
  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #e9edf4;
  --text: #55607a;
  --muted: #8b93a5;
  --chip-bg: #eaf0fd;
  --hero-gradient: linear-gradient(120deg, #141f38 0%, #1b2c5e 45%, #2c4fce 100%);
  --cta-gradient: linear-gradient(120deg, #141f38, #22397f 60%, #2c4fce);

  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Shared navbar (navbar_home) is a transparent overlay with a dark logo;
   over our dark hero the logo needs a light backdrop to read. Scoped to
   /faq so other pages are untouched. */
.faq-page #navbar img[alt="Properkey"] {
  background: #fff;
  border-radius: 12px;
  padding: 6px 14px;
  box-shadow: 0 2px 8px rgba(10, 20, 45, 0.15);
}

/* ---- Hero ---- */
.faq-hero {
  background: var(--hero-gradient);
  color: #fff;
}

.faq-hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  /* top clears the fixed navbar so the breadcrumb doesn't sit under it */
  padding: 104px 24px 52px;
}

.faq-breadcrumb {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 18px;
}

.faq-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.faq-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.faq-breadcrumb-sep {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.4);
}

.faq-hero-title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 14px;
}

.faq-hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
  margin: 0;
}

.faq-updated {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 14px 0 0;
}

.faq-updated time {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

/* ---- Search ---- */
.faq-search {
  position: relative;
  max-width: 640px;
  margin-top: 28px;
}

.faq-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  padding: 15px 44px;
  font-size: 16px;
  color: var(--navy);
  background: #fff;
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(10, 20, 45, 0.18);
  -webkit-appearance: none;
  appearance: none;
}

.faq-search-input::placeholder {
  color: var(--muted);
}

.faq-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(39, 72, 201, 0.35), 0 12px 30px rgba(10, 20, 45, 0.18);
}

.faq-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.faq-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
}

.faq-search-clear:hover {
  color: var(--navy);
}

/* ---- Body: sidebar + content ---- */
.faq-body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 8px;
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 48px;
  align-items: start;
}

.faq-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
}

.faq-sidebar-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 14px;
  padding-left: 4px;
}

.faq-sidebar-nav {
  display: flex;
  flex-direction: column;
}

.faq-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.faq-sidebar-link:hover {
  background: #fff;
  color: var(--blue);
}

.faq-sidebar-link--featured {
  color: var(--orange);
  font-weight: 700;
}

.faq-sidebar-link--featured:hover {
  color: var(--orange);
}

.faq-sidebar-link--featured .fa-star {
  margin-right: 6px;
}

.faq-sidebar-count {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

/* ---- Section headings ---- */
.faq-section-heading {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  /* sidebar anchors target this heading — clear the fixed navbar so the
     section title isn't hidden behind it after a jump */
  scroll-margin-top: 100px;
}

.faq-section-star {
  color: var(--orange);
}

.faq-count-pill {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 2px 9px;
  letter-spacing: 0;
}

/* ---- Featured (Most Asked) ---- */
.faq-featured {
  margin-bottom: 40px;
}

.faq-featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.faq-featured-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(21, 34, 63, 0.04);
}

.faq-featured-summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 24px;
}

.faq-featured-summary::-webkit-details-marker {
  display: none;
}

.faq-featured-summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 13px;
}

.faq-featured-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.faq-featured-q {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0;
}

.faq-featured-chevron {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-featured-card[open] .faq-featured-chevron {
  transform: rotate(180deg);
}

.faq-featured-teaser {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 10px 0 0;
}

.faq-featured-card[open] .faq-featured-teaser {
  display: none;
}

.faq-featured-a {
  padding: 2px 24px 22px;
  color: var(--text);
  line-height: 1.65;
  font-size: 0.95rem;
}

.faq-featured-a p {
  margin: 0 0 0.6rem;
}

.faq-featured-a p:last-child {
  margin-bottom: 0;
}

.faq-featured-a ul,
.faq-featured-a ol {
  margin: 0 0 0.6rem 1.25rem;
}

.faq-featured-a strong {
  color: var(--navy);
}

/* ---- Category accordions (native <details>) ---- */
.faq-category {
  margin-bottom: 40px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(21, 34, 63, 0.03);
}

.faq-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 13px;
}

.faq-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--chip-bg);
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-q {
  flex: 1;
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
}

.faq-chevron {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-a {
  padding: 0 20px 20px 60px;
  color: var(--text);
  line-height: 1.7;
}

.faq-a p {
  margin: 0 0 0.75rem;
}

.faq-a p:last-child {
  margin-bottom: 0;
}

.faq-a a {
  color: var(--blue);
  font-weight: 600;
}

.faq-a ul,
.faq-a ol {
  margin: 0 0 0.75rem 1.25rem;
}

.faq-a strong {
  color: var(--navy);
}

/* ---- Empty state ---- */
.faq-empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}

.faq-empty-icon {
  font-size: 2rem;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
  display: block;
}

.faq-empty a {
  color: var(--orange);
  font-weight: 600;
}

/* ---- CTA ---- */
.faq-cta {
  max-width: 1112px;
  margin: 8px auto 56px;
  background: var(--cta-gradient);
  border-radius: 18px;
  padding: 44px 32px;
  text-align: center;
  color: #fff;
}

.faq-cta-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.faq-cta-text {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto 22px;
  max-width: 520px;
}

.faq-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.faq-cta-button:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .faq-body {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }

  .faq-sidebar {
    position: static;
  }

  .faq-sidebar-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
}

@media (max-width: 1159px) {
  .faq-cta {
    margin-left: 24px;
    margin-right: 24px;
  }
}

@media (max-width: 640px) {
  .faq-hero-inner {
    padding: 92px 20px 36px;
  }

  .faq-featured-grid {
    grid-template-columns: 1fr;
  }

  .faq-sidebar-nav {
    grid-template-columns: 1fr;
  }

  .faq-a {
    padding-left: 20px;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .faq-chevron,
  .faq-cta-button {
    transition: none !important;
  }
}
