/* Gallery Page Styles */

/* Page Hero Section */
.page-hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: white;
  padding: 80px var(--spacing-md);
  text-align: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.page-hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Gallery Page Section */
.gallery-page-section {
  padding: var(--spacing-xxl) 0;
}

/* Gallery Categories Filter */
.gallery-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.gallery-filter {
  padding: 10px 24px;
  border: 2px solid var(--secondary-blue);
  background: white;
  color: var(--secondary-blue);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-base);
  font-size: var(--font-sm);
}

.gallery-filter:hover {
  background: var(--secondary-blue);
  color: white;
}

.gallery-filter.active {
  background: var(--secondary-blue);
  color: white;
}

/* Gallery Grid Full */
.gallery-grid-full {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.gallery-grid-full .gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-base);
}

.gallery-grid-full .gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #e8f4f8 0%, #cce7f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  transition: transform var(--transition-base);
}

.gallery-grid-full .gallery-item:hover .gallery-placeholder {
  transform: scale(1.05);
}

.gallery-grid-full .gallery-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.gallery-grid-full .gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(30, 60, 114, 0.9));
  color: white;
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
  transform: translateY(100%);
  transition: transform var(--transition-base);
}

.gallery-grid-full .gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h4 {
  font-size: var(--font-base);
  margin: 0 0 4px 0;
  font-weight: 600;
}

.gallery-overlay p {
  font-size: var(--font-sm);
  margin: 0;
  opacity: 0.9;
}

/* Responsive for Gallery Grid Full */
@media (max-width: 1024px) {
  .gallery-grid-full {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 60px var(--spacing-md);
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .gallery-grid-full {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .gallery-placeholder,
  .gallery-grid-full .gallery-image {
    height: 180px;
  }

  .gallery-categories {
    gap: var(--spacing-xs);
  }

  .gallery-filter {
    padding: 8px 16px;
    font-size: var(--font-xs);
  }
}

@media (max-width: 480px) {
  .page-hero h1 {
    font-size: 1.5rem;
  }

  .gallery-grid-full {
    grid-template-columns: 1fr;
  }

  .gallery-placeholder,
  .gallery-grid-full .gallery-image {
    height: 200px;
  }
}

/* Hero Section (Legacy) */
.gallery-hero {
  background: linear-gradient(135deg, var(--secondary-blue) 0%, #3a6ba8 100%);
  color: white;
  padding: 50px var(--spacing-md);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.gallery-hero-content h1 {
  font-size: var(--font-xxl);
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.gallery-hero-content p {
  font-size: var(--font-base);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 300;
}

/* Gallery Section */
.gallery-section {
  padding: var(--spacing-xl) 0;
}

.gallery-wrapper {
  display: flex;
  gap: var(--spacing-lg);
  align-items: flex-start;
}

.gallery-sidebar {
  width: 250px;
  flex-shrink: 0;
}

.gallery-main {
  flex: 1;
  min-width: 0;
}

.gallery-header {
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.gallery-header h2 {
  color: var(--primary-blue);
  font-size: var(--font-lg);
  margin-bottom: 0;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.filter-btn {
  padding: 12px 18px;
  border: 1px solid #d0d0d0;
  background: white;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 400;
  transition: all var(--transition-base);
  font-size: var(--font-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.filter-btn:hover {
  background: var(--bg-light-gray);
  border-color: var(--secondary-blue);
  color: var(--primary-blue);
  box-shadow: 0 2px 6px rgba(42, 82, 152, 0.12);
}

.filter-btn.active {
  background: var(--secondary-blue);
  color: white;
  border-color: var(--secondary-blue);
  box-shadow: 0 2px 8px rgba(42, 82, 152, 0.2);
}

/* Photo Gallery Grid */
.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.gallery-item {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-base);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.photo-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--bg-light-gray);
  height: 250px;
}

.photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover .photo-wrapper img {
  transform: scale(1.08);
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 60, 114, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.photo-icon {
  font-size: 48px;
  color: white;
  cursor: pointer;
  transition: transform var(--transition-base);
  text-decoration: none;
  opacity: 0.9;
}

.photo-icon:hover {
  transform: scale(1.15);
  opacity: 1;
}

.photo-info {
  padding: var(--spacing-md);
  background: white;
}

.photo-info h3 {
  color: var(--primary-blue);
  font-size: var(--font-lg);
  margin: 0 0 var(--spacing-xs) 0;
  font-weight: 500;
}

.photo-info p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin: 0;
  line-height: 1.5;
}

/* Video Gallery Grid */
.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.video-item {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--bg-light-gray);
  height: 250px;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s ease;
}

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

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  background: rgba(42, 82, 152, 0.7);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.video-item:hover .play-icon {
  background: var(--secondary-blue);
  transform: translate(-50%, -50%) scale(1.15);
}

.video-info {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
}

.video-info h3 {
  color: var(--primary-blue);
  font-size: var(--font-lg);
  margin: 0 0 var(--spacing-xs) 0;
  font-weight: 500;
}

.video-info p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin: 0 0 var(--spacing-md) 0;
  line-height: 1.5;
  flex: 1;
}

.play-btn {
  background: var(--secondary-blue);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-base);
  align-self: flex-start;
  font-size: var(--font-sm);
}

.play-btn:hover {
  background: var(--primary-blue);
  transform: translateX(3px);
  box-shadow: 0 2px 6px rgba(30, 60, 114, 0.2);
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  animation: fadeIn 0.3s ease-in;
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: zoomIn 0.3s ease-in;
}

.modal-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.close-modal {
  position: absolute;
  right: -40px;
  top: -40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: transform var(--transition-base);
  z-index: 1001;
}

.close-modal:hover {
  transform: scale(1.2);
}

/* Video Modal */
.video-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  animation: fadeIn 0.3s ease-in;
}

.video-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  animation: zoomIn 0.3s ease-in;
}

#videoPlayer {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
}

.video-modal .close-modal {
  right: -40px;
  top: -40px;
}

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

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

/* Gallery Item Hide/Show */
.gallery-item.hidden {
  display: none;
}

.gallery-item.show {
  animation: fadeIn 0.4s ease-in;
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-hero {
    padding: 40px var(--spacing-md);
  }

  .gallery-hero-content h1 {
    font-size: var(--font-xl);
  }

  .gallery-hero-content p {
    font-size: var(--font-sm);
  }

  .gallery-wrapper {
    flex-direction: column;
  }

  .gallery-sidebar {
    width: 100%;
  }

  .filter-buttons {
    flex-direction: row;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
  }

  .filter-btn {
    padding: 10px 16px;
    font-size: var(--font-xs);
    text-align: center;
  }

  .photo-gallery-grid,
  .video-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .photo-wrapper,
  .video-thumbnail {
    height: 200px;
  }

  .modal-image {
    max-width: 95%;
    max-height: 80vh;
  }

  #videoPlayer {
    aspect-ratio: 16 / 9;
  }

  .close-modal {
    right: 10px;
    top: 10px;
  }
}

@media (max-width: 480px) {
  .photo-gallery-grid,
  .video-gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-header h2 {
    font-size: var(--font-base);
  }

  .filter-buttons {
    flex-direction: column;
    width: 100%;
  }

  .filter-btn {
    width: 100%;
  }

  .photo-wrapper,
  .video-thumbnail {
    height: 180px;
  }

  .play-icon {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }

  .modal-content {
    max-width: 100%;
  }

  .modal-image {
    max-width: 100%;
  }
}

/* Section Header */
.section-header {
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.section-header h2 {
  color: var(--primary-blue);
  font-size: 1.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.section-header h2 i {
  color: var(--secondary-blue);
}

/* Video Section */
.video-section {
  border-top: 1px solid #eee;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xxl);
}

/* Video Gallery Grid */
.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.video-gallery-item {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-base);
}

.video-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.video-gallery-item a {
  display: block;
  text-decoration: none;
}

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

.video-gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-gallery-item:hover .video-gallery-thumbnail img {
  transform: scale(1.05);
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base);
}

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

.video-play-overlay i {
  font-size: 60px;
  color: white;
  opacity: 0.9;
  transition: all var(--transition-base);
}

.video-gallery-item:hover .video-play-overlay i {
  transform: scale(1.1);
  color: #ff0000;
  opacity: 1;
}

.video-gallery-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.video-gallery-info {
  padding: var(--spacing-md);
}

.video-gallery-info h4 {
  color: var(--primary-blue);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-xs) 0;
}

.video-gallery-info p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin: 0;
  line-height: 1.5;
}

/* Empty Gallery Message */
.empty-gallery-message {
  text-align: center;
  padding: var(--spacing-xxl);
  color: var(--text-secondary);
}

.empty-gallery-message i {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: var(--spacing-md);
  display: block;
}

.empty-gallery-message p {
  font-size: 1.1rem;
}

/* Video Gallery Responsive */
@media (max-width: 1024px) {
  .video-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-header h2 {
    font-size: 1.5rem;
  }

  .video-gallery-grid {
    grid-template-columns: 1fr;
  }

  .video-gallery-thumbnail {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .video-gallery-thumbnail {
    height: 200px;
  }

  .video-play-overlay i {
    font-size: 50px;
  }
}
