@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-items {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 100px 2.5rem 2rem;
    gap: 0;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 15;
  }

  .nav-items.open {
    transform: translateX(0);
  }

  .nav-items li {
    width: 100%;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.35s ease;
  }

  .nav-items.open li {
    opacity: 1;
    transform: translateX(0);
  }

  /* Stagger the link animations */
  .nav-items.open li:nth-child(1) {
    transition-delay: 0.1s;
  }
  .nav-items.open li:nth-child(2) {
    transition-delay: 0.18s;
  }
  .nav-items.open li:nth-child(3) {
    transition-delay: 0.26s;
  }
  .nav-items.open li:nth-child(4) {
    transition-delay: 0.34s;
  }
  .nav-items.open li:nth-child(5) {
    transition-delay: 0.42s;
  }

  .nav-items .nav-item {
    display: block;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--dark);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    width: 100%;
  }

  .nav-items .nav-item::after {
    bottom: -1px;
    height: 2px;
  }

  /* Overlay backdrop */
  .nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 2;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Prevent body scroll when menu open */
  body.nav-open {
    overflow: hidden;
  }
}


@media (max-width: 900px) {
  .header-content {
    align-items: center;
  }

  .image-text {
    margin-left: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .image-text h1 {
    font-size: 2.2rem;
  }

  #donations .cards {
    flex-direction: column;
  }

  #donations .card {
    width: 80%;
  }

  #about-us {
    flex-direction: column;
    padding: 4rem 2rem;
    gap: 3rem;
  }

  #about-us .about {
    align-items: center;
    text-align: center;
  }

  #about-us .read-more {
    align-self: center;
  }

  #about-us aside {
    width: 100%;
    height: 450px;
  }

  #stories {
    padding: 60px 24px 80px;
  }
  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  footer {
    padding: 60px 24px 28px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }

  .founders-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .founders-grid .founder-card:last-child {
    grid-column: 1 / -1;
    max-width: 340px;
    justify-self: center;
  }
}

@media (max-width: 600px) {
  nav {
    padding: 1rem;
  }

  .image-text h1 {
    font-size: 1.8rem;
  }

  .image-text p {
    font-size: 1.1rem;
  }

  #donations .card {
    width: 100%;
  }

  #about-us h2 {
    font-size: 2rem;
  }

  #about-us aside {
    height: 350px;
  }

  .stories-header h2 {
    font-size: 1.8rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
    border: none;
    gap: 10px;
  }
  .newsletter-form input {
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  .newsletter-form button {
    border-radius: 3px;
    width: 100%;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  #founders {
    padding: 60px 20px 80px;
  }
  .founders-grid {
    grid-template-columns: 1fr;
  }
  .founders-grid .founder-card:last-child {
    grid-column: auto;
    max-width: 100%;
  }
}

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