/* Modern FAQ Page Styling */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-image: url("../../images/bg/faqcloset.webp");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: #ffffff;
  overflow-y: auto;
}

/* Dark overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: -1;
}

main {
  padding: 80px 20px;
}

/* Main Container */
#faq-container {
  max-width: 1000px;
  margin: 0 auto;
  animation: fadeIn 1s ease;
}

#faq-container h1 {
  text-align: center;
  font-size: 3.5rem;
  margin-bottom: 50px;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff, #ff85c5, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
  letter-spacing: 1px;
  font-weight: 800;
}

/* Tabs Section */
.faq-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.faq-tab {
  padding: 12px 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 25px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.faq-tab:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.12));
  transform: translateY(-3px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 105, 180, 0.4);
}

.faq-tab.active {
  background: linear-gradient(135deg, #6a0dad, #a855f7);
  border-color: rgba(168, 85, 247, 0.6);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 25px rgba(106, 13, 173, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

.faq-category.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* FAQ Section */
.faq-section {
  background: linear-gradient(145deg, rgba(30, 30, 40, 0.92), rgba(45, 45, 60, 0.92));
  border-radius: 20px;
  padding: 35px;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 50px;
}

.faq-item {
  margin-bottom: 18px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 8px;
  transition: all 0.3s ease;
}

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

.faq-question {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 0.3px;
  box-shadow: 
    0 3px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.faq-question:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.12));
  transform: translateY(-2px);
  box-shadow: 
    0 5px 18px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 105, 180, 0.3);
}

.faq-question::after {
  content: "+";
  font-size: 1.8rem;
  font-weight: 300;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #ff69b4;
}

.faq-item.active .faq-question {
  background: linear-gradient(145deg, rgba(106, 13, 173, 0.4), rgba(142, 45, 226, 0.3));
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 
    0 4px 15px rgba(106, 13, 173, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.faq-item.active .faq-question::after {
  content: "−";
  transform: rotate(180deg);
  color: #a855f7;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.5s ease,
    padding 0.3s ease;
  padding: 0 20px;
  color: #e0e0e0;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
  padding: 20px;
}

.faq-answer p {
  margin-top: 0;
  line-height: 1.6;
  margin-bottom: 15px;
}

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

.faq-answer ul {
  margin-top: 10px;
  margin-bottom: 15px;
  padding-left: 25px;
}

.faq-answer li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.faq-answer a {
  color: #d29eff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.faq-answer a:hover {
  color: #ff69b4;
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  #faq-container {
    margin: 40px 15px;
    padding: 25px 15px;
  }

  #faq-container h1 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .faq-section {
    padding: 20px 15px;
  }

  .faq-tabs {
    gap: 8px;
    margin-bottom: 20px;
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }

  .faq-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
  }

  .faq-tab {
    padding: 8px 12px;
    font-size: 0.85rem;
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .faq-question {
    font-size: 1rem;
    padding: 12px 40px 12px 15px;
  }

  .faq-question::after {
    right: 15px;
  }

  .faq-answer {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .faq-item.active .faq-answer {
    padding: 15px;
  }
}

@media (min-width: 2560px) {
  #faq-container h1 {
    font-size: 3.5rem;
  }

  .faq-tab {
    font-size: 1.3rem;
    padding: 12px 30px;
  }

  .faq-question {
    font-size: 1.4rem;
  }

  .faq-answer {
    font-size: 1.2rem;
  }
}
