/* Base grid - full-bleed width and margins applied by JS */
/* Model filter pill - reuses the same look as the theme's Sort/Show
   toolbar pills (see template-parts/partials-general-posts-toggle.php:
   .tf-filter-control / .tf-sort-label). That partial's styling is
   inline in a theme template that never loads on this shortcode page,
   so the light + dark mode rules are duplicated here rather than
   relied on, keeping this pill visually identical wherever it appears. */
.air-filter-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 20px;
  background: #f7f7f7;
  border: 1px solid #d3d3d3;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8125em;
  color: #7f7f7f;
}
.air-filter-control .tf-sort-label {
  font-weight: 600;
  color: inherit;
}
.air-filter-control select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: transparent;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0 16px 0 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%237f7f7f' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 10px 6px;
}
.air-filter-control select:focus {
  outline: none;
}

body.dark-mode .air-filter-control {
  background: #2a2a2a;
  border-color: #555;
  color: #a0a0a0;
}
body.dark-mode .air-filter-control select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23a0a0a0' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
}
/* The <option> list itself is native UI and can't be fully re-skinned,
   but setting these keeps it from flashing white-on-white in dark mode. */
body.dark-mode .air-filter-control select option {
  background: #2a2a2a;
  color: #a0a0a0;
}

.photo-collage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0;
  list-style: none !important;
  position: relative;
  padding: 0 !important;
}

/* Keep items tight */
.photo-collage li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Square crop + hover */
.photo-collage .image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.photo-collage .image-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-collage .image-wrapper:hover {
  transform: scale(1.05);
  z-index: 2;
  box-shadow:
    0 0 20px rgba(255,255,255,0.7),
    0 4px 12px rgba(0,0,0,0.25);
}

/* Mobile: three columns */
@media (max-width: 435px) {
  .photo-collage {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Loading placeholder on each image cell until its image arrives */
.photo-collage .image-wrapper.is-loading {
  background-color: #1a1a1a;
}
.photo-collage .image-wrapper.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: air-shimmer 1.4s infinite;
}
@keyframes air-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* Below 1180px: unlock ancestor overflow and apply full-bleed */
@media (max-width: 1180px) {
  #content-wrap {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  .photo-collage {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
  }
}


@media (min-width: 1181px) {
  #content-wrap {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
  
  .photo-collage {
    width: 80vw;
    position: relative;
    left: 50%;
    margin-left: -40vw;
    margin-right: -40vw;
  }
}