/* ============================================
   FAQ PAGE STYLES
   Matches dark medieval fire/ice theme
   ============================================ */

/* ---- FAQ HERO ---- */

.faq-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 60px;
}

.faq-hero__bg {
  position: absolute;
  inset: 0;
}

.faq-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.05);
}

/* No-image hero: atmospheric dark design */
.faq-hero--no-img {
  min-height: 380px;
  background: var(--bg-deep);
  border-bottom: 1px solid rgba(255, 107, 0, 0.15);
}

.faq-hero--no-img .faq-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(255, 107, 0, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 30% 60%, rgba(0, 212, 255, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 70% 70%, rgba(255, 107, 0, 0.04) 0%, transparent 60%);
}

/* Top decorative fire line */
.faq-hero--no-img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, transparent 5%, var(--fire-500) 30%, var(--fire-300) 50%, var(--fire-500) 70%, transparent 95%);
  opacity: 0.6;
}

/* Bottom decorative fade line */
.faq-hero--no-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.3), transparent);
}

/* Image hero overlay (activate with faq-hero--has-img) */
.faq-hero--has-img .faq-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(7, 7, 9, 0.6) 0%,
      rgba(7, 7, 9, 0.3) 40%,
      rgba(7, 7, 9, 0.5) 70%,
      var(--bg-abyss) 100%);
}

.faq-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 24px 48px;
}

.faq-hero__content .section-header__tag {
  margin-bottom: 20px;
}

.faq-hero__title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 100px);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--fire-100), var(--fire-300) 40%, var(--fire-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 50px var(--fire-glow)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.faq-hero__subtitle {
  font-family: var(--font-heading);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- FAQ SECTION ---- */

.faq {
  padding: clamp(48px, 8vh, 100px) 0;
  background: var(--bg-abyss);
}

/* ---- FAQ LAYOUT (sidebar + panels) ---- */

.faq-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* ---- SIDEBAR ---- */

.faq-sidebar {
  position: sticky;
  top: 80px;
  flex-shrink: 0;
  width: 260px;
}

.faq-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
}

.faq-sidebar__tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.faq-sidebar__tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: all 0.25s ease;
}

.faq-sidebar__tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.faq-sidebar__tab:hover svg {
  opacity: 0.8;
}

.faq-sidebar__tab--active {
  color: var(--fire-300);
  background: rgba(255, 107, 0, 0.1);
}

.faq-sidebar__tab--active svg {
  opacity: 1;
  color: var(--fire-500);
}

.faq-sidebar__tab--active:hover {
  color: var(--fire-300);
  background: rgba(255, 107, 0, 0.12);
}

/* ---- FAQ PANELS ---- */

.faq-panels {
  flex: 1;
  min-width: 0;
}

.faq-panel {
  display: none;
}

.faq-panel--active {
  display: block;
}

/* ---- FAQ CATEGORY ---- */

.faq-category {
  margin-bottom: 56px;
}

.faq-category:last-child {
  margin-bottom: 0;
}

.faq-category__title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 107, 0, 0.15);
}

.faq-category__icon {
  width: 28px;
  height: 28px;
  color: var(--fire-500);
  flex-shrink: 0;
}

/* ---- CATEGORY BANNER ---- */

.faq-category__banner {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 220px;
}

.faq-category__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* ---- FAQ ITEM (accordion) ---- */

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out-expo),
              box-shadow 0.3s var(--ease-out-expo);
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.faq-item--open {
  border-color: rgba(255, 107, 0, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ---- QUESTION BUTTON ---- */

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  transition: color 0.3s;
}

.faq-item__question:hover {
  color: var(--fire-300);
}

.faq-item--open .faq-item__question {
  color: var(--fire-300);
}

/* ---- CHEVRON ---- */

.faq-item__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.4s var(--ease-out-expo),
              color 0.3s;
}

.faq-item--open .faq-item__chevron {
  transform: rotate(180deg);
  color: var(--fire-500);
}

/* ---- ANSWER ---- */

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out-expo),
              padding 0.4s var(--ease-out-expo);
  padding: 0 24px;
}

.faq-item--open .faq-item__answer {
  max-height: 600px;
  padding: 0 24px 24px;
}

.faq-item__answer p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.faq-item__answer p:last-child {
  margin-bottom: 0;
}

.faq-item__answer strong {
  color: var(--text-primary);
  font-weight: 600;
}

.faq-item__answer ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.faq-item__answer ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.faq-item__answer ul li:last-child {
  margin-bottom: 0;
}

.faq-item__answer ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fire-500);
}

/* ---- CURRENCY TABLE ---- */

.faq-currency-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.faq-currency-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 15px;
}

.faq-currency-table th {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fire-300);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 107, 0, 0.2);
  white-space: nowrap;
}

.faq-currency-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.6;
}

.faq-currency-table td strong {
  color: var(--text-primary);
}

.faq-currency-table tr:last-child td {
  border-bottom: none;
}

.faq-currency-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ---- CONTACT NOTE ---- */

.faq-contact-note {
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
  padding: 32px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 900px) {
  .faq-layout {
    flex-direction: column;
    gap: 32px;
  }

  .faq-sidebar {
    position: static;
    width: 100%;
  }

  .faq-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: transparent;
    border: none;
  }

  .faq-sidebar__tab {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 20px;
    gap: 0;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.08), rgba(0, 212, 255, 0.06));
    border: 1px solid rgba(255, 184, 77, 0.2);
    color: transparent;
    background-clip: padding-box;
  }

  .faq-sidebar__tab span {
    background: linear-gradient(135deg, var(--ice-300), var(--ice-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .faq-sidebar__tab--active {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.25), rgba(255, 60, 0, 0.15));
    border-color: rgba(255, 107, 0, 0.5);
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.2);
  }

  .faq-sidebar__tab--active span {
    background: linear-gradient(135deg, var(--fire-100), var(--fire-300) 40%, var(--fire-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .faq-sidebar__tab svg {
    display: none;
  }

  .faq-sidebar__tab span {
    display: inline;
  }
}

@media (max-width: 768px) {
  .faq-hero {
    min-height: 320px;
    margin-top: 52px;
  }

  .faq-hero__content {
    padding: 60px 20px 40px;
  }

  .faq-category {
    margin-bottom: 40px;
  }

  .faq-category__title {
    font-size: 20px;
    gap: 10px;
  }

  .faq-category__icon {
    width: 22px;
    height: 22px;
  }

  .faq-category__banner {
    max-height: 160px;
    margin-bottom: 24px;
  }

  .faq-item__question {
    padding: 16px 18px;
    font-size: 15px;
  }

  .faq-item__answer {
    padding: 0 18px;
  }

  .faq-item--open .faq-item__answer {
    padding: 0 18px 18px;
  }

  .faq-item__answer p,
  .faq-item__answer ul li {
    font-size: 15px;
  }

  .faq-currency-table th {
    font-size: 11px;
    padding: 10px 12px;
  }

  .faq-currency-table td {
    font-size: 13px;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .faq-hero {
    min-height: 260px;
  }

  .faq-hero__subtitle {
    font-size: 13px;
    letter-spacing: 1px;
  }

  .faq-sidebar__tab {
    padding: 8px 14px;
    font-size: 12px;
    gap: 8px;
  }

  .faq-sidebar__tab svg {
    width: 14px;
    height: 14px;
  }

  .faq-item__question {
    padding: 14px 16px;
  }

  .faq-item__answer {
    padding: 0 16px;
  }

  .faq-item--open .faq-item__answer {
    padding: 0 16px 16px;
  }
}
