/* ===========================================================
   PREMIUM UNIFIED ADD-ON CSS
   Add this AFTER unified-styles.css for hero sections
   =========================================================== */
: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);
}


/*new hero section */

.hero-section {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('/images/pediatrics.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 */
.article-meta {
  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);
  }
}

.meta-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 */
.meta-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;
}

.meta-item:hover::before {
  opacity: 1;
}

.meta-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);
}

.meta-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);
  }
}

.meta-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);
}


/* Article Content Structure */
.main-content {
  margin-top: 120px;
  transition: margin-top 0.3s ease;
  min-height: 100vh;
  background: var(--white, #fff);
  position: relative;
  width: 100%;
}

/* Lede Section Enhancement */
.lede-section {
  text-align: center;
}

.lede-section .hero-badge {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: var(--white, #fff);
  box-shadow: var(--shadow-md);
  animation: scaleIn 0.5s ease;
  margin-top: 15px;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* Page Footer */
.page-footer {
  background: var(--color-gray-900, #111827);
  color: var(--white, #fff);
  padding: var(--space-2xl, 3rem) var(--space-xl, 2rem);
  text-align: center;
  margin-top: var(--space-3xl, 4rem);
}

.footer-links {
  margin-bottom: var(--space-lg, 1.5rem);
}

.footer-links a {
  color: var(--white, #fff);
  text-decoration: none;
  transition: color var(--transition-base, 0.3s);
  margin: 0 var(--space-md, 1rem);
}

.footer-links a:hover {
  color: var(--primary-coral, #FF6B6B);
}

.page-footer p {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Article Navigation */
.article-navigation {
  margin-top: 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);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-2xl, 3rem);
  right: var(--space-2xl, 3rem);
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ffd166 100%); 
  border: none;
  border-radius: var(--radius-full, 9999px);
  color: var(--white, #fff);
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base, 0.3s);
  box-shadow: var(--shadow-xl);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .article-body {
    padding: var(--space-2xl, 3rem);
  }
}

@media (min-width: 1024px) {
  .article-badge, .hero-title {
    margin-bottom: 50px !important;
  }
  .hero-subtitle {
    margin-bottom: 80px !important;
    padding: 0.95rem 1.5rem;
    display: inline-block;
  }

}


@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;
    }
    
    .article-meta {
        gap: 1rem;
    }
    
    .meta-item {
        padding: 1.25rem 1.75rem;
        min-width: 140px;
    }
    
    .meta-item i {
        font-size: 2rem;
    }
    
    .meta-item span {
        font-size: 1rem;
    }
  
  .article-content {
    padding: var(--space-xl, 2rem) var(--space-md, 1rem);
  }
  
  .article-body {
    padding: var(--space-xl, 2rem);
    border-radius: var(--radius-xl, 20px);
  }
  
  .nav-button {
    padding: var(--space-md, 1rem) var(--space-xl, 2rem) !important;
    font-size: 0.875rem;
  }
  
  .back-to-top {
    bottom: var(--space-lg, 1.5rem);
    right: var(--space-lg, 1.5rem);
    width: 45px;
    height: 45px;
  }
}


/* Ensure content sections have proper spacing */
.content-section {
  margin-bottom: var(--space-3xl, 4rem);
}

/* Hide old footer and button */
.footer:not(.page-footer) {
  display: none;
}

/* Print Styles */
@media print {
  .hero-section,
  .back-to-top,
  .article-navigation {
    display: none;
  }
  
  .article-body {
    box-shadow: none;
    padding: 0;
  }
}   

.mobile-menu-toggle {
  background: linear-gradient(135deg, #ff6b6b 0%, #ffd166 100%);  /* Use the page's gradient variable */
}

.desktop-nav-toggle {
  background: linear-gradient(135deg, #ff6b6b 0%, #ffd166 100%);  /* Use the page's gradient variable */
}

@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;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .meta-item {
        width: 100%;
        padding: 1.25rem;
    }
}
