/* Single project page. Scoped to avoid changes to other theme views and related projects. */
.at-pf-single {
  --at-ink: #1b1d1e;
  --at-muted: #6c6e70;
  --at-accent: #bd7c3a;
  max-width: 1200px;
  margin: 0 auto;
}
.at-pf-single .at-pf-gallery {
  max-width: 1100px;
  margin: 0 auto 64px;
}
.at-pf-single .at-pf-gallery-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f0ec;
  border-radius: 6px;
}
.at-pf-single .at-pf-gallery-slide {
  width: 100%;
  height: 100%;
}
.at-pf-single .at-pf-gallery-slide[hidden] { display: none !important; }
.at-pf-single .at-pf-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.at-pf-single .at-pf-gallery-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: var(--at-ink);
  box-shadow: 0 4px 18px rgba(0,0,0,.13);
  cursor: pointer;
}
.at-pf-single .at-pf-gallery-arrow:hover,
.at-pf-single .at-pf-gallery-arrow:focus-visible {
  background: var(--at-accent);
  color: white;
}
.at-pf-single .at-pf-gallery-prev { left: 20px; }
.at-pf-single .at-pf-gallery-next { right: 20px; }
.at-pf-single .at-pf-gallery-count {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  right: 18px;
  min-width: 66px;
  padding: 7px 11px;
  text-align: center;
  border-radius: 5px;
  background: rgba(20,22,23,.78);
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.at-pf-single .at-pf-gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 1px 4px;
  scrollbar-width: thin;
}
.at-pf-single .at-pf-gallery-thumb {
  flex: 0 0 110px;
  height: 78px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: #f3f0ec;
  cursor: pointer;
  opacity: .7;
}
.at-pf-single .at-pf-gallery-thumb.is-active,
.at-pf-single .at-pf-gallery-thumb:hover,
.at-pf-single .at-pf-gallery-thumb:focus-visible {
  border-color: var(--at-accent);
  opacity: 1;
}
.at-pf-single .at-pf-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.at-pf-single .at-pf-story {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 8px;
}
.at-pf-single .at-pf-eyebrow {
  margin: 0 0 12px;
  color: var(--at-accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.at-pf-single .at-pf-story-text {
  color: var(--at-muted);
  font-size: 17px;
  line-height: 1.8;
}
.at-pf-single .at-pf-story-text p:last-child { margin-bottom: 0; }
.at-pf-single .at-pf-contact {
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  margin: 0 calc(50% - 50vw) 64px;
  padding: clamp(36px, 5vw, 72px) clamp(20px, 4vw, 48px);
  background: #f7f5f2;
  border-radius: 0;
}
.at-pf-single .at-pf-contact-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
.at-pf-single .at-pf-contact-inner > div { min-width: 0; }
.at-pf-single .at-pf-contact-info,
.at-pf-single .at-pf-contact-form { width: 100%; }
.at-pf-single .at-pf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto 48px;
  padding: 24px 0;
  border-top: 1px solid #e8e3dd;
}
.at-pf-single .at-pf-footer .tm-nextprev-bottom-nav { margin: 0; }
@media (max-width: 767px) {
  .at-pf-single .at-pf-gallery { margin-bottom: 36px; }
  .at-pf-single .at-pf-gallery-stage { aspect-ratio: 4 / 5; }
  .at-pf-single .at-pf-gallery-thumbs { display: none; }
  .at-pf-single .at-pf-gallery-arrow { width: 42px; height: 42px; }
  .at-pf-single .at-pf-gallery-prev { left: 10px; }
  .at-pf-single .at-pf-gallery-next { right: 10px; }
  .at-pf-single .at-pf-gallery-count { bottom: 12px; right: 12px; }
  .at-pf-single .at-pf-story {
    margin-bottom: 48px;
    padding: 0 4px;
  }
  .at-pf-single .at-pf-story-text { font-size: 16px; }
  .at-pf-single .at-pf-contact {
    margin-bottom: 44px;
    padding: 32px 22px;
  }
  .at-pf-single .at-pf-contact-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .at-pf-single .at-pf-footer { margin-bottom: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .at-pf-single .at-pf-gallery-arrow,
  .at-pf-single .at-pf-gallery-thumb { transition: none; }
}

/* Each project section occupies its own row. */
.at-pf-single .at-pf-overview-row,
.at-pf-single .at-pf-photos-row {
  display: block;
  clear: both;
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.at-pf-single .at-pf-overview-row { margin-bottom: 50px; }
.at-pf-single .at-pf-photos-row { margin-bottom: 64px; }
.at-pf-single .at-pf-primary-gallery .at-pf-gallery {
  max-width: none;
  margin: 0;
}
.at-pf-single .at-pf-primary-gallery .at-pf-gallery-stage { aspect-ratio: 4 / 3; }
.at-pf-single .at-pf-lightbox-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.at-pf-single .at-pf-breadcrumbs {
  margin: 0 0 28px;
  color: var(--at-muted);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.at-pf-single .at-pf-breadcrumbs a { color: inherit; }
.at-pf-single .at-pf-breadcrumbs a:hover { color: var(--at-accent); }
.at-pf-single .at-pf-title {
  color: var(--at-ink);
  margin: 0 0 36px;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.17;
  overflow-wrap: break-word;
}
.at-pf-single .at-pf-primary-content .at-pf-story {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}
.at-pf-single .at-pf-primary-content .at-pf-story-text {
  font-size: 16px;
  line-height: 1.75;
}
.at-pf-single .at-pf-contact-info h2 {
  color: var(--at-ink);
  font-size: clamp(25px, 2.5vw, 34px);
  line-height: 1.2;
  margin: 0 0 20px;
}
.at-pf-single .at-pf-contact-info p { line-height: 1.7; }
.at-pf-single .at-pf-contact-info .at-pf-contact-link {
  display: block;
  color: var(--at-ink);
  font-weight: 650;
  font-size: 17px;
  margin-top: 14px;
  overflow-wrap: anywhere;
}
.at-pf-single .at-pf-contact-info .at-pf-contact-link:hover { color: var(--at-accent); }
@media (max-width: 900px) {
  .at-pf-single .at-pf-overview-row { margin-bottom: 28px; }
  .at-pf-single .at-pf-photos-row { margin-bottom: 48px; }
  .at-pf-single .at-pf-breadcrumbs { margin-bottom: 16px; }
  .at-pf-single .at-pf-title { font-size: clamp(28px, 8vw, 36px); margin-bottom: 26px; }
}

@media (max-width: 767px) {
  .at-pf-single .at-pf-primary-gallery .at-pf-gallery-stage { aspect-ratio: 4 / 5; }
}

/* Clip only the fractional scrollbar overflow caused by a viewport-wide band. */
body.single-tm_portfolio .site-content-wrapper { overflow-x: clip; }

/* Related work: crop old and new uploads to the configured card ratio. */
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-box-portfolio .tm-featured-wrapper.tm-tm_portfolio-featured-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: var(--at-related-ratio, 4 / 3);
  overflow: hidden;
}
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-box-portfolio .tm-featured-wrapper.tm-tm_portfolio-featured-wrapper > a {
  display: block;
  width: 100%;
  height: 100%;
}
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-box-portfolio .tm-featured-wrapper.tm-tm_portfolio-featured-wrapper img.wp-post-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Related project cards: keep the title legible before and after hover. */
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-portfoliobox-style1 .tm-featured-wrapper:before {
  opacity: 1;
  background-image: linear-gradient(to top, rgba(17, 19, 20, .88) 0%, rgba(17, 19, 20, .48) 32%, transparent 68%);
  pointer-events: none;
}
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-portfoliobox-style1 .themetechmount-box-overlay {
  z-index: 2;
  width: 100%;
  padding: 28px;
  opacity: 1;
}
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-portfoliobox-style1 .themetechmount-box-title h4,
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-portfoliobox-style1:hover .themetechmount-box-title h4 {
  margin: 0;
  transform: none;
}
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-portfoliobox-style1 .themetechmount-box-category {
  display: none;
}
.at-pf-single .tm-pf-single-related-wrapper .themetechmount-portfoliobox-style1 .tm-post-iconbox {
  z-index: 3;
}
@media (max-width: 767px) {
  .at-pf-single .tm-pf-single-related-wrapper .themetechmount-portfoliobox-style1 .themetechmount-box-overlay {
    padding: 20px;
  }
}

/* Wide project introduction followed by a photo-only horizontal carousel. */
@media (min-width: 901px) {
  .at-pf-single .at-pf-title { margin-bottom: 28px; }
  .at-pf-single .at-pf-primary-gallery .at-pf-gallery { display: none; }
}
.at-pf-single .at-pf-gallery-desktop {
  --at-strip-gutter: max(24px, calc((100vw - 1100px) / 2));
  box-sizing: border-box;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.at-pf-single .at-pf-gallery-desktop-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 1100px;
  margin: 24px auto 0;
}
.at-pf-single .at-pf-gallery-desktop-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d8dce0;
  border-radius: 50%;
  background: #fff;
  color: var(--at-ink);
  cursor: pointer;
}
.at-pf-single .at-pf-gallery-desktop-controls button:hover,
.at-pf-single .at-pf-gallery-desktop-controls button:focus-visible {
  border-color: var(--at-accent);
  color: var(--at-accent);
}
.at-pf-single .at-pf-gallery-desktop-controls button:disabled {
  opacity: .4;
  cursor: default;
}
.at-pf-single .at-pf-gallery-desktop-track {
  display: flex;
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: var(--at-strip-gutter);
  padding: 0 var(--at-strip-gutter);
  clip-path: inset(0 0 0 var(--at-strip-gutter));
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
}
.at-pf-single .at-pf-gallery-desktop-track.is-dragging {
  scroll-snap-type: none;
  cursor: grabbing;
  user-select: none;
}
.at-pf-single .at-pf-gallery-desktop-track::-webkit-scrollbar { display: none; }
.at-pf-single .at-pf-gallery-card {
  display: block;
  position: relative;
  flex: 0 0 clamp(230px, 19vw, 310px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f3f0ec;
  scroll-snap-align: start;
  cursor: zoom-in;
}
.at-pf-single .at-pf-gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .25s ease;
  -webkit-user-drag: none;
}
.at-pf-single .at-pf-gallery-card:hover img { transform: scale(1.035); }
.at-pf-single .at-pf-gallery-card:focus-visible { outline: 3px solid var(--at-accent); outline-offset: 3px; }
@media (max-width: 900px) {
  .at-pf-single .at-pf-gallery-desktop { display: none; }
  .at-pf-single .at-pf-primary-gallery .at-pf-gallery { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .at-pf-single .at-pf-gallery-card img { transition: none; }
}
