/* Gallery */

.gallery-item {
    display: inline-block;
    margin: 20px;
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

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

.gallery-item img {
    width: 500px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Stagger animation for gallery items */
.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }
.gallery-item:nth-child(7) { animation-delay: 0.35s; }
.gallery-item:nth-child(8) { animation-delay: 0.4s; }
.gallery-item:nth-child(9) { animation-delay: 0.45s; }
.gallery-item:nth-child(10) { animation-delay: 0.5s; }
.gallery-item:nth-child(11) { animation-delay: 0.55s; }
.gallery-item:nth-child(12) { animation-delay: 0.6s; }
.gallery-item:nth-child(13) { animation-delay: 0.65s; }
.gallery-item:nth-child(14) { animation-delay: 0.7s; }
.gallery-item:nth-child(15) { animation-delay: 0.75s; }
.gallery-item:nth-child(16) { animation-delay: 0.8s; }
.gallery-item:nth-child(17) { animation-delay: 0.85s; }
.gallery-item:nth-child(18) { animation-delay: 0.9s; }
.gallery-item:nth-child(19) { animation-delay: 0.95s; }
.gallery-item:nth-child(20) { animation-delay: 1s; }
.gallery-item:nth-child(21) { animation-delay: 1.05s; }
.gallery-item:nth-child(22) { animation-delay: 1.1s; }
.gallery-item:nth-child(23) { animation-delay: 1.15s; }
.gallery-item:nth-child(24) { animation-delay: 1.2s; }
.gallery-item:nth-child(25) { animation-delay: 1.25s; }
.gallery-item:nth-child(26) { animation-delay: 1.3s; }
.gallery-item:nth-child(27) { animation-delay: 1.35s; }
.gallery-item:nth-child(28) { animation-delay: 1.4s; }
.gallery-item:nth-child(29) { animation-delay: 1.45s; }
.gallery-item:nth-child(30) { animation-delay: 1.5s; }
.gallery-item:nth-child(n+31) { animation-delay: 1.55s; }

/* Modal transitions */
.model {
    transition: opacity 0.3s ease;
}

.model-content {
    transition: transform 0.3s ease;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media screen and (max-width: 768px) {
    .gallery-item {
      display: block;
      margin: 20px auto;
      text-align: center;
    }

    .gallery-item img {
      width: 100%;
      max-width: 90vw;
      height: auto;
      border-radius: 8px;
    }

    /* Reduce animation delays on mobile for faster loading feel */
    .gallery-item:nth-child(n) { animation-delay: 0.1s; }

    .navfilter {
        width: 25%;
    }

    .navfilter img {
        width: 100%;
    }
  }

  @media screen and (min-width: 769px) and (max-width: 1024px) {
    .gallery-item {
      width: 45%;
      display: inline-block;
      margin: 2.5%;
    }
  
    .gallery-item img {
      width: 100%;
      height: auto;
    }
  }