/*
 * Static Our Work gallery for our-work.html.
 * Presents project photos as three-column masonry cards (three-column masonry of bordered
 * photo cards) without the SDK, reusing the same tokens as the reviews grid:
 * card border #483721, 12px radius, caption #2f2f2f, metadata #6a6a6a.
 */

.ow-gallery {
  --ow-ink: #2f2f2f;
  --ow-muted: #6a6a6a;
  --ow-line: #483721;

  font-family: Inter, "Nj Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--ow-ink);
}

.ow-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --- Masonry ------------------------------------------------------------ */

/*
 * No-JS baseline: a plain flowed grid holding all 29 cards.
 * With scripting on, the script hides this and deals the cards into the real
 * columns below - column-count re-balances on every content change, which moved
 * cards that were already on screen.
 */
.ow-grid {
  column-count: 3;
  column-gap: 24px;
}

.ow-grid--pool {
  display: none;
}

.ow-cols {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.ow-col {
  flex: 1 1 0;
  min-width: 0;
}

.ow-card {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 24px;
  border: 1px solid var(--ow-line);
  border-radius: 12px;
  background-color: #fff;
  overflow: hidden;
}

/* --- Photo -------------------------------------------------------------- */

.ow-card__img {
  display: block;
  width: 100%;
  height: auto;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

/* --- Caption ------------------------------------------------------------ */

.ow-card__body {
  position: relative;
  padding: 16px 20px 34px;
}

.ow-card__caption {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ow-ink);
}

/* Collapsed by script; without JS the tail is simply visible and the toggle stays hidden. */
.ow-caption__toggle {
  margin: 0 0 0 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 800;
  color: var(--ow-ink);
  cursor: pointer;
  white-space: nowrap;
}

.ow-caption__toggle:hover,
.ow-caption__toggle:focus-visible {
  text-decoration: underline;
}

.ow-card__loc {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ow-muted);
}

.ow-card__pin {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  display: block;
}

.ow-card__share {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: #b5b5b5;
}

.ow-card__share-icon {
  width: 15px;
  height: 15px;
  display: block;
}

/* --- Load More ---------------------------------------------------------- */

.ow-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 32px;
}

/* A plain text link. Kept as a <button> because it performs an action rather
   than navigating, which is what screen readers and keyboards need to hear. */
.ow-loadmore {
  padding: 4px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ow-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 160ms ease;
}

.ow-loadmore:hover,
.ow-loadmore:focus-visible {
  color: var(--ow-ink);
}

.ow-loadmore[hidden] {
  display: none;
}

.ow-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.ow-card:focus {
  outline: 2px solid var(--ow-line);
  outline-offset: 3px;
}

/* --- Powerbar ----------------------------------------------------------- */

.ow-powerbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 4px;
  font-size: 14px;
  color: var(--ow-muted);
}

/* --- Responsive --------------------------------------------------------- */

/* Breakpoints must match colCount() in the inline script. */
@media screen and (max-width: 991px) {
  .ow-grid,
  .ow-cols {
    column-gap: 20px;
    gap: 20px;
  }

  .ow-card__body {
    padding: 14px 16px 32px;
  }
}

@media screen and (max-width: 767px) {
  .ow-grid {
    column-count: 2;
  }
}

@media screen and (max-width: 599px) {
  .ow-grid {
    column-count: 1;
  }
}
