/* ========== VIDEOS PAGE ========== */
.gallery-header { 
  margin-bottom: 6rem; 
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.3s ease;
  margin-bottom: 3rem;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  background: rgba(11, 138, 66, 0.06);
  border-radius: 100px;
  border: 1px solid rgba(11, 138, 66, 0.15);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.back-link:hover {
  background: var(--primary-green);
  color: #fff;
  transform: translateY(-2px);
  gap: 0.8rem;
}

.section-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.video-categories {
  display: flex;
  flex-direction: column;
  gap: 8rem;
}

.category-header {
  margin-bottom: 4rem;
  text-align: center;
  position: relative;
}

.category-header::after {
  content: '';
  position: absolute;
  bottom: -1.2rem; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 3px;
  background: var(--primary-green);
  border-radius: 10px;
}

.category-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark-green);
  margin-bottom: 0.5rem;
}

.category-description {
  color: var(--text-muted);
  font-size: 1rem;
}

.category-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.video-item {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

.video-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.video-preview-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9; /* Small rectangular thumbnail as requested */
  overflow: hidden;
  background: #000;
}

.video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.8;
}

.video-item:hover video {
  transform: scale(1.05);
  opacity: 1;
}

.video-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(11, 138, 66, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.play-button-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: rgba(0,0,0,0.2);
  transition: background 0.3s ease;
}

.video-item:hover .play-button-overlay {
  background: rgba(0,0,0,0.1);
}

.play-icon {
  width: 54px; height: 54px;
  background: rgba(11,138,66,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.video-item:hover .play-icon {
  transform: scale(1.1);
  background: var(--primary-green);
}

.video-item:hover video { transform: scale(1.03); }

.video-title {
  padding: 1.2rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-green);
  text-align: center;
}

/* Gallery CTA */
.gallery-cta {
  text-align: center;
  background: var(--dark-green);
  padding: 5rem 2rem;
  border-radius: var(--radius);
  color: #fff;
  margin-top: 8rem;
  margin-bottom: 6rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.gallery-cta::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

.gallery-cta h3 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.gallery-cta p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 2.8rem;
  background: #fff;
  color: var(--dark-green);
  border-radius: 100px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-button:hover {
  background: var(--primary-green);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(11, 138, 66, 0.3);
}

/* Video Fullscreen Modal */
.video-fullscreen-modal {
  position: fixed;
  inset: 0;
  background: rgba(6,51,43,0.98);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.video-fullscreen-modal.active { opacity: 1; pointer-events: auto; }

.modal-close {
  position: absolute;
  top: 2rem; right: 2rem;
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20001;
  transition: background 0.3s ease, transform 0.3s ease;
}

.modal-close:hover { background: var(--primary-green); transform: rotate(90deg); }

.video-fullscreen-container {
  width: 90%;
  max-width: 450px; /* Portrait video max width */
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 20px; /* Space around video */
}

.video-fullscreen-modal.active .video-fullscreen-container { transform: scale(1); }

.video-fullscreen-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 1100px) {
  .gallery-header { margin-bottom: 4rem; }
  .category-videos-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 768px) {
  .section-title { font-size: 2.2rem; }
  .category-videos-grid { grid-template-columns: 1fr; gap: 2rem; }
  .video-fullscreen-container { width: 95%; max-width: 450px; }
  .video-preview-wrapper { aspect-ratio: 16/9; } /* Horizontal on mobile for better scroll experience */
  .gallery-cta { padding: 4rem 1.5rem; }
  .gallery-cta h3 { font-size: 1.8rem; }
  .cta-button { width: 100%; justify-content: center; }
}

@media (max-width: 580px) {
  .category-title { font-size: 1.5rem; }
  .category-description { font-size: 0.9rem; }
  .video-title { font-size: 1rem; padding: 1rem; }
  .video-categories { gap: 5rem; }
}
