/* ==========================================================================
   SARASWATI KENDRA NEPAL — RESPONSIVE STYLESHEET
   Breakpoints: Tablet ≤1024px | Mobile ≤768px | Small Mobile ≤480px
   ========================================================================== */

/* ============================================================
   TABLET & SMALL LAPTOP (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 1.5rem; }

  /* Hero */
  .hero-content-wrap {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-card-side { display: none; }
  .hero-title { font-size: 2.8rem; }

  /* Stats - 2×2 grid */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { border-right: 1px solid var(--border-color); }
  .stat-card:nth-child(2n) { border-right: none; }
  .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--border-color); }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-img-main { height: 320px; }
  .about-img-badge { right: 0; }

  /* Programs - 2 columns */
  .programs-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

  /* Affiliations - 1 column */
  .affiliation-grid { grid-template-columns: 1fr; }

  /* Donors - 2 columns */
  .donors-grid { grid-template-columns: repeat(2, 1fr); }

  /* Team - 2 columns */
  .team-grid { grid-template-columns: repeat(2, 1fr); }

  /* Gallery - 2 columns */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Donation - stack */
  .donation-grid { grid-template-columns: 1fr; }

  /* Contact - stack */
  .contact-grid { grid-template-columns: 1fr; }

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

/* ============================================================
   MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }

  /* Top bar — hide to save space */
  .top-bar { display: none; }

  /* Navbar — tighten brand text */
  .brand-title { font-size: 1rem; line-height: 1.2; }
  .brand-tagline { font-size: 0.6rem; }
  .brand-logo-img { width: 38px; height: 38px; }
  .nav-actions .btn { padding: 0.4rem 0.75rem; font-size: 0.78rem; }

  /* Mobile nav menu — slide-in overlay */
  .nav-menu { display: none; }
  .nav-menu.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--bg-surface);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem;
  }
  .nav-menu.mobile-open .nav-link { font-size: 1.25rem; font-weight: 700; }
  .mobile-toggle { display: flex; }

  /* Hero */
  .hero-section { min-height: 65vh; padding: 4rem 0 2.5rem; }
  .hero-title { font-size: 1.9rem; line-height: 1.2; }
  .hero-description { font-size: 0.95rem; }
  .hero-cta-group { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .hero-cta-group .btn { width: 100%; justify-content: center; }

  /* Stats — 2 columns */
  .stats-banner { margin-top: -1.25rem; }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.1rem;
    border-radius: var(--radius-md);
    gap: 0;
  }
  .stat-card { padding: 0.85rem; border-right: 1px solid var(--border-color); }
  .stat-card:nth-child(even) { border-right: none; }
  .stat-card:nth-child(1),
  .stat-card:nth-child(2) { border-bottom: 1px solid var(--border-color); }
  .stat-number { font-size: 1.75rem; }
  .stat-label { font-size: 0.78rem; }

  /* Section headings */
  .section-title { font-size: 1.7rem; }
  .section-description { font-size: 0.88rem; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-img-main { height: 240px; }
  .about-img-badge { position: static; margin-top: 0.75rem; max-width: 100%; }
  .about-pillars-grid { grid-template-columns: 1fr 1fr; }

  /* Programs — 1 column */
  .programs-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .program-img-wrap { height: 190px; }

  /* Schools table — horizontal scroll */
  .schools-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .schools-table th,
  .schools-table td { padding: 0.7rem 0.85rem; font-size: 0.8rem; white-space: nowrap; }

  /* Affiliations */
  .affiliation-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .aff-card { flex-direction: column; padding: 1.5rem; gap: 1rem; }

  /* Budget table — horizontal scroll */
  .budget-card { padding: 1.25rem; }
  .budget-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .budget-table { display: block; overflow-x: auto; }
  .budget-table th,
  .budget-table td { white-space: nowrap; font-size: 0.8rem; padding: 0.7rem 0.85rem; }
  .budget-header { flex-direction: column; gap: 1rem; align-items: flex-start; }

  /* Donors — 1 column, horizontal card layout */
  .donors-grid { grid-template-columns: 1fr; gap: 1rem; }
  .donor-card {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem;
  }
  .donor-avatar-wrap { width: 68px; height: 68px; flex-shrink: 0; }
  .donor-desc { font-size: 0.82rem; }

  /* Partner logos bar */
  .partner-logos-bar { flex-wrap: wrap; gap: 0.5rem; padding: 0.85rem 1rem; justify-content: flex-start; }
  .partner-badge-item { font-size: 0.75rem; padding: 0.25rem 0.55rem; }

  /* Team — 2 columns */
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .team-card { padding: 1.1rem 0.75rem 0.9rem; }
  .team-avatar-wrap { width: 80px; height: 80px; }
  .team-name { font-size: 0.9rem; }
  .team-role { font-size: 0.75rem; }
  .team-bio { font-size: 0.75rem; }
  .team-filter-nav { gap: 0.4rem; }
  .team-filter-btn { font-size: 0.75rem; padding: 0.35rem 0.75rem; }

  /* Gallery — 2 columns */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .gallery-filter-nav { gap: 0.4rem; }
  .filter-btn { font-size: 0.75rem; padding: 0.35rem 0.75rem; }
  .gallery-caption { font-size: 0.8rem; }
  .gallery-date { font-size: 0.7rem; }

  /* Donation */
  .donation-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .bank-card { padding: 1.25rem; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 1.25rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.4rem; text-align: center; font-size: 0.78rem; }

  /* Facebook section */
  .fb-section-card { flex-direction: column; gap: 1.25rem; }
}

/* ============================================================
   SMALL MOBILE (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 0.85rem; }

  /* Hero */
  .hero-title { font-size: 1.55rem; }
  .hero-badge-pill { font-size: 0.72rem; padding: 0.28rem 0.7rem; }

  /* Stats — 1 column */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { border-right: none !important; border-bottom: 1px solid var(--border-color) !important; }
  .stat-card:last-child { border-bottom: none !important; }

  /* Team — 1 column, horizontal card layout */
  .team-grid { grid-template-columns: 1fr; }
  .team-card {
    flex-direction: row;
    text-align: left;
    padding: 0.9rem;
    align-items: center;
    gap: 0.85rem;
  }
  .team-avatar-wrap { width: 64px; height: 64px; margin: 0; flex-shrink: 0; }
  .team-badge-chip { align-self: flex-start; margin-bottom: 0.25rem; }
  .team-name { font-size: 0.88rem; }
  .team-card-actions { margin-top: 0.5rem; }

  /* Gallery — 1 column */
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item { border-radius: var(--radius-md); }

  /* Donors — stack full */
  .donor-card { flex-direction: column; text-align: center; align-items: center; }
  .donor-avatar-wrap { width: 80px; height: 80px; }

  /* Section titles */
  .section-title { font-size: 1.4rem; }
  .section-subtitle { font-size: 0.72rem; }

  /* About pillars - stack */
  .about-pillars-grid { grid-template-columns: 1fr; }

  /* Programs */
  .programs-grid { gap: 1rem; }

  /* Baseline stat cards */
  .stats-comparison-grid { grid-template-columns: 1fr; }
}
