/*-----------------------------------*\
  #FAQ - Modern & Friendly Redesign
\*-----------------------------------*/

.faq {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.faq-search {
  display: flex;
  align-items: center;
  max-width: 300px;
  margin: 30px auto;
  background: white;
  border-radius: 50px;
  padding: 10px 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.faq-search:focus-within {
  box-shadow: 0 5px 20px rgba(160, 32, 240, 0.2);
}

.faq-search ion-icon {
  color: #6134b7;
  font-size: 20px;
  margin-right: 5px;
}

.faq-search input {
  width: 80%;
  border: none;
  padding: 10px;
  font-size: 12px;
  outline: none;
  margin: 0 auto;
}

.faq-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.faq-category {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-category.active,
.faq-category:hover {
  background: linear-gradient(to right, #6134b7, #ffa700) !important;
  color: white;
  border-color: #6134b7;
}

.faq-card {
  transition: max-height 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
  background: linear-gradient(to right, #6134b7, #ffa700) !important;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  transition: color 0.3s ease;
}
.faq-card.filtered-out {
  opacity: 0;
  transform: translateY(20px);
  max-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.action-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(to right, #6134b7, #ffa700) !important;
  transition: all 0.3s ease;
}

.action-icon ion-icon {
  font-size: 20px;
}

.action-icon .close {
  display: none;
}

.faq-card.active .action-icon .open {
  display: none;
}

.faq-card.active .action-icon .close {
  display: block;
}

.card-content {
  background: white;
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: all 0.3s ease;
}

.faq-card.active .card-content {
  max-height: 300px;
  padding: 0 20px 20px;
}

.faq-contact {
  text-align: center;
  margin-top: 60px;
  padding: 30px;
  background-color: #020138;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-contact h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #333;
}

.faq-contact p {
  color: whitesmoke;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.faq-contact span {
  margin-right: 10px;
}

.faq-contact-btn {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(to right, #6134b7, #ffa700) !important;
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.faq-contact-btn:hover {
  background: linear-gradient(45deg, #6134b7, #ffa700);
  transform: translateY(-3px);
}

.faq-contact-btn ion-icon {
  margin-left: 8px;
}

/* Additional styles for improved FAQ */

/* Highlight for search results */
.highlight {
  background-color: rgba(160, 32, 240, 0.2);
  background: linear-gradient(to right, #6134b7, #ffa700) !important;
  font-weight: bold;
  padding: 0 2px;
  border-radius: 3px;
}

/* Animations for filtering */
.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Search tooltip */
.search-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.search-tooltip:after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(0, 0, 0, 0.8);
}

.search-tooltip.show {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .faq-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 20px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .faq-category {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .faq-search {
    max-width: 70%;
  }

  .card-title {
    font-size: 16px;
  }
}

/* Accessibility improvements */
.faq-search input:focus {
  outline: 2px solid #6134b7;
}

.card-action:focus {
  outline: 2px solid #6134b7;
  outline-offset: 2px;
}

.faq-category:focus {
  outline: 2px solid #6134b7;
  outline-offset: 2px;
}

/* Add a subtle hover effect to FAQ cards */
.faq-card:hover .card-action {
  background-color: rgba(160, 32, 240, 0.05);
}

/* Add a counter before each FAQ item */
.faq-card .card-title {
  position: relative;
}

/* Improve the "new" badge */
.faq-card.new::after {
  content: "Nouveau";
  position: absolute;
  top: 2px;
  right: 15px;
  background: linear-gradient(to right, #6134b7, #ffa700) !important;
  color: white;
  font-size: 8px;
  padding: 3px 3px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(160, 32, 240, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
