/* ================= PAGE ================= */
.gallery-container {
  max-width: 1200px;
  margin: 10px auto;
  padding: 40px 20px;
  text-align: center;
}

.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 8px;
}

.gallery-subtitle {
  color: #777;
  margin-bottom: 30px;
}

/* ================= FILTER TABS ================= */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 35px;
}

.gallery-tabs button {
  padding: 10px 28px;
  border-radius: 30px;
  border: 2px solid #ddd;
  background: white;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
}

.gallery-tabs button.active {
  background: linear-gradient(135deg, orange, #ff8800);
  color: white;
  border: none;
  box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

.gallery-tabs button:hover {
  border-color: orange;
  color: orange;
}

/* ================= GALLERY GRID ================= */
#galleryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 25px;
  justify-content: center;
}

.gallery-container .row > [class*="col-"] {
  display: flex;
}

.gallery-item,
.video-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  animation: fadeIn 0.4s ease;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s ease;
  display: block;
}

.video-item video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.gallery-container .gallery-item:hover img {
  transform: none;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  font-size: 25px;
  opacity: 0;
  transition: 0.3s;
}

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

.video-gallery {
  padding-bottom: 70px;
}

/* ================= LIGHTBOX ================= */
#lightbox {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
}

/* ================= ANIMATION ================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 991px) {
  .gallery-container {
    width: 94%;
    padding: 35px 0;
  }

  .gallery-tabs {
    flex-wrap: wrap;
    gap: 10px;
  }

  .video-item video {
    height: 240px;
  }

  .gallery-item {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 768px) {
  .gallery-container {
    width: 92%;
    padding: 30px 0;
  }

  .gallery-title {
    font-size: 28px;
  }

  #galleryGrid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .video-item video {
    height: 260px;
  }

  .gallery-item {
    aspect-ratio: 4 / 3;
  }

  #lightbox img {
    max-width: 92%;
    max-height: 78%;
  }
}

@media (max-width: 480px) {
  .gallery-container {
    width: 94%;
    padding: 24px 0;
  }

  .gallery-title {
    font-size: 24px;
  }

  .gallery-subtitle {
    margin-bottom: 20px;
  }

  .gallery-tabs button {
    width: 100%;
    max-width: 220px;
    padding: 9px 18px;
  }

  .video-item video {
    height: 220px;
  }

  .gallery-item {
    aspect-ratio: 1 / 1;
  }

  .gallery-overlay {
    font-size: 22px;
  }

  .video-gallery {
    padding-bottom: 45px;
  }
}

/* ================= CONSISTENCY PASS ================= */
.gallery-title {
  color: #111827;
  font-weight: 800;
  line-height: 1.15;
}

.gallery-subtitle {
  color: #5f6675;
  line-height: 1.65;
}

.gallery-tabs {
  gap: 10px;
}

.gallery-tabs button {
  border-radius: 999px;
  font-weight: 700;
}

.gallery-item,
.video-item {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

@media (max-width: 480px) {
  .gallery-title {
    font-size: 28px;
  }
}
