/* -------------------- Global & Variables -------------------- */
html { scroll-behavior: smooth; }
:root {
  --primary: #1B4332;
  --secondary: #2D6A4F;
  --accent: #3C8C68;
  --bg: #F1FAEE;
  --white: #ffffff;
  --radius: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Poppins', sans-serif;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.18);
}
/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--primary);
  line-height: 1.65;
  transition: background var(--transition), color var(--transition);
}
a, button, img, .nav-links li a, .donate-button {
  transition: all var(--transition);
  cursor: pointer;
}
/* -------------------- Header & Navigation -------------------- */
header {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-15px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  backdrop-filter: blur(6px);
}
body.loaded header { opacity: 1; transform: translateY(0); }
/* Left side (logo + title) */
.header-left { display: flex; align-items: center; gap: 0.8rem; }
.logo {
  height: 90px; /* only change */
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}
header h1 {
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 1.6rem;
  color: var(--white);
}
/* Navigation styling */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.2rem;
}
.nav-links li a {
  color: var(--white);
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.nav-links li a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
  border-radius: var(--radius);
}
.nav-links li a:hover::after, .nav-links li a.active::after { opacity: 1; }
.nav-links li a:hover { transform: translateY(-2px); }
/* Donate Button */
.donate-button {
  background: var(--accent);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.donate-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity var(--transition);
}
.donate-button:hover::after { opacity: 1; }
.donate-button:hover {
  background: var(--secondary);
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-md);
}
/* -------------------- Main Container -------------------- */
.container {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.container:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
/* -------------------- Home Section -------------------- */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
  margin: 2rem auto;
  max-width: 900px;
  animation: fadeInUp 0.8s ease forwards;
}
.home-hero h2 { font-size: 2rem; font-weight: 600; color: var(--primary); }
.home-hero p {
  font-size: 1.05rem;
  color: var(--primary);
  max-width: 650px;
  opacity: 0.9;
}
.home-hero img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.home-hero img:hover { transform: scale(1.05) rotate(0.5deg); box-shadow: var(--shadow-lg); }
.home-hero .donate-button { margin-top: 1rem; }
/* -------------------- Gallery -------------------- */
#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.3rem;
  margin: 2rem 0;
}
.img-container {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.img-container img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.5s ease, filter 0.5s ease;
}
.img-container:hover img { transform: scale(1.08); filter: brightness(1.05); }
.img-container:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.center { text-align: center; margin: 2rem 0; }
/* -------------------- Stall Dates -------------------- */
.stall-list { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; }
.stall {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stall:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-md); }
.stall h3 { color: var(--primary); font-size: 1.3rem; margin-bottom: 0.5rem; }
/* -------------------- Footer -------------------- */
footer {
  text-align: center;
  padding: 1.2rem;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}
footer:hover { background: var(--secondary); }
/* -------------------- Animations -------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
[data-aos] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-aos].aos-animate, [data-aos].default-visible {
  opacity: 1;
  transform: translateY(0);
}
/* -------------------- Lightbox -------------------- */
#lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 200;
  padding: 1rem;
  backdrop-filter: blur(3px);
}
#lightbox.active { visibility: visible; opacity: 1; }
#lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
  transform: scale(0.9);
  opacity: 0;
  animation: fadeIn 0.4s forwards ease-out;
}
@keyframes fadeIn { to { opacity: 1; transform: scale(1); } }
#lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease, transform 0.3s ease;
}
#lightbox .close { top: 20px; right: 30px; }
#lightbox .next, #lightbox .prev {
  top: 50%;
  transform: translateY(-50%);
  padding: 0 0.5rem;
}
#lightbox .next { right: 20px; }
#lightbox .prev { left: 20px; }
#lightbox button:hover { color: var(--accent); transform: scale(1.15); }
/* -------------------- About List -------------------- */
.about-list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-top: 2rem;
}
.about-list li {
  background: var(--white);
  border: 1px solid #e6e6e6;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.8rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--primary);
  transition: box-shadow var(--transition), transform var(--transition), opacity 0.6s ease, transform 0.6s ease;
  opacity: 0;
  transform: translateY(20px);
}
.about-list li.visible { opacity: 1; transform: translateY(0); }
.about-list li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
/* -------------------- Gallery Hint -------------------- */
.gallery-hint {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 1.8rem;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInHint 1.6s ease-out forwards;
  position: relative;
}
.gallery-hint::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  border-radius: 3px;
  opacity: 0;
  animation: underlineSlide 1.4s ease-out 0.8s forwards;
}
@keyframes fadeInHint { to { opacity: 1; transform: translateY(0); } }
@keyframes underlineSlide {
  0% { width: 0; opacity: 0; }
  100% { width: 70px; opacity: 1; }
}
/* -------------------- Scroll Hint -------------------- */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  color: var(--accent);
  font-weight: 500;
  font-size: 1rem;
  margin: 2rem auto 2.8rem;
  opacity: 0.9;
  animation: hintFloat 2.2s ease-in-out infinite;
}
.scroll-hint .arrow {
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  animation: arrowBounce 1.8s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes hintFloat {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(5px); opacity: 1; }
}
@keyframes arrowBounce {
  0%, 100% { transform: rotate(-45deg) translateY(0); }
  50% { transform: rotate(-45deg) translateY(6px); }
}
/* -------------------- Responsive Header -------------------- */
@media (max-width: 768px) {
  header { flex-direction: column; align-items: center; text-align: center; padding: 1rem; }
  .header-left { flex-direction: column; gap: 0.4rem; }
  .logo { height: 70px; }
  .nav-links { flex-direction: column; gap: 0.6rem; margin-top: 0.8rem; }
  .nav-links li a { padding: 0.5rem 0.8rem; }
}
@media (max-width: 480px) {
  header h1 { font-size: 1.3rem; }
  .logo { height: 60px; }
  .nav-links { gap: 0.4rem; }
}
/* --- Subtle Page Fade-in --- */
body { opacity: 0; animation: pageFadeIn 0.8s ease forwards; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }
/* --- Secret Glow --- */
a:hover, .donate-button:hover { filter: drop-shadow(0 0 8px var(--accent)); }
/* --- Themed Scrollbar --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }
/* --- Frosted Glass Enhancement --- */
.container, .stall, .about-list li { backdrop-filter: blur(6px) saturate(120%); background-color: rgba(255, 255, 255, 0.8); }
/* --- Gentle Shake --- */
h2:hover { animation: gentleShake 0.3s ease; }
@keyframes gentleShake {
  25% { transform: translateX(2px); }
  50% { transform: translateX(-2px); }
  75% { transform: translateX(1px); }
}
/* --- Floating CTA --- */
.donate-button { animation: floaty 3s ease-in-out infinite; }
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
/* --- Floating + Glowing Donate Button --- */
.donate-button { animation: floaty 3s ease-in-out infinite, glowPulse 4s ease-in-out infinite; transition: transform 0.3s ease, box-shadow 0.3s ease; }
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 8px rgba(60, 140, 104, 0.2); }
  50% { box-shadow: 0 0 18px rgba(60, 140, 104, 0.4); }
}
/* --- Subtle Text Shadow --- */
.text-shadow { text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
/* --- Sticky Header Shadow --- */
header.sticky { box-shadow: 0 4px 20px rgba(0,0,0,0.08); backdrop-filter: blur(8px); transition: box-shadow 0.3s ease, backdrop-filter 0.3s ease; }
/* -------------------- Professional Footer -------------------- */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.05);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  transition: background var(--transition), color var(--transition), transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
footer:hover { transform: translateY(-3px); box-shadow: 0 -6px 20px rgba(0,0,0,0.1); }
footer a { color: var(--white); text-decoration: none; position: relative; transition: color var(--transition); }
footer a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}
footer a:hover::after { width: 100%; }

/* --- Safety fix for gallery buttons visibility --- */
.filter-buttons {
  display: flex !important;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.5rem auto 2rem;
  z-index: 10;
  position: relative;
}

.filter-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--secondary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* --- FIX FOR GALLERY FILTER --- */
.hidden {
  display: none !important;
}

/* -------------------- Responsive Enhancements -------------------- */

/* --- Tablet (up to 992px) --- */
@media (max-width: 992px) {
  .container {
    margin: 2rem auto;
    padding: 1.5rem;
    max-width: 90%;
  }

  .home-hero h2 { font-size: 1.8rem; }
  .home-hero p { font-size: 1rem; }
  .home-hero img { max-width: 420px; }

  .stall h3 { font-size: 1.2rem; }
  .about-list li { font-size: 1rem; }

  footer { font-size: 0.9rem; padding: 1.2rem; }
}

/* --- Mobile (up to 768px) --- */
@media (max-width: 768px) {
  body { line-height: 1.6; }

  header {
    flex-direction: column;
    padding: 1rem;
    gap: 0.8rem;
  }

  .header-left {
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
  }

  .nav-links li a {
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
  }

  .container {
    padding: 1.3rem;
    margin: 1.5rem auto;
    max-width: 95%;
  }

  .home-hero {
    padding: 0 1rem;
    gap: 1.2rem;
  }

  .home-hero h2 {
    font-size: 1.6rem;
  }

  .home-hero p {
    font-size: 0.95rem;
  }

  #gallery {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }

  .img-container img {
    height: 200px;
  }

  .stall {
    padding: 1.2rem;
  }

  .about-list li {
    padding: 1.2rem 1.3rem;
    font-size: 0.95rem;
  }

  .donate-button {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }

  footer {
    font-size: 0.9rem;
    padding: 1rem;
  }
}

/* --- Small Phones (up to 480px) --- */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.2rem;
  }

  .logo {
    height: 55px;
  }

  .home-hero h2 {
    font-size: 1.4rem;
  }

  .home-hero p {
    font-size: 0.9rem;
  }

  .donate-button {
    width: 100%;
    text-align: center;
  }

  .img-container img {
    height: 180px;
  }

  .gallery-hint {
    font-size: 1rem;
  }

  footer {
    font-size: 0.85rem;
  }
}
