/* FAQ Page Specific Styles */

/* Hero Section Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Hero Section */
.bg-primary {
  background: var(--primary);
}

/* Search Section */
#faq-search {
  transition: all 0.3s ease;
}

#faq-search:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.15);
}

/* FAQ Items */
.faq-item {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.faq-item:hover {
  border-color: rgba(138, 0, 0, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.faq-question {
  transition: all 0.3s ease;
}

.faq-question:hover {
  background-color: rgba(138, 0, 0, 0.05);
}

.faq-question.active {
  background-color: rgba(138, 0, 0, 0.1);
}

.faq-question.active i {
  transform: rotate(180deg);
}

.faq-answer {
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

.faq-answer.show {
  max-height: 500px;
  padding-top: 1rem;
}

/* Section Headers */
.text-2xl.font-bold.text-secondary {
  animation: slideInFromLeft 0.6s ease-out;
}

/* FAQ Items Animation */
.space-y-4 > .faq-item {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.space-y-4 > .faq-item:nth-child(1) {
  animation-delay: 0.1s;
}
.space-y-4 > .faq-item:nth-child(2) {
  animation-delay: 0.2s;
}
.space-y-4 > .faq-item:nth-child(3) {
  animation-delay: 0.3s;
}

/* Contact Support Cards */
.grid.grid-cols-1.md\\:grid-cols-3 > div {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
  transition: all 0.3s ease;
}

.grid.grid-cols-1.md\\:grid-cols-3 > div:nth-child(1) {
  animation-delay: 0.1s;
}
.grid.grid-cols-1.md\\:grid-cols-3 > div:nth-child(2) {
  animation-delay: 0.2s;
}
.grid.grid-cols-1.md\\:grid-cols-3 > div:nth-child(3) {
  animation-delay: 0.3s;
}

.grid.grid-cols-1.md\\:grid-cols-3 > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Search Results Highlighting */
.highlight {
  background-color: rgba(138, 0, 0, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* FAQ Categories */
.faq-category {
  margin-bottom: 3rem;
}

.faq-category h2 {
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.faq-category h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* Smooth Transitions */
.faq-question i {
  transition: transform 0.3s ease;
}

.faq-item.expanded .faq-question {
  background-color: rgba(138, 0, 0, 0.05);
}

.faq-item.expanded .faq-question i {
  transform: rotate(180deg);
}

/* Search Animation */
.search-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--sqube-red);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .grid.grid-cols-1.md\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .grid.grid-cols-1.md\\:grid-cols-3 > div,
  .space-y-4 > .faq-item {
    animation: none;
  }

  .faq-question {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .faq-answer {
    padding: 0 1rem 1rem 1rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .bg-background {
    background-color: #1a1a1a;
  }

  .bg-background {
    background-color: #2d2d2d;
    color: #ffffff;
  }

  .text-text {
    color: #a0a0a0;
  }

  .border-gray-300 {
    border-color: #4a4a4a;
  }

  .faq-item {
    background-color: #2d2d2d;
    border-color: #4a4a4a;
  }

  .faq-question:hover {
    background-color: rgba(138, 0, 0, 0.1);
  }
}

/* Accessibility */
.faq-question:focus {
  outline: 2px solid var(--sqube-red);
  outline-offset: 2px;
}

.faq-question:focus:not(:focus-visible) {
  outline: none;
}

/* Print Styles */
@media print {
  .faq-question {
    break-inside: avoid;
  }

  .faq-answer {
    max-height: none !important;
    display: block !important;
  }

  .bg-primary {
    background: var(--sqube-red) !important;
    -webkit-print-color-adjust: exact;
  }
}
