/* Gallery Styles Extracted */
:root { --gallery-gap: 15px; }

/* Grid layout with CSS Grid */
.gallery-container, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gallery-gap);
}

/* Flexbox fallback when Grid not supported */
@supports not (display: grid) {
  .gallery-grid { display: flex; flex-wrap: wrap; margin: calc(var(--gallery-gap) * -1); }
  .gallery-grid > .gallery-item { flex: 1 1 280px; margin: var(--gallery-gap); }
}

.gallery-card {
  background: transparent;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin: 0;
  padding: 0;
}
.gallery-card:hover { animation: pulse 1s ease-in-out; box-shadow: 0 0 15px rgba(0, 123, 255, 0.5); }
.gallery-card img, .gallery-card video { width: 100%; height: 250px; object-fit: cover; border-radius: 15px; }
.gallery-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; opacity: 0; transition: all 0.3s ease; }
.gallery-card:hover .gallery-overlay { opacity: 1; }
.gallery-play { color: white; font-size: 48px; }
.gallery-type-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,123,255,0.9); color: white; padding: 5px 10px; border-radius: 15px; font-size: 12px; font-weight: 600; }
.image-badge { background: rgba(0,123,255,0.9); }
.video-badge { background: #ef4444; }
.gallery-card-info { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); padding: 20px 15px 15px; }
.gallery-card-title { color: white; font-size: 16px; font-weight: 600; margin: 0; }

@keyframes pulse { 0% { transform: scale(1);} 50% { transform: scale(1.03);} 100% { transform: scale(1);} }

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
}

/* Fullscreen Slideshow */
.slideshow-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 9999; display: none; }
.slideshow-container { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.slideshow-image { max-width: 90%; max-height: 90%; object-fit: contain; }
.slideshow-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: white; border: none; font-size: 24px; padding: 15px 20px; cursor: pointer; border-radius: 50%; transition: all 0.3s ease; }
.slideshow-nav:hover { background: rgba(255,255,255,0.3); }
.slideshow-prev { left: 30px; }
.slideshow-next { right: 30px; }
.slideshow-close { position: absolute; top: 30px; right: 30px; background: none; color: white; border: none; font-size: 36px; cursor: pointer; transition: all 0.3s ease; }
.slideshow-close:hover { color: #007bff; }
.slideshow-counter { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: white; font-size: 18px; font-weight: 600; }

/* Video Modal Styles */
.video-modal { display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); }
.video-modal-content { position: relative; margin: 5% auto; width: 90%; max-width: 800px; background: #1f2937; border-radius: 15px; overflow: hidden; }
.video-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: #111827; }
.video-modal-title { color: white; font-size: 20px; font-weight: bold; margin: 0; }
.video-modal-close { background: #ef4444; color: white; border: none; border-radius: 50%; width: 35px; height: 35px; cursor: pointer; transition: background 0.3s ease; }
.video-modal-close:hover { background: #dc2626; }
.video-modal-body { padding: 0; }
.modal-video { width: 100%; height: 450px; background: #000; }

