/* ─── MSSS NGO – Global Design System ──────────────────────────────────────── */

/* ── Google Fonts ────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

/* ── CSS Variables ───────────────────────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --navy:        #1a6b2f;
  --navy-dark:   #145524;
  --navy-light:  #21883c;
  --white:       #ffffff;
  --light-gray:  #d3d3d3;
  --royal-blue:  #3aaa55;
  --royal-light: #52c46e;
  --orange:      #f5c518;
  --orange-dark: #d4a80f;
  --orange-light:#f7d040;

  /* Extended palette */
  --bg-light:    #f2f8f4;
  --bg-card:     #ffffff;
  --text-main:   #1a1f36;
  --text-body:   #4a5568;
  --text-muted:  #718096;
  --text-light:  #a0aec0;
  --border:      #e2e8f0;
  --border-dark: #cbd5e0;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(26,107,47,0.12);
  --shadow-lg:   0 8px 32px rgba(26,107,47,0.18);
  --shadow-xl:   0 16px 48px rgba(26,107,47,0.22);

  /* Typography */
  --font-hindi:  'Noto Sans Devanagari', sans-serif;
  --font-body:   'Inter', sans-serif;
  --font-display:'Playfair Display', serif;

  /* Spacing */
  --section-py:  80px;
  --section-px:  24px;
  --container:   1200px;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* Transitions */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --transition:  0.3s var(--ease);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Container ───────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

/* ── Section Base ────────────────────────────────────────────────────────────── */
.section {
  padding: var(--section-py) 0;
}
.section-alt { background: var(--bg-light); }
.section-navy { background: var(--navy); color: var(--white); }
.section-dark { background: var(--navy-dark); color: var(--white); }

/* ── Section Heading ─────────────────────────────────────────────────────────── */
.section-head {
  margin-bottom: 48px;
}
.section-head.center { text-align: center; }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 12px;
}
.section-tag::before,
.section-tag::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--orange);
  border-radius: var(--radius-full);
}
.section-head.center .section-tag::before { display: none; }
.section-title {
  font-family: var(--font-hindi);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 12px;
}
.section-navy .section-title,
.section-dark .section-title { color: var(--white); }
.section-subtitle {
  font-size: 1rem;
  color: var(--text-body);
  max-width: 600px;
  line-height: 1.7;
}
.section-head.center .section-subtitle { margin: 0 auto; }
.section-navy .section-subtitle { color: rgba(255,255,255,0.75); }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
  box-shadow: 0 4px 14px rgba(255,130,0,0.35);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,130,0,0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-white:hover {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-sm { padding: 9px 20px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-icon { width: 42px; height: 42px; padding: 0; border-radius: 50%; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(65,105,225,0.2);
}

/* ── Badge ───────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-orange  { background: rgba(255,130,0,0.12); color: var(--orange); }
.badge-navy    { background: rgba(26,107,47,0.1);   color: var(--navy);   }
.badge-green   { background: #e8f8e8; color: #2e7d32; }
.badge-red     { background: #fde8e8; color: #c62828; }
.badge-yellow  { background: #fff8e0; color: #b7851a; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}
.form-label .req { color: var(--orange); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-main);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--royal-blue);
  box-shadow: 0 0 0 3px rgba(65,105,225,0.12);
}
.form-control::placeholder { color: var(--text-light); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.form-error { font-size: 0.8rem; color: #c62828; margin-top: 4px; }
.form-hint  { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── File Upload ─────────────────────────────────────────────────────────────── */
.file-upload-box {
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #fafbff;
  position: relative;
}
.file-upload-box:hover { border-color: var(--royal-blue); background: rgba(65,105,225,0.04); }
.file-upload-box input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-upload-icon { font-size: 2rem; margin-bottom: 8px; color: var(--royal-blue); }
.file-upload-text { font-size: 0.85rem; color: var(--text-body); }
.file-upload-text strong { color: var(--royal-blue); }

/* ── Alert / Flash ───────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.alert-success { background: #e8f8e8; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error   { background: #fde8e8; color: #c62828; border: 1px solid #ef9a9a; }
.alert-info    { background: #e8f0fe; color: #1a73e8; border: 1px solid #90b4f8; }
.alert-warning { background: #fff8e0; color: #b7851a; border: 1px solid #ffe082; }

/* ── Grid Utilities ──────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 24px; }

/* ── Divider ─────────────────────────────────────────────────────────────────── */
.divider {
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--royal-blue));
  border-radius: var(--radius-full);
  margin: 8px 0;
}

/* ── Page Banner ─────────────────────────────────────────────────────────────── */
.page-banner {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  padding: 60px 0 48px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 1;
}
.page-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--royal-blue), var(--orange));
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner-title {
  font-family: var(--font-hindi);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 10px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}
.breadcrumb a { color: rgba(255,255,255,0.9); transition: var(--transition); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb-sep { opacity: 0.5; font-size: 0.7rem; }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--border-dark);
  color: var(--text-body);
  transition: var(--transition);
}
.pagination a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination .active { background: var(--orange); color: var(--white); border-color: var(--orange); }

/* ── Scroll to top ───────────────────────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--orange); transform: translateY(-3px); }

/* ── Overlay Loader ──────────────────────────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right;  }
.text-orange  { color: var(--orange); }
.text-navy    { color: var(--navy);   }
.text-muted   { color: var(--text-muted); }
.fw-bold      { font-weight: 700; }
.fw-semibold  { font-weight: 600; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.d-none { display: none; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* ── Table ───────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.9rem;
}
.table thead th {
  background: var(--navy);
  color: var(--white);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(65,105,225,0.03); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-py: 60px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  :root { --section-py: 48px; --section-px: 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 32px; }
  .page-banner { padding: 40px 0 32px; }
}

@media (max-width: 480px) {
  :root { --section-px: 14px; }
}
