/* === Site Enhancements (cards, gallery, animations) === */
:root { --radius: 12px; --gap: 1rem; }

/* Make common images responsive by default */
img.responsive,
img[src*="ziele"],
img[src*="ziel"],
img[src*="bilder/"] {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* Card base */
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
  padding: 1rem;
  transition: transform .3s ease, box-shadow .3s ease, opacity .6s ease;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp .8s ease forwards;
}
@media (hover:hover) {
  .card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  }
}

/* Two-column grid (keeps your existing naming) */
.grid.two { gap: var(--gap); }

/* 6-image gallery in card style */
.erreicht-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap);
  margin: 2rem 0;
}
.erreicht-gallery .card { padding: 0; }
.erreicht-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform .3s ease;
}
@media (hover:hover) {
  .erreicht-gallery .card:hover img { transform: scale(1.05); }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger patterns */
.erreicht-gallery .card:nth-child(1) { animation-delay: .10s; }
.erreicht-gallery .card:nth-child(2) { animation-delay: .20s; }
.erreicht-gallery .card:nth-child(3) { animation-delay: .30s; }
.erreicht-gallery .card:nth-child(4) { animation-delay: .40s; }
.erreicht-gallery .card:nth-child(5) { animation-delay: .50s; }
.erreicht-gallery .card:nth-child(6) { animation-delay: .60s; }

.grid.two > .card:nth-child(1) { animation-delay: .15s; }
.grid.two > .card:nth-child(2) { animation-delay: .25s; }
.grid.two > .card:nth-child(3) { animation-delay: .35s; }
.grid.two > .card:nth-child(4) { animation-delay: .45s; }
.grid.two > .card:nth-child(5) { animation-delay: .55s; }
.grid.two > .card:nth-child(6) { animation-delay: .65s; }
.grid.two > .card:nth-child(7) { animation-delay: .75s; }
.grid.two > .card:nth-child(8) { animation-delay: .85s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; opacity: 1; transform: none; transition: none; }
}
