/* ============================================================
   Gallery (活動照片) Styles
   依賴 styles-news.css 提供 banner/breadcrumb/share/pagination 樣式
   ============================================================ */

/* 覆寫 news 的 tab 樣式 — gallery 用扁平資料夾分類樣式（接近設計稿） */
.gallery-page .psd-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
    border-bottom: 1px solid #d8d8d8;
    margin-bottom: 0;
    padding: 0 8px;
}

.gallery-page .psd-type-tab {
    background: #f0f0f2;
    border: 1px solid #d8d8d8;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 10px 22px;
    min-width: 0;
    color: #555;
    font-weight: 400;
    box-shadow: none;
    margin-bottom: -1px;  /* 覆蓋下方 border-bottom 形成「接合」效果 */
    transition: all 0.15s;
}

.gallery-page .psd-type-tab span {
    font-size: clamp(14px, 1.05vw, 16px);
    font-weight: 500;
    letter-spacing: 0.5px;
    color: inherit;
}

.gallery-page .psd-type-tab:hover {
    background: #fafafa;
    color: #004a89;
    box-shadow: none;
    opacity: 1;
}

.gallery-page .psd-type-tab.is-active {
    background: #fff;
    color: #004a89;
    border-color: #d8d8d8;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.04);
}

/* gallery 內容區直接接 tab 下方（無 gap） */
.gallery-page .gallery-grid {
    border-radius: 0 0 12px 12px;
}

/* 活動相片網格 - 桌面 3 欄 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 24px;
    margin-bottom: 50px;
    padding: 30px 0;
    background: #f7f7f9;
    border-radius: 12px;
    padding: 40px 24px;
}

.gallery-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s;
}

.gallery-card:hover {
    box-shadow: 0 8px 24px rgba(0, 74, 137, 0.15);
    transform: translateY(-3px);
}

.gallery-card-link {
    display: block;
    text-decoration: none;
}

.gallery-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e8eef4;
}

.gallery-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-card-img img {
    transform: scale(1.05);
}

.gallery-card-img-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
}

.gallery-card-body {
    padding: 16px 14px 18px;
}

.gallery-card-title {
    font-family: "Noto Sans TC", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #222;
    line-height: 1.5;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.gallery-card-date {
    font-family: "Noto Sans TC", sans-serif;
    font-size: 13px;
    color: #888;
    font-weight: 300;
}

/* ============================================================
   Tablet (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
        padding: 32px 16px;
    }
    .gallery-card-title {
        font-size: 15px;
    }
}

/* ============================================================
   Mobile (max-width: 767px)
   ============================================================ */
@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 10px;
        padding: 20px 12px;
        border-radius: 8px;
    }
    .gallery-card-body {
        padding: 12px 10px 14px;
    }
    .gallery-card-title {
        font-size: 13px;
        min-height: 38px;
        margin-bottom: 6px;
    }
    .gallery-card-date {
        font-size: 12px;
    }
}

/* ============================================================
   Small Mobile (max-width: 400px)
   ============================================================ */
@media (max-width: 400px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .gallery-card-title {
        font-size: 14px;
        min-height: 0;
    }
}

/* ============================================================
   Hero Banner（藍底白字，比照 /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;
    }
}
