/* Responsive */
@media (max-width: 1199px) {
  .causes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--charcoal);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

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

  .main-nav a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .header-actions .btn {
    display: none;
  }

  .events-home,
  .success-grid,
  .about-layout,
  .content-sidebar,
  .blog-home-grid,
  .team-intro {
    grid-template-columns: 1fr;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

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

  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

  .blog-entry {
    grid-template-columns: 1fr;
  }

  .dark-cta-box {
    margin: 0 auto;
  }

  .mosaic {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .cta-bars {
    grid-template-columns: 1fr;
  }

  .causes-grid,
  .team-grid,
  .about-visuals,
  .team-names,
  .form-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .event-entry {
    flex-direction: column;
  }

  .section {
    padding: 50px 0;
  }

  .hero-home {
    min-height: 85vh;
  }

  .page-hero {
    min-height: 240px;
  }

  .volunteer-banner .inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom .inner {
    flex-direction: column;
    text-align: center;
  }

  .logo-text {
    font-size: 13px;
  }
}

/* Header over home hero needs solid feel on small screens when menu open */
.main-nav.open {
  max-height: 80vh;
  overflow-y: auto;
}

/* Improve cause card bottom spacing for progress ring overlap */
.causes-grid .cause-card-img {
  margin-bottom: 0;
}

/* Page hero title animation */
.page-hero h1 {
  animation: fadeUp 0.7s ease both;
}

.page-hero .underline {
  animation: fadeUp 0.7s 0.1s ease both;
}

/* Ensure buttons don't stretch oddly on iOS */
button.btn,
a.btn {
  -webkit-appearance: none;
  appearance: none;
}

/* Legal spacing */
.legal-content {
  max-width: 860px;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .share-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
