/* Enhanced Gallery Page Styles */

/* Gallery Section */
.gallery-section {
  background: white;
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 2px solid #e2e8f0;
  margin-bottom: 40px;
}

.gallery-header-section {
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 3px solid #e2e8f0;
  text-align: center;
}

.gallery-header-section h2 {
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.gallery-header-section h2 i {
  color: var(--primary-color);
  font-size: 32px;
}

.gallery-header-section p {
  margin: 0;
  font-size: 16px;
  color: #64748b;
  font-weight: 500;
}

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

.gallery-item-enhanced {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border: 2px solid #e2e8f0;
  transition: all 0.4s ease;
  cursor: pointer;
}

.gallery-item-enhanced:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(2, 102, 112, 0.2);
  border-color: var(--primary-color);
}

/* Gallery Image Wrapper */
.gallery-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 Aspect Ratio */
  overflow: hidden;
  background: #f1f5f9;
}

.gallery-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item-enhanced:hover .gallery-image-wrapper img {
  transform: scale(1.1);
}

/* Gallery Overlay Enhanced */
.gallery-overlay-enhanced {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 25px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item-enhanced:hover .gallery-overlay-enhanced {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.gallery-item-enhanced:hover .overlay-content {
  transform: translateY(0);
}

.overlay-content h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
  line-height: 1.3;
}

.btn-view-image {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: white;
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-view-image:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

.btn-view-image i {
  font-size: 18px;
}

/* Gallery Item Footer */
.gallery-item-footer {
  padding: 15px 20px;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}

.gallery-item-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  line-height: 1.4;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

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

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.lightbox-caption {
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  max-width: 600px;
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #1e293b;
  font-size: 24px;
  z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-grid-enhanced {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .gallery-section {
    padding: 25px 20px;
  }
  
  .gallery-header-section h2 {
    font-size: 24px;
  }
  
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-caption {
    font-size: 16px;
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .gallery-grid-enhanced {
    grid-template-columns: 1fr;
  }
  
  .overlay-content h3 {
    font-size: 16px;
  }
  
  .btn-view-image {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Loading Animation */
.gallery-image-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.gallery-image-wrapper img[src] + * {
  display: none;
}

/* Hover Effects Enhancement */
.gallery-item-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  z-index: 1;
}

.gallery-item-enhanced:hover::before {
  transform: scaleX(1);
}

/* Video Gallery Styles */
.video-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.video-item-enhanced {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.video-item-enhanced:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(2, 102, 112, 0.15);
  border-color: var(--primary-color);
}

.video-wrapper-enhanced {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
}

.video-wrapper-enhanced iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-item-footer {
  padding: 20px;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}

.video-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
}

.video-date {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
}

.video-date i {
  color: var(--primary-color);
  font-size: 16px;
}

/* YouTube Channel Card */
.youtube-channel-card {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 35px;
  background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
  border-radius: 16px;
  border: 2px solid #fca5a5;
  margin-top: 40px;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.1);
}

.youtube-icon {
  width: 80px;
  height: 80px;
  background: #FF0000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.youtube-icon i {
  font-size: 40px;
  color: white;
}

.youtube-content {
  flex: 1;
}

.youtube-content h3 {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
}

.youtube-content p {
  margin: 0 0 20px 0;
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
}

.btn-youtube {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: #FF0000;
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-youtube:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.btn-youtube i {
  font-size: 24px;
}

/* Responsive Video Gallery */
@media (max-width: 768px) {
  .video-grid-enhanced {
    grid-template-columns: 1fr;
  }
  
  .youtube-channel-card {
    flex-direction: column;
    text-align: center;
    padding: 25px;
  }
  
  .youtube-content h3 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .video-title {
    font-size: 16px;
  }
  
  .youtube-icon {
    width: 60px;
    height: 60px;
  }
  
  .youtube-icon i {
    font-size: 30px;
  }
}
