.portfolio-detail .container {
  max-width: 1400px;
}



.pf-detail-header-wrap {
  background: #f3f4f6;
  background-image: url("/static/home/assets/img/portfolio/1.jpg");
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid #e5e7eb;
}

.pf-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 4.2rem 0;
}

.pf-detail-header__left {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.pf-detail-rule {
  width: 96px;
  height: 2px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.28);
  margin-bottom: 0.4rem;
}

.pf-breadcrumb {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: rgba(107, 114, 128, 0.75);
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
  white-space: normal;
  max-width: 100%;
}

.pf-breadcrumb .crumb-link {
  color: inherit;
  text-decoration: none;
}

.pf-breadcrumb .crumb-link:hover {
  color: #111827;
  text-decoration: none;
}

.pf-meta {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(107, 114, 128, 0.85);
  margin-bottom: 0.45rem;
}

.portfolio-detail .pf-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  margin: 0;
  color: #111827;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.pf-subtitle {
  margin: 0.5rem auto 0;
  max-width: 720px;
  color: rgba(15, 23, 42, 0.85);
  font-weight: 600;
}

.pf-gallery {
  margin: 4rem auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  outline: none;
}

/* Detail page: add spacing below banner before content */

.pf-gallery-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f5f6f8;
  aspect-ratio: 16 / 9;
  box-shadow: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  height: min(var(--pf-media-height), 70vh);
  margin: 0 auto;
}

.pf-main-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(0);
  z-index: 1;
}

.pf-main-track.is-dragging {
  transition: none;
  cursor: grabbing;
}

.pf-main-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 18px;
  overflow: hidden;
}

.pf-media-frame {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  background: #0b0f16;
  overflow: hidden;
}

.pf-gallery--single .pf-media-frame {
  aspect-ratio: 1 / 1.05;
}

.pf-gallery--double .pf-media-frame {
  aspect-ratio: 16 / 9;
}
.pf-main-slide--video {
  position: relative;
  background: #fff;
}

.pf-gallery--single .pf-gallery-main,
.pf-gallery--single .pf-main-slide {
  aspect-ratio: 1 / 1.05 !important;
}

.portfolio-detail {
  --pf-media-height: clamp(273px, 57.2vh, 624px);
}

.portfolio-detail .pf-gallery--single {
  --pf-media-height: clamp(299px, 62.4vh, 676px);
}

.pf-gallery--single .pf-gallery-main {
  height: min(var(--pf-media-height), 70vh);
}

.pf-gallery--double .pf-gallery-main,
.pf-gallery--double .pf-main-slide {
  aspect-ratio: 16 / 9 !important;
}

.pf-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #0b0f16;
}

.pf-gallery--single .pf-main-img {
  object-fit: cover;
}

.pf-main-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pf-gallery--single .pf-main-video {
  object-fit: contain;
  background: #0b0f16;
}

@supports not (aspect-ratio: 16 / 9) {
  .pf-media-frame {
    height: auto;
  }

  .pf-media-frame::before {
    content: "";
    display: block;
    padding-top: 56.25%;
  }

  .pf-gallery--single .pf-media-frame::before {
    padding-top: 105%;
  }

  .pf-media-frame > .pf-main-img,
  .pf-media-frame > .pf-main-video {
    position: absolute;
    inset: 0;
  }
}

.pf-main-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-weight: 600;
}

.pf-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid #E5E7EB;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 1.6rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  z-index: 2;
}

.pf-nav:hover {
  background: #111827;
  color: #fff;
}

.pf-nav:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.35);
  outline-offset: 3px;
}

.pf-prev {
  left: 14px;
}

.pf-next {
  right: 14px;
}

.pf-thumbs {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
  justify-content: center;
}

.pf-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 64px;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  overflow: hidden;
  background: #f3f4f6;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 16 / 9;
}

.pf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pf-thumb-label {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #111827;
  background: #e5e7eb;
  letter-spacing: 0.08em;
}

.pf-thumb.is-active {
  border-color: #111827;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.4);
}

.pf-thumbs::-webkit-scrollbar {
  height: 6px;
}

.pf-thumbs::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}

.pf-back-btn {
  border-radius: 999px;
  font-weight: 700;
  background: #111827;
  color: #fff;
  border-color: #111827;
  padding: 0.55rem 1.6rem;
}

.pf-back-btn:hover {
  background: #0b1220;
  color: #fff;
  border-color: #0b1220;
}

.pf-gallery:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.25);
  outline-offset: 4px;
  border-radius: 12px;
}

@media (max-width: 767px) {
  .pf-detail-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 2.4rem 0;
  }

  .pf-breadcrumb {
    justify-content: center;
    margin-left: 0;
  }

  .pf-title {
    font-size: 1.75rem;
  }

  .pf-gallery-main {
    aspect-ratio: 16 / 10; 
    height: min(var(--pf-media-height), 70vh); 
  }

  .pf-gallery--single .pf-gallery-main {
    aspect-ratio: 1 / 1.05 !important;
    height: auto;
  }

  .pf-gallery--double .pf-gallery-main {
    aspect-ratio: 16 / 9 !important;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-nav {
    transition: none;
  }

  .pf-main-track {
    transition: none;
  }
}


.pf-hero{
  margin: 18px 0 24px;
}

.pf-hero-media{
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #111; /* 로딩/포스터 배경 */
  aspect-ratio: 16 / 9; /* 필요하면 4/3로 변경 가능 */
}

.pf-hero-video{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pf-hero-image{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pf-hero--single .pf-hero-media{
  aspect-ratio: 1 / 1.05;
}

.pf-hero--single .pf-hero-video{
  object-fit: cover;
}

/* override single booth video background/crop */
.pf-hero-media{
  background: #fff;
  height: min(var(--pf-media-height), 70vh);
}

.pf-hero--single .pf-hero-video{
  object-fit: contain;
}

.pf-hero--single .pf-hero-image{
  object-fit: contain;
}
