/* =========================================
   HOMEPAGE STYLES (index.css)
========================================= */

html,
body {
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
  margin: 0;
  padding: 0;
}

/* --- Hero Section & Animation --- */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 0 var(--spacing-md);
  background:
    radial-gradient(
      circle at top left,
      rgba(183, 31, 31, 0.85),
      transparent 30%
    ),
    linear-gradient(135deg, #8b1620 0%, #1c2d79 50%, #5a2d75 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 800px;
  background: rgba(11, 15, 25, 0.6);
  padding: var(--spacing-xl) var(--spacing-lg);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-wrap: break-word;
}

.hero-content h1 {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
  text-shadow: 0 4px 15px rgba(230, 57, 70, 0.5);
}

.hero-content h2 {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: var(--spacing-md);
}

.hero-content .tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: var(--spacing-md);
}

/* --- Mobile Responsiveness Adjustments --- */
@media (max-width: 768px) {
  /* Compress the Hero Section */
  .hero-section {
    height: auto;
    min-height: 75vh; /* Takes up 75% of the screen instead of 100% */
    padding-top: 100px; /* Accounts for the navbar */
    padding-bottom: 40px;
  }

  /* Shrink the content box padding */
  .hero-content {
    padding: var(--spacing-md);
  }

  /* Scale fonts down so long words don't stretch the screen */
  .hero-content h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  .hero-content h2 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
  }
  .hero-content .tagline {
    font-size: 1rem;
    margin-top: var(--spacing-sm);
  }

  /* Compress the Idols slightly more if you added them */
  .divine-idols {
    transform: translate(-50%, -35%);
  }

  .milestone-wrapper {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
}

/* Abstract Divine Animation */
.animation-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.darkness {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, #05070a 100%);
  animation: pulseDarkness 8s infinite alternate;
}

.divine-light {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 60vw;
  background: var(--glow-primary);
  border-radius: 50%;
  filter: blur(60px);
  animation: pulseDivine 4s infinite alternate;
}

/* --- Glowing Divine Idols (Chalchitra) --- */
.divine-idols {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  display: flex;
  align-items: flex-end; /* Aligns them at the bottom */
  justify-content: center;
  gap: 2vw;
  width: 90%;
  z-index: 1; /* Sits behind your main text */
  pointer-events: none; /* Prevents them from blocking text selection */
}

.idol {
  width: auto;
  min-width: 80px;
  height: contain;
  opacity: 0.15; /* Keeps them subtle and ghost-like */

  /* THE MAGIC: This filter turns any transparent image into a glowing yellow sketch */
  filter: brightness(0) invert(1) /* Turns the image pure white */ sepia(1)
    hue-rotate(5deg) saturate(10) /* Dyes the white into a rich golden yellow */
    drop-shadow(0 0 15px var(--color-accent)); /* Adds the glowing aura */

  animation: divineBreath 5s infinite alternate ease-in-out;
}

.hero-mobile {
  visibility: hidden;
}

/* The breathing light animation */
@keyframes divineBreath {
  0% {
    opacity: 0.1;
    transform: translateY(0px) scale(0.98);
    filter: brightness(0) invert(1) sepia(1) hue-rotate(5deg) saturate(10)
      drop-shadow(0 0 5px rgba(255, 209, 102, 0.3));
  }
  100% {
    opacity: 0.35;
    transform: translateY(-10px) scale(1.02);
    filter: brightness(0) invert(1) sepia(1) hue-rotate(5deg) saturate(10)
      drop-shadow(0 0 25px rgba(255, 209, 102, 1));
  }
}

@media (max-width: 768px) {
  .divine-idols {
    gap: 1vw;
    transform: translate(-50%, -40%);
  }
  .idol {
    width: 18vw;
  }
}

/* --- Section Layouts --- */
.section-container {
  padding: var(--spacing-sm) 5%;
  position: relative;
  z-index: 5;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-accent);
}

/* --- Background Glow Patches --- */
.glow-patch {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
}

.patch-left {
  background: var(--glow-secondary);
  left: -20vw;
  margin-top: 10vh;
}

.patch-right {
  background: var(--glow-primary);
  right: -20vw;
  margin-top: 50vh;
}

/* --- Cards (Schedules & CTAs) --- */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.schedule-card {
  background-color: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.schedule-card,
.cta-card {
  background-color: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.schedule-card:hover,
.cta-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 159, 28, 0.3);
}

.cta-card h3 {
  color: var(--color-secondary);
  font-size: 1.5rem;
}

.cta-card p {
  color: var(--text-muted);
  margin-bottom: var(--spacing-lg);
}

/* --- Milestones --- */
.milestone-wrapper {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    var(--bg-gradient-end) 100%
  );
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 209, 102, 0.2);
}

.milestone {
  text-align: center;
}

.milestone .counter,
.milestone .plus {
  font-size: 4rem;
  font-family: var(--font-heading);
  color: var(--color-accent);
  font-weight: 700;
  text-shadow: 0 0 20px rgba(255, 209, 102, 0.4);
}

.milestone p {
  font-size: 1.2rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  height: 200px;
  background-color: #1a2235;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-style: italic;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* --- Sponsor Carousel --- */
.sponsor-section {
  padding: var(--spacing-lg) 0;
  background-color: #080b12;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.sponsor-title {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-lg);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.carousel-container::before,
.carousel-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
}

.carousel-container::before {
  left: 0;
  background: linear-gradient(to right, #080b12 0%, transparent 100%);
}

.carousel-container::after {
  right: 0;
  background: linear-gradient(to left, #080b12 0%, transparent 100%);
}

.carousel-track {
  display: inline-flex;
  gap: 4rem;
  animation: scrollSponsors 20s linear infinite;
}

.sponsor-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-heading);
}

.sponsor-logo img {
  height: 50dvh;
  width: auto;
}

@media (max-width: 768px) {
  .sponsor-logo img {
    height: 20dvh;
  }
}

@keyframes scrollSponsors {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 2rem));
  } /* Moves exactly half the track width to loop */
}

/* --- Mobile Responsiveness Adjustments --- */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content h2 {
    font-size: 1.5rem;
  }

  .milestone-wrapper {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
}

/* --- Marigold Petal Animation --- */
.petal {
  position: absolute;
  background-color: var(--color-accent); /* Festive Gold */
  border-radius: 15% 85% 15% 85%; /* Classic CSS petal shape */
  z-index: 5;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.6);
  pointer-events: none; /* So they don't block clicks */
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) rotate(720deg) scale(1.2);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  /* Scale fonts down so long words don't stretch the screen */
  .hero-content h1 {
    font-size: 1.8rem; /* Reduced from 2.5rem */
    line-height: 1.2;
  }
  .hero-content h2 {
    font-size: 1.2rem; /* Reduced from 1.5rem */
  }

  .milestone-wrapper {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
}

/* =========================================
   LIGHT THEME OVERRIDES
========================================= */

/* 1. Remove the heavy dark gradient from the Hero background */
[data-theme="light"] .hero-section {
  /* This light red radial gradient matches the idol and lets the light blue body show */
  background: radial-gradient(
    circle at top left,
    rgba(239, 68, 68, 0.15),
    transparent 40%
  );
}

/* 2. Lighten the Hero Content Box so the dark text is readable */
[data-theme="light"] .hero-content {
  background: rgba(
    255,
    255,
    255,
    0.7
  ); /* Translucent white instead of dark blue */
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* 3. Fix the Milestones Gradient (it was fading into hardcoded black) */
[data-theme="light"] .milestone-wrapper {
  background: linear-gradient(135deg, var(--bg-card) 0%, #fef08a 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 4. Fix the Sponsors Section Background */
[data-theme="light"] .sponsor-section {
  background-color: var(--bg-dark); /* Uses the light blue */
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 5. Fix the Sponsors Carousel Fade Effect (so it doesn't fade to black) */
[data-theme="light"] .carousel-container::before {
  background: linear-gradient(to right, var(--bg-dark) 0%, transparent 100%);
}
[data-theme="light"] .carousel-container::after {
  background: linear-gradient(to left, var(--bg-dark) 0%, transparent 100%);
}
