/* 作品案例詳情 — 高質感編排 */
.page-portfolio-detail .pfd-section {
    display: block !important;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.page-portfolio-detail .pfd-section.pfd-hero {
    overflow: hidden;
}
.page-portfolio-detail .pfd-inner {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

/* --- Hero：與作品列表頁相同全幅底圖 + 遮罩（不重複作品首圖） --- */
.page-portfolio-detail .pfd-hero {
    position: relative;
    isolation: isolate;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
    min-height: min(62vh, 640px);
    padding: clamp(92px, 14vw, 128px) 5% clamp(64px, 9vw, 96px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.pfd-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.pfd-hero__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.01);
}

/* 與 page-portfolio.css .pf-hero::after 一致調性 */
.page-portfolio-detail .pfd-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        120deg,
        rgba(10, 10, 14, 0.78) 0%,
        rgba(18, 12, 22, 0.66) 46%,
        rgba(10, 10, 14, 0.52) 100%
    );
}

.pfd-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(960px, 92vw);
    margin: 0 auto;
    text-align: center;
}

.pfd-hero__eyebrow {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.48);
    margin: 0 0 0.65rem;
    line-height: 1.35;
    text-align: center;
}

.pfd-hero__eyebrow [lang='zh-Hant'] {
    font-family: 'Noto Serif TC', serif;
    font-style: normal;
    font-size: 0.82em;
    letter-spacing: 0.35em;
    text-transform: none;
    color: rgba(212, 175, 55, 0.38);
}

.pfd-hero__eyebrow-sep {
    color: rgba(212, 175, 55, 0.28);
    font-style: normal;
    letter-spacing: 0.05em;
}

.pfd-breadcrumb {
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    margin-bottom: 1.1rem;
    text-transform: uppercase;
    opacity: 0.9;
    text-align: center;
}
.pfd-breadcrumb a {
    color: rgba(212, 175, 55, 0.62);
    text-decoration: none;
    transition: color 0.3s ease;
}
.pfd-breadcrumb a:hover {
    color: var(--gold-light);
}
.pfd-breadcrumb span {
    color: rgba(180, 180, 185, 0.7);
    margin: 0 0.5em;
}

.pfd-hero__title {
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(1.65rem, 3.4vw, 2.45rem);
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.36;
    margin: 0 auto 0.6rem;
    max-width: min(40em, 100%);
    font-feature-settings: 'kern' 1;
    color: #f0e6d4;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55),
        0 3px 14px rgba(0, 0, 0, 0.45),
        0 0 36px rgba(212, 175, 55, 0.18);
}

@supports (background-clip: text) and (-webkit-background-clip: text) {
    .pfd-hero__title {
        background: linear-gradient(118deg, #fff9f0 0%, var(--gold-light) 45%, #c9a227 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        /* 漸層字無法用 text-shadow，改用 drop-shadow 做立體感 */
        text-shadow: none;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55)) drop-shadow(0 4px 18px rgba(0, 0, 0, 0.4))
            drop-shadow(0 0 24px rgba(212, 175, 55, 0.15));
    }
}

.pfd-hero__meta {
    font-size: 0.9rem;
    color: var(--text-sub);
    letter-spacing: 0.05em;
    line-height: 1.7;
    margin: 0 auto 1.125rem;
    max-width: min(42em, 100%);
    text-align: center;
}

.pfd-hero__intro {
    font-size: 1.02rem;
    font-weight: 300;
    color: rgba(235, 235, 240, 0.9);
    line-height: 1.75;
    letter-spacing: 0.03em;
    max-width: min(40em, 100%);
    margin: 0 auto;
    padding: 1.35rem 0 0;
    border-top: 1px solid rgba(212, 175, 55, 0.22);
    position: relative;
    text-align: center;
}

.pfd-hero__intro::before {
    content: '“';
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    line-height: 0;
    color: rgba(212, 175, 55, 0.22);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 1rem;
    pointer-events: none;
}

@media (max-width: 900px) {
    .page-portfolio-detail .pfd-hero {
        min-height: min(56vh, 520px);
        /* 固定導覽下，眉題勿貼頂 */
        padding-top: clamp(72px, 18vw, 96px);
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
    .pfd-hero__inner {
        max-width: min(960px, 94vw) !important;
    }
    .pfd-hero__eyebrow {
        letter-spacing: 0.2em;
        font-size: 0.88rem;
    }
    .pfd-hero__intro {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
        box-sizing: border-box;
    }
}

/* --- 輪播 --- */
.pfd-gallery {
    padding: 56px 0 56px !important;
    background: var(--bg-dark);
}
.pfd-gallery__frame {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 5%;
}
.pfd-swiper-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(212, 175, 55, 0.06) inset;
}
.pfd-swiper {
    width: 100%;
    height: auto;
    --swiper-theme-color: var(--gold);
    --swiper-navigation-size: 22px;
}
/* 覆寫 Swiper 預設的 slide height:100%，否則無法依圖片比例撐開 */
.pfd-swiper .swiper-wrapper {
    align-items: flex-start;
}
.pfd-swiper .swiper-slide {
    background: #0c0c10;
    height: auto !important;
    box-sizing: border-box;
    aspect-ratio: 2000 / 1334;
    overflow: hidden;
}
.pfd-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: block;
    vertical-align: middle;
    object-fit: cover;
    object-position: center;
}
.pfd-swiper .swiper-button-next,
.pfd-swiper .swiper-button-prev {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 10, 14, 0.65);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--gold-light);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s ease, border-color 0.3s ease;
}
.pfd-swiper .swiper-button-next:hover,
.pfd-swiper .swiper-button-prev:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.55);
}
.pfd-swiper .swiper-button-next::after,
.pfd-swiper .swiper-button-prev::after {
    font-size: 16px;
    font-weight: 700;
}
.pfd-swiper .swiper-pagination-bullet {
    width: 9px;
    height: 9px;
    background: rgba(255, 255, 255, 0.35);
    opacity: 1;
}
.pfd-swiper .swiper-pagination-bullet-active {
    background: var(--gold);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.55);
}

/* --- 內文 --- */
.pfd-story {
    padding: 72px 5% 88px !important;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-lighter) 55%, var(--bg-dark) 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.06);
}
.pfd-story__inner {
    max-width: 720px;
    margin: 0 auto;
}
.pfd-story__label {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.88rem;
    letter-spacing: 6px;
    color: rgba(212, 175, 55, 0.45);
    margin-bottom: 28px;
    text-align: center;
}
.pfd-story__text {
    font-size: 1.05rem;
    color: rgba(235, 235, 240, 0.92);
    line-height: 2.05;
    letter-spacing: 0.35px;
    margin-bottom: 1.65em;
}
.pfd-story__text:last-child {
    margin-bottom: 0;
}

/* --- 亮點 --- */
.pfd-highlights {
    padding: 0 5% 88px !important;
    background: var(--bg-dark);
}
.pfd-highlights__inner {
    max-width: 960px;
    margin: 0 auto;
}
.pfd-highlights__title {
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--gold);
    text-align: center;
    margin-bottom: 36px;
}
.pfd-highlights__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.pfd-highlight {
    padding: 26px 22px;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: linear-gradient(155deg, rgba(22, 18, 26, 0.9) 0%, rgba(10, 10, 14, 0.95) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.pfd-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold) 0%, rgba(212, 175, 55, 0.2) 100%);
    opacity: 0.85;
}
.pfd-highlight p {
    font-size: 0.92rem;
    color: var(--text-sub);
    line-height: 1.75;
    letter-spacing: 0.4px;
    margin: 0;
    padding: 0 14px;
    text-align: center;
}

/* --- 上一則／下一則 --- */
/* 底圖：Unsplash 抽象流體質感（與其他頁相同：CSS 同層 images/） */
.pfd-nav {
    position: relative;
    isolation: isolate;
    padding: 52px 5% 68px !important;
    /* 不加 border-top，避免與底圖頂緣疊成彩色細線 */
    border-top: none;
    background-color: #0a0a0e;
    background-image: url('images/pfd-nav-bg.jpg');
    background-size: cover;
    background-position: center 42%;
    background-repeat: no-repeat;
    background-attachment: scroll;
    overflow: hidden;
}
.pfd-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(125deg, rgba(6, 5, 10, 0.92) 0%, rgba(10, 8, 16, 0.78) 42%, rgba(8, 6, 12, 0.9) 100%),
        radial-gradient(ellipse 90% 70% at 20% 30%, rgba(212, 175, 55, 0.09) 0%, transparent 52%),
        radial-gradient(ellipse 80% 60% at 85% 75%, rgba(90, 60, 80, 0.12) 0%, transparent 50%);
}
.pfd-nav::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* 頂部須先以不透明底色蓋住底圖 JPEG 上緣，否則會露出一段彩邊 */
    background: linear-gradient(
        180deg,
        #07070a 0%,
        rgba(7, 7, 10, 0.97) 5%,
        rgba(0, 0, 0, 0.08) 34%,
        rgba(0, 0, 0, 0.32) 100%
    );
}
.pfd-nav__row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.pfd-nav__link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 24px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(8, 8, 12, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}
.pfd-nav__link:hover {
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.pfd-nav__link--next {
    text-align: right;
    align-items: flex-end;
}
.pfd-nav__dir {
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.5);
}
.pfd-nav__title {
    font-size: 1rem;
    color: var(--gold-light);
    letter-spacing: 1px;
    line-height: 1.5;
}
.pfd-nav__placeholder {
    visibility: hidden;
    pointer-events: none;
}

/* --- CTA --- */
.pfd-cta {
    padding: 72px 5% 96px !important;
    text-align: center;
    background: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(80, 45, 60, 0.2) 0%, transparent 55%),
        linear-gradient(180deg, var(--bg-dark) 0%, #0a0a0e 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}
.pfd-cta .pfd-inner {
    max-width: 640px;
}
.pfd-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px 20px;
    margin-top: 8px;
}
.pfd-cta__actions .gold-btn {
    margin-top: 0;
}
.pfd-cta__btn--secondary {
    background: transparent;
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--gold-light);
}
.pfd-cta__btn--secondary:hover {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-light);
    border-color: rgba(212, 175, 55, 0.65);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.15);
}
.pfd-cta h2 {
    font-size: clamp(1.35rem, 2.8vw, 1.8rem);
    color: var(--gold-light);
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 14px;
}
.pfd-cta p {
    color: var(--text-sub);
    font-size: 0.98rem;
    line-height: 1.9;
    margin-bottom: 24px;
}

.pfd-not-found {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 5%;
    text-align: center;
}
.pfd-not-found h1 {
    color: var(--gold-light);
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 16px;
}
.pfd-not-found p {
    color: var(--text-sub);
    margin-bottom: 28px;
}

@media (max-width: 900px) {
    .page-portfolio-detail .pfd-hero__title {
        font-size: clamp(1.45rem, 5.2vw, 1.85rem);
        letter-spacing: 0.05em;
    }
    /* 首屏即顯示，避免 reveal 延遲像被遮住 */
    .page-portfolio-detail .pfd-hero .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .pfd-highlights__grid {
        grid-template-columns: 1fr;
    }
    .pfd-nav__row {
        grid-template-columns: 1fr;
    }
    .pfd-nav__link--next {
        text-align: left;
        align-items: flex-start;
    }
}
@media (max-width: 600px) {
    .pfd-gallery {
        padding-top: 40px !important;
        padding-bottom: 48px !important;
    }
}
