/* ============================================================
   KIBRIYA FOUNDATION - SENIOR DEVELOPER DESIGN SYSTEM
   Modern, Vibrant, Glassmorphism & Ultra-Responsive CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Curated HSL Palette */
  --primary: #0d9488;          /* Vibrant Emerald Teal */
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --secondary: #d97706;        /* Warm Gold / Amber Accent */
  --secondary-hover: #b45309;
  --secondary-light: #fef3c7;
  --dark-bg: #0f172a;           /* Deep Slate Navy */
  --dark-card: #1e293b;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 25px -5px rgb(13 148 136 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 30px -10px rgb(15 23 42 / 0.25);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(255, 255, 255, 0.3);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-padding {
  padding: 4.5rem 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-warning { background: var(--secondary-light); color: var(--secondary-hover); }
.badge-success { background: #dcfce7; color: #15803d; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-align: center;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0d746d 100%);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-hover) 0%, #0b5e58 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, #b45309 100%);
  color: #ffffff;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(217, 119, 6, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Top Announcement Bar */
.top-bar {
  background: var(--dark-bg);
  color: #94a3b8;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-info {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.top-info span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Header & Mobile Toggle */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 5rem 0 6rem 0;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, rgba(217, 119, 6, 0.06) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.2rem;
  line-height: 1.15;
  margin: 1.2rem 0;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 95%;
}

.trust-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.trust-badge-item {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
}

/* Quick Donation Card */
.quick-donate-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  position: relative;
}

.quick-donate-header h3 {
  font-size: 1.4rem;
}

.donation-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.preset-btn {
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-dark);
}

.preset-btn:hover, .preset-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.custom-amount-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  outline: none;
}

.custom-amount-input:focus {
  border-color: var(--primary);
}

.input-currency-wrapper {
  position: relative;
}

.input-currency-wrapper::before {
  content: '₹';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.section-header h2 {
  font-size: 2.4rem;
  margin: 0.75rem 0;
  letter-spacing: -0.5px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Causes Grid */
.causes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.cause-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.cause-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.cause-image {
  height: 210px;
  width: 100%;
  object-fit: cover;
  position: relative;
}

.cause-category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.cause-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cause-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.cause-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.progress-container {
  margin-bottom: 1.5rem;
}

.progress-track {
  height: 10px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50px;
  transition: width 1s ease-in-out;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Impact Statistics Counter Bar */
.impact-bar {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1e293b 100%);
  color: #ffffff;
  padding: 3.5rem 1.5rem;
  border-radius: var(--radius-lg);
  margin: 3rem 0;
  box-shadow: var(--shadow-xl);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.impact-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.impact-label {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 500;
}

/* 80G Tax Benefits Calculator Card */
.tax-calc-section {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid #bbf7d0;
  margin: 3rem 0;
}

.tax-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.tax-result-box {
  background: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.tax-deduction-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
}

/* Modal Popup Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  position: relative;
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-light);
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  background: #ffffff;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 90vw;
}

.toast {
  background: var(--dark-bg);
  color: #fff;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.4s ease;
  border-left: 5px solid var(--primary);
  font-size: 0.9rem;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Printable 80G Receipt Layout */
.receipt-printable {
  background: #ffffff;
  padding: 2rem;
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
  color: #0f172a;
}

.receipt-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Footer */
.footer {
  background: var(--dark-bg);
  color: #94a3b8;
  padding: 4.5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  color: #ffffff;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES (FULL MOBILE & TABLET OPTIMIZATION)
   ============================================================ */

@media (max-width: 1024px) {
  .hero-grid, .tax-calc-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-content h1 {
    font-size: 2.6rem;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none; /* Hide topbar on small screens for clean viewport */
  }

  .mobile-toggle-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    box-shadow: var(--shadow-xl);
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    z-index: 999;
  }

  .nav-links.mobile-active {
    transform: translateY(0);
  }

  .hero {
    padding: 3rem 0 4rem 0;
  }

  .hero-content h1 {
    font-size: 2.1rem;
  }

  .hero-content p {
    font-size: 1rem;
    max-width: 100%;
  }

  .donation-preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tax-calc-section {
    padding: 1.75rem 1.25rem;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
  }

  .form-group-row {
    grid-template-columns: 1fr !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .impact-number {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.85rem;
  }

  .preset-btn {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .quick-donate-card {
    padding: 1.5rem;
  }

  .btn {
    width: 100%;
    padding: 0.85rem 1.2rem;
  }

  .cause-filter-btns {
    flex-direction: column;
    width: 100%;
  }

  .cause-filter-btn {
    width: 100%;
  }
}
