/* FAQ Page Specific Styles */
/* Inherits from .legal-page-wrapper and .policy-banner in legalpage.css */

/* Inherits .policy-banner h1 from legalpage.css */

/* FAQ Tabs - matches policy-tabs styling */
.faq-tabs {
  padding: var(--minim) 0;
  display: flex;
  justify-content: center;
  gap: var(--semibreve);
  width: 100%;
  margin-bottom: var(--breve);
  flex-wrap: wrap;
}

.faq-tab {
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: var(--grey-700);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: var(--quaver);
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s,
    border-bottom-color 0.2s;
  font-weight: 540;
}

.faq-tab:hover {
  color: var(--mb);
}

.faq-tab.active {
  color: var(--mb);
  border-bottom-color: var(--mb);
}

/* FAQ Content Container */
.faq-content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--minim) var(--breve);
}

/* FAQ Category Sections */
.faq-category {
  display: none;
}

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

/* FAQ Item (Accordion) */
.faq-item {
  border-bottom: 1px solid var(--mb-70);
}

.faq-item:first-child {
  border-top: 1px solid var(--mb-70);
}

/* FAQ Question Button */
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--minim) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--mb);
  line-height: 1.5;
  transition: color 0.2s ease;
}

.faq-question span:first-child {
  flex: 1;
  padding-right: var(--minim);
}

/* FAQ Icon (Plus/Minus) */
.faq-icon {
  font-size: 18px;
  font-weight: 300;
  color: var(--mb);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  transition: color 0.2s ease;
}

/* Hide the span content and use ::after for the icon */
.faq-icon {
  font-size: 0;
}

.faq-icon::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
}

.faq-item.open .faq-icon::after {
  content: "−";
}

/* FAQ Answer */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease-out,
    transform 0.3s ease-out,
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
  padding-bottom: var(--minim);
}

.faq-answer p {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--mb);
  margin: 0;
  padding-right: var(--semibreve);
}

.faq-answer p + p {
  margin-top: var(20px);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .faq-tabs {
    gap: var(--crotchet);
    padding: var(--crotchet) var(--minim);
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .faq-tabs::-webkit-scrollbar {
    display: none;
  }

  .faq-tab {
    font-size: 12px;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .faq-content-container {
    padding: 0 var(--semibreve) var(--breve);
  }

  .faq-question {
    font-size: 14px;
    padding: var(--crotchet) 0;
  }

  .faq-answer p {
    font-size: 13px;
    padding-right: var(--minim);
  }
}

@media (max-width: 480px) {
  .faq-tabs {
    gap: var(--minim);
  }

  .faq-tab {
    font-size: 11px;
  }

  .faq-content-container {
    padding: 0 var(--minim) var(--breve);
  }
}
