/* NBC Photo Gallery CSS */

/* Main gallery container */
#nbc-photo-gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Gallery controls */
.nbc-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 15px;
  background: #ecf2f9;
}

#nbc-download-all {
  background-color: #3265ac;
  color: #ffffff;
  border: 1px solid #3265ac;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

#nbc-download-all:hover {
  background-color: #ffffff;
  color: #3265ac;
}

/* Photo grid */
#nbc-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

#nbc-photo-grid.nbc-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

#nbc-photo-grid.nbc-loading .nbc-loader {
  font-size: 18px;
  color: #666;
}

/* Photo items */
.nbc-photo-item {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.nbc-photo-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.nbc-photo-item:hover .nbc-photo-thumbnail img {
  transform: scale(1.05);
}

.nbc-photo-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3 aspect ratio */
  overflow: hidden;
}

.nbc-photo-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.nbc-photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    transparent 30%,
    transparent 70%,
    rgba(0, 0, 0, 0.7) 100%
  );
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nbc-photo-number {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
}

/* Lightbox styles */
.nbc-lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.nbc-lightbox-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 90%;
  max-width: 1000px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.nbc-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 10001;
  transition: opacity 0.2s ease;
}

.nbc-lightbox-close:hover {
  opacity: 0.7;
}

#nbc-lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.nbc-lightbox-info {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: white;
}

#nbc-lightbox-number {
  font-size: 18px;
}

.nbc-lightbox-actions {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

#nbc-download-photo {
  background-color: #3265ac;
  color: #ffffff;
  border: 1px solid #3265ac;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

#nbc-download-photo:hover {
  background-color: #ffffff;
  color: #3265ac;
}

.nbc-lightbox-actions {
  display: flex;
  justify-content: center;
  margin: 0 0 25px;
}

.nbc-lightbox-nav {
  display: flex;
  gap: 20px;
}

.nbc-lightbox-nav button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1rem;
  width: 130px;
  transition: background-color 0.2s ease;
}

.nbc-lightbox-nav button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
  #nbc-photo-gallery {
    padding: 10px;
  }
  
  #nbc-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .nbc-lightbox-content {
    padding: 10px;
  }
  
  #nbc-lightbox-image {
    max-height: 60vh;
  }
  
  .nbc-lightbox-nav {
    flex-direction: column;
    width: 100%;
  }

  .nbc-lightbox-nav button {
    width: 100%;
  }
  
  .nbc-lightbox-actions {
    margin: 15px 0;
  }
}

@media (max-width: 480px) {
  #nbc-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .nbc-lightbox-close {
    font-size: 30px;
    top: 10px;
    right: 15px;
  }
}