/* Article Content Styles for post.blade.php and aipost.blade.php */
/* Enhanced typography and table styling for entertainment blog theme */

/* ==================================
   HEADING STYLES (H1, H2, H3)
   ================================== */

.prose h1,
.prose h2,
.prose h3 {
  scroll-margin-top: 100px; /* Account for sticky header */
}

/* H1 Styles - Main Article Headings */
.prose h1 {
  font-size: 2.25rem; /* 36px */
  font-weight: 800;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #9333ea, #ec4899, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 0.75rem;
}

.prose h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #9333ea, #ec4899);
  border-radius: 2px;
}

/* H2 Styles - Section Headings */
.prose h2 {
  font-size: 1.875rem; /* 30px */
  font-weight: 700;
  line-height: 1.3;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  color: #1f2937;
  position: relative;
  padding-left: 1rem;
}

.dark .prose h2 {
  color: #f9fafb;
}

.prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 4px;
  height: calc(100% - 0.5rem);
  background: linear-gradient(180deg, #9333ea, #ec4899);
  border-radius: 2px;
}

/* H3 Styles - Subsection Headings */
.prose h3 {
  font-size: 1.5rem; /* 24px */
  font-weight: 600;
  line-height: 1.4;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #374151;
  position: relative;
  padding-left: 0.75rem;
}

.dark .prose h3 {
  color: #e5e7eb;
}

.prose h3::before {
  content: '▶';
  position: absolute;
  left: 0;
  top: 0;
  color: #9333ea;
  font-size: 0.75rem;
  transform: rotate(90deg);
  transition: transform 0.3s ease;
}

.prose h3:hover::before {
  transform: rotate(90deg) scale(1.2);
  color: #ec4899;
}

/* ==================================
   TABLE STYLES
   ================================== */

.prose table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

.dark .prose table {
  background: #1f2937;
  border-color: #374151;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Table Header */
.prose table thead {
  background: linear-gradient(135deg, #9333ea, #ec4899);
}

.prose table thead th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  border: none;
  position: relative;
}

.prose table thead th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
}

/* Table Body Rows */
.prose table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

.dark .prose table tbody tr {
  border-bottom-color: #374151;
}

.prose table tbody tr:hover {
  background-color: #f8fafc;
}

.dark .prose table tbody tr:hover {
  background-color: #374151;
}

.prose table tbody tr:last-child {
  border-bottom: none;
}

/* Table Body Cells */
.prose table tbody td {
  padding: 1rem 1.5rem;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
  border: none;
}

.dark .prose table tbody td {
  color: #d1d5db;
}

/* Alternating row colors */
.prose table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.dark .prose table tbody tr:nth-child(even) {
  background-color: #111827;
}

.prose table tbody tr:nth-child(even):hover {
  background-color: #f3f4f6;
}

.dark .prose table tbody tr:nth-child(even):hover {
  background-color: #374151;
}

/* ==================================
   TABLE VARIANTS
   ================================== */

/* Data table variant */
.prose table.data-table {
  font-family: 'Courier New', monospace;
}

.prose table.data-table tbody td {
  font-size: 0.8125rem;
}

/* Pricing table variant */
.prose table.pricing-table thead {
  background: linear-gradient(135deg, #059669, #0d9488);
}

/* Comparison table variant */
.prose table.comparison-table thead {
  background: linear-gradient(135deg, #dc2626, #ea580c);
}

/* Stats table variant */
.prose table.stats-table thead {
  background: linear-gradient(135deg, #1e40af, #3730a3);
}

/* Schedule table variant */
.prose table.schedule-table thead {
  background: linear-gradient(135deg, #7c2d12, #9a3412);
}

/* ==================================
   TABLE ENHANCEMENTS
   ================================== */

/* Table caption styling */
.prose table caption {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-align: left;
  font-style: italic;
}

.dark .prose table caption {
  color: #9ca3af;
}

/* Code blocks within tables */
.prose table code {
  background: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.dark .prose table code {
  background: #374151;
  color: #d1d5db;
}

/* Links within tables */
.prose table a {
  color: #9333ea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.prose table a:hover {
  color: #ec4899;
  text-decoration: underline;
}

.dark .prose table a {
  color: #c084fc;
}

.dark .prose table a:hover {
  color: #f0abfc;
}

/* ==================================
   HEADING ENHANCEMENTS
   ================================== */

/* Links within headings */
.prose h1 a,
.prose h2 a,
.prose h3 a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.prose h1 a:hover,
.prose h2 a:hover,
.prose h3 a:hover {
  opacity: 0.8;
}

/* Heading anchor links */
.prose h1:hover::after,
.prose h2:hover::before,
.prose h3:hover::before {
  opacity: 0.8;
}

/* ==================================
   RESPONSIVE DESIGN
   ================================== */

/* Mobile optimizations */
@media (max-width: 768px) {
  .prose table {
    font-size: 0.75rem;
    margin: 1.5rem 0;
  }
  
  .prose table thead th,
  .prose table tbody td {
    padding: 0.75rem 1rem;
  }
  
  .prose h1 {
    font-size: 1.875rem; /* 30px */
    margin-top: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .prose h2 {
    font-size: 1.5rem; /* 24px */
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
  
  .prose h3 {
    font-size: 1.25rem; /* 20px */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
}

/* Tablet optimizations */
@media (max-width: 1024px) and (min-width: 769px) {
  .prose table {
    font-size: 0.8125rem;
  }
  
  .prose h1 {
    font-size: 2rem; /* 32px */
  }
  
  .prose h2 {
    font-size: 1.75rem; /* 28px */
  }
  
  .prose h3 {
    font-size: 1.375rem; /* 22px */
  }
}

/* ==================================
   PRINT STYLES
   ================================== */

@media print {
  .prose h1,
  .prose h2,
  .prose h3 {
    color: #000 !important;
    break-after: avoid;
  }
  
  .prose h1::after,
  .prose h2::before,
  .prose h3::before {
    display: none;
  }
  
  .prose table {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .prose table thead {
    background: #f0f0f0 !important;
    color: #000 !important;
  }
  
  .prose table tbody tr {
    border-bottom: 1px solid #ccc;
  }
  
  .prose table tbody tr:hover {
    background: transparent !important;
  }
}

/* ==================================
   ACCESSIBILITY ENHANCEMENTS
   ================================== */

/* Focus styles for keyboard navigation */
.prose h1:focus,
.prose h2:focus,
.prose h3:focus {
  outline: 2px solid #9333ea;
  outline-offset: 2px;
  border-radius: 4px;
}

.prose table:focus-within {
  outline: 2px solid #9333ea;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .prose h1,
  .prose h2,
  .prose h3 {
    color: #000;
  }
  
  .dark .prose h1,
  .dark .prose h2,
  .dark .prose h3 {
    color: #fff;
  }
  
  .prose table {
    border: 2px solid #000;
  }
  
  .dark .prose table {
    border-color: #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .prose h3::before {
    transition: none;
  }
  
  .prose table tbody tr {
    transition: none;
  }
}
