/* ===========================================================
   ENHANCED PREMIUM HERO SECTION
   Ultra-modern design with advanced animations
   Sidebar styles remain UNTOUCHED
   =========================================================== */
:root {
  --gradient-mesh: radial-gradient(at 40% 20%, rgba(79, 70, 229, 0.3) 0px, transparent 50%),
                   radial-gradient(at 80% 0%, rgba(124, 58, 237, 0.25) 0px, transparent 50%),
                   radial-gradient(at 0% 50%, rgba(236, 72, 153, 0.2) 0px, transparent 50%),
                   radial-gradient(at 100% 80%, rgba(16, 185, 129, 0.25) 0px, transparent 50%);
  --glass-subtle: blur(8px);
  --glass-medium: blur(16px);
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-serif: 'Crimson Pro', Georgia, serif;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-elegant: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
   
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: yellow;
  color: #1313bd;
    text-shadow: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-serif);
  line-height: 1.8;
  color: var(--text-main);
  background: var(--bg-soft);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  overflow-x: hidden;
}

/* --- Hero Section Base --- */
.hero-section {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('/images/quiz-three.webp') center/cover no-repeat;
  overflow: hidden;
  padding: 8rem 2rem;
  isolation: isolate;
}

/* Animated Mesh Gradient Overlay */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
  animation: meshFloat 15s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes meshFloat {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-20px) scale(1.05);
  }
}

/* Sophisticated Dark Overlay with Grain */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(124, 58, 237, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, rgba(24, 24, 27, 0.3) 0%, rgba(24, 24, 27, 0.75) 100%);
  backdrop-filter: var(--glass-subtle);
  z-index: 2;
}

/* Subtle noise texture for depth */
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Hero Content Container */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1400px;
  width: 100%;
  text-align: center;
  color: white;
  padding: 0 2rem;
}

/* Premium Badge with Pill Shape */
.article-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.75rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: var(--glass-medium);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: badgeSlideIn 0.8s var(--ease-spring) both;
  transition: all 0.4s var(--ease-smooth);
}

.article-badge:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@keyframes badgeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Display Title - Cinematic */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 9vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 40%, #ddd6fe 70%, #fae8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleEntrance 1.2s var(--ease-elegant) 0.2s both;
  position: relative;
}

/* Animated underline accent */
.hero-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  border-radius: 2px;
  animation: underlineExpand 2.5s ease-in-out infinite;
}

@keyframes titleEntrance {
  0% {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes underlineExpand {
  0%, 100% {
    width: 100px;
    opacity: 0.5;
  }
  50% {
    width: 160px;
    opacity: 1;
  }
}

/* Refined Subtitle with Glass Effect */
.hero-subtitle {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 500;
  font-style: italic;
  margin-bottom: 3rem;
  padding: 1rem 2.25rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--glass-medium);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: subtitleFade 1s var(--ease-smooth) 0.5s both;
  position: relative;
  overflow: hidden;
}

/* Shimmer effect */
.hero-subtitle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmer 3s infinite;
}

@keyframes subtitleFade {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* Hero Stats - Premium Glass Cards */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: statsRise 1s var(--ease-smooth) 0.8s both;
}

@keyframes statsRise {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--glass-medium);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  min-width: 180px;
  transition: all 0.5s var(--ease-spring);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Hover glow border effect */
.stat-item::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.4) 0%, 
    transparent 50%, 
    rgba(255, 255, 255, 0.4) 100%);
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.stat-item:hover::before {
  opacity: 1;
}

.stat-item:hover {
  transform: translateY(-8px) scale(1.03);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.stat-item i {
  font-size: 2.25rem;
  opacity: 0.95;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.stat-item span {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}


/* --- Main Content Adjustment --- */
.main-content {
  margin-top: 120px;
  transition: margin-top 0.3s ease;
  min-height: 100vh;
  background: var(--white, #fff);
  position: relative;
  width: 100%;
}


/* --- Page Footer --- */
.page-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-footer p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.6);
}

.back-to-top:active {
    transform: translateY(-6px) scale(1.05);
}

/* --- Mobile Menu Toggle Button --- */
.mobile-menu-toggle {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.desktop-nav-toggle {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
}

/* --- Responsive Design --- */
@media (min-width: 1024px) {
    .article-badge, .hero-title {
        margin-bottom: 2.5rem;
    }
    
    .hero-subtitle {
        margin-bottom: 4rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
        padding: 4rem 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.25rem 1.75rem;
        min-width: 140px;
    }
    
    .stat-item i {
        font-size: 2rem;
    }
    
    .stat-item span {
        font-size: 1rem;
    }
    
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 450px;
        padding: 3rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .stat-item {
        width: 100%;
        padding: 1.25rem;
    }
}

/* --- Print Styles --- */
@media print {
    .hero-section,
    .back-to-top {
        display: none;
    }
}

.article-navigation {
  margin-top: var(--space-3xl, 4rem) !important;
  margin-bottom: var(--space-3xl, 4rem) !important;
  padding-top: var(--space-2xl, 3rem) !important;
  border-top: 2px solid var(--border, #e2e8f0) !important;
  display: flex !important;
  justify-content: center !important;
}

.nav-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: var(--space-md, 1rem) !important;
  padding: var(--space-lg, 1.5rem) var(--space-2xl, 3rem) !important;
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
  color: var(--white, #fff) !important;
  text-decoration: none !important;
  border-radius: var(--radius-full, 9999px) !important;
  font-weight: 600 !important;
  transition: all var(--transition-base, 0.3s) !important;
  box-shadow: var(--shadow-md) !important;
  border: none !important;
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.nav-button i {
  transition: transform var(--transition-base, 0.3s);
}

.nav-button:hover i {
  transform: translateX(-5px);
}
