/* Space Page Specific Styles */

.space-hero,
.space-banner,
.space-banner-carousel-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    overflow: hidden;
}

.space-hero {
    margin-top: 88px; /* 与首页固定头部一致 */
    margin-bottom: 20px;
}

.space-full-img {
    width: 100%;
    max-width: 1920px;
    height: auto;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

/* space_banner1 缩小到 70% 显示 */
.space-hero--70 .space-full-img {
    width: 100%;
    max-width: 1920px;
}

/* space_banner3 缩小一半显示，与上方图片间距 20px */
.space-banner--spacing {
    margin-top: 20px;
}

.space-banner--half .space-full-img {
    width: 50%;
    max-width: 960px;
}

/* space_banner7 缩小到 70% 显示 */
.space-banner--70 .space-full-img {
    width: 70%;
    max-width: 1344px;
}

/* space_banner5 和 space_banner6 轮播缩小一半显示 */
.space-banner-carousel--half .space-full-img {
    width: 50%;
    max-width: 960px;
}

.space-text-section {
    width: 100%;
    background: #fff;
    padding: 20px 0 30px;
}

.space-text-container {
    text-align: center;
}

.space-center-text {
    font-family: 'Noto Serif SC', '思源宋体', serif;
    font-size: 18px;
    line-height: 2;
    color: #333;
    margin: 0;
}

.space-text-section--bottom {
    padding: 40px 0 50px;
}

.space-bottom-text {
    font-family: 'Noto Serif SC', '思源宋体', serif;
    font-size: 18px;
    line-height: 2;
    color: #333;
    margin: 0 auto;
    max-width: 1000px;
    text-align: center;
}

/* 图片轮播（两页九宫格） */
.space-roll-section {
    width: 100%;
    background: #fff;
    padding: 10px 0 30px;
}

.space-roll-container {
    max-width: 1200px;
    margin: 0 auto;
}

.space-carousel {
    width: 100%;
}

.space-carousel-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.space-carousel-slide {
    display: none;
    width: 100%;
}

.space-carousel-slide.is-active {
    display: block;
}

.space-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 10px 0;
}

.space-thumb {
    width: 100%;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.space-thumb img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1);
    transition: transform 0.35s ease, filter 0.35s ease;
    will-change: transform;
}

/* 鼠标放置：心脏跳动放大效果 */
@keyframes spaceHeartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.12); }
    28% { transform: scale(1.02); }
    42% { transform: scale(1.16); }
    70% { transform: scale(1.04); }
    100% { transform: scale(1.12); }
}

.space-thumb:hover img {
    animation: spaceHeartBeat 0.9s ease-in-out infinite;
    filter: brightness(1.03);
}

.space-thumb:focus-visible {
    outline: 2px solid rgba(139, 69, 19, 0.6);
    outline-offset: 3px;
}

/* 指示点（按首页图标呈现：一次只显示“当前态”图片） */
.space-carousel-controls {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
    z-index: 10;
}

.space-carousel-indicators {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.space-indicator-img {
    width: auto;
    height: 50px;
    cursor: default;
    display: none; /* 只显示 active 的那一张，仿照首页 */
    transition: opacity 0.3s;
    user-select: none;
}

.space-indicator-img.is-active {
    display: block;
    opacity: 1;
}

/* banner 5/6 轮播边距 */
.space-banner-carousel {
    width: 100%;
}

/* Lightbox */
.space-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

.space-lightbox.is-open {
    display: block;
}

.space-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.space-lightbox-dialog {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 18px;
}

.space-lightbox-img {
    max-width: min(1200px, 92vw);
    max-height: 82vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.space-lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.space-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.space-lightbox-prev { left: 18px; }
.space-lightbox-next { right: 18px; }

.space-lightbox-close:hover,
.space-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 800px) {
    .space-hero { margin-top: 60px; }

    .space-center-text,
    .space-bottom-text {
        font-size: 18px;
    }

    .space-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 10px 5px;
    }

    .space-indicator-img {
        height: 40px;
    }

    .space-lightbox-img {
        max-width: 92vw;
        max-height: 72vh;
    }

    .space-lightbox-nav {
        width: 46px;
        height: 46px;
        font-size: 36px;
    }

    .space-lightbox-prev { left: 10px; }
    .space-lightbox-next { right: 10px; }

    .space-lightbox-close {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
}

@media (max-width: 520px) {
    .space-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 801px) {
    .space-indicator-img {
        height: 60px;
    }
}

