/* Gallery Grid Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.gallery-item .caption {
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border-top: 1px solid rgba(255,255,255,.08);
}

.gallery-item .caption h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.gallery-item .caption p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.back-btn {
  margin-bottom: 20px;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  margin: 5vh auto;
  display: block;
}

.modal img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.modal-close:hover {
  background: rgba(0,0,0,0.8);
}

.modal-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.modal-caption h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.modal-caption p {
  margin: 0;
  color: rgba(255,255,255,0.8);
  font-size: 14px;
}

@media (max-width: 720px) {
  .modal-close {
    top: 10px;
    right: 15px;
    font-size: 30px;
    width: 50px;
    height: 50px;
  }
  
  .modal-caption {
    bottom: 10px;
    left: 10px;
    right: 10px;
    padding: 12px 16px;
  }
  
  .modal-caption h4 {
    font-size: 16px;
  }
}