/* Filterable Portfolio (content-filter-portfolio.php, assets/js/filter-portfolio.js). */

.filter-portfolio-head {
  margin-bottom: 30px;
}

/* =====  Filter buttons  ======== */

.pf-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d3cbbf;
}
.pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pf-chip {
  padding: 11px 18px 10px;
  font-family: "Katahdin Round", "Inter", system-ui, sans-serif;
  font-size: 12px;
  line-height: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #100f0e;
  background-color: transparent;
  border: 1px solid #d3cbbf;
  border-radius: 40px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.pf-chip:hover {
  border-color: #100f0e;
}
.pf-chip.is-on {
  color: #f2eee6;
  background-color: #100f0e;
  border-color: #100f0e;
}

/* Video groups */
.pf-chips-sub {
  margin-top: 16px;
}
.pf-chip.pf-chip-small {
  padding: 8px 13px 7px;
  font-size: 11px;
  letter-spacing: 0.12em;
}
.pf-chip.pf-chip-small.is-on {
  color: #ffffff;
  background-color: #b45f06;
  border-color: #b45f06;
}

.pf-count {
  font-size: 13.5px;
  white-space: nowrap;
  color: #796e65;
}

/* "Showing work for ..." */
.pf-client {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 8px 10px 8px 16px;
  font-size: 14px;
  background-color: #ffffff;
  border: 1px solid #d3cbbf;
  border-radius: 40px;
}
.pf-client[hidden] {
  display: none;
}
.pf-client button {
  padding: 6px 12px;
  font-size: 12.5px;
  background-color: #e9e3d7;
  border: 0;
  border-radius: 30px;
  cursor: pointer;
}


/* =====  Grid  ======== */

.pf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 18px;
  margin-top: 30px;
}

.pf-item {
  display: block;
  min-width: 0;
  padding: 0;
  text-align: left;
  color: #100f0e;
  background: none;
  border: 0;
  cursor: pointer;
}
.pf-item:focus-visible {
  outline: 2px solid #cf6f09;
  outline-offset: 4px;
}

.pf-photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background-color: #1d1c1a;
}
.pf-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pf-item:hover .pf-photo img {
  transform: scale(1.05);
}

/* Websites and devices: the whole image on black */
.pf-item-contain .pf-photo {
  background-color: #000000;
}
.pf-item-contain .pf-photo img {
  object-fit: contain;
  padding: 8px;
}

/* Play button on videos */
.pf-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background-color: rgba(16, 15, 14, 0.6);
  border: 1px solid rgba(242, 238, 230, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.pf-play:after {
  content: "";
  position: absolute;
  left: 22px;
  top: 17px;
  border-left: 15px solid #f2eee6;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* Small label in the corner: 9:16 or "4 photos" */
.pf-ratio {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 7px 3px;
  font-family: "Katahdin Round", "Inter", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #f2eee6;
  background-color: rgba(16, 15, 14, 0.7);
  border-radius: 2px;
}

.pf-caption {
  display: block;
  margin-top: 12px;
}
.pf-kind {
  display: block;
  font-family: "Katahdin Round", "Inter", system-ui, sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b45f06;
}
.pf-caption b {
  display: block;
  margin-top: 5px;
  font-family: "Charpentier", "Garamond Fill", Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
}
.pf-title {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  color: #46413b;
}

.pf-more {
  margin-top: 44px;
  text-align: center;
}


/* =====  Viewer (lightbox)  ======== */

.pf-lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3000;
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  align-items: center;
  color: #f2eee6;
  background-color: rgba(10, 10, 9, 0.95);
}
.pf-lightbox[hidden] {
  display: none;
}
.pf-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 26px;
  color: #f2eee6;
  background: none;
  border: 0;
  cursor: pointer;
}
.pf-lightbox-nav {
  height: 100%;
  font-size: 54px;
  color: #f2eee6;
  background: none;
  border: 0;
  opacity: 0.7;
  cursor: pointer;
}
.pf-lightbox-nav:hover {
  opacity: 1;
}
.pf-lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-height: 92vh;
  margin: 0;
}

/* Photos: as large as the screen allows, never cropped */
.pf-lightbox-media img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

/* Videos: 16:9, or 9:16 for vertical ones */
.pf-video {
  position: relative;
  width: 80vw;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  background-color: #000000;
}
.pf-video.pf-video-vertical {
  width: auto;
  max-width: none;
  height: 72vh;
  aspect-ratio: 9 / 16;
}
.pf-video iframe,
.pf-video video,
.pf-video img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.pf-video-waiting span {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 12px 18px;
  font-size: 14px;
  white-space: nowrap;
  background-color: rgba(16, 15, 14, 0.82);
  border: 1px solid rgba(242, 238, 230, 0.25);
  transform: translate(-50%, -50%);
}

/* Album thumbnails */
.pf-lightbox-album {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.pf-lightbox-album button {
  width: 64px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  background: none;
  border: 2px solid transparent;
  opacity: 0.6;
  cursor: pointer;
}
.pf-lightbox-album button.is-on {
  border-color: #e3893a;
  opacity: 1;
}
.pf-lightbox-album img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-lightbox figcaption {
  text-align: center;
}
.pf-lightbox .pf-kind {
  font-size: 11px;
  color: #e3893a;
}
.pf-lightbox figcaption b {
  display: block;
  margin-top: 4px;
  font-family: "Charpentier", "Garamond Fill", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
}
.pf-lightbox-text {
  display: block;
  margin: 2px 0 10px;
  font-size: 14.5px;
  color: rgba(242, 238, 230, 0.75);
}
.pf-lightbox .text-link.text-link-orange {
  color: #e3893a;
}


/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
  .pf-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
  .pf-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 0;
    border-bottom: 0;
  }
  /* Filter buttons become one row you can swipe */
  .pf-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -22px;
    padding: 0 22px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pf-chips::-webkit-scrollbar {
    display: none;
  }
  .pf-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 12px;
  }
  .pf-caption b {
    font-size: 17px;
  }
  .pf-title {
    font-size: 12.5px;
  }
  .pf-play {
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
  }
  .pf-play:after {
    left: 17px;
    top: 12px;
    border-left-width: 12px;
    border-top-width: 9px;
    border-bottom-width: 9px;
  }
  .pf-lightbox {
    grid-template-columns: 1fr;
    padding: 56px 12px 20px;
  }
  .pf-lightbox-nav {
    position: absolute;
    bottom: 14px;
    height: auto;
    font-size: 40px;
  }
  .pf-lightbox-prev {
    left: 16px;
  }
  .pf-lightbox-next {
    right: 16px;
  }
  .pf-video {
    width: 100%;
  }
  .pf-video.pf-video-vertical {
    height: 66vh;
  }
}
