/* Critical layout -- works even if the pinned Tailwind runtime is slow to load */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; }
img, video, svg { max-width: 100%; height: auto; }

/* Responsive card grid: stacks at 400px, fills as the panel widens */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 0.75rem;
}

/* Table wrapper for horizontal scroll when needed */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Little Ummah Brand Colors (fallback) ===== */
:root {
  --ummah-purple: #5B297A;
  --ummah-purple-dark: #4A1F63;
  --ummah-pink: #E05070;
  --ummah-orange: #C06020;
  --ummah-green: #70A010;
  --ummah-yellow: #F0B010;
  --cream-50: #FEF7EC;
  --cream-100: #FDF0DA;
  --cream-200: #F9E4C8;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Navbar shadow on scroll */
#navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile menu animation */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobile-menu.open {
  max-height: 500px;
}

/* Hamburger animation */
#menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.open span:nth-child(2) {
  opacity: 0;
}
#menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Fade-in animation for sections */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gallery card hover effect */
.gallery-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}
.gallery-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Floating WhatsApp button pulse */
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(112, 160, 16, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(112, 160, 16, 0); }
}
a[aria-label="WhatsApp us"] {
  animation: wa-pulse 2.5s infinite;
}
