.section {
  max-width: 1100px;
  margin: 80px auto;
  padding: 0px 32px;
}

.title {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  color: #0b1c3d;
  margin-bottom: 50px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  padding-top: 16px;
}

/* Square cards */
.card {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.12);
  transition: all 0.4s ease;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-8px);
}

/* Image */
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
  transition: transform 0.6s ease;
}

.card:hover img {
  transform: scale(1.08);
}

/* Soft color overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05),
    rgba(11, 28, 61, 0.75)
  );
}

/* Color tints */
.health .content {
  background: rgba(255, 150, 120, 0.25);
}
.education .content {
  background: rgba(120, 170, 255, 0.25);
}
.community .content {
  background: rgba(180, 150, 255, 0.25);
}
.sustain .content {
  background: rgba(140, 200, 150, 0.25);
}
.women .content {
  background: rgba(255, 170, 200, 0.25);
}
.sports .content {
  background: rgba(140, 220, 220, 0.25);
}
.relief .content {
  background: rgba(255, 190, 120, 0.25);
}
.digital .content {
  background: rgba(150, 220, 255, 0.25);
}
.institutions .content {
  background: rgba(220, 220, 220, 0.25);
}
.governance .content {
  background: rgba(180, 200, 230, 0.25);
}

/* Text area */
.content {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  color: white;
  display: flex;
  flex-direction: row;
}

.content svg {
  height: 50px;
  width: 50px;
  margin-right: 8px;
}

.content h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.content p {
  font-size: 10px;
  opacity: 0.85;
}

.arrow {
  display: none;
  position: absolute;
  right: 26px;
  bottom: 26px;
  font-size: 26px;
  color: white;
  transition: transform 0.3s ease;
}

.card:hover .arrow {
  transform: translateX(6px);
}

@media (max-width: 700px) {
  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

.card:nth-child(odd) {
  animation: comeRight forwards linear;
  animation-timeline: view();
  animation-range: entry -5% cover 15%;
}

.card:nth-child(even) {
  animation: comeLeft forwards linear;
  animation-timeline: view();
  animation-range: entry -5% cover 15%;
}

@keyframes comeRight {
  0% {
    right: 10vw;
  }
  100% {
    right: 0vw;
  }
}

@keyframes comeLeft {
  0% {
    left: 10vw;
  }
  100% {
    left: 0vw;
  }
}
