/* =========================================
   1. 基础变量与全局重置
========================================= */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --spacing-unit: 20px;
    --header-height: 60px; /* 设定导航栏高度 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px;
}

/* =========================================
   2. 顶部导航栏 (Header)
========================================= */
.site-header {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-unit);
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    align-items: center;
}

.site-header a {
    color: var(--text-color);
    text-decoration: none;
}

/* =========================================
   3. 首屏大片轮播 (Hero Section - Full Bleed)
========================================= */
.hero-section, #hero-carousel {
    width: 100% !important;
    max-width: 100% !important;
    /* 高度=屏幕高度减去导航栏，完美铺满不超标 */
    height: calc(100vh - var(--header-height)) !important; 
    margin-top: var(--header-height) !important; /* 避开导航栏，防止图片最上面被遮挡 */
    margin-bottom: 0 !important;
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-color);
}

.hero-image-container {
    width: 100%;
    height: 100%;
}

/* 解决防闪烁问题：初始隐藏，加载后显示 */
#hero-main-img, #hero-main-video {
    display: none; 
    width: 100% !important;
    height: 100% !important;
    /* 删除了这里的 !important，现在由 JS 智能接管排版 */
    object-fit: cover; 
    object-position: center top; 
    transition: opacity 0.4s ease;
}

/* 核心修复：彻底隐藏首屏不需要的元素（缩略图、文字标题等） */
.hero-caption, 
#hero-caption, 
.hero-thumbnails, 
#hero-thumbnails,
.thumb-num {
    display: none !important; 
}

/* 隐形的左右点击区域 */
.click-zone {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: 10;
}
.left-zone { left: 0; cursor: w-resize; }
.right-zone { right: 0; cursor: e-resize; }

/* 🌟 专供电脑端大屏幕的优化：打造“悬浮画框感” */
@media (min-width: 769px) {
    #hero-carousel {
        /* 原本是 100vh（满屏高度），现在改成 85vh，让底部留出 15% 的呼吸空间 */
        height: calc(87vh - var(--header-height)) !important; 
        margin-top: calc(var(--header-height) + 10px) !important; /* 顶部也往下稍微推一点点 */
    }
}


/* =========================================
   4. 画廊区域 (Gallery)
========================================= */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding-top: 40px;
}

.category-row {
    width: 100%;
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

.row-title {
    font-size: 3vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    padding: 0 var(--spacing-unit);
    margin-bottom: 20px;
}

.horizontal-gallery {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding: 0 var(--spacing-unit);
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}
.horizontal-gallery::-webkit-scrollbar { display: none; }

.gallery-item {
    flex: 0 0 auto;
    height: 380px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transform: translateZ(0);
}

.gallery-item img {
    height: 100%;
    width: auto;
    display: block;
    transition: filter 0.3s ease;
}

.hover-info {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    transition: bottom 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover img { filter: brightness(0.8); }
.gallery-item:hover .hover-info { bottom: 0; }
.gallery-item:hover .play-icon { opacity: 1; transform: translate(-50%, -50%) scale(1.1); transition: all 0.3s ease; }

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0.8;
}

/* =========================================
   5. 底部过滤栏 (Filter Footer)
========================================= */
.filter-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: var(--spacing-unit);
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    z-index: 100;
}

.filter-group { display: flex; gap: 30px; }

.filter-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    opacity: 0.4;
    transition: opacity 0.3s;
}
.filter-btn:hover, .filter-btn.active { opacity: 1; }

/* =========================================
   6. 全新瀑布流灯箱 (Lightbox - Continuous Scroll)
========================================= */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: #050505; /* 极深的纯黑色底，沉浸感极强 */
    overflow-y: auto; /* 🌟 核心魔法：允许上下自由滚动 */
    -webkit-overflow-scrolling: touch; /* 让手机端滑动如丝般顺滑 */
}

/* 存放所有图片的垂直容器 */
.lightbox-content {
    position: relative;
    width: 100%;
    max-width: 1200px; /* 限制一下电脑端的最大宽度，避免太夸张 */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0 100px 0; /* 上下留出呼吸空间 */
}

.lightbox-item-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 彻底解除高度限制，让图片肆意伸展，并增加高级呼吸边框 */
.lightbox-item-wrapper img, 
.lightbox-item-wrapper video, 
.lightbox-item-wrapper .ba-container {
    width: 92%; /* 🌟 核心魔法：从 100% 缩小到 92%，让左右自然露出 4% 的黑色深渊背景 */
    max-width: 1000px; /* 电脑端限制最大尺寸，避免全屏时脸部过大吓人 */
    height: auto !important; 
    max-height: none !important; 
    object-fit: contain;
    display: block;
    
    /* 💡 附加的高级细节（让图片像实体照片一样浮在背景上） */
    border-radius: 2px; /* 极其微小的圆角，消除数码图片的锋利切割感 */
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9); /* 深邃的底部阴影，拉开空间层次 */
}

/* 图片之间的高级极窄间隙 (约2mm) */
.lightbox-divider {
    width: 100%;
    height: 8px; 
    background-color: transparent; 
    margin: 0;
}

/* 隐藏旧版缩略图相关元素 */
.lightbox-thumbnails, #lightbox-img, #lightbox-video {
    display: none !important;
}

/* 悬浮在右上角的关闭按钮 */
.close-btn {
    position: fixed; /* 固定位置，不受滑动影响 */
    top: 20px; right: 25px;
    width: 45px; height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px); /* 高级的毛玻璃效果 */
    border-radius: 50%;
    color: #fff;
    display: flex; justify-content: center; align-items: center;
    font-size: 30px; font-weight: 300;
    cursor: pointer; z-index: 1005; transition: 0.3s;
}
.close-btn:hover { background-color: rgba(255, 255, 255, 0.3); }

/* =========================================
   7. Before/After 对比滑块
========================================= */
.ba-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
    user-select: none;
}
.ba-after { display: block; }
.ba-before-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 50%; height: 100%;
    overflow: hidden;
}
.ba-before {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}
.ba-slider {
    position: absolute;
    top: 0; left: 50%;
    height: 100%; width: 40px;
    margin-left: -20px;
    cursor: ew-resize;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.ba-slider-line {
    width: 2px; height: 100%;
    background-color: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
.ba-slider-button {
    position: absolute;
    width: 36px; height: 36px;
    background-color: white;
    border-radius: 50%;
    color: black;
    display: flex; justify-content: center; align-items: center;
    font-weight: 900; font-size: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* =========================================
   8. 关于页面 (About Sidebar)
========================================= */
.about-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000; opacity: 0; visibility: hidden;
    transition: 0.3s ease; backdrop-filter: blur(5px);
}
.about-overlay.active { opacity: 1; visibility: visible; }

.about-sidebar {
    position: fixed; top: 0; right: -450px;
    width: 450px; max-width: 100%; height: 100vh;
    background: var(--bg-color); color: var(--text-color);
    z-index: 1001; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
}
.about-sidebar.active { right: 0; }

.about-sidebar .about-content {
    padding: 60px 40px !important;
    display: flex; flex-direction: column; align-items: center;
}
.about-content img {
    width: 55%; /* 核心魔法：只占侧边栏的一半宽度，留出高级呼吸感 */
    aspect-ratio: 3 / 4; /* 强制锁定极其高级的肖像比例 */
    object-fit: cover;
    margin-top: 30px; 
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); /* 像相框一样的立体阴影 */
}
.about-name {
    font-size: 26px !important; font-weight: 800 !important;
    letter-spacing: 4px !important; text-transform: uppercase;
    color: #111; margin-bottom: 8px !important;
}
.about-role {
    font-size: 11px !important; font-weight: 400 !important;
    letter-spacing: 2px !important; text-transform: uppercase;
    color: #999; margin-bottom: 35px !important;
}
.about-bio {
    font-size: 13px !important; line-height: 2.0 !important;
    color: #444; text-align: left; white-space: pre-wrap !important;
    width: 100%; margin-bottom: 50px !important;
}
.about-contact {
    width: 100%; border-top: 1px solid #eee;
    padding-top: 25px; display: flex; flex-direction: column; gap: 12px;
}
.about-contact-item {
    display: flex; justify-content: flex-start; align-items: baseline; gap: 15px;
}
.about-contact-item .label {
    font-size: 11px !important; font-weight: 400 !important;
    letter-spacing: 2px !important; text-transform: uppercase;
    color: #999; width: 100px; text-align: right;
}
.about-contact-item .value {
    font-size: 13px !important; font-weight: 700 !important;
    color: #111 !important; text-decoration: none; word-break: break-word;
}
.about-contact-item .value.a:hover { text-decoration: underline; }
.close-about-btn {
    position: absolute; top: 15px; right: 25px;
    background: none; border: none; font-size: 40px; font-weight: 300;
    cursor: pointer; color: var(--text-color); transition: opacity 0.3s;
}
.close-about-btn:hover { opacity: 0.5; }

/* =========================================
   9. 移动端适配 (Media Queries - 干净唯一版)
========================================= */
@media (max-width: 768px) {
    /* 1. 原本的手机端适配（千万不能丢！） */
    .site-header { padding: 15px; font-size: 12px; }
    .row-title { font-size: 24px; }
    .gallery-item { height: 250px; }
    .hover-info { bottom: 0; padding: 10px; font-size: 11px; }

    .filter-footer { padding: 10px; justify-content: flex-start; }
    .filter-group {
        gap: 20px; width: 100%; overflow-x: auto;
        padding-bottom: 5px; -ms-overflow-style: none; scrollbar-width: none;
    }
    .filter-group::-webkit-scrollbar { display: none; }
    .filter-btn { font-size: 11px; white-space: nowrap; }

    .close-btn { font-size: 30px; top: 10px; right: 15px; }

    .about-sidebar { width: 100%; right: -100%; }
    .about-sidebar .about-content { padding: 60px 20px !important; }
    .about-name { font-size: 24px !important; }

    /* ==================================== */
    /* 2. 🌟 新增：取消首屏全屏高度，消灭上下白边 */
    /* ==================================== */
    #hero-carousel, .hero-section, .hero-image-container {
        height: auto !important;
    }
    #hero-main-img, #hero-main-video {
        position: relative !important;
        height: auto !important; 
        width: 100% !important;
        max-height: 80vh; /* 稍微限制一下极限高度，防止竖图太长滑不到底 */
        object-fit: contain !important;
        display: block;
    }
}


/* =========================================
   10. 强效修复：击碎隐形遮挡，强制开启点击
========================================= */
.gallery-item {
    position: relative !important;
    z-index: 50 !important; /* 把画廊强行提到上层 */
    pointer-events: auto !important; /* 强制接收鼠标动作 */
    cursor: pointer !important; /* 鼠标放上去绝对会变成 👆 小手 */
}

/* 确保遮罩层在隐藏时绝对不会阻挡鼠标 */
.lightbox-overlay, .about-overlay {
    pointer-events: none; 
}
/* 只有当它们打开时，才允许阻挡鼠标 */
.lightbox-overlay[style*="display: block"], 
.about-overlay.active {
    pointer-events: auto;
}