/* ============================================================
   合作夥伴 (Partner) Styles
   ============================================================ */

.partner-page {
    background: #fff;
}

.partner-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 4% 20px;
}

/* ============================================================
   列表頁：一列一個夥伴，黑色分隔線
   ============================================================ */
.partner-empty {
    text-align: center;
    padding: 70px 20px;
    color: #999;
    font-size: 16px;
}

.partner-row {
    display: flex;
    align-items: flex-start;
    gap: clamp(24px, 4vw, 64px);
    padding: clamp(28px, 4vw, 56px) clamp(8px, 3vw, 48px);
    border-bottom: 1px solid #333;
}

.partner-row:last-of-type {
    border-bottom: 1px solid #333;
}

.partner-row-logo {
    flex: 0 0 auto;
    width: clamp(150px, 18vw, 240px);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    text-decoration: none;
}

.partner-row-logo img {
    width: 86%;
    height: 86%;
    object-fit: contain;
}

.partner-row-logo-empty {
    color: #bbb;
    font-size: 14px;
    letter-spacing: 2px;
}

.partner-row-body {
    flex: 1 1 auto;
    min-width: 0;
}

.partner-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(14px, 2vw, 28px);
}

.partner-row-name {
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(22px, 2.2vw, 32px);
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px;
}

.partner-row-name a {
    color: #004a89;
    text-decoration: none;
}

.partner-row-name a:hover {
    text-decoration: underline;
}

.partner-row-subtitle {
    font-size: clamp(15px, 1.3vw, 19px);
    color: #333;
    margin: 0;
}

.partner-row-brief {
    font-size: clamp(15px, 1.2vw, 18px);
    color: #222;
    line-height: 2;
    margin: 0;
    max-width: 960px;
}

/* 參考資料下載按鈕（列表 + 內頁共用） */
.partner-download-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f2f2f2;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    font-size: 14px;
    text-decoration: underline;
    white-space: nowrap;
    transition: all 0.2s;
}

.partner-download-btn:hover {
    background: #e8e8e8;
    color: #004a89;
}

/* ============================================================
   內頁
   ============================================================ */
.pdetail-head {
    display: flex;
    align-items: flex-start;
    gap: clamp(24px, 4vw, 56px);
    padding: clamp(24px, 3.5vw, 48px) clamp(8px, 3vw, 48px) clamp(20px, 3vw, 40px);
}

.pdetail-head-logo {
    flex: 0 0 auto;
    width: clamp(130px, 15vw, 200px);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.pdetail-head-logo img {
    width: 86%;
    height: 86%;
    object-fit: contain;
}

.pdetail-head-body {
    flex: 1 1 auto;
    min-width: 0;
}

.pdetail-head-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(12px, 1.8vw, 24px);
}

.pdetail-name {
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(24px, 2.5vw, 36px);
    font-weight: 700;
    color: #004a89;
    line-height: 1.4;
    margin: 0 0 6px;
}

.pdetail-subtitle {
    font-size: clamp(16px, 1.5vw, 21px);
    color: #333;
    margin: 0;
}

.pdetail-brief {
    font-size: clamp(16px, 1.35vw, 20px);
    color: #222;
    line-height: 2;
    margin: 0;
    max-width: 960px;
}

.pdetail-divider {
    border: 0;
    border-top: 1px solid #c9c9c9;
    margin: 8px clamp(8px, 3vw, 48px);
}

/* 三段內文章節 */
.pdetail-section {
    padding: clamp(20px, 3vw, 40px) clamp(8px, 3vw, 48px) 0;
}

.pdetail-section-title {
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 700;
    color: #004a89;
    margin: 0 0 clamp(14px, 2vw, 24px);
}

.pdetail-section-body {
    font-size: clamp(16px, 1.35vw, 19.5px);
    color: #222;
    line-height: 2.1;
    max-width: 1200px;
}

.pdetail-section-body p {
    margin: 0 0 10px;
}

.pdetail-section-body img {
    max-width: 100%;
    height: auto;
}

/* 活動照片：縮圖格 + 圖說，點擊放大 */
.pdetail-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: clamp(28px, 4vw, 52px) 0 0;
    padding: 0 clamp(8px, 3vw, 48px);
}

.pdetail-thumb {
    margin: 0;
}

.pdetail-thumb-link {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #e8eef4;
    cursor: zoom-in;
}

.pdetail-thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pdetail-thumb-link:hover img {
    transform: scale(1.05);
}

.pdetail-thumb-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1024px) {
    .pdetail-thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* 燈箱（純 JS 不依賴外部套件） */
.lb-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.9);z-index:9999;display:flex;align-items:center;justify-content:center;animation:lb-in .2s ease-out}
@keyframes lb-in{from{opacity:0}to{opacity:1}}
.lb-img{max-width:92vw;max-height:82vh;box-shadow:0 8px 32px rgba(0,0,0,.5);background:#000;user-select:none}
.lb-close{position:absolute;top:20px;right:24px;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.15);border:0;color:#fff;font-size:24px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.lb-close:hover{background:rgba(255,255,255,.25)}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:50px;height:50px;border-radius:50%;background:rgba(255,255,255,.15);border:0;color:#fff;font-size:28px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.lb-nav:hover{background:rgba(255,255,255,.25)}
.lb-prev{left:24px}.lb-next{right:24px}
.lb-caption{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);color:#fff;font-size:15px;background:rgba(0,0,0,.5);padding:6px 16px;border-radius:20px;max-width:86vw;text-align:center;line-height:1.6}
.lb-counter{position:absolute;top:24px;left:24px;color:#fff;font-size:14px;background:rgba(0,0,0,.4);padding:4px 12px;border-radius:12px}
@media (max-width: 600px){
    .lb-nav{width:40px;height:40px;font-size:22px}.lb-prev{left:8px}.lb-next{right:8px}
    .lb-close{top:8px;right:8px;width:38px;height:38px}
    .lb-caption{font-size:13px;bottom:16px}
}

/* 返回按鈕 */
.pdetail-back {
    text-align: center;
    margin: clamp(28px, 4vw, 48px) 0 10px;
}

.pdetail-back a {
    display: inline-block;
    min-width: 220px;
    padding: 12px 40px;
    background: #9d9d9d;
    border-radius: 26px;
    color: #fff;
    font-size: 16px;
    letter-spacing: 2px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.pdetail-back a:hover {
    background: #004a89;
}

/* ============================================================
   Tablet (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .partner-row {
        gap: 20px;
    }
    .partner-row-head,
    .pdetail-head-top {
        flex-wrap: wrap;
    }
    .pdetail-section-title {
        text-align: center;
    }
}

/* ============================================================
   Mobile (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {
    .partner-container {
        padding: 12px 5% 10px;
    }
    .partner-row {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 26px 4px;
    }
    .partner-row-logo {
        width: 170px;
    }
    .partner-row-body {
        width: 100%;
    }
    .partner-row-head {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }
    .partner-row-brief {
        line-height: 1.9;
    }

    .pdetail-head {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 22px 4px 18px;
    }
    .pdetail-head-logo {
        width: 170px;
    }
    .pdetail-head-body {
        width: 100%;
    }
    .pdetail-head-top {
        flex-direction: column;
        gap: 10px;
    }
    .pdetail-section {
        padding: 20px 4px 0;
    }
    .pdetail-divider {
        margin: 8px 4px;
    }

    /* 手機：縮圖 2 欄 */
    .pdetail-thumbs {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 4px;
    }
    .pdetail-thumb-caption {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* ============================================================
   Hero Banner（藍底白字，與 gallery/service 同款）
   ============================================================ */
.hero-banner {
    margin-top: clamp(64px, 6.25vw, 120px);
    position: relative;
    overflow: hidden;
    background: #004a89;
    padding: 0 8%;
    display: flex;
    align-items: center;
    height: 200px;
}
.hero-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-banner-deco {
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
    z-index: 1;
    opacity: 0.12;
}
.hero-banner-content {
    position: relative;
    z-index: 2;
}
.hero-banner-title {
    font-size: clamp(32px, 3vw, 56px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 6px;
    margin: 0;
}
@media (max-width: 1024px) {
    .hero-banner {
        margin-top: 80px;
        height: 110px;
        padding: 0 5%;
        justify-content: center;
    }
    .hero-banner-content {
        text-align: center;
    }
    .hero-banner-title {
        font-size: 26px;
        letter-spacing: 4px;
    }
}
@media (max-width: 767px) {
    .hero-banner {
        margin-top: 64px;
        height: 80px;
        padding: 0 5%;
        justify-content: center;
    }
    .hero-banner-title {
        font-size: 20px;
        letter-spacing: 3px;
    }
}

/* ============================================================
   執行成效案例內頁補充（沿用 pdetail-* 版面）
   ============================================================ */
.pdetail-tag {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #004a89;
    margin-bottom: 12px;
}
.pdetail-tag--orange { background: #e67e22; }
.pdetail-tag--green  { background: #3a9b54; }
.pdetail-tag--teal   { background: #2a8c8c; }

.pdetail-industry {
    font-weight: 400;
    color: #555;
}

.pdetail-topic {
    font-size: clamp(16px, 1.5vw, 21px);
    font-weight: 700;
    color: #1c2a3a;
    margin: 0 0 10px;
}

.pdetail-list {
    margin: 0;
    padding-left: 1.4em;
    font-size: clamp(16px, 1.35vw, 19.5px);
    color: #222;
    line-height: 2;
}
.pdetail-list li { padding-left: 4px; }
.pdetail-list li::marker { color: #004a89; }

/* 案例內頁主圖（標題左側，橫式照片） */
.pdetail-head-photo {
    flex: 0 0 auto;
    width: clamp(220px, 26vw, 340px);
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: #e8eef4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

.pdetail-head-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 767px) {
    .pdetail-head-photo {
        width: 100%;
        max-width: 380px;
    }
}
