/**
 * FAQ Page Styles
 * Modern, clean design with smooth animations
 */

/* ============================================
   PAGE LAYOUT
   ============================================ */
.faq-page {
  padding: 2rem 0;
  min-height: calc(100vh - 160px);
}

/* ============================================
   HEADER
   ============================================ */
.faq-header {
  text-align: center;
  padding: 6rem 0 4rem;
}

@media (max-width: 1023px) {
  .faq-header {
    padding: 2rem 0 2rem;
  }
}

@media (max-width: 1920px) {
  .faq-header {
    padding: 4rem 0 3rem;
  }
}

.faq-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.faq-title-normal {
  color: var(--foreground);
}

.faq-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted-foreground);
  margin: 0;
  animation-delay: 0.1s;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.faq-search-container {
  max-width: 600px;
  margin: 0 auto 3rem;
}

.faq-search-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
}

.faq-search-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(226, 1, 205, 0.1);
}

.faq-search-icon {
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.faq-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--foreground);
  font-size: 1rem;
  font-family: inherit;
  padding-right: 2.5rem; /* Добавляем отступ справа для кнопки */
}

.faq-search-input::placeholder {
  color: var(--muted-foreground);
}

.faq-search-clear {
  position: absolute;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(226, 1, 205, 0.1);
  border-radius: 6px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.faq-search-clear:hover {
  background: rgba(226, 1, 205, 0.2);
  color: var(--primary);
  transform: scale(1.05);
}

.faq-search-clear:active {
  transform: scale(0.95);
}

/* ============================================
   CATEGORIES
   ============================================ */
.faq-categories {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-category {
  opacity: 0;
}

/* ============================================
   CATEGORY HEADER
   ============================================ */
.faq-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.faq-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.faq-category-icon-primary {
  background: linear-gradient(135deg, rgba(226, 1, 205, 0.2), rgba(226, 1, 205, 0.1));
  color: var(--primary);
  border: 1px solid var(--glass-border);
}

.faq-category-icon-secondary {
  background: linear-gradient(135deg, rgba(31, 158, 158, 0.2), rgba(31, 158, 158, 0.1));
  color: var(--secondary);
  border: 1px solid var(--glass-border);
}

.faq-category-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0;
}

/* ============================================
   FAQ ITEMS
   ============================================ */
.faq-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.faq-item {
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(226, 1, 205, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-item.active {
  border-color: var(--primary);
}

/* ============================================
   QUESTION BUTTON
   ============================================ */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
  font-family: inherit;
}

.faq-question:hover {
  background: rgba(226, 1, 205, 0.05);
}

.faq-question-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.4;
}

.faq-chevron {
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

/* ============================================
   ANSWER
   ============================================ */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
  padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
  color: var(--muted-foreground);
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

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

.faq-answer strong {
  color: var(--foreground);
  font-weight: 600;
}

/* ============================================
   LISTS
   ============================================ */
.faq-list {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.faq-list li {
  margin-bottom: 0.5rem;
}

.faq-list li:last-child {
  margin-bottom: 0;
}

/* ============================================
   LINKS
   ============================================ */
.faq-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.faq-link:hover {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}

/* ============================================
   CODE BLOCKS
   ============================================ */
.faq-code {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(226, 1, 205, 0.1);
  border: 1px solid rgba(226, 1, 205, 0.2);
  border-radius: 4px;
  color: var(--primary);
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  font-weight: 500;
}

/* ============================================
   NO RESULTS
   ============================================ */
.faq-no-results {
  text-align: center;
  padding: 4rem 2rem;
  opacity: 0;
  animation: fade-in 0.5s ease forwards;
}

.faq-no-results-icon {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.faq-no-results-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.faq-no-results-text {
  color: var(--muted-foreground);
  margin: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out forwards;
  opacity: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .faq-header {
    padding: 3rem 0 2rem;
  }
  
  .faq-search-container {
    margin-bottom: 2rem;
  }
  
  .faq-categories {
    gap: 1.5rem;
  }
  
  .faq-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .faq-category-title {
    font-size: 1.5rem;
  }
  
  .faq-question {
    padding: 1rem;
  }
  
  .faq-question-text {
    font-size: 1rem;
  }
  
  .faq-item.active .faq-answer {
    padding: 0 1rem 1rem;
  }
}

@media (max-width: 480px) {
  .faq-page {
    padding: 1rem 0;
  }
  
  .faq-header {
    padding: 2rem 0 1.5rem;
  }
  
  .faq-search-wrapper {
    padding: 0.875rem 1rem;
  }
  
  .faq-category-icon {
    width: 40px;
    height: 40px;
  }
  
  .faq-category-title {
    font-size: 1.25rem;
  }
  
  .faq-question {
    padding: 0.875rem;
  }
  
  .faq-question-text {
    font-size: 0.95rem;
  }
  
  .faq-item.active .faq-answer {
    padding: 0 0.875rem 0.875rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   HIDDEN STATE
   ============================================ */
.faq-item.hidden {
  display: none;
}

.faq-category.hidden {
  display: none;
}
