/* 508 Ministry Sitewide Interactive Visual FAQ Dropdowns (EN + ES + 37 Languages)
 * Self-hosted SIL OFL 1.1 Cormorant + Figtree only. Natural-aspect framing.
 */
@keyframes vfaqSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes vfaqBarGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes vfaqPulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(201, 151, 44, 0.52); }
  70%  { box-shadow: 0 0 0 8px rgba(201, 151, 44, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 151, 44, 0); }
}
@keyframes vfaqRedPulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.65); }
  70%  { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
@keyframes vfaqWave {
  0%, 100% { transform: scaleY(0.32); }
  50%      { transform: scaleY(1); }
}
@keyframes vfaqRingSweep {
  from { stroke-dashoffset: 251.2; }
}

.gl-faq-in.vfaq-host,
.n5-faq.vfaq-host,
.wr-faq .wr-w.vfaq-host {
  max-width: 980px;
}

details.vfaq-item {
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

details.vfaq-item[open] {
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.92), rgba(250, 244, 231, 0.72));
  border-radius: 16px;
  padding-inline: 18px;
  margin-block: 6px;
  box-shadow: 0 12px 32px rgba(15, 30, 61, 0.07), 0 0 0 1px rgba(201, 151, 44, 0.28);
}

details.vfaq-item > summary {
  transition: color 0.18s ease;
}

.vfaq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 22px;
  align-items: start;
  padding: 4px 0 20px;
}

details.vfaq-item[open] .vfaq-grid {
  animation: vfaqSlideIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.vfaq-copy {
  min-width: 0;
  font-family: 'Figtree', system-ui, -apple-system, sans-serif;
  color: #2b3345;
  line-height: 1.65;
}

.gl-faq .vfaq-copy {
  color: #4a3525;
}

.vfaq-copy > p:first-child {
  margin-top: 0;
}

.vfaq-copy p {
  padding-bottom: 10px !important;
  max-width: 64ch;
}

/* Seamless cooperation with home-lower-vibe.css on /#faq */
details.vfaq-item .hlv-faq-grid {
  display: block !important;
  padding-top: 4px !important;
}
details.vfaq-item .hlv-faq-media {
  display: none !important;
}
#faq .n5-faq > details.vfaq-item > .vfaq-grid {
  padding: 6px 22px 22px;
}

.vfaq-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.vfaq-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(201, 151, 44, 0.13);
  border: 1px solid rgba(201, 151, 44, 0.36);
  color: #5b3f11;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
}

.vfaq-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9972c;
  animation: vfaqPulseRing 2.2s infinite;
}

.vfaq-card {
  background: #ffffff;
  border: 1px solid rgba(201, 151, 44, 0.34);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 30, 61, 0.08);
  font-family: 'Figtree', system-ui, sans-serif;
}

details.vfaq-item[open] .vfaq-card {
  animation: vfaqSlideIn 0.42s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.vfaq-media {
  position: relative;
  background: radial-gradient(circle at 50% 35%, #243456 0%, #111b2e 100%);
  padding: 10px 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-faq .vfaq-media,
.wr-faq .vfaq-media {
  background: radial-gradient(circle at 50% 35%, #3d2616 0%, #1c1109 100%);
}

.vfaq-media img {
  width: 100%;
  height: auto;
  max-height: 188px;
  object-fit: contain;
  display: block;
  border-radius: 10px 10px 0 0;
}

.vfaq-badge {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px;
  background: rgba(15, 25, 44, 0.86);
  backdrop-filter: blur(6px);
  color: #f6d98e;
  border: 1px solid rgba(246, 217, 142, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vfaq-viz {
  padding: 13px 15px 15px;
  background: linear-gradient(180deg, #fffdf8 0%, #f9f3e6 100%);
  border-top: 1px solid rgba(201, 151, 44, 0.22);
}

.vfaq-viz-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.vfaq-viz-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 17.5px;
  font-weight: 700;
  color: #13223f;
  line-height: 1.2;
  margin: 0;
}

.gl-faq .vfaq-viz-title {
  color: #2b1a0e;
}

.vfaq-viz-kpi {
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #8a6116;
  background: rgba(201, 151, 44, 0.16);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Animated Bar Charts */
.vfaq-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vfaq-bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 1.1fr) minmax(0, 1.9fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #2c364c;
}

.vfaq-bar-lbl {
  font-weight: 600;
  line-height: 1.2;
}

.vfaq-bar-track {
  display: block;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(19, 34, 63, 0.1);
  overflow: hidden;
}

.vfaq-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b68220, #e3b857);
  transform-origin: left center;
}

html[dir="rtl"] .vfaq-bar-fill {
  transform-origin: right center;
}

details.vfaq-item[open] .vfaq-bar-fill {
  animation: vfaqBarGrow 0.72s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.vfaq-bar-fill.is-navy {
  background: linear-gradient(90deg, #1b3564, #355d9e);
}

.vfaq-bar-fill.is-green {
  background: linear-gradient(90deg, #1d7a4c, #34a86c);
}

.vfaq-bar-fill.is-muted {
  background: linear-gradient(90deg, #8b95a7, #b0b8c7);
}

.vfaq-bar-val {
  font-weight: 700;
  color: #13223f;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
}

/* 3-Step Flow / Timeline */
.vfaq-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.vfaq-step {
  background: #ffffff;
  border: 1px solid rgba(201, 151, 44, 0.3);
  border-radius: 10px;
  padding: 8px 7px;
  text-align: center;
  position: relative;
}

.vfaq-step-num {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9972c, #9d6f15);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.vfaq-step-t {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #162544;
  line-height: 1.22;
}

.vfaq-step-s {
  display: block;
  font-size: 10.5px;
  color: #5c667a;
  margin-top: 2px;
  line-height: 1.2;
}

/* Interactive Language Waveform + Pills */
.vfaq-wave-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #13223f;
  color: #faf3e3;
  padding: 8px 11px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.gl-faq .vfaq-wave-row {
  background: #2b1a0e;
}

.vfaq-wave-bars {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 20px;
  flex-shrink: 0;
}

.vfaq-wave-bars i {
  display: block;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: #f0c869;
  animation: vfaqWave 1.05s ease-in-out infinite;
}
.vfaq-wave-bars i:nth-child(2) { animation-delay: 0.15s; }
.vfaq-wave-bars i:nth-child(3) { animation-delay: 0.3s; }
.vfaq-wave-bars i:nth-child(4) { animation-delay: 0.1s; }
.vfaq-wave-bars i:nth-child(5) { animation-delay: 0.25s; }
.vfaq-wave-bars i:nth-child(6) { animation-delay: 0.4s; }

.vfaq-wave-phrase {
  font-size: 12px;
  font-weight: 600;
  color: #f9e6b3;
  line-height: 1.25;
}

.vfaq-lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.vfaq-lang-btn {
  appearance: none;
  border: 1px solid rgba(201, 151, 44, 0.38);
  background: #ffffff;
  color: #24324d;
  border-radius: 6px;
  padding: 2.5px 6.5px;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vfaq-lang-btn:hover,
.vfaq-lang-btn.is-active {
  background: #c9972c;
  border-color: #b0801e;
  color: #ffffff;
}

/* Interactive Dove Privacy Slider & Photochromic Toggle */
.vfaq-toggle-box {
  background: #ffffff;
  border: 1px solid rgba(201, 151, 44, 0.3);
  border-radius: 10px;
  padding: 9px 11px;
}

.vfaq-dove-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vfaq-tally {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #374151;
}

.vfaq-tally-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
  transition: background-color 0.2s ease;
}

.vfaq-tally-led.is-live {
  background: #dc2626;
  animation: vfaqRedPulse 1.5s infinite;
}

.vfaq-mini-btn {
  appearance: none;
  border: 1px solid #c9972c;
  background: linear-gradient(135deg, #fdf6e4, #f5e5bd);
  color: #4a3208;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.vfaq-mini-btn:hover {
  background: #c9972c;
  color: #ffffff;
}

/* Donut Ring + Metrics */
.vfaq-donut-wrap {
  display: flex;
  align-items: center;
  gap: 13px;
}

.vfaq-donut-svg {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

details.vfaq-item[open] .vfaq-donut-arc {
  animation: vfaqRingSweep 0.9s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.vfaq-donut-meta {
  font-size: 12px;
  color: #2b354a;
  line-height: 1.4;
}

.vfaq-donut-meta strong {
  display: block;
  color: #13223f;
  font-size: 13px;
  margin-bottom: 2px;
}

/* Side-by-side Split Matrix */
.vfaq-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vfaq-matrix-col {
  background: #ffffff;
  border: 1px solid rgba(201, 151, 44, 0.3);
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 11.5px;
  line-height: 1.32;
}

.vfaq-matrix-col strong {
  display: block;
  color: #13223f;
  font-size: 12px;
  margin-bottom: 3px;
}

/* Video Language Switcher Pill Bar (/glasses/ & /es/glasses/) */
.gl-lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-family: 'Figtree', system-ui, sans-serif;
}

.gl-lang-switch-lbl {
  font-size: 12.5px;
  color: #dbc8a0;
  font-weight: 600;
}

.gl-lang-pill-group {
  display: inline-flex;
  background: rgba(20, 12, 6, 0.72);
  border: 1px solid rgba(226, 189, 107, 0.45);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}

.gl-lang-pill {
  appearance: none;
  border: 0;
  background: transparent;
  color: #e9d9b7;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.gl-lang-pill.is-active {
  background: linear-gradient(135deg, #d7a646, #a8771c);
  color: #1a1008;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@media (max-width: 740px) {
  .vfaq-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  details.vfaq-item[open] {
    padding-inline: 12px;
  }
  .vfaq-steps {
    grid-template-columns: 1fr;
  }
  .vfaq-bar-row {
    grid-template-columns: minmax(78px, 1fr) minmax(0, 1.5fr) auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  details.vfaq-item[open] .vfaq-grid,
  details.vfaq-item[open] .vfaq-card,
  details.vfaq-item[open] .vfaq-bar-fill,
  details.vfaq-item[open] .vfaq-donut-arc,
  .vfaq-wave-bars i,
  .vfaq-pill-dot,
  .vfaq-tally-led.is-live {
    animation: none !important;
  }
}
