/* Gallery Page Styles */

.gallery-section {
  min-height: 100vh;
  padding-top: 80px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ffffff 100%);
}

.gallery-header {
  text-align: center;
  padding: 3rem 0 2rem;
  background: var(--white);
  margin-bottom: 2rem;
}

.gallery-title {
  font-family: "Dancing Script", cursive;
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.gallery-subtitle {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.gallery-stats {
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 600;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}

.gallery-item:hover .play-icon {
  background: var(--primary-color);
  transform: translate(-50%, -50%) scale(1.1);
}

.load-more-container {
  text-align: center;
  margin: 3rem 0;
}

.load-more-btn {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.load-more-btn:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.loading-indicator {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

.loading-indicator i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.empty-state > i {
  font-size: 4rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.empty-state h3 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.upload-link-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-link-btn:hover {
  background-color: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.upload-link-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.upload-link-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.message-container,
.error-container {
  text-align: center;
  padding: 3rem;
  background: var(--accent-color);
  border-radius: 15px;
  margin: 2rem;
}

.message-container i,
.error-container i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.message-container i {
  color: var(--primary-color);
}

.error-container i {
  color: #e74c3c;
}

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

.media-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: #000;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.modal-nav-btn:hover {
  background: var(--primary-color);
  transform: translateY(-50%) scale(1.1);
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

.modal-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 10;
}

.modal-media-container {
  position: relative;
  max-width: 100%;
  max-height: 80vh;
  overflow: hidden;
}

.modal-media-container img,
.modal-media-container video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.modal-info {
  padding: 1.5rem;
  background: var(--white);
}

.modal-info h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.modal-info p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Floating Upload Button */
.floating-upload-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.upload-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.upload-fab:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Admin Link in Footer */
.admin-link {
  display: inline-block;
  margin-left: 15px;
  color: #666;
  font-size: 0.8rem;
  opacity: 0.3;
  transition: var(--transition);
  text-decoration: none;
}

.admin-link:hover {
  opacity: 1;
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .gallery-title {
    font-size: 2rem;
  }

  .play-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .modal-media-container {
    max-height: 70vh;
  }

  .modal-media-container img,
  .modal-media-container video {
    max-height: 70vh;
  }

  .floating-upload-btn {
    bottom: 1rem;
    right: 1rem;
  }

  .upload-fab {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
  }

  .gallery-header {
    padding: 2rem 0 1rem;
  }

  .gallery-title {
    font-size: 1.8rem;
  }
}

.featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
