/* ===========================================
   ARTICLE HERO SECTION
   Seamless integration with shared background
   =========================================== */

.article-hero {
  position: relative;
  /* Completely transparent - shared background shows through */
  background: transparent;
  color: white;
  overflow: hidden;
}

.article-hero>.container {
  position: relative;
  z-index: 10;
}

/* Category Badge - Glassmorphism style */
.article-category {
  display: inline-flex;
  width: fit-content;
  margin: 0 auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg,
      rgba(139, 92, 246, 0.15) 0%,
      rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(10px);
  color: #c4b5fd;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
}

.article-hero .max-w-4xl {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Title styling for readability */
#article-title {
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

/* Excerpt styling */
#article-excerpt {
  color: rgba(199, 210, 254, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Article Meta - Refined styling */
.article-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.article-meta span:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
}

.article-meta span i {
  color: #a78bfa;
  font-size: 0.85rem;
}

/* Article Cover Image - Floating card with purple glow */
.article-cover {
  position: relative;
  z-index: 10;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 1.25rem;
  margin-top: -80px;
  /* Floating Card Effect with purple glow */
  box-shadow:
    0 25px 60px -10px rgba(0, 0, 0, 0.5),
    0 0 80px -20px rgba(139, 92, 246, 0.2),
    0 0 0 1px rgba(139, 92, 246, 0.15);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.article-cover:hover img {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 35px 80px -10px rgba(0, 0, 0, 0.6),
    0 0 100px -15px rgba(139, 92, 246, 0.3),
    0 0 0 1px rgba(139, 92, 246, 0.25);
}

.article-content {
  padding: 3rem 0;
  max-width: 42rem !important;
  /* Slightly narrower for better reading experience */
  margin-left: auto;
  margin-right: auto;
  color: #e5e7eb;
  /* gray-200 - lighter for better contrast on dark */
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  /* Ensure clean sans-serif */
}

/* --- Experimental: Cinematic Images --- */
@media (min-width: 850px) {
  .article-content img {
    max-width: 54rem !important;
    /* 42rem * 1.3 approx */
    width: 130%;
    margin-left: -15%;
    border-radius: 1rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
  }
}

/* --- Premium Typography --- */

/* Drop Cap for the first paragraph */
.article-content>p:first-of-type::first-letter {
  float: left;
  font-size: 3.5rem;
  line-height: 0.85;
  font-weight: 800;
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  color: #818cf8;
  /* indigo-400 */
}

/* Gradient Headings */
.article-content h2 {
  font-size: 2.25rem;
  margin-top: 5rem;
  margin-bottom: 3rem;
  /* Increased space after the underline */
  padding-bottom: 1.25rem;
  /* Increased space between text and underline */
  background: linear-gradient(90deg, #ffffff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: none;
  position: relative;
  width: fit-content;
  font-weight: 800;
}

/* Decorative underline for H2 */
.article-content h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, #818cf8, #c084fc);
  border-radius: 4px;
}

.article-content h3 {
  font-size: 1.5rem;
  margin-top: 3.5rem;
  color: #f3f4f6;
  font-weight: 700;
}

.article-content h4 {
  font-size: 1.25rem;
  color: #e5e7eb;
  font-weight: 600;
}

.article-content p {
  line-height: 1.85;
  /* Relaxed leading */
  color: #d1d5db;
  /* gray-300 */
  margin-bottom: 1.75rem;
  font-size: 1.125rem;
  text-align: left;
  font-weight: 300;
  /* Lighter weight for elegance */
  letter-spacing: 0.01em;
}

/* Stylized Blockquote */
.article-content blockquote {
  position: relative;
  margin: 3.5rem 0;
  padding: 2.5rem 2rem;
  /* More padding */
  border: none;
  /* Remove simple border */
  border-left: 2px solid rgba(129, 140, 248, 0.5);
  /* Subtle line */
  background: linear-gradient(to right, rgba(129, 140, 248, 0.05), transparent);
  border-radius: 0 1rem 1rem 0;
  color: #e0e7ff;
  font-size: 1.35rem;
  font-family: serif;
  /* Mixed font for editorial feel */
  font-style: italic;
  font-weight: 400;
  line-height: 1.6;
}

/* Large decorative quote mark */
.article-content blockquote::before {
  content: '“';
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-size: 6rem;
  color: rgba(129, 140, 248, 0.1);
  font-family: serif;
  line-height: 1;
  pointer-events: none;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  padding-left: 1rem;
}

.article-content li {
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
  line-height: 1.7;
  color: #d1d5db;
  position: relative;
}

/* Custom bullet points */
.article-content ul li {
  list-style: none;
}

.article-content ul li::before {
  content: '—';
  position: absolute;
  left: -1rem;
  color: #818cf8;
  font-weight: 700;
}

.article-content a {
  color: #a5b4fc;
  /* Lighter indigo */
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(transparent calc(100% - 1px), #818cf8 1px);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s cubic-bezier(0.23, 1, 0.32, 1), color 0.3s;
  border-bottom: 1px solid rgba(129, 140, 248, 0.3);
  /* Base underline */
}

.article-content a:hover {
  background-size: 100% 100%;
  /* Fill line effect */
  color: white;
  border-bottom-color: transparent;
}

.article-content strong,
.article-content b {
  font-weight: 700;
  color: white;
}

.article-content em,
.article-content i {
  color: #e5e7eb;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2rem auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.article-content hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 3rem 0;
}

.article-cta {
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-cta h3 {
  color: white !important;
}

.article-cta p {
  color: #d1d5db !important;
}

.article-cta .text-indigo-600 {
  color: #818cf8 !important;
}

.article-cta .border-gray-200 {
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* --- Article Mobile Styles --- */
@media (max-width: 768px) {
  .article-category {
    font-size: 0.7rem;
    padding: 0.4rem 0.75rem;
  }

  .article-meta {
    gap: 0.75rem;
  }

  .article-meta span {
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
  }

  .article-cover img {
    margin-top: -50px;
    border-radius: 1rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Related Articles Section --- */
.related-section {
  position: relative;
  margin-top: 4rem;
  padding: 2.5rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg,
      rgba(99, 102, 241, 0.08) 0%,
      rgba(139, 92, 246, 0.05) 50%,
      rgba(17, 24, 39, 0.9) 100%);
  border: 1px solid rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 60px -20px rgba(139, 92, 246, 0.1);
  overflow: hidden;
}

/* Decorative glow */
.related-section::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.related-section>* {
  position: relative;
  z-index: 1;
}

.related-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.related-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.75rem;
  font-weight: 700;
}

.related-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.related-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.1);
  background: linear-gradient(180deg,
      rgba(139, 92, 246, 0.06) 0%,
      rgba(17, 24, 39, 0.8) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.related-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.35),
    0 0 40px -10px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.3);
}

.related-image {
  position: relative;
  overflow: hidden;
}

.related-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.6) 0%, transparent 50%);
  pointer-events: none;
}

.related-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.related-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-body p {
  color: #9ca3af;
  line-height: 1.5;
  flex: 1;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .related-section {
    padding: 1.75rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .related-title {
    font-size: 1.5rem;
  }

  .related-image img {
    height: 140px;
  }
}

@media (max-width: 768px) {
  .article-cover img {
    margin-top: -40px;
  }

  .article-content {
    padding: 1.5rem 0;
  }

  .article-content h2,
  .article-content h3,
  .article-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    /* Adjust heading size for mobile */
  }

  .article-content blockquote {
    padding: 1.5rem;
    margin: 2rem 0;
  }
}