.holi-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 50px 20px;
  text-align: center; /* centers inline-block elements like subtitle & title */
}

.holi-title {
  font-size: 3rem;
  text-align: center;
  font-weight: bold;
  color: #d63384;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 0.5rem;
}

/* Holi subtitle — vibrant, centered, readable & responsive */
.holi-subtitle {
  --h-gradient: linear-gradient(90deg, #ff6b6b 0%, #ffdd57 45%, #6be3ff 100%);
  --accent-height: 4px;

  display: inline-block; /* keeps it centered inside text-align:center parent */
  text-align: center;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: clamp(1rem, 1.6vw + 0.5rem, 1.25rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin: 0.5rem auto 1.25rem;
  padding-bottom: 0.35rem;

  /* Gradient text */
  background: var(--h-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  /* Subtle shadow for readability */
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.06),
               0 6px 18px rgba(107, 30, 87, 0.06);

  position: relative;
  overflow: visible;
}

/* Animated underline */
.holi-subtitle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.1rem;
  transform: translateX(-50%);
  height: var(--accent-height);
  width: 0%;
  background: linear-gradient(
    90deg,
    rgba(255, 107, 107, 0.95),
    rgba(255, 221, 87, 0.95),
    rgba(107, 227, 255, 0.95)
  );
  border-radius: 999px;
  transition: width 700ms cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: width;
  pointer-events: none;
}

/* Hover/focus underline expansion */
.holi-subtitle:hover::after,
.holi-subtitle:focus::after {
  width: 100%;
}

/* Entrance animation */
@media (prefers-reduced-motion: no-preference) {
  .holi-subtitle {
    transform: translateY(6px);
    opacity: 0;
    animation: holiFadeUp 800ms ease-out 300ms forwards;
  }

  @keyframes holiFadeUp {
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* Fallback for browsers without gradient text support */
@supports not (-webkit-background-clip: text) {
  .holi-subtitle {
    color: #ff6b6b;
    background: none;
    text-shadow: none;
  }
}

/* Holi image gallery */
.holi-images {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.holi-images img {
  width: 45%;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out;
}

.holi-images img:hover {
  transform: scale(1.1);
}

/* Animated background splashes */
.colors-animation {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.color-splash {
  position: absolute;
  background-color: rgba(255, 87, 34, 0.5);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  animation: splash-animation 3s infinite ease-in-out;
}

@keyframes splash-animation {
  0% {
    transform: scale(0) translateY(0);
    opacity: 1;
  }
  50% {
    transform: scale(1.5) translateY(-50px);
    opacity: 0.5;
  }
  100% {
    transform: scale(2) translateY(-100px);
    opacity: 0;
  }
}
