/* ==========================================================================
   FAQ — vertical layout (intro on top, accordion below)
   File: assets/css/15-faq.css
   FORCE LIGHT (no prefers-color-scheme)
   ========================================================================== */

.section-faq{
  padding-block: clamp(56px, 6vw, 96px) !important;

  position: relative;
  overflow: hidden;
  isolation: isolate;

  /* local palette */
  --faq-ink: rgba(3, 7, 18, 0.92);
  --faq-muted: rgba(3, 7, 18, 0.72);
  --faq-muted2: rgba(3, 7, 18, 0.62);

  --faq-bg-top: #f8fbff;
  --faq-bg-mid: #eef7ff;
  --faq-bg-bot: #f8fbff;

  --faq-card-bg: rgba(255,255,255,0.74);
  --faq-card-border: rgba(3,7,18,0.08);
  --faq-divider: rgba(3, 7, 18, 0.08);

  --faq-shadow:
    0 18px 50px rgba(3,7,18,0.12),
    0  2px 10px rgba(3,7,18,0.07);

  background-color: var(--faq-bg-top);
  background-image:
    radial-gradient(circle 520px at 18% 18%, rgba(94, 234, 212, 0.16) 0%, rgba(94, 234, 212, 0.00) 72%),
    radial-gradient(circle 680px at 82% 36%, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.00) 74%),
    radial-gradient(circle 760px at 62% 110%, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.00) 72%),
    linear-gradient(180deg, var(--faq-bg-top) 0%, var(--faq-bg-mid) 55%, var(--faq-bg-bot) 100%);

  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0 0;
}

.section-faq::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(1100px 520px at 50% 10%, rgba(248, 252, 255, 0.86) 0%, rgba(248, 252, 255, 0.00) 72%),
    radial-gradient(1200px 560px at 50% 110%, rgba(248, 252, 255, 0.70) 0%, rgba(248, 252, 255, 0.00) 70%);
}

.section-faq .container{
  position: relative;
  z-index: 1;
}

/* =========================
   Intro (top) — only header + subheader
========================= */

.faq__intro{
  text-align: center;
  max-width: 920px;
  margin: 0 auto clamp(10px, 1.6vw, 18px);
}

.faq__kicker{
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(3,7,18,0.55);
  font-weight: 800;
}

.faq__title{
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-size: clamp(34px, 3.8vw, 56px);
  color: var(--faq-ink);
}

.faq__accent{
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.faq__sub{
  margin: 0 auto;
  max-width: 62ch;

  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -0.012em;

  color: rgba(3, 7, 18, 0.76);
}

@supports (-webkit-background-clip: text){
  .faq__sub{
    background: linear-gradient(90deg, rgba(3,7,18,0.78), rgba(3,7,18,0.60));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

/* =========================
   Accordion panel (bottom)
========================= */

.faq__panel{
  max-width: 980px;

  /* ✅ ВОТ ТУТ НАСТРАИВАЕШЬ ОТСТУП ОТ САБХЕДЕРА */
  margin: clamp(16px, 2.2vw, 28px) auto 0;
}

/* pill list */
.faq{
  display: grid;
  gap: 14px;
}

/* each item is its own glass pill */
.faq-item{
  border-radius: var(--radius2);
  border: 1px solid var(--faq-card-border);
  background: var(--faq-card-bg);
  box-shadow: var(--faq-shadow);
  overflow: hidden;

  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .faq-item{ background: rgba(255,255,255,0.88); }
}

.faq-item:hover{
  transform: translateY(-1px);
  box-shadow:
    0 20px 58px rgba(3,7,18,0.13),
    0  2px 12px rgba(3,7,18,0.08);
  border-color: rgba(3,7,18,0.10);
}

/* question button */
.faq-q{
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;

  padding: 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  color: var(--faq-ink);
  font-weight: 850;
  letter-spacing: -0.012em;
  font-size: 16px;
}

/* gradient dot */
.faq-q::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  box-shadow: 0 10px 20px rgba(59,130,246,0.14);
  flex: 0 0 10px;
}

.faq-q:focus-visible{
  outline: 2px solid rgba(94,234,212,0.55);
  outline-offset: 3px;
  border-radius: 14px;
}

/* =========================================================
   Toggle icon: orbital spinner (with fallback chevron)
   ========================================================= */

/* Fallback chevron */
.chev{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(3,7,18,0.10);
  background: rgba(255,255,255,0.65);
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  position: relative;
  overflow: hidden;

  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.chev::before{
  content:"";
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(3,7,18,0.58);
  border-bottom: 2px solid rgba(3,7,18,0.58);
  transform: rotate(45deg);
  margin-top: -2px;
}

.faq-q[aria-expanded="true"] .chev{
  transform: rotate(180deg);
  background: rgba(255,255,255,0.86);
  border-color: rgba(3,7,18,0.14);
}

/* Enhanced spinner for modern browsers */
@supports (background: conic-gradient(#000, #fff)){
  .chev{
    transform: none !important; /* don’t rotate container */
  }

  /* gradient ring */
  .chev::before{
    border: 0;
    margin: 0;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: block;

    background: conic-gradient(
      from 90deg,
      var(--primary),
      var(--primary2),
      var(--primary)
    );

    -webkit-mask: radial-gradient(farthest-side, transparent 62%, #000 63%);
            mask: radial-gradient(farthest-side, transparent 62%, #000 63%);

    opacity: 0.55;
    transform: rotate(0deg);
    transform-origin: 50% 50%;
  }

  /* orbiting dot */
  .chev::after{
    content:"";
    position: absolute;
    inset: 0;
    margin: auto;

    width: 6px;
    height: 6px;
    border-radius: 999px;

    background: linear-gradient(90deg, var(--primary), var(--primary2));
    box-shadow: 0 10px 18px rgba(59,130,246,0.18);

    transform: rotate(0deg) translateX(9px);
    transform-origin: 50% 50%;

    opacity: 0;
  }

  .faq-q[aria-expanded="true"] .chev{
    background: rgba(255,255,255,0.86);
    border-color: rgba(3,7,18,0.14);
  }

  .faq-q[aria-expanded="true"] .chev::before{
    opacity: 0.95;
    animation: nb-spin 900ms linear infinite;
  }

  .faq-q[aria-expanded="true"] .chev::after{
    opacity: 1;
    animation: nb-orbit 900ms linear infinite;
  }

  @keyframes nb-spin{ to{ transform: rotate(360deg); } }
  @keyframes nb-orbit{ to{ transform: rotate(360deg) translateX(9px); } }
}

/* answer */
.faq-a{
  padding: 0 18px 18px 18px;
  color: rgba(3,7,18,0.72);
  font-size: 15px;
  line-height: 1.6;
}

.faq-a p{ margin: 10px 0; }
.faq-a ul, .faq-a ol{ margin: 10px 0 0; padding-left: 18px; }
.faq-a li{ margin: 6px 0; }

/* open animation */
.faq-q[aria-expanded="true"] + .faq-a{
  animation: faq-in 220ms ease;
}

@keyframes faq-in{
  from{ opacity: 0; transform: translateY(-4px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .faq-item,
  .chev{
    transition: none !important;
  }
  .faq-q[aria-expanded="true"] + .faq-a{
    animation: none !important;
  }
  @supports (background: conic-gradient(#000, #fff)){
    .faq-q[aria-expanded="true"] .chev::before,
    .faq-q[aria-expanded="true"] .chev::after{
      animation: none !important;
    }
  }
}
