/* buttons, cards, nav items */
.modal {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 1300ms ease;

  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 1300ms ease,
    visibility 0s linear 1300ms;
}

.modal-header {
  display: flex;
  width: 90vw;
  margin: 1rem 0;
  justify-content: space-between;
  color: white;
  font-weight: bold;
}

.modal-content {
  max-width: 900px;
  max-height: 80vh;
  margin: 0 auto;
  overflow-y: auto;
  background-color: white;
  padding: 0 0 1rem 0;
  position: relative;
  text-align: right;
  scrollbar-width: none;
}

.modal-content.bump {
  animation: modal-bump 300ms ease-in-out;
}

@keyframes modal-bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.modal-content.bump-out {
  animation: modal-bump-out 300ms ease-in-out;
}

@keyframes modal-bump-out {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.caption {
  padding-bottom: 1rem;
}

.gallery-entry {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.grid-toggle {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 20;
  font-size: 1.5rem;
  cursor: pointer;
}

.gallery-grid {
  position: absolute;
  top: 10%;
  left: 10%;
  max-width: 80%;
  height: 120px;

  background: rgba(255, 255, 255, 0.25);

  display: flex; /* ← change from grid → flex */
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;

  overflow-x: auto;
  overflow-y: hidden;
  z-index: 15;
  scroll-behavior: smooth;
  left: 50%;
  transform: translateX(-50%);
}

.gallery-grid:not(.hidden) {
  pointer-events: auto;
}

.gallery-grid img {
  height: 100%;
  flex: 0 0 auto; /* prevents shrinking */
  cursor: pointer;
}

.grid-item.active {
  outline: 3px solid white;
}

.project-card {
  text-decoration: none;
  color: inherit;
}

.project-card-image {
  width: 100%;
  height: auto;
  display: block;
}

.project-card-title {
  margin-top: 0.5rem;
}

.project-poster {
  cursor: pointer;
}

.modal-swiper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#close {
  display: inline-block;
  cursor: pointer;
}

.close-btn {
  width: 1rem;
  height: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;

  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 20;

  color: white; /* or whatever fits your theme */
}

.projects-swiper {
  width: 100%;
  height: 60vh; /* adjust as needed */
}

.projects-swiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
