/* =============================================
   AADARSH SHIKSHA SADAN - MAIN STYLESHEET
   Responsive, mobile-first, clean design
   ============================================= */

/* ---- FONTS & ROOT VARIABLES ---- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Devanagari:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --green:       #0f7a5c;
  --green-dark:  #0a5c44;
  --green-light: #e8f5f0;
  --red:         #d62828;
  --gold:        #f0a500;
  --white:       #ffffff;
  --bg:          #f7f9f8;
  --text:        #2d2d2d;
  --muted:       #6b7a72;
  --radius:      14px;
  --shadow:      0 6px 24px rgba(15,122,92,.12);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.14);
  --transition:  0.28s cubic-bezier(.4,0,.2,1);
  --navbar-h:    70px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: var(--navbar-h);
  overflow-x: hidden;
  line-height: 1.7;
}

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

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

/* Hindi / Devanagari text */
.hindi { font-family: 'Noto Serif Devanagari', serif; }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1050;
  background: var(--green);
  height: var(--navbar-h);
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  padding: 0 16px;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white) !important;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  flex-shrink: 0;
  max-width: 60%;
}

.navbar-brand img {
  height: 42px;
  width: auto;
  border-radius: 6px;
  flex-shrink: 0;
}

.navbar-brand span {
  font-family: 'Noto Serif Devanagari', serif;
  font-size: 0.9rem;
  line-height: 2.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.nav-links a {
  color: rgba(255,255,255,.9) !important;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 30px;
  border: 1.5px solid rgba(255,255,255,.4);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #222 !important;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,.6);
  border-radius: 8px;
  color: white;
  font-size: 1.3rem;
  padding: 4px 10px;
  cursor: pointer;
  line-height: 1;
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 6px;
  position: absolute;
  top: var(--navbar-h);
  left: 0; right: 0;
  background: var(--green-dark);
  padding: 14px 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  color: var(--white) !important;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.nav-drawer a:last-child { border-bottom: none; }

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  min-height: 88vh;
  background:
    linear-gradient(rgba(10,80,56,.72), rgba(0,0,0,.55)),
    url('../images/slide1.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 60px 20px;
}

.hero-inner { max-width: 700px; }

.hero h1 {
  font-family: 'Noto Serif Devanagari', serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
  margin-bottom: 16px;
}

.hero p {
  font-size: clamp(.95rem, 2.5vw, 1.2rem);
  opacity: .9;
  margin-bottom: 28px;
  font-family: 'Noto Serif Devanagari', serif;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-badge {
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3);
  color: white;
  border-radius: 30px;
  padding: 6px 16px;
  font-size: .82rem;
  font-weight: 500;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 30px;
  padding: 12px 28px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-main:hover {
  background: var(--gold);
  color: #222;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(240,165,0,.35);
}

.btn-outline-green {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
  border-radius: 30px;
  padding: 10px 24px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn-outline-green:hover {
  background: var(--green);
  color: white;
}

/* =============================================
   SECTIONS - COMMON
   ============================================= */
section { padding: 80px 0; overflow: hidden; }

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--text);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--muted);
  font-size: .95rem;
}

.section-title .title-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 2px;
  margin: 12px auto 0;
}

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar {
  background: var(--green);
  padding: 28px 0;
}

.stats-bar .row { gap: 0; }

.stat-item {
  text-align: center;
  color: white;
  padding: 10px 16px;
  border-right: 1px solid rgba(255,255,255,.2);
}

.stat-item:last-child { border-right: none; }

.stat-item .num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-item .label {
  font-size: .8rem;
  opacity: .85;
  margin-top: 4px;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
#about { background: var(--white); }

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  height: 100%;
  transition: var(--transition);
  border: 1px solid rgba(15,122,92,.08);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.about-card h4 {
  color: var(--green);
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-light);
}

.about-card p { font-size: .92rem; margin-bottom: 8px; color: #444; }
.about-card p b { color: var(--text); }

.about-card .table {
  font-size: .88rem;
  margin-bottom: 0;
}

.about-card .table th {
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
  border: none;
  padding: 8px 12px;
}

.about-card .table td {
  padding: 8px 12px;
  border-color: #eee;
  vertical-align: middle;
}

.sector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sector-tag {
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 500;
}

/* =============================================
   POSTS / ACTIVITIES
   ============================================= */
#posts { background: var(--bg); }

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: none;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-body h5 {
  font-size: 1rem;
  color: var(--green);
  margin-bottom: 8px;
}

.post-card-body p {
  font-size: .87rem;
  color: #555;
  flex: 1;
}

.post-location {
  font-size: .8rem;
  color: var(--red);
  margin-top: 10px;
  font-weight: 500;
}

/* =============================================
   DONATE SECTION
   ============================================= */
#donate {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
}

#donate .section-title h2 { color: white; }
#donate .section-title p   { color: rgba(255,255,255,.8); }
#donate .section-title .title-line { background: linear-gradient(90deg, var(--gold), #fff); }

.donate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

.donate-qr-box {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
}

.donate-qr-box img {
  width: 100%;
  max-width: 220px;
  margin: 0 auto 16px;
  border-radius: 8px;
}

.donate-qr-box p { color: #444; font-size: .9rem; }
.donate-qr-box b { color: var(--green); font-size: 1rem; }

.donate-info { color: white; }

.donate-info h3 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.donate-info p {
  font-size: 1rem;
  opacity: .9;
  margin-bottom: 10px;
}

.upi-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 30px;
  padding: 10px 22px;
  font-size: .95rem;
  font-weight: 600;
  margin: 16px 0;
  cursor: pointer;
  transition: var(--transition);
}

.upi-pill:hover {
  background: rgba(255,255,255,.28);
}

.payment-icons {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pay-badge {
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
}

/* =============================================
   CONTACT SECTION
   ============================================= */
#contact { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info h4 {
  color: var(--green);
  margin-bottom: 18px;
  font-size: 1.2rem;
}

.contact-item {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--green-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-text p:first-child {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: 2px;
}

.contact-text p:last-child {
  font-size: .87rem;
  color: var(--muted);
  margin: 0;
}

/* Contact Form */
.contact-form-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  background: white;
  transition: border-color .2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15,122,92,.1);
}

textarea.form-control { resize: vertical; min-height: 110px; }

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--green-dark);
  color: white;
  padding: 32px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-brand p {
  font-size: .88rem;
  opacity: .78;
  margin-top: 10px;
  line-height: 1.6;
}

.footer-section h6 {
  font-size: .88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .7;
  margin-bottom: 14px;
}

.footer-section a,
.footer-section p {
  display: block;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .87rem;
  margin-bottom: 8px;
  transition: color .2s;
}

.footer-section a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 18px;
  text-align: center;
  font-size: .82rem;
  opacity: .65;
}

/* =============================================
   WHATSAPP BUTTON
   ============================================= */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(37,211,102,.45);
  transition: var(--transition);
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,.6);
}

/* =============================================
   MODALS
   ============================================= */
.modal-header {
  background: var(--green);
  color: white;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-title { color: white; font-weight: 600; }

.btn-close { filter: invert(1); }

.modal-content { border-radius: var(--radius); border: none; box-shadow: var(--shadow-lg); }

/* QR Modal */
.premium-card {
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border: none;
  box-shadow: var(--shadow-lg);
}

.step-bar {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 10px 0 20px;
}

.step {
  flex: 1;
  padding: 6px 4px;
  font-size: .75rem;
  border-radius: 20px;
  background: #eee;
  color: #888;
  text-align: center;
  transition: var(--transition);
}

.step.active { background: var(--green); color: white; font-weight: 600; }

.qr-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.qr-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 16px;
  background: radial-gradient(circle, rgba(15,122,92,.2), transparent 60%);
  animation: qrPulse 1.8s ease-in-out infinite;
}

@keyframes qrPulse {
  0%, 100% { transform: scale(.95); opacity: .6; }
  50%       { transform: scale(1.06); opacity: .25; }
}

.qr-wrapper {
  position: relative;
  z-index: 2;
  width: 260px;
  height: 260px;
  background: white;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.qr-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =============================================
   CARDS (Bootstrap overrides)
   ============================================= */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

/* =============================================
   FORM PAGE (form.html)
   ============================================= */
.page-form-bg {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 24px 16px;
}

.form-box {
  background: white;
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.form-box h2 {
  color: var(--green);
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 24px;
}

.error-msg {
  color: var(--red);
  font-size: .83rem;
  display: none;
  margin-top: 4px;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 50px rgba(0,0,0,.2);
  animation: fadeUp .7s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-card h3 {
  font-size: 1.4rem;
  text-align: center;
  color: var(--text);
  margin-bottom: 24px;
}

.login-card .form-control {
  padding: 13px 16px;
  font-size: 1rem;
}

.btn-login {
  width: 100%;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 13px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-login:hover { background: var(--green-dark); }

/* =============================================
   DASHBOARD
   ============================================= */
.dash-body {
  background: #f4f6f9;
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

.dash-header {
  background: var(--green);
  color: white;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  gap: 12px;
  flex-wrap: wrap;
}

.dash-header h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.dash-header .user-info {
  font-size: .87rem;
  opacity: .85;
}

.dash-main { padding: 28px 20px; max-width: 1200px; margin: 0 auto; }

.stat-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card .num {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .lbl { font-size: .85rem; color: var(--muted); }

.stat-card.green  { border-left: 4px solid var(--green); }
.stat-card.gold   { border-left: 4px solid var(--gold); }
.stat-card.teal   { border-left: 4px solid #17a2b8; }
.stat-card.red    { border-left: 4px solid var(--red); }

.dash-card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.dash-card h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

/* =============================================
   SUCCESS PAGE
   ============================================= */
.success-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green-light), #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.success-card {
  background: white;
  padding: 40px 32px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 380px;
  width: 100%;
  animation: fadeUp .6s ease;
}

.success-icon { font-size: 3.5rem; margin-bottom: 16px; }

.success-card h2 {
  color: #28a745;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.success-card p { color: var(--muted); font-size: .95rem; }

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */
@media (max-width: 992px) {
  .donate-grid  { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 56px 0; }

  .nav-links  { display: none; }
  .nav-toggle { display: block; }

  .hero h1  { font-size: 1.7rem; }
  .hero p   { font-size: .92rem; }

  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  .qr-wrapper { width: 210px; height: 210px; }
  .qr-glow    { width: 190px; height: 190px; }

  .form-box    { padding: 24px 18px; }
  .login-card  { padding: 30px 22px; }

  .dash-header h4 { font-size: .9rem; }
  .dash-main { padding: 16px 12px; }
}

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

  .btn-main {
    padding: 11px 22px;
    font-size: .9rem;
  }

  .about-card { padding: 18px; }

  .donate-qr-box img { max-width: 180px; }
}

/* =============================================
   AOS ANIMATION SUPPORT
   ============================================= */
[data-aos] { transition-property: transform, opacity; }

/* =============================================
   UTILITIES
   ============================================= */
.text-green { color: var(--green) !important; }
.text-red   { color: var(--red) !important; }
.text-gold  { color: var(--gold) !important; }
.bg-green   { background: var(--green) !important; }

.rounded-lg { border-radius: var(--radius) !important; }
.shadow-main { box-shadow: var(--shadow) !important; }
