/* Projects Grid Block Styles */
.acf-block-projects-grid {
  padding: 4rem 0;
  background: #f9f9f9;
}

/* Block Header */
.projects-grid-header {
  margin-bottom: 3rem;
  opacity: 0; /* Hidden initially for animation */
}

.projects-grid-subtitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  text-transform: capitalize;
  margin-bottom: 0.15rem;
  color: #000000;
}

.subtitle-bullet {
  font-size: 1.5rem;
  line-height: 1;
}

.projects-grid-title {
  font-size: 35px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 1px;
  margin: 0;
  padding: 2px 6px;
  background: #457B9D;
  color: #fff;
  display: inline-block;
}

@media (min-width: 768px) {
  .projects-grid-title {
    font-size: 26px;
  }
}

/* Filters Container */
.projects-grid-filters {
  display: flex;
  gap: 6px;
  margin: 70px 0% 24px 10%;
  align-items: center;
  flex-wrap: wrap;
  margin-left: 0px;   
  justify-content: center;
  opacity: 0; /* Hidden initially for animation */
}

/* Filter Buttons */
.projects-filter-btn {
  background: transparent;
  border: none;
  padding: 6px 2px;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  color: #000;
  transition: all 0.25s ease;
}

/* Active Button (exact look requested) */
.projects-filter-btn.active {
  background: #457B9D;
  color: #fff;
  font-weight: 400;
}

/* Projects Grid Container */
.projects-grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  opacity: 0; /* Hidden initially for animation */
}

@media (min-width: 640px) {
  .projects-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===========================
   PROJECTS GRID – CLEAN IMAGE CARDS
   =========================== */
.project-grid-item {
  position: relative;
  overflow: hidden;
}

.project-grid-item.hidden {
  display: none;
}

.project-grid-link {
  display: block;
  color: inherit;
}

/* Image Wrapper */
.project-image-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f5f5;
}

/* Image */
.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.project-grid-item:hover .project-image {
  transform: scale(1.08);
}

/* Hover Overlay (same as Our Team) */
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(168, 218, 220, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.project-grid-item:hover .project-overlay {
  opacity: 1;
  visibility: visible;
}

/* Hover inner */
.project-overlay-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 80%;
  align-items: center;
  justify-content: center;
}

/* Location (white title) */
.project-location {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  text-transform: capitalize;
  margin: 0;
}


.project-hover-location {
  display: flex;
  gap:  6px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  text-transform: capitalize;
  font-weight: 300;

  /* add comma between categories */
}

.project-hover-location > span:not(:last-child)::after {
  content: ',';
}

/* Placeholder */
.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d0d0d0;
  color: #666;
  font-weight: 600;
}

/* Remove bottom content entirely */
.project-grid-content {
  display: none !important;
}

/* Empty State */
.projects-grid-empty {
  text-align: center;
  padding: 4rem 0;
  color: #999;
}

.projects-grid-empty p {
  font-size: 1.125rem;
}

/* Fade Animation for Filtering */
.project-grid-item.fade-out {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-grid-item.fade-in {
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Entrance Animations */
.acf-block-projects-grid.is-visible .projects-grid-header {
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.acf-block-projects-grid.is-visible .projects-grid-filters {
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.acf-block-projects-grid.is-visible .projects-grid-container {
    animation: fadeInUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

/* Disable animations in backend editor */
.acf-block-projects-grid.no-animation .projects-grid-header,
.acf-block-projects-grid.no-animation .projects-grid-filters,
.acf-block-projects-grid.no-animation .projects-grid-container {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    animation-delay: 0s !important;
    transition: none !important;
}