/* =====================================================================
   AEGON TOOLS - STARVY/DRIBBBLE STYLE ULTRA-PREMIUM FAQ REDESIGN
   2-Column Bento Accordion Grid, Cyber Grid Ambient Glow,
   Dynamic Plus/Minus Toggles, Seamless Dark & Light Mode,
   and Radiant CTA Banner Card Matching the Reference Image
   ===================================================================== */

:root {
  --faq-font-display: var(--font-display, 'Outfit', 'Clash Display', sans-serif);
  --faq-font-body: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
}

/* Light Theme Variables */
html:not([data-theme="dark"]) .faq-page-premium {
  --faq-bg: #f8fafc;
  --faq-grid-line: rgba(124, 92, 255, 0.05);
  --faq-ambient-glow: radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.12) 0%, rgba(56, 189, 248, 0.06) 45%, transparent 70%);
  --faq-card-bg: #ffffff;
  --faq-card-border: rgba(124, 92, 255, 0.14);
  --faq-card-hover-border: rgba(124, 92, 255, 0.38);
  --faq-card-active-bg: linear-gradient(165deg, #ffffff 0%, #f7f6ff 100%);
  --faq-card-active-border: rgba(124, 92, 255, 0.5);
  --faq-card-shadow: 0 4px 20px rgba(44, 37, 94, 0.04);
  --faq-card-hover-shadow: 0 12px 32px rgba(124, 92, 255, 0.1);
  --faq-card-active-shadow: 0 16px 40px rgba(124, 92, 255, 0.14);
  --faq-text-title: #0f172a;
  --faq-text-body: #475569;
  --faq-text-muted: #64748b;
  --faq-accent: #7c5cff;
  --faq-accent-glow: rgba(124, 92, 255, 0.22);
  --faq-pill-bg: rgba(124, 92, 255, 0.08);
  --faq-pill-border: rgba(124, 92, 255, 0.22);
  --faq-pill-text: #6366f1;
  --faq-cat-bg: #ffffff;
  --faq-cat-border: rgba(124, 92, 255, 0.16);
  --faq-cat-text: #475569;
  --faq-search-bg: #ffffff;
  --faq-search-border: rgba(124, 92, 255, 0.18);
  --faq-cta-card-bg: linear-gradient(165deg, #131428 0%, #0b0d1c 100%);
  --faq-cta-border: rgba(255, 255, 255, 0.1);
  --faq-cta-title: #ffffff;
  --faq-cta-body: rgba(255, 255, 255, 0.76);
}

/* Dark Theme Variables (Primary Signature Theme) */
html[data-theme="dark"] .faq-page-premium {
  --faq-bg: #070811;
  --faq-grid-line: rgba(124, 92, 255, 0.08);
  --faq-ambient-glow: radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.2) 0%, rgba(99, 102, 241, 0.1) 40%, transparent 65%);
  --faq-card-bg: rgba(14, 16, 32, 0.72);
  --faq-card-border: rgba(124, 92, 255, 0.18);
  --faq-card-hover-border: rgba(124, 92, 255, 0.45);
  --faq-card-active-bg: linear-gradient(165deg, rgba(26, 22, 58, 0.88) 0%, rgba(14, 16, 34, 0.88) 100%);
  --faq-card-active-border: rgba(147, 112, 255, 0.6);
  --faq-card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --faq-card-hover-shadow: 0 16px 40px -10px rgba(124, 92, 255, 0.2);
  --faq-card-active-shadow: 0 20px 50px -10px rgba(124, 92, 255, 0.28);
  --faq-text-title: #f8fafc;
  --faq-text-body: #94a3b8;
  --faq-text-muted: #64748b;
  --faq-accent: #7c5cff;
  --faq-accent-glow: rgba(124, 92, 255, 0.35);
  --faq-pill-bg: rgba(124, 92, 255, 0.14);
  --faq-pill-border: rgba(124, 92, 255, 0.3);
  --faq-pill-text: #c4b5fd;
  --faq-cat-bg: rgba(18, 20, 38, 0.65);
  --faq-cat-border: rgba(124, 92, 255, 0.2);
  --faq-cat-text: #94a3b8;
  --faq-search-bg: rgba(14, 16, 32, 0.75);
  --faq-search-border: rgba(124, 92, 255, 0.24);
  --faq-cta-card-bg: linear-gradient(165deg, #101228 0%, #080a18 100%);
  --faq-cta-border: rgba(124, 92, 255, 0.22);
  --faq-cta-title: #ffffff;
  --faq-cta-body: rgba(255, 255, 255, 0.75);
}

/* ---------------------------------------------------------------------
   1. PAGE WRAPPER & CYBER GRID CANVAS
   --------------------------------------------------------------------- */
.faq-page-premium {
  position: relative;
  background-color: var(--faq-bg);
  color: var(--faq-text-body);
  font-family: var(--faq-font-body);
  overflow: hidden;
  padding: 0 0 40px 0;
  transition: background-color 0.3s ease, color 0.3s ease;
  border-radius: 0 0 34px 34px !important;
}

/* Ambient Cyber Grid Background */
.faq-cyber-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--faq-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--faq-grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 20%, black 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, black 30%, transparent 85%);
}

/* Top Center Ambient Radiant Glow */
.faq-ambient-orb {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 550px;
  background: var(--faq-ambient-glow);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.faq-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ---------------------------------------------------------------------
   2. HERO HEADER SECTION
   --------------------------------------------------------------------- */
.faq-hero-sec {
  padding: clamp(90px, 12vw, 130px) 0 40px 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Eyebrow Badge Pill (Icon + FAQ) */
.faq-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--faq-pill-bg);
  border: 1px solid var(--faq-pill-border);
  color: var(--faq-pill-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.faq-eyebrow-pill svg {
  color: inherit;
  flex-shrink: 0;
}

/* Main Display Title */
.faq-title {
  font-family: var(--faq-font-display);
  font-size: clamp(36px, 5.2vw, 58px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--faq-text-title);
  margin: 0 auto 18px auto;
  max-width: 820px;
}

/* Subtitle */
.faq-subtitle {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.65;
  color: var(--faq-text-muted);
  max-width: 620px;
  margin: 0 auto 36px auto;
}

/* ---------------------------------------------------------------------
   3. SEARCH & CATEGORY FILTER NAVIGATION
   --------------------------------------------------------------------- */
.faq-controls-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-bottom: 50px;
}

/* Glassmorphic Search Bar */
.faq-search-box {
  width: 100%;
  max-width: 540px;
  display: flex;
  align-items: center;
  background: var(--faq-search-bg);
  border: 1px solid var(--faq-search-border);
  border-radius: 999px;
  padding: 8px 18px 8px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}
.faq-search-box:focus-within {
  border-color: var(--faq-accent);
  box-shadow: 0 12px 36px rgba(124, 92, 255, 0.2);
  transform: translateY(-2px);
}
.faq-search-box svg {
  color: var(--faq-text-muted);
  margin-right: 12px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.faq-search-box:focus-within svg {
  color: var(--faq-accent);
}
.faq-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--faq-text-title);
  font-size: 15px;
  font-family: inherit;
  padding: 8px 0;
}
.faq-search-input::placeholder {
  color: var(--faq-text-muted);
  opacity: 0.8;
}
.faq-search-clear {
  background: transparent;
  border: none;
  color: var(--faq-text-muted);
  cursor: pointer;
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.faq-search-clear:hover {
  color: var(--faq-text-title);
}

/* Category Filter Pills */
.faq-category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.faq-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--faq-cat-bg);
  border: 1px solid var(--faq-cat-border);
  color: var(--faq-cat-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.faq-cat-pill svg {
  color: inherit;
  opacity: 0.85;
}
.faq-cat-pill:hover {
  border-color: var(--faq-card-hover-border);
  color: var(--faq-text-title);
  transform: translateY(-2px);
}
.faq-cat-pill.is-active {
  background: linear-gradient(135deg, #7c5cff 0%, #6366f1 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.35);
  transform: translateY(-2px);
}
.faq-cat-pill.is-active svg {
  opacity: 1;
}

/* Results Status Bar */
.faq-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto 20px auto;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--faq-text-muted);
}
.faq-active-cat-title {
  color: var(--faq-text-title);
  font-weight: 600;
}

/* ---------------------------------------------------------------------
   4. THE 2-COLUMN BENTO ACCORDION GRID (STARVY SIGNATURE LAYOUT)
   --------------------------------------------------------------------- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 860px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Individual FAQ Card */
.faq-card {
  background: var(--faq-card-bg);
  border: 1px solid var(--faq-card-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--faq-card-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.faq-card:hover {
  border-color: var(--faq-card-hover-border);
  box-shadow: var(--faq-card-hover-shadow);
  transform: translateY(-2px);
}

/* Expanded Active State */
.faq-card.is-active {
  background: var(--faq-card-active-bg);
  border-color: var(--faq-card-active-border);
  box-shadow: var(--faq-card-active-shadow);
}

/* Card Header Button */
.faq-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--faq-text-title);
  transition: color 0.2s ease;
}
.faq-card:hover .faq-card-btn {
  color: var(--faq-text-title);
}
.faq-card.is-active .faq-card-btn {
  color: var(--faq-text-title);
}

/* Question Title Text */
.faq-q-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.faq-q-cat-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faq-accent);
  opacity: 0.9;
}
.faq-q-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: inherit;
  margin: 0;
  transition: color 0.2s ease;
}
.faq-card.is-active .faq-q-text {
  color: #ffffff;
}
html:not([data-theme="dark"]) .faq-card.is-active .faq-q-text {
  color: var(--faq-accent);
}

/* Dynamic Plus / Minus Icon Indicator */
.faq-toggle-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.16);
  color: var(--faq-text-title);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-card:hover .faq-toggle-icon {
  background: rgba(124, 92, 255, 0.18);
  border-color: rgba(124, 92, 255, 0.4);
  color: #ffffff;
}
.faq-card.is-active .faq-toggle-icon {
  background: var(--faq-accent);
  border-color: var(--faq-accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.4);
}

.faq-icon-minus {
  display: none;
}
.faq-card.is-active .faq-icon-plus {
  display: none;
}
.faq-card.is-active .faq-icon-minus {
  display: block;
}

/* Smooth Accordion Body */
.faq-card-content {
  height: 0;
  overflow: hidden;
  transition: height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-card-body-inner {
  padding: 0 24px 22px 24px;
  border-top: 1px solid rgba(124, 92, 255, 0.08);
  margin-top: -4px;
  padding-top: 16px;
}
.faq-card-answer {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--faq-text-body);
  margin: 0;
}

/* Empty State */
.faq-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  background: var(--faq-card-bg);
  border: 1px dashed var(--faq-card-border);
  border-radius: 20px;
  margin: 20px auto;
  max-width: 600px;
  width: 100%;
}
.faq-empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.12);
  display: grid;
  place-items: center;
  color: var(--faq-accent);
}
.faq-empty-title {
  font-family: var(--faq-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--faq-text-title);
  margin-bottom: 8px;
}
.faq-empty-desc {
  font-size: 14px;
  color: var(--faq-text-muted);
  margin-bottom: 20px;
}
.faq-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--faq-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.faq-empty-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.3);
}

/* ---------------------------------------------------------------------
   5. RADIANT CTA BANNER CARD (IDENTICAL TO REFERENCE IMAGE)
   --------------------------------------------------------------------- */
.faq-cta-sec {
  margin-top: 80px;
  padding-bottom: 50px;
}

.faq-cta-card {
  position: relative;
  background: var(--faq-cta-card-bg);
  border: 1px solid var(--faq-cta-border);
  border-radius: 26px;
  padding: clamp(50px, 7vw, 76px) clamp(24px, 5vw, 60px);
  text-align: center;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.7);
}

/* CTA Card Ambient Grid Background */
.faq-cta-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 92, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 85%);
  z-index: 0;
}

/* CTA Radiant Glow Orb Behind Content */
.faq-cta-glow {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.45) 0%, rgba(99, 102, 241, 0.15) 50%, transparent 70%);
  filter: blur(55px);
  pointer-events: none;
  z-index: 0;
}

/* Top Center Geometric Logo Mark */
.faq-cta-badge {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin: 0 auto 24px auto;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.28), rgba(99, 102, 241, 0.14));
  border: 1px solid rgba(124, 92, 255, 0.45);
  box-shadow: 0 0 35px rgba(124, 92, 255, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  color: #ffffff;
}

/* CTA Main Title */
.faq-cta-h2 {
  position: relative;
  z-index: 2;
  font-family: var(--faq-font-display);
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--faq-cta-title);
  margin: 0 auto 16px auto;
  max-width: 720px;
}

/* CTA Paragraph */
.faq-cta-p {
  position: relative;
  z-index: 2;
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--faq-cta-body);
  max-width: 600px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}

/* CTA Action Buttons */
.faq-cta-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Primary Button (Pill with Gradient & Glow) */
.faq-btn-pill-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 28px -4px rgba(124, 92, 255, 0.5), 0 0 20px rgba(124, 92, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.faq-btn-pill-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -4px rgba(124, 92, 255, 0.65), 0 0 30px rgba(124, 92, 255, 0.35);
  color: #ffffff;
}

/* Secondary Button (WhatsApp / Support) */
.faq-btn-pill-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.faq-btn-pill-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  color: #ffffff;
}

/* ---------------------------------------------------------------------
   6. SCROLL REVEAL ANIMATIONS & MOBILE POLISH
   --------------------------------------------------------------------- */
.faq-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .faq-card-btn {
    padding: 18px 20px;
  }
  .faq-card-body-inner {
    padding: 0 20px 18px 20px;
  }
  .faq-q-text {
    font-size: 15px;
  }
  .faq-cta-card {
    border-radius: 20px;
  }
  .faq-btn-pill-primary,
  .faq-btn-pill-secondary {
    width: 100%;
    justify-content: center;
  }
}