/* ===================================
   MYADIM - MINIMAL CUSTOM STYLES
   Pure DaisyUI + Essential Enhancements
   =================================== */

/* ===== FALLBACK STYLES (if CDN fails) ===== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  color: #1f2937;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Basic button styling as fallback */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
}

/* Basic card styling as fallback */
.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* Basic hero styling as fallback */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* ===== CUSTOM SCROLL BEHAVIOR ===== */
html {
  scroll-behavior: smooth;
}

/* ===== ENHANCED TRANSITIONS ===== */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a, a:visited {
    text-decoration: underline;
  }
  
  .navbar,
  .footer,
  .btn,
  .no-print {
    display: none !important;
  }
  
  .container {
    width: auto;
    margin: 0;
    padding: 0;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible for better keyboard navigation */
*:focus-visible {
  outline: 2px solid hsl(var(--p)) !important;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor !important;
  }
}


/* ===== CUSTOM ENHANCEMENTS FOR DAISYUI ===== */

/* Enhanced hover effects for cards */
.card:hover {
  transform: translateY(-4px);
  transition: all 0.3s ease;
}

/* Smooth scrolling for anchor links */
a[href^="#"] {
  scroll-behavior: smooth;
}

/* Loading state enhancement */
.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ===== UTILITY CLASSES ===== */

/* Line Clamp Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Enhanced Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

/* Improved Card Hover Effects */
.card:hover {
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card img {
  transition: transform 0.5s ease;
}

.card:hover img {
  transform: scale(1.05);
}

/* Fix Article Title and Content Visibility */
.card .card-title {
  color: #1f2937 !important; /* Force dark text on light cards */
}

.card .card-body p {
  color: #4b5563 !important; /* Force dark gray for content text */
}

.card .card-body .text-base-content\/60,
.card .card-body .text-base-content\/70 {
  color: #6b7280 !important; /* Force readable gray for meta text */
}

/* Force readable text for author names */
.card .font-medium {
  color: #374151 !important;
}

/* Ensure readable text on all themes */
[data-theme="dark"] .card .card-title,
[data-theme="synthwave"] .card .card-title,
[data-theme="halloween"] .card .card-title,
[data-theme="forest"] .card .card-title,
[data-theme="dracula"] .card .card-title {
  color: #1f2937 !important; /* Keep dark text even on dark themes since cards have light background */
}

[data-theme="dark"] .card .card-body p,
[data-theme="synthwave"] .card .card-body p,
[data-theme="halloween"] .card .card-body p,
[data-theme="forest"] .card .card-body p,
[data-theme="dracula"] .card .card-body p {
  color: #4b5563 !important;
}

[data-theme="dark"] .card .text-base-content\/60,
[data-theme="synthwave"] .card .text-base-content\/60,
[data-theme="halloween"] .card .text-base-content\/60,
[data-theme="forest"] .card .text-base-content\/60,
[data-theme="dracula"] .card .text-base-content\/60,
[data-theme="dark"] .card .text-base-content\/70,
[data-theme="synthwave"] .card .text-base-content\/70,
[data-theme="halloween"] .card .text-base-content\/70,
[data-theme="forest"] .card .text-base-content\/70,
[data-theme="dracula"] .card .text-base-content\/70 {
  color: #6b7280 !important;
}

[data-theme="dark"] .card .font-medium,
[data-theme="synthwave"] .card .font-medium,
[data-theme="halloween"] .card .font-medium,
[data-theme="forest"] .card .font-medium,
[data-theme="dracula"] .card .font-medium {
  color: #374151 !important;
}

.card .card-title:hover {
  color: hsl(var(--p)) !important; /* Primary color on hover */
}

/* ===== ARTICLE CONTENT STYLING ===== */
.prose {
  color: #374151;
  max-width: none;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: #1f2937;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }
.prose h4 { font-size: 1.25rem; }

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

.prose a {
  color: hsl(var(--p));
  text-decoration: underline;
}

.prose a:hover {
  color: hsl(var(--s));
}

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

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

.prose blockquote {
  border-left: 4px solid hsl(var(--p));
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.prose code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.prose pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

/* Dark theme prose adjustments */
[data-theme="dark"] .prose,
[data-theme="synthwave"] .prose,
[data-theme="halloween"] .prose,
[data-theme="forest"] .prose,
[data-theme="dracula"] .prose {
  color: #d1d5db;
}

[data-theme="dark"] .prose h1,
[data-theme="dark"] .prose h2,
[data-theme="dark"] .prose h3,
[data-theme="dark"] .prose h4,
[data-theme="dark"] .prose h5,
[data-theme="dark"] .prose h6,
[data-theme="synthwave"] .prose h1,
[data-theme="synthwave"] .prose h2,
[data-theme="synthwave"] .prose h3,
[data-theme="synthwave"] .prose h4,
[data-theme="synthwave"] .prose h5,
[data-theme="synthwave"] .prose h6,
[data-theme="halloween"] .prose h1,
[data-theme="halloween"] .prose h2,
[data-theme="halloween"] .prose h3,
[data-theme="halloween"] .prose h4,
[data-theme="halloween"] .prose h5,
[data-theme="halloween"] .prose h6,
[data-theme="forest"] .prose h1,
[data-theme="forest"] .prose h2,
[data-theme="forest"] .prose h3,
[data-theme="forest"] .prose h4,
[data-theme="forest"] .prose h5,
[data-theme="forest"] .prose h6,
[data-theme="dracula"] .prose h1,
[data-theme="dracula"] .prose h2,
[data-theme="dracula"] .prose h3,
[data-theme="dracula"] .prose h4,
[data-theme="dracula"] .prose h5,
[data-theme="dracula"] .prose h6 {
  color: #f3f4f6;
}

/* ===== PREVENT HORIZONTAL OVERFLOW ===== */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
  .hero {
    min-height: 70vh;
  }
  
  .text-6xl {
    font-size: 2.5rem !important;
  }
  
  .text-5xl {
    font-size: 2.25rem !important;
  }
  
  .stats {
    flex-direction: column;
  }
  
  .grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .text-6xl {
    font-size: 2rem !important;
  }
  
  .text-5xl {
    font-size: 1.875rem !important;
  }
  
  .text-4xl {
    font-size: 1.75rem !important;
  }
  
  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}