/* bl-formats-gallery.css — homepage lo-gallery cards for Budget Lab #formats */

.bl-formats.lo-gallery {
  position: relative;
  z-index: 1;
  isolation: isolate;
  clear: both;
  margin: 0;
}

.bl-formats .lo-gallery-head {
  padding: 0 max(1.5rem, calc(50% - 640px));
  margin: 0 0 2rem;
}

.bl-formats .lo-gallery-head h2 {
  margin: 0 0 0.45rem;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  letter-spacing: -0.01em;
  color: #fff;
}

.bl-formats .lo-gallery-head p {
  margin: 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.125rem;
  line-height: 1.6;
}

.bl-formats .lo-work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 0 max(1.5rem, calc(50% - 640px));
}

.bl-formats .lo-work-card {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  aspect-ratio: 4 / 5;
  background: #06141f;
  isolation: isolate;
  border-radius: 24px;
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.bl-formats .lo-work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 56px -18px rgba(0, 0, 0, 0.6);
}

.bl-formats .lo-work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.06) contrast(1.04);
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.bl-formats .lo-work-card:hover img {
  transform: scale(1.05);
}

.bl-formats .lo-work-card::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  pointer-events: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background-color: #ff4a00;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px;
  opacity: 0;
  transform: scale(0.82);
  box-shadow: 0 10px 22px rgba(255, 74, 0, 0.4);
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.bl-formats .lo-work-card:hover::before {
  opacity: 1;
  transform: scale(1);
}

.bl-formats .lo-work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.78) 100%);
}

.bl-formats .lo-work-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.15rem 1rem 1.05rem;
  box-sizing: border-box;
}

.bl-formats .lo-work-loc {
  margin: 0 0 0.35rem;
  font-family: "Inter", Helvetica, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.bl-formats .lo-work-brand {
  margin: 0 0 0.55rem;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.bl-formats .lo-work-view {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Inter", Helvetica, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.bl-formats .lo-work-view svg {
  width: 12px;
  height: 12px;
  display: block;
}

@media (max-width: 980px) {
  .bl-formats .lo-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .bl-formats .lo-work-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .bl-formats .lo-work-card {
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bl-formats .lo-work-card,
  .bl-formats .lo-work-card img,
  .bl-formats .lo-work-card::before {
    transition: none;
  }

  .bl-formats .lo-work-card:hover {
    transform: none;
  }

  .bl-formats .lo-work-card:hover img {
    transform: none;
  }
}
