/* Photo grid */
.gallery-page main { background: rgba(230, 230, 230, 0.94); }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 16px 10%;
}
.grid-item {
  display: block;
  padding: 0;
  margin: 0;
  border-radius: 2px;
  overflow: hidden;
  background: #ddd;
  aspect-ratio: 1 / 1;
  transition: transform 0.15s ease;
  cursor: zoom-in;
}
.grid-item:hover { transform: scale(1.02); }
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.grid-item.hidden { display: none; }

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); margin: 10px 5%; }
}
@media (max-width: 660px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 8px 0; }
}

/* Modal (image viewer) */
.image-modal {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
}
.image-modal::backdrop { background: rgba(10, 10, 10, 0.85); }

.modal-close {
  position: fixed;
  top: 16px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: rgba(0, 0, 0, 0.8); }

.modal-content {
  position: absolute;
  top: 70px;
  left: 70px;
  right: 70px;
  bottom: 70px;
  background: rgba(250, 250, 250, 1);
  display: grid;
  grid-template-columns: minmax(280px, 30%) 1fr;
  overflow: hidden;
}
.modal-image {
  background: rgb(12, 12, 12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.modal-image a { display: block; max-width: 100%; max-height: 100%; }
.modal-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}
.modal-details {
  padding: 24px 24px 32px 24px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.55;
}
.modal-details h4 {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 6px 0;
}
.modal-details h5 {
  font-size: 14px;
  font-weight: 400;
  color: #6a6a6a;
  margin: 0 0 14px 0;
}
.modal-details .equipment-title {
  margin-top: 1.25rem;
  font-size: 16px;
  font-weight: 500;
}
.modal-details .equipment-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}
.modal-details .equipment-list li { padding: 2px 0; }
.modal-details a { color: rgb(20, 109, 211); }
.modal-details a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .modal-content { left: 30px; right: 30px; top: 60px; bottom: 60px; }
}
@media (max-width: 660px) {
  .modal-content {
    left: 10px;
    right: 10px;
    top: 50px;
    bottom: 50px;
    grid-template-columns: 1fr;
    grid-template-rows: 60vh 1fr;
    overflow-y: auto;
  }
  .modal-details { padding: 16px; }
  .modal-close { top: 6px; right: 10px; width: 36px; height: 36px; }
}

/* Videos page */
.videos-list {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 16px;
}
.video-card { margin-bottom: 30px; text-align: center; }
.video-card h4 { margin-bottom: 8px; font-weight: 400; }
.video-card .video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}
.video-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
