/* =============================================================
   Lucky Polytank FAQ — frontend
   ✏️ Ubah warna & ukuran cukup di blok variabel paling atas
   ============================================================= */
.lp-faq {
  --lpf-primary: #2b1a9a;        /* warna utama (ungu Lucky) */
  --lpf-primary-2: #5a46e0;      /* warna gradasi garis aktif */
  --lpf-q: #1c1470;              /* warna teks pertanyaan */
  --lpf-text: #4a4a5c;           /* warna teks jawaban */
  --lpf-border: #e6e4f5;         /* warna border kartu */
  --lpf-bg: #ffffff;             /* background kartu */
  --lpf-radius: 16px;            /* sudut kartu */
  --lpf-maxwidth: 1100px;        /* lebar section (samakan dengan header) */
  --lpf-listwidth: 900px;        /* lebar daftar FAQ */
  --lpf-space: 40px;             /* jarak atas & bawah section */
  --lpf-speed: .45s;             /* kecepatan animasi buka/tutup */
  --lpf-ease: cubic-bezier(.4, 0, .2, 1);

  width: 100%;
  padding: var(--lpf-space) 0;
  box-sizing: border-box;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
}
.lp-faq *,
.lp-faq *::before,
.lp-faq *::after { box-sizing: border-box; }

.lp-faq__wrap {
  max-width: var(--lpf-maxwidth);
  margin: 0 auto;
}

/* ---------- Daftar ---------- */
.lp-faq__list {
  max-width: var(--lpf-listwidth);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Kartu ---------- */
.lp-faq__item {
  position: relative;
  background: var(--lpf-bg);
  border: 1px solid var(--lpf-border);
  border-radius: var(--lpf-radius);
  overflow: hidden;
  transition:
    border-color .3s ease,
    box-shadow .35s ease,
    opacity .6s ease var(--lpf-delay, 0s),
    transform .6s cubic-bezier(.2, .7, .2, 1) var(--lpf-delay, 0s);
}
/* garis aksen kiri saat terbuka */
.lp-faq__item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--lpf-primary), var(--lpf-primary-2));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--lpf-speed) var(--lpf-ease);
}
.lp-faq__item:hover {
  border-color: #d3cff0;
  box-shadow: 0 8px 24px rgba(43, 26, 154, .07);
}
.lp-faq__item.is-open {
  border-color: rgba(43, 26, 154, .28);
  box-shadow: 0 14px 36px rgba(43, 26, 154, .12);
}
.lp-faq__item.is-open::before { transform: scaleY(1); }

/* ---------- Pertanyaan (reset style tema/Elementor) ---------- */
.lp-faq .lp-faq__heading {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: inherit !important;
  line-height: inherit !important;
}
.lp-faq button.lp-faq__q {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 20px 24px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--lpf-q) !important;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: normal;
  text-align: left;
  text-transform: none !important;
  text-decoration: none !important;
  white-space: normal;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .25s ease;
}
.lp-faq button.lp-faq__q:hover { color: var(--lpf-primary) !important; }
.lp-faq button.lp-faq__q:focus { outline: none; }
.lp-faq button.lp-faq__q:focus-visible {
  outline: 2px solid var(--lpf-primary);
  outline-offset: -4px;
  border-radius: var(--lpf-radius) !important;
}

.lp-faq__q-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* ikon + yang berputar jadi − */
.lp-faq__icon {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--lpf-border);
  border-radius: 50%;
  transition:
    background .3s ease,
    border-color .3s ease,
    transform var(--lpf-speed) var(--lpf-ease);
}
.lp-faq__icon::before,
.lp-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--lpf-primary);
  transition: transform var(--lpf-speed) var(--lpf-ease), background .3s ease;
}
.lp-faq__icon::after { transform: rotate(90deg); }
.lp-faq__item:hover .lp-faq__icon { border-color: var(--lpf-primary); }
.lp-faq__item.is-open .lp-faq__icon {
  background: var(--lpf-primary);
  border-color: var(--lpf-primary);
  transform: rotate(180deg);
}
.lp-faq__item.is-open .lp-faq__icon::before,
.lp-faq__item.is-open .lp-faq__icon::after { background: #fff; }
.lp-faq__item.is-open .lp-faq__icon::after { transform: rotate(0deg); }

/* ---------- Jawaban (animasi tinggi) ---------- */
.lp-faq__a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows var(--lpf-speed) var(--lpf-ease),
    visibility 0s linear var(--lpf-speed);
}
.lp-faq__item.is-open > .lp-faq__a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition:
    grid-template-rows var(--lpf-speed) var(--lpf-ease),
    visibility 0s;
}
.lp-faq__a-inner {
  min-height: 0;
  overflow: hidden;
}
.lp-faq__a-content {
  padding: 0 76px 22px 24px;
  color: var(--lpf-text);
  font-size: 16px;
  line-height: 1.75;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .25s ease, transform .3s ease;
}
.lp-faq__item.is-open .lp-faq__a-content {
  opacity: 1;
  transform: none;
  transition: opacity .35s ease .1s, transform .4s ease .1s;
}

.lp-faq__a-content > :first-child { margin-top: 0; }
.lp-faq__a-content > :last-child { margin-bottom: 0; }
.lp-faq .lp-faq__a-content p {
  margin: 0 0 12px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
.lp-faq .lp-faq__a-content ul,
.lp-faq .lp-faq__a-content ol {
  margin: 0 0 12px;
  padding-left: 20px;
}
.lp-faq .lp-faq__a-content li { margin: 0 0 6px; }
.lp-faq .lp-faq__a-content a {
  color: var(--lpf-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lp-faq .lp-faq__a-content strong,
.lp-faq .lp-faq__a-content b { color: #2a2a3a; }

/* ---------- Animasi muncul saat di-scroll ---------- */
.lp-faq--js .lp-faq__item {
  opacity: 0;
  transform: translateY(18px);
}
.lp-faq--js .lp-faq__item.is-inview {
  opacity: 1;
  transform: none;
}

/* ---------- Pesan untuk admin (FAQ kosong) ---------- */
.lp-faq-notice {
  max-width: 900px;
  margin: 20px auto;
  padding: 16px 20px;
  border: 2px dashed #c9c3ef;
  border-radius: 12px;
  background: #f7f6ff;
  color: #2b1a9a;
  font: 15px/1.6 "Roboto", Arial, sans-serif;
  text-align: center;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

/* Laptop kecil */
@media (max-width: 1140px) {
  .lp-faq { padding-left: 20px; padding-right: 20px; }
}

/* Tablet */
@media (max-width: 1024px) {
  .lp-faq button.lp-faq__q { padding: 18px 20px; font-size: 16px; }
  .lp-faq__a-content { padding: 0 72px 20px 20px; }
}

/* Mobile */
@media (max-width: 767px) {
  .lp-faq { --lpf-radius: 12px; padding: 28px 15px; }
  .lp-faq__list { gap: 10px; }
  .lp-faq button.lp-faq__q {
    gap: 12px;
    padding: 15px 16px;
    font-size: 15.5px;
  }
  .lp-faq__icon { flex-basis: 30px; width: 30px; height: 30px; }
  .lp-faq__icon::before,
  .lp-faq__icon::after { width: 10px; margin-left: -5px; }
  .lp-faq__a-content {
    padding: 0 16px 18px 16px;
    font-size: 15px;
    line-height: 1.7;
  }
}

/* Hormati setting "kurangi animasi" di HP/komputer pengguna */
@media (prefers-reduced-motion: reduce) {
  .lp-faq *,
  .lp-faq *::before,
  .lp-faq *::after { transition: none !important; animation: none !important; }
}
