/* Modern FAQ Page Design - Matching Homepage Dark Theme */

/* Import Noto Sans Lao font */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@300;400;500;600;700&display=swap");

/* FAQ Hero Section */
.faq-hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: clamp(50px, 6vw, 80px) 0 clamp(40px, 5vw, 60px);
  position: relative;
  overflow: hidden;
  margin-top: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.faq-hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%231e293b" stroke-width="0.2" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>'),
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.faq-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
  text-align: center;
}

.faq-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: #ffffff !important;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  box-shadow: 
    0 8px 24px rgba(59, 130, 246, 0.4),
    0 4px 12px rgba(37, 99, 235, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Force white text/icon color inside FAQ badge */
.faq-hero-badge,
.faq-hero-badge span,
.faq-hero-badge i {
  color: #ffffff !important;
}

.faq-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1rem;
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
  letter-spacing: -0.04em;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
}

.faq-hero-description {
  font-size: 1.125rem;
  color: #cbd5e1;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
  font-weight: 400;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.01em;
}

/* Search Bar */
.faq-search-container {
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
  animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

.faq-search-container:focus-within .faq-search-hint {
  opacity: 0;
  visibility: hidden;
}

.faq-search-box {
  width: 100%;
  padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: #ffffff;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.faq-search-box::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.faq-search-box:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.faq-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.25rem;
  pointer-events: none;
}

/* FAQ Content Section */
.faq-content-section {
  background: #ffffff;
  padding: clamp(40px, 5vw, 60px) 0;
  position: relative;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* FAQ Counter */
.faq-counter {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #64748b;
  font-size: 0.9375rem;
  font-weight: 500;
}

.faq-counter strong {
  color: #3b82f6;
  font-weight: 700;
}

/* Category Filter */
.faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.faq-category-btn {
  padding: 0.625rem 1.25rem;
  background: #f1f5f9;
  border: 2px solid transparent;
  border-radius: 12px;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.faq-category-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: translateY(-2px);
}

.faq-category-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Modern Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-accordion-item {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
}

.faq-accordion-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

.faq-accordion-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.faq-accordion-item.active {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.faq-accordion-item.active::before {
  transform: scaleY(1);
}

.faq-accordion-header {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: all 0.3s ease;
}

.faq-accordion-item:hover .faq-accordion-header {
  background: #f8fafc;
}

.faq-accordion-item.active .faq-accordion-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(37, 99, 235, 0.03));
}

.faq-accordion-question {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
  flex: 1;
  padding-right: 1rem;
  margin: 0;
}

.faq-accordion-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 8px;
  color: #3b82f6;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.faq-accordion-item.active .faq-accordion-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  transform: rotate(180deg);
}

.faq-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
  padding: 0 1.5rem;
}

.faq-accordion-item.active .faq-accordion-body {
  max-height: 1000px;
  padding: 0 1.5rem 1.5rem;
}

.faq-accordion-answer {
  color: #64748b;
  line-height: 1.75;
  font-size: 1rem;
  padding-top: 0.5rem;
}

.faq-accordion-answer ul,
.faq-accordion-answer ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.faq-accordion-answer li {
  margin-bottom: 0.5rem;
  color: #475569;
}

.faq-accordion-answer strong {
  color: #1e293b;
  font-weight: 600;
}

/* FAQ Actions (Helpful, Share, Copy) */
.faq-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.faq-helpful {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-helpful-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.faq-helpful-buttons {
  display: flex;
  gap: 0.5rem;
}

.faq-helpful-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #64748b;
  font-size: 0.875rem;
}

.faq-helpful-btn:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  color: #3b82f6;
  transform: translateY(-2px);
}

.faq-helpful-btn.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

.faq-helpful-btn.active:hover {
  transform: translateY(-2px) scale(1.05);
}

.faq-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.faq-action-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.faq-action-btn i {
  font-size: 0.875rem;
}

.faq-action-btn.copied {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-color: #10b981;
}

/* Back to Top Button */
.faq-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  font-size: 1.25rem;
}

.faq-back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.faq-back-to-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

.faq-back-to-top:active {
  transform: translateY(-2px) scale(1.05);
}

/* Keyboard Shortcut Hint */
.faq-search-hint {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  pointer-events: none;
}

.faq-search-hint kbd {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-family: monospace;
  font-size: 0.75rem;
}

.faq-search-box:focus ~ .faq-search-hint {
  opacity: 0;
}

/* No Results Message */
.faq-no-results {
  text-align: center;
  padding: 4rem 2rem;
  display: none;
}

.faq-no-results.show {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.faq-no-results-icon {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.faq-no-results h3 {
  font-size: 1.5rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.faq-no-results p {
  color: #64748b;
  font-size: 1rem;
}

/* Contact CTA Section */
.faq-cta-section {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  padding: clamp(40px, 5vw, 60px) 0;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

.faq-cta-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.faq-cta-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}

.faq-cta-description {
  font-size: 1.125rem;
  color: #64748b;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.faq-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.125rem 2.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: #ffffff !important;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 8px 24px rgba(59, 130, 246, 0.4),
    0 4px 12px rgba(37, 99, 235, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Force white text/icon color inside FAQ CTA button */
.faq-cta-button,
.faq-cta-button span,
.faq-cta-button i {
  color: #ffffff !important;
}

.faq-cta-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 16px 40px rgba(59, 130, 246, 0.5),
    0 8px 20px rgba(37, 99, 235, 0.4);
  color: #ffffff !important;
}

.faq-cta-button:active {
  transform: translateY(-2px) scale(1);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
  @media (max-width: 768px) {
    .faq-hero-section {
      padding: clamp(40px, 5vw, 60px) 0 clamp(30px, 4vw, 40px);
    }

  .faq-hero-title {
    font-size: 2.25rem;
  }

  .faq-hero-description {
    font-size: 1rem;
  }

  .faq-search-container {
    margin-bottom: 2rem;
  }

  .faq-search-box {
    padding: 1rem 1.25rem 1rem 3rem;
    font-size: 0.95rem;
  }

  .faq-categories {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .faq-category-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .faq-accordion-header {
    padding: 1.25rem;
  }

  .faq-accordion-question {
    font-size: 1rem;
    padding-right: 0.75rem;
  }

  .faq-accordion-icon {
    width: 28px;
    height: 28px;
  }

  .faq-accordion-body {
    padding: 0 1.25rem;
  }

  .faq-accordion-item.active .faq-accordion-body {
    padding: 0 1.25rem 1.25rem;
  }

  .faq-cta-title {
    font-size: 1.75rem;
  }

  .faq-cta-description {
    font-size: 1rem;
  }

  .faq-cta-button {
    padding: 1rem 2rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .faq-hero-title {
    font-size: 1.875rem;
  }

  .faq-accordion-header {
    padding: 1rem;
  }

  .faq-accordion-question {
    font-size: 0.95rem;
  }

  .faq-back-to-top {
    width: 48px;
    height: 48px;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1rem;
  }

  .faq-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .faq-helpful {
    width: 100%;
    justify-content: space-between;
  }

  .faq-search-hint {
    display: none;
  }
}

@media (max-width: 375px) {
  .faq-hero-title {
    font-size: 1.625rem;
  }

  .faq-hero-subtitle {
    font-size: 0.9rem;
  }

  .faq-search-box {
    padding: 1rem 1rem 1rem 2.75rem;
    font-size: 0.9rem;
  }

  .faq-category-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .faq-accordion-header {
    padding: 0.875rem;
  }

  .faq-accordion-question {
    font-size: 0.9rem;
  }

  .faq-accordion-answer {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .faq-back-to-top {
    width: 44px;
    height: 44px;
    bottom: 1rem;
    right: 1rem;
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.faq-accordion-header:focus-visible,
.faq-category-btn:focus-visible,
.faq-search-box:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

