/* XCDED Custom Styles */

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Smooth transitions */
* {
  transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Typography enhancements */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2em;
  margin-bottom: 1em;
}

.prose h1 {
  font-size: 2.5rem;
  color: #1f2937;
}

.prose h2 {
  font-size: 2rem;
  color: #374151;
}

.prose h3 {
  font-size: 1.5rem;
  color: #4b5563;
}

.prose p {
  margin-bottom: 1.5em;
  line-height: 1.7;
  color: #4b5563;
}

.prose strong {
  font-weight: 600;
  color: #1f2937;
}

.prose ul,
.prose ol {
  margin-bottom: 1.5em;
}

.prose li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

/* Card hover effects */
.card-hover {
  transition: transform 0.2s ease-in-out, box-shadow 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);
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
  padding: 0.75rem 1.5rem;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: white;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 0.75rem 1.5rem;
}

.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

/* Form styles */
.form-input {
  appearance: none;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: all 0.2s ease-in-out;
}

.form-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input:invalid {
  border-color: #ef4444;
}

/* Loading states */
.loading {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive utilities */
@media (max-width: 640px) {
  .prose h1 {
    font-size: 2rem;
  }
  
  .prose h2 {
    font-size: 1.5rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
  }
}

/* Mobile menu animations */
#mobile-menu {
  transition: all 0.3s ease-in-out;
}

#mobile-menu.hidden {
  opacity: 0;
  transform: translateY(-10px);
}

#mobile-menu:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

/* Tag styles */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: #f3f4f6;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.tag:hover {
  background-color: #3b82f6;
  color: white;
  transform: translateY(-1px);
}

/* Category icons */
.category-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: #eff6ff;
  color: #3b82f6;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  transition: all 0.2s ease-in-out;
}

.category-card:hover .category-icon {
  background-color: #3b82f6;
  color: white;
  transform: scale(1.1);
}

/* Article content styles */
.article-content {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #374151;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.article-content h1 {
  font-size: 2rem;
  color: #1f2937;
}

.article-content h2 {
  font-size: 1.5rem;
  color: #374151;
}

.article-content h3 {
  font-size: 1.25rem;
  color: #4b5563;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1rem;
  margin: 2rem 0;
  font-style: italic;
  color: #6b7280;
}

/* Comments section */
.comment {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background-color: white;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.comment-author {
  font-weight: 600;
  color: #374151;
}

.comment-content {
  color: #4b5563;
  line-height: 1.6;
}

/* Notification styles */
.notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  max-width: 20rem;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease-in-out;
}

.notification.success {
  background-color: #10b981;
  color: white;
}

.notification.error {
  background-color: #ef4444;
  color: white;
}

.notification.info {
  background-color: #3b82f6;
  color: white;
}

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

/* Featured article styles */
.featured-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: #f59e0b;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  z-index: 10;
}

/* Hero section enhancements */
.hero-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Image loading states - simplified */
img {
  transition: opacity 0.3s ease-in-out;
}

/* Article image styles */
.article-image {
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.article-image:hover {
  transform: scale(1.05);
}

/* Image fallback - removed to prevent overlay issues */

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* XCDED Brand Color Overrides */
.bg-xcded-600,
.bg-blue-600 {
  background-color: #00bfa5 !important;
}

.bg-xcded-700,
.bg-blue-700 {
  background-color: #00a693 !important;
}

.hover\:bg-xcded-700:hover,
.hover\:bg-blue-700:hover {
  background-color: #00a693 !important;
}

.text-xcded-600,
.text-blue-600 {
  color: #00bfa5 !important;
}

.border-xcded-600,
.border-blue-600 {
  border-color: #00bfa5 !important;
}

.focus\:ring-xcded-500:focus,
.focus\:ring-blue-500:focus {
  --tw-ring-color: rgba(0, 191, 165, 0.5) !important;
}

/* Button overrides for all pages */
button[type="submit"],
input[type="submit"],
.btn-submit {
  background-color: #00bfa5 !important;
  color: white !important;
  border: none !important;
}

button[type="submit"]:hover,
input[type="submit"]:hover,
.btn-submit:hover {
  background-color: #00a693 !important;
}

/* Hero section button fixes */
.hero .bg-white {
  background-color: #00bfa5 !important;
  color: white !important;
  border-color: #00bfa5 !important;
}

.hero .hover\:bg-white:hover {
  background-color: #00a693 !important;
  color: white !important;
}

.hero .text-gray-900 {
  color: white !important;
}

/* Specific form button overrides */
form button[type="submit"] {
  background-color: #00bfa5 !important;
  color: white !important;
}

form button[type="submit"]:hover {
  background-color: #00a693 !important;
  color: white !important;
}

/* Contact and Submit page button overrides */
#contact-form button[type="submit"],
#submit-form button[type="submit"] {
  background-color: #00bfa5 !important;
  color: white !important;
  border: none !important;
}

#contact-form button[type="submit"]:hover,
#submit-form button[type="submit"]:hover {
  background-color: #00a693 !important;
  color: white !important;
}

/* Print styles */
@media print {
  .no-print {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  a {
    text-decoration: none;
    color: black;
  }
  
  .article-content {
    font-size: 12pt;
    line-height: 1.5;
  }
}