/* ==========================================================================
   Kamatchi Ammal Foundation - Custom Enhancements & Animations
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --color-primary: #047857;       /* Emerald 700 */
  --color-primary-dark: #064E3B;  /* Emerald 900 */
  --color-primary-light: #10B981; /* Emerald 500 */
  --color-accent: #D97706;        /* Amber 600 */
  --color-accent-light: #F59E0B;  /* Amber 500 */
  --color-warm-bg: #FDFBF7;       /* Warm subtle ivory */
  --color-slate-dark: #0F172A;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #F8FAFC;
  color: #1E293B;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-serif-quote {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Glassmorphism Navigation */
.nav-glass {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.nav-glass-dark {
  background: rgba(6, 78, 59, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Hero Gradient & Patterns */
.bg-warm-pattern {
  background-color: #064E3B;
  background-image: radial-gradient(#059669 1px, transparent 1px), radial-gradient(#047857 1px, #064E3B 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

.bg-dot-pattern {
  background-image: radial-gradient(rgba(4, 120, 87, 0.15) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}

/* Shimmer on Progress Bars */
.progress-shimmer {
  position: relative;
  overflow: hidden;
}

.progress-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2.2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Soft floating badge animation */
@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.animate-float {
  animation: softFloat 4s ease-in-out infinite;
}

/* Pulse Glow for Urgent Causes */
.pulse-emerald {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Card Hover Elevate */
.card-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -10px rgba(4, 120, 87, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
}

/* Active Filter Buttons */
.filter-btn.active {
  background-color: #047857;
  color: #FFFFFF;
  border-color: #047857;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  transition: all 0.35s ease;
  transform: translateY(20px);
  opacity: 0;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
}

.lightbox-modal.active {
  display: flex;
}

/* Modal Animations */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease-out;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  transform: scale(0.95) translateY(10px);
  transition: all 0.25s ease-out;
}

.modal-backdrop.active .modal-content {
  transform: scale(1) translateY(0);
}

/* 80G Print Stylesheet */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-receipt, #printable-receipt * {
    visibility: visible;
  }
  #printable-receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    background: white;
    box-shadow: none;
  }
  .no-print {
    display: none !important;
  }
}
