/* Gallery Page Styles */

.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f5f5f5;
  min-height: calc(100vh - 200px);
}

.gallery-header {
  text-align: center;
  margin-bottom: 50px;
  padding: 30px 0;
}

.gallery-header h1 {
  font-size: 2.5em;
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.gallery-header p {
  font-size: 1.1em;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Gallery Category Cards */
.gallery-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.category-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-card-image {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3.5rem;
  line-height: 1;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', sans-serif;
  position: relative;
  overflow: hidden;
}

.category-card-image.community {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.category-card-image.cultural {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.category-card-image.celebration {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.category-card-image.educational {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.category-card-image.infra {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.category-card-image.internship {
  background: linear-gradient(135deg, #ff9a56 0%, #ff6a88 100%);
}

.category-card-image.lab {
  background: linear-gradient(135deg, #2e2e78 0%, #662d8c 100%);
}

.category-card-image.placement {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-card-image.workshop {
  background: linear-gradient(135deg, #f12711 0%, #f5af19 100%);
}

.category-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card-title {
  font-size: 1.5em;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.category-card-description {
  color: #666;
  font-size: 0.95em;
  line-height: 1.6;
  margin-bottom: 15px;
}

.category-card-count {
  color: #999;
  font-size: 0.85em;
  margin-top: 10px;
}

.view-gallery-btn {
  align-self: flex-start;
  background-color: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.view-gallery-btn:hover {
  background-color: #5568d3;
}

/* Gallery Grid */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.photo-item {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 250px;
}

.photo-item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.photo-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-item:hover .photo-item-overlay {
  opacity: 1;
}

.photo-item-caption {
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 1em;
  font-weight: 500;
}

/* Empty State */
.empty-gallery {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-gallery-icon {
  font-size: 3em;
  margin-bottom: 20px;
  color: #ddd;
}

.empty-gallery p {
  font-size: 1.1em;
  margin: 10px 0;
}

/* Modal for Image Viewing */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.image-modal-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
  }
  to {
    transform: scale(1);
  }
}

.image-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.image-modal-close {
  position: absolute;
  top: -40px;
  right: -40px;
  color: white;
  font-size: 2em;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.image-modal-close:hover {
  transform: rotate(90deg);
}

/* Back Button */
.back-button {
  display: inline-block;
  margin-bottom: 30px;
  padding: 10px 20px;
  background-color: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.back-button:hover {
  background-color: #5568d3;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-header h1 {
    font-size: 1.8em;
  }

  .gallery-categories {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .photo-item {
    height: 200px;
  }

  .image-modal-close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .gallery-container {
    padding: 10px;
  }

  .gallery-header h1 {
    font-size: 1.5em;
  }

  .photos-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .photo-item {
    height: 150px;
  }
}
