.content-block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

.content-block h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: #333;
}

.content-block h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #333;
}

.content-block p {
  font-size: 1.5rem;
  line-height: 1.6;
  color: #666;
}

.parallax-section {
  position: relative;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  top: -100px;
  left: 0;
  width: 100%;
  height: calc(100% + 200px);
  background-image: url("https://www.yourmdl.org/wp-content/uploads/2025/11/Untitled-design.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
}

.parallax-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(5, 10, 20, 0.93) 0%, rgba(10, 20, 35, 0.8) 60%, rgba(0, 0, 0, 0.6) 100%);
}

/* ── Default parallax content (homepage stats, etc.) ── */
.parallax-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 6rem 1rem;
}

.parallax-content h2 {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  line-height: 1.2;
  margin: 0;
}

.parallax-content p {
  font-size: 1.2rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  margin: 0.5rem 0 0;
  line-height: 1.5;
}

/* ── Page Hero variant (.parallax-hero) ── */
.parallax-hero .parallax-bg::after {
  background: linear-gradient(135deg, rgba(5, 10, 20, 0.93) 0%, rgba(10, 20, 35, 0.8) 60%, rgba(0, 0, 0, 0.6) 100%);
}

.parallax-hero .parallax-content {
  align-items: flex-start;
  text-align: left;
  padding: 3.5rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.parallax-hero .parallax-content h2 {
  font-size: 2.8rem;
  padding-left: 1rem;
  position: relative;
  text-shadow: none;
  opacity: 0;
  transform: translateX(30px);
}

.parallax-hero .parallax-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 0;
  background: #D2544A;
  border-radius: 2px;
}

.page-loaded .parallax-hero .parallax-content h2 {
  animation: heroFadeIn 0.8s ease forwards 0.2s;
}

.page-loaded .parallax-hero .parallax-content h2::before {
  animation: borderGrowDown 0.6s ease forwards 0.2s;
}

.parallax-hero .parallax-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: none;
  max-width: 700px;
  margin: 1rem 0 0;
  line-height: 1.6;
  padding: 0.75rem 1.25rem;
  background: rgb(0 0 0 / 44%);
  border-radius: 8px;
  opacity: 0;
  transform: translateX(30px);
}

.page-loaded .parallax-hero .parallax-content p {
  animation: heroFadeIn 0.8s ease forwards 0.5s;
}

.parallax-hero .parallax-content p a {
  color: #f8d4d0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.parallax-hero .parallax-content p a:hover {
  color: #ffffff;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes borderGrowDown {
  to {
    height: 100%;
  }
}

@media (max-width: 768px) {
  .parallax-hero .parallax-content {
    padding: 2.5rem 1.5rem;
  }

  .parallax-hero .parallax-content h2 {
    font-size: 2rem;
    max-width: 320px;
  }

  .parallax-hero .parallax-content p {
    max-width: 500px;
    font-size: 1rem;
  }
}

/* ── Parallax header (homepage stats heading) ── */
.parallax-header {
  margin-bottom: 3rem;
}

.parallax-header h2 {
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
  padding-left: 1rem;
}

.parallax-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: #D2544A;
  border-radius: 2px;
}

/* Animation-ready state: hide elements until scroll triggers */
.parallax-section.stats-animate .parallax-header h2 {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.parallax-section.stats-animate .parallax-header h2::before {
  height: 0;
  transition: height 0.6s ease 0.2s;
}

.parallax-section.stats-animate .parallax-header p {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.parallax-section.stats-visible .parallax-header h2 {
  opacity: 1;
  transform: translateX(0);
}

.parallax-section.stats-visible .parallax-header h2::before {
  height: 100%;
}

.parallax-section.stats-visible .parallax-header p {
  opacity: 1;
  transform: translateX(0);
}

/* ── Stat items staggered fade-in ── */
.evolve-stat-item {
  position: relative;
}

.evolve-stat-item-title {
  padding-left: 1rem;
  border-left: 4px solid #D2544A;
  border-radius: 2px;
}

.parallax-section.stats-animate .evolve-stat-item {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.parallax-section.stats-animate .evolve-stat-item-title {
  border-left-color: transparent;
  transition: border-left-color 0.4s ease;
}

.parallax-section.stats-visible .evolve-stat-item {
  opacity: 1;
  transform: translateX(0);
}

.parallax-section.stats-visible .evolve-stat-item-title {
  border-left-color: #D2544A;
}

/* Staggered delays for each stat (sequence: left to right) */
.parallax-section.stats-visible .evolve-stat-item:nth-child(1) {
  transition-delay: 0.6s;
}
.parallax-section.stats-visible .evolve-stat-item:nth-child(1) .evolve-stat-item-title {
  transition-delay: 0.8s;
}

.parallax-section.stats-visible .evolve-stat-item:nth-child(2) {
  transition-delay: 0.9s;
}
.parallax-section.stats-visible .evolve-stat-item:nth-child(2) .evolve-stat-item-title {
  transition-delay: 1.1s;
}

.parallax-section.stats-visible .evolve-stat-item:nth-child(3) {
  transition-delay: 1.2s;
}
.parallax-section.stats-visible .evolve-stat-item:nth-child(3) .evolve-stat-item-title {
  transition-delay: 1.4s;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .parallax-section.stats-animate .parallax-header h2,
  .parallax-section.stats-animate .parallax-header p,
  .parallax-section.stats-animate .evolve-stat-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .parallax-section.stats-animate .parallax-header h2::before {
    height: 100%;
    transition: none;
  }

  .parallax-section.stats-animate .evolve-stat-item-title {
    border-left-color: #D2544A;
    transition: none;
  }
}

@media (max-width: 768px) {
  .parallax-header {
    margin-bottom: 2rem;
  }

  .parallax-content h2 {
    max-width: 320px;
  }

  .parallax-content p {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}
