/* Inherit header height variables from home styles */
:root {
  --dh: 80px;
  --mh: 90px; /* mobile header height from base */
  --header-h: var(--mh, var(--dh));
}

/* ================== Main Section ================== */
.faqs-section {
  background: #000; /* changed to pure black */
  color: #e9eef6;
  min-height: 100vh;
  padding: calc(var(--header-h) + clamp(2rem, 5vh, 4rem)) clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.faqs-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.faqs-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 clamp(2rem, 6vh, 4rem) 0;
  color: #fff;
}

/* ================== Accordion Styling ================== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: #10141a;
  border: 1px solid #222831;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}
.faq-item:hover {
  background: #151a21;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  font-weight: 600;
  cursor: pointer;
  list-style: none; /* remove default marker */
  color: #fff;
  transition: color 0.2s ease;
}
.faq-question::-webkit-details-marker {
  display: none; /* remove default marker for Safari */
}
.faq-question:hover {
  color: #a9ccff;
}

/* Icon styling (+) */
.faq-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background-color: #7fb4ff;
  border-radius: 2px;
  transition: transform 0.3s ease-in-out;
}
.faq-icon::before {
  transform: translate(-50%, -50%);
}
.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* Icon animation (-) when open */
.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.faq-item[open] > .faq-question {
  color: #a9ccff;
}

/* ================== Answer Panel ================== */
.faq-answer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: #cfd7e6;
  font-size: clamp(0.95rem, 1vw, 1rem);
  line-height: 1.6;
  overflow: hidden; /* For animation */
  animation: fadeIn 400ms ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.faq-answer p {
  margin: 0 0 1em 0;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer strong {
  display: block;
  font-weight: 700;
  color: #fff;
  margin: 1.2em 0 0.6em 0;
}

.faq-answer ul {
  padding-left: 20px;
  margin: 0.5em 0 1em 0;
  list-style-type: disc;
}

.faq-answer li {
  margin-bottom: 0.5em;
}

/* ================== Mobile (<=1050px) ==================*/
@media (max-width: 1050px) {
  /* How much to move content upward beyond the default 90px */
  :root { --lift-up: 0px; } /* increase for more lift */

  /* Ensure whole page is dark on this route */
  body { background: #000 !important; }

  /* Reduce base mobile top padding (var(--mh)) by --lift-up */
  main#shell {
    padding-top: clamp(0px, calc(var(--mh) - var(--lift-up)), 200px);
  }

  /* Keep section’s own content padding simple on mobile */
  .faqs-section {
    padding: 1rem 1rem 2rem;
  }

  .faq-question { padding: 1rem; }
  .faq-answer { padding: 0 1rem 1rem 1rem; }
}

/* ================== Reduced Motion ================== */
@media (prefers-reduced-motion: reduce) {
  .faq-icon::before,
  .faq-icon::after,
  .faq-item { transition: none; }
  .faq-answer { animation: none; }
}
