/* Custom styles for help pages */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Line clamp utilities for text truncation */
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* Prose styling for content */
.prose {
  color: #374151;
  max-width: none;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #111827;
  font-weight: 600;
  line-height: 1.25;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1rem;
}

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

.prose ul,
.prose ol {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.prose a {
  color: #2563eb;
  text-decoration: underline;
}

.prose a:hover {
  color: #1d4ed8;
}

/* Card hover effects */
.card-hover {
  transition: all 0.2s ease-in-out;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Responsive text sizing */
@media (max-width: 640px) {
  .prose h1 {
    font-size: 1.875rem;
  }
  
  .prose h2 {
    font-size: 1.25rem;
  }
  
  .prose h3 {
    font-size: 1.125rem;
  }
}

/* Focus styles for accessibility */
.focus-ring:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Badge variants */
.badge-primary {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-secondary {
  background-color: #f3f4f6;
  color: #374151;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Search highlighting */
.search-highlight {
  background-color: #fef08a;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
}

/* Category colors */
.category-housing { background-color: #dbeafe; color: #1e40af; }
.category-food { background-color: #dcfce7; color: #166534; }
.category-utilities { background-color: #fef3c7; color: #92400e; }
.category-healthcare { background-color: #f3e8ff; color: #7c3aed; }
.category-transportation { background-color: #ecfdf5; color: #059669; }
.category-items { background-color: #fce7f3; color: #be185d; }
.category-financial { background-color: #e0f2fe; color: #0277bd; }
.category-senior { background-color: #fff1f2; color: #e11d48; }
.category-employment { background-color: #f0fdf4; color: #16a34a; }
.category-family { background-color: #fefce8; color: #ca8a04; }

/* Formatted content styling */
.formatted-content h3 {
  position: relative;
}

.formatted-content h3::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background-color: #3b82f6;
  border-radius: 2px;
}

/* List styling improvements */
.formatted-content ul li {
  transition: all 0.2s ease;
}

.formatted-content ul li:hover {
  background-color: #f8fafc;
  border-radius: 6px;
  padding: 8px;
  margin: -8px;
}

/* Content section spacing */
.formatted-content > * + * {
  margin-top: 1.5rem;
}

/* Paragraph styling in formatted content */
.formatted-content p {
  line-height: 1.8;
  font-size: 1rem;
}

/* Responsive adjustments for formatted content */
@media (max-width: 768px) {
  .formatted-content h3 {
    font-size: 1.125rem;
  }
  
  .formatted-content h4 {
    font-size: 1rem;
  }
  
  .formatted-content .bg-gray-50 {
    padding: 1rem;
  }
}

/* Table of contents style (for future enhancement) */
.toc {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.toc h4 {
  margin-bottom: 0.5rem;
  color: #374151;
  font-weight: 600;
}

.toc ul {
  margin: 0;
  padding-left: 1rem;
}

.toc li {
  margin-bottom: 0.25rem;
}

.toc a {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.9rem;
}

.toc a:hover {
  text-decoration: underline;
}