/* FAQ SECTION */

.faq-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 24px 80px;
  color: #FFFFFF;
  font-family: "Urbanist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.faq-shell {
  position: relative;
  width: 100%;
  max-width: 1919px;
  min-height: 937px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 96px; /* 96px from top */
}

/* Blur position tweak for this section (global visuals still apply) */
.faq-blur-layer {
  top: 60%;
  height: 620px;
  opacity: 0.90;
}

/* Header */
.faq-header {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #FFFFFF;
  width: 100%;
  max-width: 1400px;
}

.faq-kicker {
  margin: 0;
  font-size: 18px; /* reduced */
  font-weight: 700;
  color: #FFFFFF;
}

.faq-title {
  margin: 18px 0 0; /* slightly reduced */
  font-size: 44px; /* reduced */
  font-weight: 600;
  color: #FFFFFF;
}

/* List */
.faq-list {
  position: relative;
  z-index: 1;
  margin-top: 92px; /* reduced */
  width: 980px; /* reduced (box size) */
  max-width: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  gap: 24px; /* reduced */
}

/* Item container (glass feel similar to other sections) */
.faq-item {
  width: 100%;
  border-radius: 18px; /* reduced */
  overflow: hidden;

  border: 1px solid #633EB2;

  background: linear-gradient(135deg, rgba(99, 62, 178, 0.40) 0%, rgba(99, 62, 178, 0.12) 100%);
  box-shadow: 0 22px 74px rgba(0, 0, 0, 0.92); /* slightly reduced */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);

  transition: box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: box-shadow, filter;
}

/* Hover glow (no zoom) */
@media (hover: hover) and (pointer: fine) {
  .faq-item:hover {
    box-shadow:
      0 26px 88px rgba(0, 0, 0, 0.95),
      0 0 48px rgba(166, 151, 224, 0.32);
    filter: brightness(1.02);
  }
}

/* Question button */
.faq-question {
  width: 100%;
  height: 72px; /* reduced */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #FFFFFF;
  text-align: left;

  /* ensures icon alignment is identical on every row */
  position: relative;
}

.faq-question-text {
  margin-left: 64px; /* reduced */
  font-size: 20px;   /* reduced */
  font-weight: 500;

  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;

  line-height: 1.22;
  padding: 2px 0;
}

/* remove fixed spacer so icon alignment never varies */
.faq-spacer {
  display: none;
}

/* Icon (dropdown chevron) */
.faq-icon {
  width: 18px;    /* reduced */
  height: 10px;   /* reduced */

  position: absolute;
  right: 52px; /* reduced */
  top: 50%;
  transform: translateY(-50%) rotate(0deg);

  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;  /* reduced */
  height: 11px; /* reduced */
  border-right: 2px solid rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid rgba(255, 255, 255, 0.95);
  transform: translate(-50%, -60%) rotate(45deg);
}

/* Answer area */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);

  transition:
    max-height 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.6s ease,
    transform 0.6s ease;
}

.faq-answer p {
  margin: 0;
  padding: 0 64px 24px 64px; /* reduced */
  font-size: 14px; /* reduced */
  font-weight: 400;
  line-height: 20px; /* reduced */
  color: #FFFFFF;
  opacity: 0.95;
}

/* OPEN STATE */
.faq-item.is-open .faq-question {
  height: 72px;
}

.faq-item.is-open .faq-icon {
  transform: translateY(-50%) rotate(180deg);
}

.faq-item.is-open .faq-answer {
  max-height: 220px;
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
  .faq-question-text {
    white-space: normal;
    line-height: 1.15;
  }
}

/* ✅ Laptop/Tablet (landscape) + Desktop: unchanged behavior */
/* (We only change portrait/mobile sizes as requested) */

@media (max-width: 1024px) and (orientation: portrait) {
  .faq-section {
    padding: 0 16px 64px;
  }

  .faq-shell {
    padding-top: 80px;
    min-height: 860px;
  }

  /* ✅ REQUIRED: Tablet (portrait) subtitle + title sizes */
  .faq-kicker {
    font-size: 15px;
  }

  .faq-title {
    font-size: 24px;
  }

  .faq-list {
    width: 100%;
    max-width: 860px; /* reduced */
  }

  .faq-question-text {
    margin-left: 36px;
    font-size: 18px; /* reduced */
  }

  .faq-icon {
    right: 36px;
  }

  .faq-answer p {
    padding: 0 36px 22px 36px;
    font-size: 14px;
    line-height: 20px;
  }
}

/* ✅ MOBILE + TABLET (PORTRAIT): remove extra space after the FAQ list */
@media (max-width: 768px) and (orientation: portrait) {
  .faq-shell {
    padding-top: 72px;

    /* ✅ remove forced extra height that creates blank space after questions */
    min-height: unset;
    height: auto;
  }

  /* ✅ REQUIRED: Mobile subtitle + title sizes */
  .faq-kicker {
    font-size: 15px;
  }

  .faq-title {
    font-size: 24px;
  }

  .faq-list {
    margin-top: 64px; /* reduced */
    gap: 16px;        /* reduced */
  }

  .faq-question {
    height: auto;
    min-height: 66px; /* reduced */
    padding: 14px 0;  /* reduced */
  }

  .faq-question-text {
    margin-left: 18px;
    font-size: 16px; /* reduced */
  }

  .faq-icon {
    right: 18px;
  }

  .faq-answer p {
    padding: 0 18px 18px 18px;
    font-size: 13px; /* reduced */
    line-height: 19px;
  }
}

@media (max-width: 480px) {
  .faq-shell {
    padding-top: 64px;

    /* ✅ remove forced extra height that creates blank space after questions */
    min-height: unset;
    height: auto;
  }

  /* ✅ keep at 15/24 as requested */
  .faq-kicker {
    font-size: 15px;
  }

  .faq-title {
    font-size: 24px;
  }

  .faq-list {
    width: 100%;
    max-width: 340px; /* reduced (box size) */
    margin-top: 52px; /* reduced */
    gap: 14px;
  }

  .faq-item {
    border-radius: 16px; /* reduced */
  }

  .faq-question {
    min-height: 62px; /* reduced */
    padding: 12px 0;
  }

  .faq-question-text {
    margin-left: 16px;
    font-size: 14px; /* reduced */
  }

  .faq-icon {
    right: 16px;
    width: 16px;
    height: 9px;
  }

  .faq-icon::before {
    width: 10px;
    height: 10px;
  }

  .faq-answer p {
    padding: 0 16px 16px 16px;
    font-size: 12.5px; /* reduced */
    line-height: 18px;
  }
}
