/**
 * FAQ Component CSS
 * Apple/Tesla inspired premium design with glassmorphism
 */

.faq-section {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, var(--dark-shades) 0%, rgba(25, 25, 25, 0.98) 50%, var(--dark-shades) 100%);
  overflow: hidden;
  position: relative;
}

.faq-section::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle at top right, rgba(246, 133, 31, 0.08) 0%, transparent 70%),
              radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
              radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, transparent 65%);
  z-index: 1;
}

.faq-section__container {
  position: relative;
  z-index: 2;
}

.faq-section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.faq-section__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  color: white;
  letter-spacing: -0.02em;
}

.faq-section__description {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: white;
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--line-height-normal);
  opacity: 0.9;
}

.faq-section__items {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.faq-item__question {
  padding: var(--space-xl);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.faq-item__question h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  margin: 0;
  color: white;
  padding-right: var(--space-lg);
  letter-spacing: normal;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--main-brand);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item__icon i {
  font-size: 1.25rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-item__icon {
  background-color: var(--main-brand);
  color: white;
}

.faq-item.active .faq-item__icon i {
  transform: rotate(45deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-item__answer {
  max-height: 1000px; /* Increased to accommodate longer answers */
}

.faq-item__answer p {
  padding: 0 var(--space-xl) var(--space-xl);
  margin: 0;
  line-height: var(--line-height-normal);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  opacity: 0; /* Start invisible */
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.4s ease;
  transition-delay: 0.1s;
}

.faq-item.active .faq-item__answer p {
  opacity: 1; /* Fade in when active */
  transform: translateY(0);
}

.faq-item__answer p strong {
  font-weight: var(--font-weight-semibold);
  color: var(--main-brand-light);
}

@media (max-width: 768px) {
  .faq-section {
    padding: var(--space-2xl) 0;
  }
  
  .faq-section__title {
    font-size: var(--font-size-2xl);
  }
  
  .faq-item__question {
    padding: var(--space-lg);
  }
  
  .faq-item__question h3 {
    font-size: var(--font-size-md);
  }
  
  .faq-item.active .faq-item__answer {
    padding-bottom: var(--space-lg);
  }
}
