/* ═══════════════════════════════════════
   JAGATHI FOUNDATION – Responsive
   ═══════════════════════════════════════ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

/* Prevent zoom on input focus */
input, textarea, select {
  font-size: 16px !important;
}

/* ── TABLET (≤1024px) ── */
@media (max-width: 1024px) {
  section { padding: 60px 32px; }
  
  .hero-inner          { grid-template-columns: 1fr; }
  .hero-card-stack     { display: none; }
  .about-grid          { grid-template-columns: 1fr; }
  .about-img-wrapper   { display: none; }
  .programs-grid       { grid-template-columns: 1fr 1fr; }
  .leadership-grid     { grid-template-columns: 1fr 1fr; }
  .impact-grid         { grid-template-columns: repeat(2, 1fr); }
  .highlight-inner,
  .tejaswini-inner     { grid-template-columns: 1fr; }
  .donate-grid         { grid-template-columns: 1fr; }
  .contact-grid        { grid-template-columns: 1fr; }
  .footer-grid         { grid-template-columns: 1fr 1fr; }
  .nav-links           { display: none; }
  .nav-ctas            { display: none; }
  .hamburger           { display: flex; }
  
  /* BUTTONS */
  .btn { padding: 12px 24px; font-size: 0.9rem; }
  .btn-lg { padding: 14px 28px; }
  
  /* TYPOGRAPHY */
  h1 { line-height: 1.1 !important; }
  h2 { line-height: 1.2 !important; }
  
  /* HIGHLIGHTS PAGE TABLET */
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .secondary-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .activities-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .reach-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
}

/* ── MOBILE (≤640px) ── */
@media (max-width: 640px) {

  /* GLOBAL */
  * { transition: none !important; }
  section { padding: 40px 16px; }
  .container { padding: 0 4px; }

  /* TOPBAR */
  .topbar {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    font-size: 0.65rem;
    padding: 8px 12px;
    line-height: 1.4;
  }
  .topbar span,
  .topbar a {
    word-break: break-word;
    display: block;
  }

  /* NAV */
  nav { 
    padding: 0 12px; 
    height: 60px;
    gap: 8px;
  }
  .nav-logo img { height: 38px; }

  /* BUTTONS */
  .btn { 
    padding: 11px 18px; 
    font-size: 0.82rem;
    border-radius: 6px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .btn-lg { 
    padding: 13px 20px;
    min-height: 48px;
  }

  /* HERO */
  .hero-content { padding: 24px 12px 20px; }
  .hero h1 { 
    font-size: clamp(1.8rem, 6vw, 2.4rem); 
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
  .hero p  { 
    font-size: 0.9rem; 
    line-height: 1.5;
    margin-top: 12px;
  }
  .hero-btns { 
    flex-direction: column; 
    gap: 8px;
    margin-top: 16px;
  }
  .hero-btns .btn { 
    width: 100%; 
    justify-content: center;
  }
  .hero-image-col { 
    min-height: auto; 
    aspect-ratio: 3/2;
    border-radius: 16px;
    overflow: hidden;
  }
  .hero-badge-img {
    width: 44px;
    height: 44px;
    top: 8px;
    right: 8px;
    border-width: 2px;
  }
  .hero-main-img  { 
    object-position: center;
    width: 100%;
    height: 100%;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(13, 79, 92, 0.1);
  }
  .hero-stat-num   { 
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    line-height: 1;
    color: var(--teal);
  }
  .hero-stat-label { 
    font-size: 0.55rem;
    line-height: 1.2;
    color: var(--muted);
  }

  /* ABOUT */
  .about-two-col  { grid-template-columns: 1fr; gap: 24px; }
  .about-left-img { max-height: 240px; border-radius: 16px; overflow: hidden; }
  .about-values { gap: 12px; }
  .value-row { padding: 12px; gap: 12px; }

  /* WHAT WE DO */
  .whatwedo-inner { grid-template-columns: 1fr; gap: 24px; }
  .whatwedo-img { max-height: 240px; border-radius: 16px; overflow: hidden; }
  .whatwedo-logo-badge { width: 48px; height: 48px; bottom: -8px; right: -8px; }
  .whatwedo-img-wrap { order: -1; }
  .collab-tab-title { font-size: 0.85rem; padding: 12px 14px; }

  /* TESTIMONIALS */
  .testimonials-grid { grid-template-columns: 1fr; gap: 14px; }

  /* PARTNERS */
  .partners-section { padding: 24px 12px; }
  .marquee-track { gap: 16px; }
  .marquee-track img { height: 30px; }

  /* GALLERY */
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .gallery-grid .tall { grid-row: span 1; aspect-ratio: 1/1; height: auto; border-radius: 12px; }

  /* IMPACT BAND */
  .impact-band { padding: 24px 12px; }
  .impact-grid { grid-template-columns: 1fr 1fr; gap: 12px; text-align: center; }
  .impact-num { font-size: clamp(1.6rem, 5vw, 2rem); line-height: 1; }
  .impact-label { font-size: 0.6rem; line-height: 1.2; margin-top: 6px; }

  /* STATS BAND */
  .stats-band { padding: 24px 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; text-align: center; }
  .stat-num { font-size: clamp(1.8rem, 5vw, 2.2rem); line-height: 1; }
  .stat-label { font-size: 0.6rem; line-height: 1.2; margin-top: 6px; }

  /* SECONDARY STATS */
  .secondary-stats { padding: 28px 12px; }
  .secondary-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
  .sec-stat-card { padding: 14px 10px; border-radius: 12px; }
  .sec-stat-num { font-size: clamp(1.4rem, 4vw, 1.8rem); line-height: 1; }
  .sec-stat-label { font-size: 0.6rem; line-height: 1.2; margin-top: 4px; }

  /* ACTIVITIES */
  .activities-section { padding: 36px 12px; }
  .activities-grid { grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
  .activity-card { padding: 16px 12px; border-radius: 12px; }
  .activity-num { font-size: clamp(1.8rem, 5vw, 2.4rem); line-height: 1; }
  .activity-label { font-size: 0.7rem; line-height: 1.2; margin-top: 6px; }

  /* PROGRAMS */
  .programs-grid { grid-template-columns: 1fr; gap: 12px; }
  .program-card { padding: 18px 14px; border-radius: 14px; }
  .program-icon { width: 44px; height: 44px; font-size: 1.2rem; margin-bottom: 12px; }
  .program-card h3 { font-size: 0.95rem; }
  .program-card p { font-size: 0.78rem; }

  /* HIGHLIGHT */
  .highlight-section { padding: 36px 12px; border-radius: 0; }
  .highlight-inner { grid-template-columns: 1fr; gap: 24px; }
  .highlight-title { font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.1; }
  .highlight-visual { padding: 20px 14px; border-radius: 12px; }
  .hl-locations { gap: 10px; }
  .hl-loc { padding: 10px 12px; font-size: 0.85rem; }

  /* LEADERSHIP */
  .leadership-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .leader-avatar { width: 90px; height: 90px; font-size: 2rem; }
  .leader-card { padding: 14px 10px; border-radius: 12px; }
  .leader-name { font-size: 0.78rem; line-height: 1.2; }
  .leader-role { font-size: 0.62rem; margin-top: 4px; }

  /* REACH */
  .reach-section { padding: 36px 12px; }
  .reach-grid { grid-template-columns: 1fr; gap: 12px; }
  .reach-card { padding: 18px 14px; border-radius: 12px; }
  .reach-icon { font-size: 1.6rem; margin-bottom: 8px; }
  .reach-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
  .reach-card p { font-size: 0.78rem; }

  /* TEJASWINI */
  .tejaswini-section { padding: 36px 12px; border-radius: 0; }
  .tejaswini-inner { grid-template-columns: 1fr; gap: 24px; }
  .tejaswini-visual { grid-template-columns: 1fr; gap: 10px; }
  .tejaswini-badge { font-size: 0.65rem; padding: 5px 12px; margin-bottom: 12px; }
  .tejaswini-title { font-size: clamp(1.8rem, 6vw, 2.2rem); line-height: 1.1; margin-bottom: 16px; }
  .tejaswini-desc { font-size: 0.88rem; line-height: 1.5; }
  .tej-card { padding: 14px; border-radius: 10px; }
  .tej-card-icon { font-size: 1.4rem; margin-bottom: 8px; }
  .tej-card h4 { font-size: 0.82rem; margin-bottom: 4px; }
  .tej-card p { font-size: 0.72rem; line-height: 1.3; }

  /* DONATE */
  .donate-section { padding: 36px 12px; }
  .donate-grid { grid-template-columns: 1fr; }
  .donate-card { padding: 20px 16px; border-radius: 12px; }
  .donate-card h3 { font-size: 1rem; }
  .donate-card p { font-size: 0.85rem; }

  /* CONTACT */
  .contact-section { padding: 36px 12px; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .form-group { margin-bottom: 12px; }
  .form-group label { font-size: 0.85rem; display: block; margin-bottom: 6px; }
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px !important;
    padding: 11px 12px;
    border-radius: 8px;
    width: 100%;
  }

  /* FOOTER */
  footer { padding: 36px 12px 16px; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding-bottom: 20px; }
  .footer-col h4 { font-size: 0.7rem; }
  .footer-col ul li a { font-size: 0.8rem; }
  .footer-social { justify-content: center; margin-top: 12px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; font-size: 0.7rem; }

  /* TYPOGRAPHY */
  .section-tag { font-size: 0.65rem; padding: 4px 10px; margin-bottom: 12px; }
  .section-title { font-size: clamp(1.5rem, 5vw, 1.75rem); line-height: 1.2; margin-bottom: 12px; }
  .section-sub { font-size: 0.85rem; line-height: 1.5; }
}

/* ── EXTRA SMALL PHONES (≤380px) ── */
@media (max-width: 380px) {
  section { padding: 32px 12px; }
  nav { padding: 0 10px; height: 56px; }
  .nav-logo img { height: 34px; }

  /* BUTTONS */
  .btn { 
    padding: 10px 16px; 
    font-size: 0.78rem;
    min-height: 42px;
  }

  /* HERO */
  .hero-content { padding: 20px 10px 16px; }
  .hero h1 { font-size: clamp(1.6rem, 5vw, 2rem); }
  .hero p { font-size: 0.85rem; }
  .hero-stats { grid-template-columns: 1fr; gap: 8px; }
  .hero-stat-num { 
    font-size: clamp(1.2rem, 4vw, 1.5rem); 
    color: var(--teal);
  }
  .hero-stat-label { 
    font-size: 0.5rem; 
    color: var(--muted);
  }

  /* STATS SECTIONS */
  .stats-band { padding: 20px 10px; }
  .stats-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-num { font-size: clamp(1.6rem, 4vw, 1.8rem); }
  .stat-label { font-size: 0.55rem; }

  .secondary-stats { padding: 20px 10px; }
  .secondary-stats-grid { grid-template-columns: 1fr; gap: 8px; }
  .sec-stat-card { padding: 12px 8px; }
  .sec-stat-num { font-size: clamp(1.2rem, 3vw, 1.6rem); }

  .impact-band { padding: 20px 10px; }
  .impact-grid { grid-template-columns: 1fr; gap: 10px; }
  .impact-num { font-size: clamp(1.4rem, 4vw, 1.8rem); }

  /* ACTIVITIES */
  .activities-grid { grid-template-columns: 1fr; gap: 8px; }
  .activity-card { padding: 14px 10px; }
  .activity-num { font-size: clamp(1.6rem, 4vw, 2rem); }

  /* PROGRAMS */
  .program-card { padding: 16px 12px; }
  .program-icon { width: 40px; height: 40px; font-size: 1.1rem; }
  .program-card h3 { font-size: 0.9rem; }
  .program-card p { font-size: 0.75rem; }

  /* REACH */
  .reach-card { padding: 16px 12px; }
  .reach-icon { font-size: 1.4rem; }
  .reach-card h3 { font-size: 0.9rem; }

  /* TEJASWINI */
  .tejaswini-section { padding: 32px 10px; }
  .tejaswini-visual { gap: 8px; }
  .tejaswini-title { font-size: clamp(1.6rem, 5vw, 1.8rem); }
  .tej-card { padding: 12px; }
  .tej-card h4 { font-size: 0.78rem; }
  .tej-card p { font-size: 0.68rem; }

  /* HIGHLIGHT */
  .highlight-section { padding: 32px 10px; }
  .highlight-title { font-size: clamp(1.6rem, 5vw, 2rem); }
  .highlight-visual { padding: 16px 12px; }
  .hl-loc { padding: 8px 10px; font-size: 0.78rem; }

  /* LEADERSHIP */
  .leadership-grid { gap: 8px; }
  .leader-avatar { width: 80px; height: 80px; font-size: 1.8rem; }
  .leader-card { padding: 12px 8px; }
  .leader-name { font-size: 0.75rem; }

  /* CONTACT */
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 10px 10px;
    font-size: 16px !important;
  }

  /* FOOTER */
  footer { padding: 28px 10px 14px; }
  .footer-grid { gap: 16px; }
  .footer-col h4 { font-size: 0.65rem; }
  .footer-col ul li a { font-size: 0.75rem; }

  /* TYPOGRAPHY */
  .section-title { font-size: clamp(1.3rem, 4vw, 1.5rem); }
  .section-sub { font-size: 0.8rem; }
  .section-tag { font-size: 0.6rem; }
}