/* ============================================
   內頁共用樣式 (Page.css)
   ============================================ */

/* history 頁面：黑底 + 滿版 page-bg.webp 透明度 0.5 */
body.page-history {
    background-color: #000;
    position: relative;
}

body.page-history::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(../img/page-bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

/* 頁面橫幅（header 下方、麵包屑上方） */
.page-banner {
    position: relative;
    width: 100%;
    margin-top: 72px;
    /* 固定 header 高度，避免被擋住 */
    height: 240px;
    overflow: hidden;
    background-color: #e8e4df;
}

/* 僅主橫幅圖滿版；四角裝飾見下方 .page-history .serve-corner */
.page-banner>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-history .serve-corner {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.page-history .serve-corner img {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    display: block;
    max-width: 71px;
    max-height: 71px;
}

.page-history .serve-corner-tl {
    top: 0;
    left: 0;
}

.page-history .serve-corner-tl img,
.page-history .serve-corner-bl img {
    transform: scaleX(-1);
}

.page-history .serve-corner-tr {
    top: 0;
    right: 0;
}

.page-history .serve-corner-bl {
    bottom: 0;
    left: 0;
}

.page-history .serve-corner-br {
    bottom: 0;
    right: 0;
}

/* 麵包屑導航（底圖與 footer 相同） */
.breadcrumb {
    background-image: url(../img/footer-bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(226, 185, 105, 0.4);
    padding: 12px 0;
    margin-top: 0;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.breadcrumb-item {
    color: #e2b969;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item:hover {
    color: #fff8ba;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: rgba(226, 185, 105, 0.8);
    margin: 0 4px;
}

.breadcrumb-current {
    color: #e2b969;
    font-weight: 500;
}

/* 頁面內容容器 */
.page-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

/* 側邊欄導航 */
.page-sidebar {
    position: relative;
    background-color: #E1A201;
    background-image: url(../img/type-bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* 黃底 */
    border: 1px solid #e6d930;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    position: relative;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #c41e3a;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: block;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.sidebar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: #c41e3a;
    border-left-color: #c41e3a;
    padding-left: 16px;
}

.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.6);
    color: #c41e3a;
    font-weight: 600;
    padding-left: 44px;
    background-image: url(../img/Decorations2.webp);
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 24px auto;
}

.sidebar-submenu {
    list-style: none;
    margin: 8px 0 0;
    padding: 0 0 0 32px;
}

.sidebar-submenu li {
    margin-bottom: 6px;
}

.sidebar-submenu-link {
    display: block;
    font-size: 15px;
    color: #5f4a2a;
    text-decoration: none;
    padding: 6px 8px;
    border-left: 2px solid rgba(196, 30, 58, 0.35);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.sidebar-submenu-link:hover {
    color: #c41e3a;
    background-color: rgba(255, 255, 255, 0.4);
    border-left-color: #c41e3a;
}

.sidebar-submenu-link.active {
    color: #c41e3a;
    background-color: rgba(255, 255, 255, 0.55);
    border-left-color: #c41e3a;
    font-weight: 700;
}

.transport-map-wrap {
    margin-top: 16px;
    border: 2px solid #e1a201;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

.transport-map-wrap iframe {
    display: block;
    width: 100%;
    min-height: 360px;
    border: 0;
}

.transport-map-link {
    margin-top: 12px;
    word-break: break-all;
}

/* 主要內容區域 */
.page-main {
    background-color: #f7efdf;
    /* 淺米黃色 */
    background-image: url('../img/index-bg2.png');
    background-repeat: repeat;
    background-position: center;
    border: 3px solid #E1A201;
    /* 酪黃色邊框 */
    border-radius: 8px;
    padding: 40px;
}

.page-header {
    text-align: center;
    padding-bottom: 20px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    letter-spacing: 2px;
}

.page-title-decoration {
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, transparent, #c41e3a, transparent);
    margin: 0 auto;
    border-radius: 2px;
}

.page-body {
    margin-bottom: 40px;
}

/* 內容區段 */
.content-section {
    margin-bottom: 30px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 24px 0;
    padding-left: 52px;
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 36px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
}

.section-title-decoration-3::before {
    background-image: url(../img/Decorations3.webp);
}

.section-title-decoration-4::before {
    background-image: url(../img/Decorations4.webp);
}

.section-title-decoration-5::before {
    background-image: url(../img/Decorations5.webp);
}

.section-content {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    text-align: justify;
    margin: 0 0 20px 0;
}

.section-content a {
    color: #c41e3a;
}

.content-status {
    text-align: center;
    color: #7a6d55;
}

.content-image-block {
    margin: 0 0 20px;
}

.content-image-block img {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(226, 185, 105, 0.9);
    display: block;
}

.content-image-block figcaption {
    margin-top: 8px;
    color: #7a7a7a;
    font-size: 14px;
    text-align: center;
}

.content-video-block {
    margin: 0 0 20px;
}

.video-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(226, 185, 105, 0.9);
    background: #000;
}

.video-embed-wrapper-portrait {
    max-width: 420px;
    margin: 0 auto;
    padding-bottom: 177.78%; /* 9:16 */
}

.video-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.content-video-block figcaption {
    margin-top: 8px;
    color: #7a7a7a;
    font-size: 14px;
    text-align: center;
}

.annual-events-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.annual-event-item {
    background-color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(226, 185, 105, 0.9);
    background-image: url(../img/index-bg2.png);
    border-radius: 10px;
    padding: 16px 18px;
}

.news-list .annual-event-item {
    display: block;
    text-decoration: none;
    transition: all 0.25s ease;
}

.news-list .annual-event-item:hover {
    background-image: url(../img/index-bg2.png);
    background-color: #f3ebe1;
}

.news-list .annual-event-item:hover .annual-event-title {
    color: #c41e3a;
}

.annual-event-name {
    position: relative;
    margin: 0 0 10px 0;
    padding-right: 38px;
    min-height: 28px;
    display: flex;
    align-items: center;
    color: #333;
    font-size: 20px;
    font-weight: 700;
}
.annual-event-date {
    margin: 0 0 8px 0;
    color: #c41e3a;
    font-weight: 600;
    line-height: 1.7;
}

.annual-event-desc {
    margin: 0;
    color: #555;
    line-height: 1.9;
    text-align: justify;
}

.news-list .annual-event-category {
    margin: 0 0 6px 0;
    padding: 0;
    min-height: 0;
    color: #c41e3a;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.news-list .annual-event-category::after {
    display: none;
}

.news-list .annual-event-date {
    margin-bottom: 0;
    color: #7a7a7a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.news-list .annual-event-title {
    margin: 0;
    color: #222;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
    text-align: left;
}

.news-detail-category-wrap {
    display: flex;
    align-items: center;
    justify-content:center;
    gap: 12px;
    width: fit-content;
    margin-top: 20px;
}

.news-detail-category {
    color: #c41e3a;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-block;
    margin: 0;
}

.news-detail-date {
    color: #7a7a7a;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin: 0;
}

.lamp-price-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 12px;
}

.lamp-price-item {
    border: 1px solid rgba(226, 185, 105, 0.9);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lamp-price-name {
    color: #333;
    font-weight: 700;
}

.lamp-price-value {
    color: #c41e3a;
    font-weight: 700;
}

.worship-steps {
    margin: 0;
    padding-left: 24px;
}

.worship-step-item {
    margin-bottom: 14px;
    line-height: 1.9;
}

.worship-step-item:last-child {
    margin-bottom: 0;
}

.worship-step-title {
    display: block;
    color: #333;
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 18px;
}

.worship-step-desc {
    display: block;
}

.contact-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #c41e3a;
    font-size: 20px!important;
    line-height: 1;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.deity-image-section {
    margin-top: 20px;
}

.deity-feature-card-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 300px;
    margin: 0 auto 32px;
}

.deity-feature-card-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin: 0 0 40px;
}

.deity-feature-card-wrap .deity-feature-card-col {
    flex: 1 1 260px;
    margin: 0;
}

/* 活動紀錄頁 */
.activity-records-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.activity-category-bar,
.activity-overview {
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.92), rgba(244, 231, 205, 0.96));
    border: 1px solid rgba(181, 115, 32, 0.28);
    border-radius: 18px;
    box-shadow: 0 16px 32px rgba(109, 55, 7, 0.08);
}

.activity-records-nav-label {
    margin: 0;
    color: #9a5f11;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.activity-category-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    flex-wrap: wrap;
}

.activity-category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(196, 30, 58, 0.12);
    color: #6d3c0b;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.activity-category-pill:hover,
.activity-category-pill.active {
    background: linear-gradient(135deg, #c41e3a, #8b1026);
    color: #fff7e6;
    box-shadow: 0 12px 24px rgba(139, 16, 38, 0.2);
    transform: translateY(-2px);
}

.activity-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
}

.activity-overview-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.activity-current-category {
    margin: 0;
    color: #34221a;
    font-size: 24px;
    line-height: 1.2;
}

.activity-overview-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.activity-toolbar-count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #9a5f11;
    font-size: 13px;
    font-weight: 700;
}

.activity-events-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.activity-event-card {
    position: relative;
    width: 100%;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.activity-event-card:hover {
    transform: translateY(-4px);
    border-color: #c41e3a;
    box-shadow: 0 14px 28px rgba(125, 47, 14, 0.12);
}

.activity-event-cover-wrap {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: rgba(67, 36, 15, 0.12);
}

.activity-event-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.activity-event-card:hover .activity-event-cover {
    transform: scale(1.04);
}

.activity-event-content {
    position: relative;
    padding: 18px 18px 16px;
}

.activity-event-index {
    position: absolute;
    top: 236px;
    right: 18px;
    color: rgba(154, 95, 17, 0.18);
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}

.activity-event-summary {
    margin: 10px 0 0 0;
    color: #6a5a4e;
    line-height: 1.8;
}

.activity-event-meta {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #9a5f11;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .activity-events-grid {
        grid-template-columns: 1fr;
    }

    .activity-overview {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .activity-category-bar,
    .activity-overview {
        padding: 16px;
    }

    .activity-category-bar {
        gap: 10px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .activity-category-pill {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 16px;
        font-size: 14px;
    }

    .activity-current-category {
        font-size: 20px;
    }

    .activity-overview-main {
        align-items: flex-start;
        gap: 6px;
    }

    .activity-event-cover-wrap {
        height: 180px;
    }
}

.deity-feature-card {
    position: relative;
    background-image: url(../img/footer-bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #e2b969;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    margin: 0 auto 4px;
}

.deity-feature-card .culture-title-decoration {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 1;
    pointer-events: none;
}

.deity-feature-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}
.deity-feature-image img {
    max-width: 300px;
}
.deity-feature-card .serve-corner img{
    max-width: 40px;
    max-height: 40px;
}
.deity-feature-card .serve-corner-tl {
    top: 3px;
    left: 3px;
}
.deity-feature-card .serve-corner-tr {
    top: 3px;
    right: 3px;
}
.deity-feature-card .serve-corner-bl {
    bottom: 3px;
    left: 3px;
}
.deity-feature-card .serve-corner-br {  
    bottom: 3px;
    right: 3px;
}

.secondary-deity-layout .secondary-deity-row {
    display: grid;
    justify-content: center;
    gap: 20px 24px;
}

.secondary-deity-layout .secondary-deity-row-top {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    margin-bottom: 28px;
}

.secondary-deity-layout .secondary-deity-row-bottom {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.secondary-deity-layout .deity-feature-card-col {
    max-width: 230px;
    margin: 0 auto;
}

.secondary-deity-layout .deity-feature-card {
    max-width: 230px;
    margin-bottom: 4px;
}

.secondary-deity-layout .deity-feature-image {
    max-width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
}

/* 頁面導航 */
.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    gap: 20px;
}

.nav-prev,
.nav-next {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    min-width: 140px;
    background-image: url(../img/btn2.webp);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    color: #333;
    text-decoration: none;
    border: none;
    border-radius: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-weight: 500;
    background-color: transparent;
}

.nav-prev:hover,
.nav-next:hover {
    opacity: 0.9;
    transform: scale(1.02);
    color: #333;
}

.nav-arrow {
    font-size: 18px;
}

.nav-prev {
    margin-right: auto;
}

.nav-next {
    margin-left: auto;
}

.page-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title-deco-cloud {
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.page-title-deco-cloud img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-title-decoration-tl {
    transform: scaleX(-1);
    rotate: -90deg;
}

.page-title-decoration-tr {
    transform: scaleX(-1);
    rotate: 90deg;
}
@media (max-width: 1280px) {
    .secondary-deity-layout .deity-feature-card{
        max-width: 180px;
    }
    .secondary-deity-layout .secondary-deity-row{
        gap: 10px 12px;
    }
}

@media (max-width: 1080px) {
    .secondary-deity-layout .secondary-deity-row-top,
    .secondary-deity-layout .secondary-deity-row-bottom {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
    .secondary-deity-layout .deity-feature-card{
        max-width: 230px;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .page-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-sidebar {
        position: static;
        order: 2;
    }

    .page-main {
        order: 1;
        padding: 20px;
    }

    .breadcrumb-container {
        flex-wrap: wrap;
        gap: 4px;
    }

    .page-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 18px;
    }

    .section-content {
        font-size: 16px;
        text-align: left;
    }

    .annual-event-name {
        font-size: 18px;
    }

    .news-list .annual-event-title {
        font-size: 18px;
    }

    .lamp-price-list {
        grid-template-columns: 1fr;
    }


    .page-navigation {
        flex-direction: column;
        padding-top: 0;
        margin-bottom: 10px;
    
    }

    .nav-prev,
    .nav-next {
        width: 100%;
        padding: 8px;
        min-width: 120px;
        justify-content: center;
        margin: 0;
    }
    .nav-text{
        font-size: 14px;
    }
    .page-history .serve-corner img {
        max-width: 35px;
        max-height: 35px;
    }
}

@media (max-width: 480px) {
    .page-content {
        margin: 20px auto;
    }

    .page-main {
        padding: 15px;
    }

    .page-title {
        font-size: 24px;
    }

    .breadcrumb-container {
        font-size: 16px;
    }

    .section-title {
        font-size: 16px;
    }

    .section-content {
        font-size: 16px;
    }

    .annual-event-item {
        padding: 14px 12px;
    }

    .annual-event-name {
        font-size: 17px;
    }

    .news-list .annual-event-title {
        font-size: 16px;
    }

    .secondary-deity-layout .secondary-deity-row-top,
    .secondary-deity-layout .secondary-deity-row-bottom {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
    .secondary-deity-layout .deity-feature-card-col,
    .secondary-deity-layout .deity-feature-card {
        max-width: 200px;
    }

}

/* 大事年表組件 */
.timeline-list {
    position: relative;
    padding-left: 24px;
    margin: 32px 0 20px 10px;
    list-style: none;
}

.timeline-list::before {
    content: '';
    position: absolute;
    top: 3px;
    bottom: 0;
    left: 7px;
    width: 2px;
    background-color: #e2b969;
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #c41e3a;
    border: 3px solid #f7efdf;
    box-shadow: 0 0 0 2px #e2b969;
    z-index: 1;
}

.timeline-date {
    font-weight: 600;
    color: #c41e3a;
    font-size: 18px;
    margin-bottom: 8px;
    margin-left: 8px;
    display: block;
}

.timeline-desc {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    margin: 0;
    padding-left: 8px;
    text-align: justify;
}

.imgbox {
    width: auto;
    height: 100%;
    margin: 20px 0;
}

.imgbox img {
    max-height: 100%;
    max-width: 100%;
    border: 1px solid #c41e3a;
    border-radius: 5px;
}
.imgbox figcaption {
    font-size: 14px;
    color: #7a6a50;
    letter-spacing: 1px;
    line-height: 1.6;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .timeline-date {
        font-size: 16px;
    }

    .timeline-desc {
        font-size: 15px;
    }
}

/* 文物紀錄幻燈片 */
.artifacts-slider,
.artifacts-main-image-wrap,
.artifacts-main-media-stage,
.artifacts-main-image,
.artifacts-main-iframe,
.artifacts-thumbnails,
.artifact-thumb,
.artifact-thumb img {
    box-sizing: border-box;
}

.artifacts-main-image-wrap {
    position: relative;
    width: 100%;
    max-height: 520px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 30px;
}

.artifacts-main-media-stage {
    width: 100%;
    max-height: 520px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 11, 8, 0.9);
}

.artifacts-main-image {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    cursor: zoom-in;
}

.artifacts-main-iframe {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
    background: #000;
}

.artifacts-main-iframe.is-portrait {
    width: min(100%, 360px);
    height: 520px;
}

.artifacts-slider-section .section-content {
    margin-bottom: 20px;
}

.artifacts-thumbnails {
    margin-top: 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.artifact-thumb {
    position: relative;
    border: 2px solid transparent;
    background: transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.artifact-thumb img {
    display: block;
    width: 100px;
    height: 70px;
    object-fit: cover;
}

.artifact-thumb-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(16, 14, 12, 0.82);
    color: #fff4df;
    font-size: 12px;
    font-weight: 700;
}

.artifact-thumb:hover {
    transform: translateY(-2px);
}

.artifact-thumb.active {
    border-color: #c41e3a;
}

.artifact-main-zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(26, 24, 23, 0.72);
    backdrop-filter: blur(1px);
    pointer-events: auto;
    z-index: 2;
    cursor: zoom-in;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
}

.artifacts-main-image-wrap:hover .artifact-main-zoom,
.artifacts-main-image-wrap:focus-within .artifact-main-zoom {
    opacity: 1;
    visibility: visible;
}

.artifact-main-zoom::before {
    content: '';
    position: absolute;
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 50%;
    top: 8px;
    left: 8px;
}

.artifact-main-zoom::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transform: rotate(45deg);
    right: 8px;
    bottom: 9px;
}

.artifact-main-zoom:hover {
    background: rgba(196, 30, 58, 0.8);
}

.artifact-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.82);
}

.artifact-lightbox[hidden] {
    display: none !important;
}

.artifact-lightbox-content {
    width: min(92vw, 1320px);
    max-width: min(92vw, 1320px);
    height: min(88vh, 920px);
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.artifact-lightbox-image,
.artifact-lightbox-iframe {
    max-width: min(92vw, 1320px);
    max-height: 88vh;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.artifact-lightbox-image {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    transition: transform 0.18s ease;
    will-change: transform;
}

.artifact-lightbox-image.is-pannable {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.artifact-lightbox-image.is-dragging {
    cursor: grabbing;
    transition: none;
}

.artifact-lightbox-iframe {
    width: min(92vw, 1320px);
    height: min(51.75vw, 74vh);
    border: 0;
    background: #000;
}

.artifact-lightbox-iframe.is-portrait {
    width: min(90vw, 420px);
    height: min(88vh, 746px);
}

.artifact-lightbox-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.artifact-lightbox-toolbar {
    position: absolute;
    top: 18px;
    left: 18px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.artifact-lightbox-zoom {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: rgba(18, 17, 15, 0.72);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.artifact-lightbox-zoom:hover {
    background: rgba(196, 30, 58, 0.82);
}

.artifact-lightbox-hint {
    position: absolute;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(18, 17, 15, 0.82);
    color: #fff8e0;
    font-size: 14px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 3;
    pointer-events: none;
}

.artifact-lightbox-hint.is-visible {
    opacity: 1;
}

.artifact-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 999px;
    background: rgba(18, 17, 15, 0.72);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.artifact-lightbox-prev {
    left: 18px;
}

.artifact-lightbox-next {
    right: 18px;
}

.artifact-lightbox-nav:hover,
.artifact-lightbox-close:hover {
    background: rgba(196, 30, 58, 0.82);
}

body.artifact-lightbox-open {
    overflow: hidden;
}
.artifacts-navigation{
    margin: 0;
    padding: 0;
}

.artifacts-navigation .nav-prev,
.artifacts-navigation .nav-next {
    cursor: pointer;
}

@media (max-width: 768px) {
    .artifacts-main-image-wrap,
    .artifacts-main-media-stage,
    .artifacts-main-image,
    .artifacts-main-iframe {
        max-height: 380px;
    }

    .artifacts-main-iframe {
        height: 380px;
    }

    .artifacts-main-iframe.is-portrait {
        width: min(100%, 280px);
        height: 380px;
    }

    .artifact-thumb img {
        width: 96px;
        height: 68px;
    }

    .artifact-main-zoom {
        opacity: 1;
        visibility: visible;
    }
    .artifacts-navigation{
        flex-direction: row;
        width: unset;
        justify-content: space-between;
        margin: 0;
        padding: 0;
    }
    .artifacts-navigation .nav-prev,
    .artifacts-navigation .nav-next {
        width: unset;
    }

    .artifact-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.75rem;
    }

    .artifact-lightbox-toolbar {
        top: 14px;
        left: 14px;
    }

    .artifact-lightbox-zoom {
        width: 40px;
        height: 40px;
    }

    .artifact-lightbox-pan-btn {
        width: 42px;
        height: 42px;
    }

    .artifact-thumb img {
        width: 80px;
        height: 60px;
    }
}
@media (max-width: 480px) {
    .artifacts-main-image-wrap,
    .artifacts-main-media-stage,
    .artifacts-main-image,
    .artifacts-main-iframe {
        max-height: 300px;
    }

    .artifacts-main-media-stage {
        min-height: 220px;
    }

    .artifacts-main-iframe {
        height: 300px;
    }

    .artifacts-main-iframe.is-portrait {
        width: min(100%, 220px);
        height: 300px;
    }

    .artifacts-thumbnails {
        gap: 10px;
        margin-top: 20px;
    }

    .artifact-lightbox {
        padding: 16px;
    }

    .artifact-lightbox-toolbar {
        top: 12px;
        left: 12px;
    }

    .artifact-lightbox-prev {
        left: 10px;
    }

    .artifact-lightbox-next {
        right: 10px;
    }

    .artifact-thumb img {
        width: 64px;
        height: 48px;
    }
}
