/* =========================================================
   PHOTOGRAPHY GALLERY — FULLY SCOPED
   ========================================================= */

.ai-gallery {
  position: relative;
}

/* FILTERS */
.ai-gallery .gallery-filters {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.ai-gallery .filter-btn {
  padding: 8px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: color-mix(in srgb, var(--accent-color), transparent 90%);
  color: var(--accent-color);
  border: none;
}

.ai-gallery .filter-btn:hover {
  background-color: color-mix(in srgb, var(--accent-color), transparent 80%);
}

.ai-gallery .filter-btn.active {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

/* GRID */
.ai-gallery .gallery-item {
  padding: 0px;
}

/* CARD */
.ai-gallery .project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* Skeleton */
.ai-gallery .project-card.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    #1a1a1a 30%,
    #2a2a2a 50%,
    #1a1a1a 70%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.2s infinite;
  z-index: 2;
}

@keyframes skeleton-loading {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Images */
.ai-gallery .project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.6s ease;
}

/* Blur-up */
.ai-gallery .project-cover {
  filter: blur(18px);
  transform: scale(1.05);
}

.ai-gallery .project-card.is-loaded .project-cover {
  filter: blur(0);
  transform: scale(1);
}

/* Hover image scale */
.ai-gallery .project-card:hover .project-cover {
  transform: scale(1.05);
}

/* OVERLAY */
.ai-gallery .project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0) 60%
  );
  opacity: 1;
  pointer-events: none;
}

/* TEXT */
.ai-gallery .project-title {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.15;
  transform: translateY(28px);
  transition: transform 0.4s ease;
}

.ai-gallery .project-categories {
  color: #ccc;
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.15;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* HOVER */
.ai-gallery .project-card:hover .project-title {
  transform: translateY(0);
}

.ai-gallery .project-card:hover .project-categories {
  opacity: 1;
  transform: translateY(0);
}

/* MOBILE */
@media (max-width: 768px) {
  .ai-gallery .project-title,
  .ai-gallery .project-categories {
    transform: none;
    opacity: 1;
  }
}

/* FILTER SPACING */
@media (max-width: 768px) {
  .ai-gallery .gallery-filters {
    gap: 12px 16px;
    margin-bottom: 24px;
  }
}

/* ✅ LCP STABILITY */
.ai-page .section-title h2 {
  min-height: 48px;
  will-change: opacity, transform;
}