/* Gallery Styles */
.gallery-container {
  padding-top: 80px; /* Add padding to account for fixed navbar */
  padding-bottom: 3rem;
}

@media (max-width: 768px) {
  .gallery-container {
    padding-top: 70px; /* Adjust for smaller navbar on mobile */
  }
}

.section-title {
  margin-bottom: 2rem;
  text-align: center;
  font-size: 2.5rem;
}

.gallery-header {
  margin-bottom: 2rem;
}

.category-description {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.filter-buttons {
  display: flex;
  gap: 1rem;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  background-color: var(--bg-light);
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.shuffle-btn {
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  background-color: var(--bg-light);
  color: var(--text-color);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.shuffle-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Gallery Grid */
.gallery-grid, .categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background-color: var(--bg-color);
  cursor: pointer;
  transition: var(--transition);
}

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

.gallery-thumbnail {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.gallery-thumbnail img, 
.gallery-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-info {
  padding: 1rem;
}

.gallery-info h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-color);
}

.gallery-category {
  color: var(--text-light);
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

/* Category Cards */
.category-card {
  background-color: var(--bg-color);
  padding: 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-color);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.category-card h3 {
  margin-top: 0;
  color: var(--primary-color);
}

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

.modal-content {
  position: relative;
  background-color: var(--bg-color);
  margin: 5% auto;
  padding: 20px;
  width: 80%;
  max-width: 900px;
  border-radius: var(--radius);
  max-height: 90vh;
  overflow-y: auto;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 20px;
  color: var(--text-color);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close-button:hover {
  color: var(--primary-color);
}

#modalTitle {
  color: var(--text-color);
  margin-top: 0.5rem;
  padding-right: 30px;
}

#modalMedia {
  margin: 20px 0;
  text-align: center;
}

#modalMedia img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
}

#modalMedia video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
}

#modalMedia iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: var(--radius-sm);
}

#modalDescription {
  color: var(--text-light);
  line-height: 1.6;
}

.no-items {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background-color: var(--bg-light);
  border-radius: var(--radius);
}

/* Featured Gallery Section */
.featured-gallery {
  margin-bottom: 4rem;
}

.featured-gallery h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .gallery-filters {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filter-buttons {
    width: 100%;
    justify-content: center;
  }
  
  .shuffle-container {
    width: 100%;
    text-align: center;
  }
  
  .gallery-grid, .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  #modalMedia iframe {
    height: 300px;
  }
}

@media (max-width: 576px) {
  .gallery-grid, .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  #modalMedia iframe {
    height: 250px;
  }
}

/* Dark Theme Support */
[data-theme="dark"] .gallery-modal {
  background-color: rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .gallery-icon {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Gallery Detail Page Styles */
.gallery-detail {
  background-color: var(--bg-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.gallery-detail-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.detail-title {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.detail-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.detail-meta a {
  color: var(--primary-color);
  text-decoration: none;
}

.detail-meta a:hover {
  text-decoration: underline;
}

.gallery-detail-content {
  margin-bottom: 2rem;
}

.detail-media {
  margin-bottom: 2rem;
  text-align: center;
}

.detail-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
}

.detail-video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
}

.detail-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.detail-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-sm);
}

.detail-description h2 {
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.detail-description p {
  color: var(--text-color);
  line-height: 1.6;
}

.detail-navigation {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-light);
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
}

.back-button:hover {
  background-color: var(--primary-color);
  color: white;
}

@media (max-width: 768px) {
  .gallery-detail {
    padding: 1.5rem;
  }
  
  .detail-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}


