/* ==========================================================================
   TPS Empire - FAQ Scroll-Driven Morphing Transition & Hanging Cascade System
   Reference: Smooth scroll-driven container shrink/morph into centered FAQ button
              on modern dot-grid background, cascading into hanging question cards.
   Theme: TPS Orange (#ea580c / #e97122), Royal Indigo (#2432c9), Warm Cream (#fdfbf7)
   ========================================================================== */

:root {
  /* Brand Theme Colors */
  --tps-primary-orange: #ea580c;
  --tps-primary-orange-rgb: 234, 88, 12;
  --tps-primary-blue: #2432c9;
  --tps-primary-blue-rgb: 36, 50, 201;
  --tps-amber: #ffa41b;
  --tps-dark-navy: #090f35;
  --tps-dark-space: #050814;
  --tps-dark-surface: #0e152e;

  /* Page Backgrounds */
  --tps-bg-cream: #fff6ee;
  --tps-grid-line: rgba(234, 88, 12, 0.07);
  --tps-card-white: #ffffff;
  --tps-card-border: #e2e8f0;

  /* Typography */
  --tps-font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tps-text-head: #0f172a;
  --tps-text-body: #475569;
  --tps-text-muted: #8896ab;

  /* Smooth Transitions */
  --tps-trans-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --tps-trans-spring: cubic-bezier(0.18, 0.89, 0.32, 1.15);
}

/* --------------------------------------------------------------------------
   Scroll Depth Progress Bar
   -------------------------------------------------------------------------- */
.faq-scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3.5px;
  background: linear-gradient(90deg, #ea580c, #ffa41b, #2432c9);
  z-index: 99999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.8);
}

/* --------------------------------------------------------------------------
   Main Viewport Container
   -------------------------------------------------------------------------- */
.faq-page-wrapper {
  position: relative;
  width: 100%;
  background: var(--tps-bg-cream);
  overflow-x: clip;
}

/* --------------------------------------------------------------------------
   DOT-GRID FAQ SECTION (Real-Time Scroll-Driven Continuous Zoom System)
   - Initial View: Fullscreen Centered Intro with Headline & FAQ Box (Dead Center)
   - Continuous Scroll: The FAQ Box scales continuously in direct response to user scrolling
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   DOT-GRID FAQ SECTION (Real-Time Scroll-Driven Continuous Zoom System)
   - Initial View: Fullscreen Centered Intro with Headline & FAQ Box (Dead Center)
   - Continuous Scroll: The FAQ Box scales continuously into the questions cascade
   -------------------------------------------------------------------------- */
.faq-scroll-zoom-track {
  position: relative;
  width: 100%;
  height: 100vh;
  /* Exactly 1 viewport height - no trailing empty space */
}

.faq-transition-section {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--tps-bg-cream);
  background-image:
    linear-gradient(to right, var(--tps-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--tps-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  padding: 110px 24px 30px;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 768px) {
  .faq-scroll-zoom-track {
    height: 100vh;
  }

  .faq-transition-section {
    padding: 85px 16px 24px;
  }
}

.faq-transition-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 10;
  will-change: transform, opacity;
}

/* Bold Heading */
.faq-section-morph-heading {
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #0f172a;
  margin: 0 0 18px 0;
  text-align: center;
  font-family: var(--tps-font-main);
  will-change: transform, opacity;
}

/* Subtitle (Exact User Requested Prompt Text) */
.faq-section-morph-lead {
  font-size: clamp(16px, 1.8vw, 18.5px);
  line-height: 1.7;
  color: #475569;
  max-width: 760px;
  margin: 0 0 32px 0;
  text-align: center;
  font-family: var(--tps-font-main);
  will-change: transform, opacity;
}

/* Centerpiece FAQ Box (Matte Flat Styling with Sharp Edges & Crisp Rendering) */
.faq-docked-pill-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ea580c;
  color: #ffffff;
  padding: 14px 44px;
  border-radius: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: none;
  box-shadow: none;
  font-family: var(--tps-font-main);
  margin: 0;
  cursor: default;
  user-select: none;
  outline: none;
  transform-origin: center center;
  transform: translate3d(0, 0, 0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}

.faq-docked-pill-box>* {
  transition: opacity 0.2s ease;
  will-change: opacity;
}

.faq-docked-pill-box .pill-faq-icon {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ==========================================================================
   HANGING QUESTIONS CASCADE SECTION ("SAME STYLE AS IN OTHER FAQ SECTION")
   ========================================================================== */
.faq-questions-cascade-section {
  position: relative;
  width: 100%;
  background-color: var(--tps-bg-cream);
  background-image:
    linear-gradient(to right, var(--tps-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--tps-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  padding: 10px 0 100px 0;
  box-sizing: border-box;
  z-index: 10;
}

.faq-questions-layout-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}

/* Title & Description Above Questions Cascade */
.faq-cascade-header-block {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 36px auto;
}

.faq-cascade-section-heading {
  font-size: clamp(32px, 3.8vw, 48px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #0f172a;
  margin: 0 0 16px 0;
  text-align: center;
  font-family: var(--tps-font-main);
}

.faq-cascade-section-lead {
  font-size: clamp(15.5px, 1.7vw, 18px);
  line-height: 1.7;
  color: #475569;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--tps-font-main);
}

/* 2-Column Split Layout */
.faq-split-main-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: flex-start;
}

@media (max-width: 991px) {
  .faq-split-main-grid {
    grid-template-columns: 1fr;
  }
}

/* No Results State */
.faq-no-results-panel {
  display: none;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 30px;
}

.faq-no-results-panel.show {
  display: block;
}

.faq-no-results-icon {
  font-size: 42px;
  color: #ea580c;
  margin-bottom: 16px;
}

.faq-no-results-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  font-family: var(--tps-font-main);
}

.faq-no-results-desc {
  font-size: 14.5px;
  color: #64748b;
  max-width: 440px;
  margin: 0 auto 20px auto;
}

.faq-reset-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2432c9;
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: var(--tps-font-main);
}

.faq-reset-filters-btn:hover {
  background: #ea580c;
}

/* Category Group Heading */
.faq-category-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 36px 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.faq-category-header-wrap:first-of-type {
  margin-top: 0;
}

.faq-category-title-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq-category-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef2ff;
  color: #2432c9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.faq-category-name {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  font-family: var(--tps-font-main);
}

.faq-category-count-badge {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 9999px;
}

/* Cards Stack Container */
.tps-faq-cards-stack {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: transparent;
  z-index: 2;
  margin-bottom: 30px;
}

/* --------------------------------------------------------------------------
   INDIVIDUAL HANGING FAQ CARD (Scroll-Driven Drop & Reveal)
   -------------------------------------------------------------------------- */
.tps-faq-card {
  position: relative;
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 0;
  display: flex;
  align-items: stretch;
  overflow: visible;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(-30px) scale(0.97);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.15),
    border-color 0.25s ease,
    background-color 0.25s ease;
  will-change: transform, opacity;
  cursor: pointer;
}

/* Card becomes visible strictly when scrolled into view */
.tps-faq-card.is-card-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* --------------------------------------------------------------------------
   SYNCHRONIZED HANGING WIRE LINES (Appear with each card)
   -------------------------------------------------------------------------- */
.tps-card-hanging-wires {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 1;
}

.tps-wire {
  position: absolute;
  width: 2px;
  background: #cbd5e1;
  transform-origin: top;
  transform: scaleY(0);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.tps-wire.left {
  left: 36px;
}

.tps-wire.right {
  right: 36px;
}

/* First Card in category top hanging wires reaching from anchor ceiling */
.tps-faq-card[data-first-in-group="true"] .tps-wire {
  top: -42px;
  height: 42px;
}

/* Anchor dot nodes on the top wires of first card */
.tps-faq-card[data-first-in-group="true"] .tps-wire::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  border: 1.5px solid #ffffff;
  box-sizing: border-box;
}

/* Subsequent Cards connector wires spanning the 14px gap */
.tps-faq-card:not([data-first-in-group="true"]) .tps-wire {
  top: -14px;
  height: 14px;
}

/* When card is visible, wires appear and expand downwards with the card */
.tps-faq-card.is-card-visible .tps-wire {
  transform: scaleY(1);
  opacity: 1;
}

/* Hover & Active Selected State */
.tps-faq-card:hover,
.tps-faq-card.is-open {
  border-color: #2432c9;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(36, 50, 201, 0.1);
  transform: translateY(-2px);
}

.tps-faq-card.theme-orange:hover,
.tps-faq-card.theme-orange.is-open {
  border-color: #ea580c;
  box-shadow: 0 10px 28px rgba(234, 88, 12, 0.1);
  transform: translateY(-2px);
}

/* Number Badge Tab on Left of Each Card (01., 02., 03.) */
.tps-faq-num-tab {
  width: 72px;
  min-width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-right: 1.5px solid #e2e8f0;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--tps-font-main);
  color: #475569;
  transition: background 0.25s ease, color 0.25s ease, border-right-color 0.25s ease;
  user-select: none;
}

/* Theme Blue Number Tab */
.tps-faq-card.theme-blue .tps-faq-num-tab {
  background: #eef2ff;
  color: #2432c9;
  border-right-color: #dbeafe;
}

/* Theme Orange Number Tab */
.tps-faq-card.theme-orange .tps-faq-num-tab {
  background: #fff7ed;
  color: #ea580c;
  border-right-color: #ffedd5;
}

/* Question Content Area */
.tps-faq-card-content {
  flex: 1;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.tps-faq-q-title {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.35;
  color: #0f172a;
  margin: 0;
  font-family: var(--tps-font-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tps-faq-toggle-icon {
  font-size: 13px;
  color: #94a3b8;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
  flex-shrink: 0;
}

.tps-faq-card:hover .tps-faq-toggle-icon {
  color: #2432c9;
  transform: rotate(180deg);
}

.tps-faq-card.theme-orange:hover .tps-faq-toggle-icon {
  color: #ea580c;
  transform: rotate(180deg);
}

.tps-faq-card.is-open .tps-faq-toggle-icon {
  transform: rotate(180deg);
  color: #2432c9;
}

.tps-faq-card.theme-orange.is-open .tps-faq-toggle-icon {
  color: #ea580c;
  transform: rotate(180deg);
}

/* Expandable Answer Drawer */
.tps-faq-a-drawer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.42s var(--tps-trans-smooth), opacity 0.32s ease, margin-top 0.25s ease;
  margin-top: 0;
}

.tps-faq-card.is-open .tps-faq-a-drawer,
.tps-faq-card:hover .tps-faq-a-drawer {
  max-height: 800px;
  opacity: 1;
  margin-top: 14px;
}

.tps-faq-a-text {
  font-size: 14.5px;
  line-height: 1.7;
  color: #475569;
  margin: 0 0 14px 0;
  border-top: 1px dashed #e2e8f0;
  padding-top: 14px;
}

.tps-faq-a-text ol,
.tps-faq-a-text ul {
  padding-left: 20px;
  margin: 10px 0;
}

.tps-faq-a-text li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.tps-faq-a-text strong {
  color: #0f172a;
}

/* Card Footer with Feedback & Copy Link */
.tps-faq-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12.5px;
  color: #64748b;
}

.tps-faq-feedback-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tps-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tps-feedback-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tps-feedback-btn.active {
  background: #eef2ff;
  border-color: #2432c9;
  color: #2432c9;
}

.tps-copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.tps-copy-link-btn:hover {
  color: #2432c9;
}

/* --------------------------------------------------------------------------
   STICKY SIDEBAR SUPPORT PANEL
   -------------------------------------------------------------------------- */
.faq-sidebar-col {
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
  align-self: flex-start;
  z-index: 20;
}

.faq-sidebar-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 0;
  padding: 30px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.faq-sidebar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 0;
  margin-bottom: 16px;
}

.faq-status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: faqPulseGreen 2s infinite;
}

@keyframes faqPulseGreen {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

.faq-sidebar-card h3 {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px 0;
  font-family: var(--tps-font-main);
}

.faq-sidebar-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: #64748b;
  margin: 0 0 22px 0;
}

.faq-sidebar-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.faq-sidebar-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  color: #0f172a;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.faq-sidebar-contact-item:hover {
  background: #eef2ff;
  border-color: #2432c9;
  transform: translateX(3px);
}

.faq-sidebar-contact-item i {
  font-size: 16px;
  color: #2432c9;
  margin-top: 3px;
}

.faq-sidebar-contact-item div {
  display: flex;
  flex-direction: column;
}

.faq-sidebar-contact-item span.title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.faq-sidebar-contact-item span.subtitle {
  font-size: 11.5px;
  color: #64748b;
}

.faq-sidebar-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #2432c9;
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  text-decoration: none !important;
  transition: background 0.2s ease;
  font-family: var(--tps-font-main);
  box-sizing: border-box;
}

.faq-sidebar-cta-btn:hover {
  background: #ea580c;
  box-shadow: none;
  transform: none;
}

/* --------------------------------------------------------------------------

/* --------------------------------------------------------------------------
   INTERACTIVE TOAST ALERT NOTIFICATION
   -------------------------------------------------------------------------- */
.faq-toast-alert {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.4);
  z-index: 999999;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--tps-trans-spring), opacity 0.3s ease;
  font-family: var(--tps-font-main);
}

.faq-toast-alert.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.faq-toast-alert i {
  color: #10b981;
  font-size: 18px;
}