/* ============================================
   FAQ PAGE SPECIFIC STYLES
   ============================================ */

/* FAQ Page Background */
.faq-page {
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 50%, #fafafa 100%);
  position: relative;
}

.faq-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(100, 100, 100, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 100, 100, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  opacity: 0.5;
}

/* FAQ Category Styling */
.faq-category {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 2px solid #e8e8e8;
  scroll-margin-top: 100px; /* Offset for fixed headers */
}

.faq-category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-category-title {
  font-size: 1.8rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid #666666;
  transition: color 0.3s ease;
  letter-spacing: 0.5px;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.faq-category-title strong {
  color: #666666;
  margin-right: 8px;
}

/* FAQ Item Styling */
.faq-item {
  margin-bottom: 25px;
  padding: 22px;
  background: #fafafa;
  border-left: 4px solid #666666;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.faq-item:hover {
  background: #f5f5f5;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  transform: translateX(2px);
}

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

/* Question Styling */
.faq-question {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.6;
  cursor: default;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.faq-question strong {
  color: #666666;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 45px;
  text-align: left;
}

/* Answer Styling */
.faq-answer {
  font-size: 1rem;
  line-height: 1.9;
  color: #555;
  margin: 0;
  padding-left: 55px; /* Align with question text after number */
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.faq-answer br {
  display: block;
  content: "";
  margin-top: 8px;
}

/* Sidebar Navigation Enhancements */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  display: block;
  padding: 12px 16px;
  color: #555;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.sidebar-link:hover {
  background: #f0f0f0;
  border-left-color: #666666;
  color: #1a1a1a;
  transform: translateX(2px);
}

.sidebar-link strong {
  color: #666666;
  margin-right: 6px;
  font-weight: 700;
}

.sidebar-link.active {
  background: #e8e8e8;
  border-left-color: #666666;
  color: #1a1a1a;
  font-weight: 600;
}

/* Sidebar Title */
.sidebar-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #666666;
  letter-spacing: 0.5px;
  font-family: 'Inter', sans-serif;
}

/* Search Box (for future enhancement) */
.faq-search-box {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.faq-search-input:focus {
  outline: none;
  border-color: #666666;
  box-shadow: 0 0 0 3px rgba(100, 100, 100, 0.1);
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 80px 20px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.loading-state p {
  color: #666;
  font-size: 1rem;
  margin: 0;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.loading-state::after {
  content: '';
  display: block;
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #666666;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error State */
.faq-error {
  padding: 40px;
  text-align: center;
  background: #fff3e0;
  border: 2px solid #ff9800;
  border-radius: 8px;
  margin: 20px 0;
}

.faq-error h2 {
  color: #e65100;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

/* Highlight for search results (future enhancement) */
.faq-item.highlight {
  background: #fff9c4;
  border-left-color: #fbc02d;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .faq-category-title {
    font-size: 1.35rem;
  }

  .faq-question {
    font-size: 1.05rem;
  }

  .faq-question strong {
    min-width: 42px;
  }

  .faq-answer {
    font-size: 0.92rem;
    padding-left: 52px;
  }

  .faq-item {
    padding: 18px;
    margin-bottom: 20px;
  }

  .faq-category {
    margin-bottom: 50px;
    padding-bottom: 35px;
  }

  .sidebar-link {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  .sidebar-title {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .faq-category-title {
    font-size: 1.2rem;
  }

  .faq-question {
    font-size: 1rem;
    flex-direction: column;
    gap: 5px;
  }

  .faq-question strong {
    min-width: auto;
  }

  .faq-answer {
    font-size: 0.9rem;
    padding-left: 0;
  }

  .faq-item {
    padding: 15px;
  }

  .faq-category {
    margin-bottom: 40px;
    padding-bottom: 30px;
  }
}

/* Print Styles */
@media print {
  .sidebar-nav {
    display: none;
  }

  .faq-item {
    page-break-inside: avoid;
    background: white;
    border: 1px solid #ddd;
    box-shadow: none;
  }

  .faq-category {
    page-break-after: auto;
  }
}

/* Accessibility Enhancements */
.faq-question:focus,
.sidebar-link:focus {
  outline: 3px solid #666666;
  outline-offset: 3px;
  border-radius: 2px;
}

.sidebar-link:focus {
  background: #f0f0f0;
}

/* Smooth appearance animation */
.faq-item {
  animation: fadeInUp 0.5s ease-out backwards;
}

.faq-item:nth-child(1) { animation-delay: 0.05s; }
.faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-item:nth-child(3) { animation-delay: 0.15s; }
.faq-item:nth-child(4) { animation-delay: 0.2s; }
.faq-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sticky sidebar on larger screens */
@media (min-width: 1024px) {
  .policies-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 transparent;
  }

  .policies-sidebar::-webkit-scrollbar {
    width: 4px;
  }

  .policies-sidebar::-webkit-scrollbar-track {
    background: transparent;
  }

  .policies-sidebar::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 2px;
  }

  .policies-sidebar::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
  }
}
