/**
 * FAQ Page Hierarchical CSS
 * Styles for Frequently Asked Questions page
 */

/* ============================================
   MAIN FAQ CONTAINER
   ============================================ */
.faq {
  width: 100%;
  min-height: 100vh;
  background-color: #ffffff;
  padding-bottom: 70px;
}

h3.empty-tag {
  display: none !important;
}

.faq .container {
  max-width: 1270px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   FAQ HEADER
   ============================================ */
.faq .faq-header {
  background: linear-gradient(90deg, #0069aa 0%, #00a5d9 100%);
  color: #ffffff;
  padding: 80px 0;
  margin-bottom: 40px;
}

.faq-header h1 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 400;
  margin: 0;
  line-height: 1.2;
}

/* ============================================
   FEATURED/POPULAR QUESTIONS SECTION
   ============================================ */
.faq-featured {
  padding: 60px 0;
}

.faq-featured h2 {
  font-size: 36px !important;
  font-weight: 600;
  color: #222720;
  margin-bottom: 25px;
  line-height: 1.3;
  font-family: "Univers LT Std" !important;
}
@media screen and (max-width: 991px) {
  .faq-featured h2 {
    font-size: 30px !important;
  }
}
@media screen and (max-width: 595px) {
  .faq-featured h2 {
    font-size: 24px !important;
  }
}
.faq-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.faq-featured-card {
  background-color: #ffffff;
  padding: 50px 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  box-shadow: 0px 17px 47px 0px #7a95a42e;
}

.faq-featured-card .faq-question-text h3 {
  font-size: 24px !important;
  font-family: "Univers LT Std" !important;
  line-height: 31px !important;
  line-height: 1.3 !important;
  margin-bottom: 0;
  color: #222720;
  max-width: 430px;
  padding-right: 10px;
}

.faq-featured-card .faq-question-arrow {
  transition: transform 0.3s ease;
}

.faq-featured-card:hover .faq-question-arrow {
  transform: translateX(10px);
}
@media screen and (max-width: 991px) {
  .faq-featured-card .faq-question-text h3 {
    font-size: 20px !important;
  }
}
/* ============================================
   FILTER AND SEARCH SECTION
   ============================================ */
.faq-filters {
  padding: 25px 0;
}

.faq-filters .faq-filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.faq-filter-group {
  display: flex;
  align-items: center;
  flex: 0 0 70%;
  max-width: 70%;
  flex-wrap: wrap;
}

.faq-filter-group label {
  font-size: 1rem;
  font-weight: 700;
  color: #222720;
  white-space: nowrap;
}

.faq-filter-select {
  position: relative;
  min-width: 200px;
  margin-left: 15px;
}

.faq-filter-select.selector-wrap {
  position: relative;
}

.faq-filter-select .selector {
  box-shadow: 0 5px 18px 0px rgba(78, 102, 116, 0.17);
  padding: 13px 19px 11px;
  cursor: pointer;
  position: relative;
  background-color: #ffffff;
  max-width: 245px;
}

.faq-filter-select .selector span {
  max-width: 140px;
  overflow: hidden;
  display: block;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.faq-filter-select .selector:before {
  position: absolute;
  content: "";
  top: 20px;
  right: 20px;
  width: 16px;
  height: 9px;
  background: url("/wp-content/themes/modeln/img/resource/selector_arrow.png")
    no-repeat;
  transition: all 0.3s ease-in-out;
}

.faq-filter-select .selector.open:before {
  transform: rotate(180deg);
}

.faq-filter-select .option-wrap {
  padding: 8px 0 0 0;
  margin: 0;
  list-style: none;
  box-shadow: 0px 5px 18px 0px rgba(78, 102, 116, 0.17);
  position: absolute;
  left: 0;
  top: 50px;
  max-height: 230px;
  width: 100%;
  overflow: scroll !important;
  overflow-x: hidden !important;
  background: #fff;
  display: none;
  z-index: 99;
}

.faq-filter-select .option-wrap li {
  padding: 13px 36px 10px 18px;
  font-weight: 400;
  margin: 0;
  color: #414141;
  font-family: "Univers LT Std";
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  position: relative;
  line-height: 1.3;
  letter-spacing: -0.038em;
}

.faq-filter-select .option-wrap li:hover {
  background: #00a5d9;
  color: #fff;
}

.faq-filter-select .option-wrap li.active:before {
  position: absolute;
  content: "";
  top: 15px;
  right: 20px;
  width: 15px;
  height: 11px;
  transition: all 0.3s ease-in-out;
  background: url("/wp-content/themes/modeln/img/resource/tick_mark-blue.png")
    no-repeat;
}

.faq-filter-select .option-wrap li.active:hover:before {
  background: url("/wp-content/themes/modeln/img/resource/tick_mark-white.png")
    no-repeat;
}

.faq-search {
  position: relative;
  flex: 0 0 30%;
  max-width: 30%;
}

.faq-search input[type="search"],
.faq-search input[type="text"] {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 1px solid #e3e3e3;
  font-size: 14px;
  color: #767676;
  transition: border-color 0.3s ease;
  background-color: #e3eff880;
  margin-bottom: 0;
}

.faq-search input[type="search"]:focus,
.faq-search input[type="text"]:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.faq-search::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 10px;
  pointer-events: none;
  background-image: url("/wp-content/themes/modeln/faq/images/search.svg");
  background-size: contain;
  background-repeat: no-repeat;
  width: 24px;
  height: 24px;
}

/* ============================================
   FAQ QUESTIONS LIST (ACCORDION)
   ============================================ */
.faq-list {
  margin-top: 25px;
}

.faq-list .faq-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-bottom: 40px;
}

.faq-list .faq-item {
  background-color: #ffffff;
  box-shadow: 0px 17px 47px 0px #7a95a42e;
  padding: 40px 20px;
}

.faq-list .faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  cursor: pointer;
  user-select: none;
}

.faq-list .faq-question-text {
  margin-right: 20px;
}
.faq-list .faq-question-text h3 {
  font-size: 24px !important;
  font-family: "Univers LT Std" !important;
  color: #222720 !important;
  line-height: 1.3 !important;
  margin-bottom: 0;
}

.faq-list .faq-item-link .faq-question-arrow {
  transition: transform 0.3s ease;
}

.faq-list .faq-item-link:hover .faq-question-arrow {
  transform: translateX(10px);
}

.faq-list .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  padding: 0 0;
}

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

.faq-list .faq-answer-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #666666;
  padding-top: 10px;
}

.faq-list .faq-answer-content p {
  margin-bottom: 15px;
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 991px) {
  .faq-featured {
    padding: 30px 0;
  }

  .faq-header h1 {
    font-size: 2rem;
  }

  .faq-featured h2 {
    font-size: 1.5rem;
  }

  .faq-featured-grid {
    grid-template-columns: 1fr;
  }

  .faq-filter-group {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .faq-filter-group label {
    margin-bottom: 5px;
  }

  .faq-search {
    flex: 0 0 100%;
    max-width: 100%;
    margin-top: 20px;
  }

  .faq-list .faq-question {
    padding: 15px 0;
  }
}

@media (max-width: 595px) {
  .faq-header {
    padding: 30px 0;
  }

  .faq-header h1 {
    font-size: 1.75rem;
  }

  .faq-featured-card {
    padding: 20px;
  }

  .faq-featured-card .faq-question-text {
    font-size: 0.9rem;
  }
  .faq-list .faq-question-text h3 {
    font-size: 20px !important;
  }
  .faq-filter-group {
    flex-direction: column;
  }

  .faq-filter-select {
    max-width: 100%;
    margin: 0 0 20px;
    min-width: 100%;
  }

  .faq-filter-select .selector {
    padding: 12px 17px 12px;
  }

  .faq-filter-select .option-wrap li {
    padding-right: 50px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.faq-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666666;
}

.faq-empty-state p {
  font-size: 1.1rem;
  margin: 0;
}

.faq-loading {
  text-align: center;
  padding: 40px 20px;
  color: #666666;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.faq-list .faq-question:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.faq-list .faq-question:focus:not(:focus-visible) {
  outline: none;
}

.faq-list .faq-question:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* Screen reader only text */
.faq-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
