/**
 * yanyi.css - 核心业务页面样式
 */

/* --- 全局及背景 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    color: #bca475; 
    font-size: 14px;
    line-height: 1.8;
    position: relative; 
    min-height: 100vh;
    overflow-x: hidden;
}
.page-content-wrapper {
    padding-top: 0px;
    position: relative;
}
.page-content-wrapper::before {
    content: ""; position: absolute; top: 50px; left: 0;
    width: 100%; height: calc(100% - 90px); 
    background: #111 url('../img/bg-4.png') no-repeat top center; 
    background-size: 100% 100%; 
    z-index: -1;
}
.container { width: 72vw; margin: 0 auto; position: relative; }

/* --- 导航栏样式 --- */
.nav-wrapper { width: 100%; height: 50px; margin-bottom: 60px; display: flex; }
.nav-item { 
    width: 160px; height: 50px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 18px; cursor: pointer; 
    border: 1px solid #b08d55; margin-right: -1px; 
    background-color: #fff; color: #b08d55; 
    position: relative; 
    text-decoration: none;
    transition: all 0.2s;
}
.nav-item.active { 
    background-color: #b08d55; 
    color: #fff; 
    border-color: #b08d55; 
    z-index: 2; 
}
.nav-item.active::after { 
    content: ''; position: absolute; bottom: -10px; left: 50%; 
    transform: translateX(-50%); width: 0; height: 0; 
    border-left: 10px solid transparent; 
    border-right: 10px solid transparent; 
    border-top: 10px solid #b08d55; 
}

/* --- 布局核心 --- */
.show-section { display: flex; margin-bottom: 80px; align-items: stretch; }
.poster-col { flex: 0 0 480px; margin-right: 60px; }
.poster-col img { 
    width: 100%; height: 100%; object-fit: cover; display: block; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
    transition: transform 0.3s ease;
}
.poster-col img:hover { transform: scale(1.05); }
.info-col { flex: 1; padding-top: 5px; display: flex; flex-direction: column; }

/* 标题区域 */
.section-header { display: flex; align-items: flex-end; border-bottom: 1px solid #b08d55; height: 60px; margin-bottom: 25px; position: relative; flex-shrink: 0; }
.icon-doc { width: 22px; height: 25px; border: 1px solid #b08d55; border-radius: 1px; display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; padding: 4px 3px; margin-bottom: 15px; margin-right: 10px; }
.icon-doc span { display: block; width: 12px; height: 1px; background-color: #b08d55; }
.vertical-line { width: 1px; height: 50px; background-color: #b08d55; margin-bottom: 0; margin-right: 10px; }
.section-header h2 { font-size: 28px; color: #b08d55; font-weight: normal; line-height: 1; letter-spacing: 2px; margin-bottom: 15px; }
.icon-more { position: absolute; right: 0; bottom: 15px; }

/* 文本描述 */
.description { margin-top: 10px; height: 350px; overflow: hidden; }
.description p { font-size: 16px; color: #bca475; text-align: justify; line-height: 1.6em; margin-bottom: 20px; }
.thumbnails { display: flex; gap: 20px; margin-top: auto; }
.thumbnails img { 
    width: calc(50% - 10px); height: 220px; object-fit: cover; 
    border: 1px solid #bca475; padding: 8px; 
    transition: transform 0.3s ease;
}
.thumbnails img:hover { transform: scale(1.05); }

/* 底部卡片轮播 */
.card-carousel {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
}
.card-carousel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #b08d55;
    z-index: 10;
}
.card-track {
    display: flex;
    gap: 20px;
    width: fit-content;
    will-change: transform;
}

.card { 
    display: flex; 
    flex-direction: column; 
    height: 450px; 
    position: relative; 
    overflow: hidden;
    /* 固定卡片宽度：容器宽度72vw，减去3个间距60px，除以4 */
    width: calc((72vw - 60px) / 4);
    flex-shrink: 0;
}
.card-img-wrap { width: 100%; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-content { padding: 25px; display: flex; flex-direction: column; overflow: hidden; }
.card h3 { font-size: 18px; margin-bottom: 12px; font-weight: normal; }
.card p { font-size: 12px; line-height: 1.6; text-align: justify; }

/* 卡片风格：黑底风格 */
.style-dark .card-img-wrap { height: 40%; flex-shrink: 0; }
.style-dark .card-content { height: 60%; background-color: #000; border-top: none; border-bottom: 2px solid #b08d55; color: #fff; }
.style-dark h3 { color: #fff; }
.butterfly h3 { color: #d32f2f; }

/* 去除卡片内容中a标签的默认样式 */
.card-content a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* 确保h3在a标签内时保持原有样式 */
.card-content a h3 {
    margin: 0;
    padding: 0;
    color: inherit;
}

/* 去除海报区域a标签的默认样式 */
.poster-col a {
    display: block;
    width: 100%;
    height: 100%;
}

/* 去除标题区域a标签的默认样式 */
.section-header a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

/* 确保h2在a标签内时保持原有样式 */
.section-header a h2 {
    margin: 0;
    padding: 0;
    color: inherit;
}

/* 去除卡片图片区域a标签的默认样式 */
.card-img-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

/* 卡片风格：金底遮罩风格 */
.style-gold { border: none; }
.style-gold .card-img-wrap { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.style-gold .card-content { position: absolute; bottom: 0; left: 0; width: 100%; height: 40%; z-index: 1; background-color: rgba(198, 181, 147, 0.9); color: #000; }
.style-gold h3 { color: #000; }
.style-gold p { color: #1a1a1a; }

/* 底部箭头按钮样式 */
.slider-controls { display: flex; justify-content: center; gap: 60px; padding: 0px 0 60px 0; }
.arrow { width: 40px; height: 40px; border-radius: 50%; background-color: #a6a6a6; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.3s; }
.arrow:hover { background-color: #b08d55; }
.arrow::before { content: ''; width: 10px; height: 10px; border-top: 2px solid #fff; border-right: 2px solid #fff; display: block; }
.arrow:first-child::before { transform: rotate(-135deg); margin-left: 4px; }
.arrow:last-child::before { transform: rotate(45deg); margin-right: 4px; }

/* ================= 手机端适配 ================= */
.mobile-nav {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

@media screen and (max-width: 768px) {
    /* 1. 隐藏 PC 端 Header */
    .header-component-wrapper {
        display: none !important;
    }
    
    /* 2. Banner 适配 */
    .banner {
        display: flex !important;
        height: 230px;
        margin-top: 90px; /* 紧接在 header 下方 */
        background-size: cover;
        position: relative;
    }

    .banner img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover;
    }

    .banner-text-container {
        width: 100%;
        padding: 0 20px;
        justify-content: flex-start;
    }

    .banner-title-group {
        height: 40px;
        transform: translateY(0);
    }

    .banner-red-line {
        height: 80%;
        margin-right: 15px;
        width: 4px;
    }

    .banner-main-title {
        font-size: 28px;
        letter-spacing: 2px;
    }

    /* 3. 显示手机端导航 (复制自 sousuo.css) */
    .mobile-nav {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
        height: 90px;
        background-color: rgba(174, 31, 3, 0.9);
        position: fixed;
        top: 0; left: 0; z-index: 1000;
        padding: 0 15px;
    }

    .mobile-menu-btn, .mobile-search-btn {
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        width: 40px;
        height: 90px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-right-tools {
        display: flex;
        height: 90px;
        align-items: center;
    }

    .mobile-lang-btn {
        color: #fff;
        font-size: 12px;
        font-weight: bold;
        cursor: pointer;
        border: 1px solid #fff;
        border-radius: 2px;
        padding: 3px 6px;
        margin-left: 10px;
        height: auto;
        width: auto;
        display: inline-block;
        line-height: 1;
    }

    .mobile-logo-box {
        position: absolute;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        background-color: transparent;
        height: 90px;
        width: 160px;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: none;
        z-index: 1001;
    }

    .mobile-logo-box img {
        max-width: 80%;
        max-height: 80%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* 手机端全屏菜单样式 */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 2000;
        display: none;
        flex-direction: column;
        justify-content: flex-start;
    }

    .mobile-menu-content {
        width: 100%;
        background-color: transparent;
        max-height: 80vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu-header {
        display: flex;
        height: 90px;
        width: 100%;
    }

    .mobile-menu-close {
        width: 70px;
        height: 90px;
        background-color: #ae1f03;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }

    .mobile-menu-close i {
        color: #fff;
        font-size: 50px;
    }

    .mobile-menu-logo {
        flex: 1;
        min-width: 0;
        background-color: #000;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 0 20px;
    }

    .mobile-menu-logo img {
        height: auto;
        max-height: 100px;
        width: 100%;
    }

    .mobile-menu-list {
        background-color: #000;
        padding-left: 20px;
        display: flex;
        flex-direction: column;
        margin-left: 70px;
    }

    .mm-item {
        width: 100%;
        border-bottom: 1px solid #333;
    }

    .mm-link, .mm-link-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        color: #fff;
        font-size: 18px;
        text-decoration: none;
        cursor: pointer;
        background-color: #000;
        transition: background-color 0.3s;
    }

    .mm-link:hover, .mm-link-wrapper:hover {
        background-color: #1a1a1a;
    }

    .mm-item.active .mm-link-wrapper {
        background-color: #606060;
    }

    .mm-link-text {
        font-weight: normal;
    }

    .mm-arrow-box {
        padding-left: 15px;
        border-left: 1px solid #999;
        display: flex;
        align-items: center;
        height: 14px;
    }

    .mm-item.active .mm-arrow-box {
        border-left-color: #000;
    }

    .mm-arrow {
        font-size: 14px;
        color: #fff;
        transition: transform 0.3s;
    }

    .mm-item.active .mm-arrow {
        transform: rotate(180deg);
        color: #fdb933;
    }

    .mm-submenu {
        display: none;
        background-color: #212121;
        padding: 0;
        border-right: 15px solid #606060;
    }

    .mm-item.active .mm-submenu {
        display: block;
    }

    .mm-sub-link {
        display: block;
        padding: 12px 20px;
        color: #ccc;
        font-size: 16px;
        text-decoration: none;
        border-bottom: 1px solid #444;
    }

    .mm-sub-link:last-child {
        border-bottom: none;
    }

    .mm-sub-link.active {
        color: #fdb933;
    }

    /* 面包屑适配 */
    .breadcrumb {
        padding: 16px 15px; /* 内边距 */
        margin-bottom: 0;
        display: flex;
        align-items: center;
        font-size: 0; /* 隐藏直接文本节点 (例如 >) */
        color: #333;

        /* 全屏白色背景处理 */
        width: calc(100% + 30px);
        margin-left: -15px;
        background-color: #fff;
        position: relative;
        z-index: 5; /* 确保在黑色背景之上 */
    }

    .breadcrumb a:first-child {
        display: inline-block;
        width: 32px;
        height: 32px;
        background: url('../img/icon-27.png') no-repeat center center;
        background-size: contain;
        font-size: 0;
        margin-right: 15px;
        position: relative;
    }

    .breadcrumb a:first-child::after {
        content: '';
        position: absolute;
        right: -15px;
        top: 3px;
        height: 26px;
        width: 2px;
        background-color: #ddd;
    }

    .breadcrumb span,
    .breadcrumb a {
        font-size: 18px;
        color: #333;
        font-family: 'SourceHanSansCN', 'CustomArial', 'CustomArialUnicode', sans-serif;
    }

    .breadcrumb span {
        margin-left: 0;
        font-weight: normal;
    }

    .breadcrumb span:first-of-type {
        margin-left: 15px;
    }

    .breadcrumb span:not(:last-child)::after {
        content: '>';
        margin-left: 8px;
        margin-right: 8px;
        color: #666;
        font-weight: normal;
        display: inline-block;
        vertical-align: middle;
        /* 重置之前可能存在的竖线样式 */
        width: auto;
        height: auto;
        background-color: transparent;
    }

    /* 容器适配 */
    .container {
        width: 100%;
        padding: 0 15px;
    }

    /* 搜索栏适配 */
    .header-search-bar {
        top: 90px;
        background-color: rgba(31, 31, 31, 0.95);
        height: auto;
        padding: 30px 0;
        z-index: 999;
    }

    .header-search-bar .search-container {
        width: 90%;
        max-width: none;
    }

    /* --- yanyi.html 特有内容适配 --- */

    /* 导航 Tabs */
    .nav-wrapper {
        /* 两边要有 margin：不再全屏，跟随 container 宽度 */
        width: calc(100% + 30px); /* 恢复全屏背景 */
        margin-left: -15px; /* 抵消 container padding */
        padding-left: 15px; /* 内容缩进 */
        padding-right: 15px; /* 内容缩进 */
        
        display: flex;
        flex-wrap: nowrap;
        /* 允许溢出以显示三角 */
        overflow: visible; 
        margin-bottom: 40px; 
        height: 50px; 
        background-color: #fff; /* 白色背景 */
        
        position: relative;
        z-index: 5;
        align-items: center;
    }
    
    .nav-item {
        flex: 1; /* 平分宽度 */
        width: auto;
        padding: 0;
        min-width: 0;
        font-size: 16px;
        height: 50px; 
        
        /* 恢复PC端样式 */
        border: 1px solid #b08d55;
        margin-right: -1px;
        background-color: #fff; /* 恢复白色背景 */
        color: #b08d55;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative; 
    }

    /* 修正 nav-wrapper 选中项样式 - 恢复PC端风格 */
    .nav-item.active {
        background-color: #b08d55; 
        color: #fff;
        border-color: #b08d55;
        z-index: 2;
    }
    
    .nav-item.active::after {
        display: block; 
        content: ''; 
        position: absolute; 
        bottom: -10px; 
        left: 50%; 
        transform: translateX(-50%); 
        width: 0; 
        height: 0; 
        border-left: 10px solid transparent; 
        border-right: 10px solid transparent; 
        border-top: 10px solid #b08d55; 
        z-index: 3;
    }
    .show-section {
        flex-direction: column;
        margin-bottom: 40px;
        padding-top: 30px; /* 增加顶部间距 */
    }

    .poster-col {
        flex: none;
        width: 80%; /* 缩小宽度 */
        margin: 0 auto 20px; /* 居中显示 */
    }

    .poster-col img {
        width: 100%;
        height: auto;
        max-height: none; /* 取消高度限制 */
        box-shadow: none; /* 手机端可能不需要阴影 */
    }

    .info-col {
        width: 80%; /* 与图片宽度一致 */
        margin: 0 auto; /* 居中显示，保证左右留白一致 */
        padding-top: 0;
    }

    /* 标题区域 */
    .section-header {
        height: auto; /* 高度自动 */
        padding-bottom: 0; /* 清除 padding，让竖线能触底 */
        margin-bottom: 15px;
        align-items: flex-end; /* 底部对齐 */
        border-bottom-color: #b08d55;
        position: relative;
    }
    
    .section-header h2 {
        font-size: 20px;
        line-height: 25px; 
        color: #b08d55;
        margin-bottom: 5px; /* 文字距离底部 5px */
    }
    
    .icon-doc {
        transform: scale(0.9);
        margin-bottom: 5px; /* 图标距离底部 5px */
        margin-right: 10px;
        border-color: #b08d55;
        height: 25px;
    }
    
    .vertical-line {
        height: 35px; /* 竖线高度，比文字稍高 */
        margin-bottom: 0; /* 紧贴底部边框，实现连接效果 */
        background-color: #b08d55;
    }
    
    .icon-more {
        position: absolute;
        right: 0;
        bottom: 17.5px; /* 文字中心高度：margin-bottom 5px + line-height 25px / 2 */
        transform: translateY(50%); /* 自身向下偏移50%以实现居中 */
        top: auto; 
        width: 64px;
        height: auto;
    }

    /* 描述文本 */
    .description {
        height: auto; /* 自动高度 */
        margin-bottom: 20px;
    }

    .description p {
        font-size: 14px;
        margin-bottom: 15px;
        color: #bca475; /* 恢复PC端黄色 */
    }

    /* 缩略图 */
    .thumbnails {
        width: 125%; /* 恢复宽度：80% * 125% = 100% (相对于屏幕宽度) */
        margin-left: -12.5%; /* 抵消居中 */
        margin-top: 5px; /* 缩短与文字的间隔至 5px */
        gap: 10px;
        display: flex;
        justify-content: space-between;
    }

    .thumbnails img {
        height: auto;
        width: calc(50% - 5px); /* 两张并排 */
        aspect-ratio: 16/9; /* 保持比例 */
    }

    /* 底部卡片轮播 */
    .card-carousel {
        margin-bottom: 20px;
    }
    
    /* 调整卡片宽度为 40vw 并减小高度 */
    .card {
        width: 40vw; 
        height: 270px;
    }
    
    /* 调整卡片内文字大小以适应缩小后的卡片 */
    .card h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .card p {
        font-size: 12px; /* 已经是最小值，保持不变或稍微缩小 */
        line-height: 1.4;
    }
    
    .card-content {
        padding: 15px; /* 减小内边距 */
    }
    
    .slider-controls {
        padding-bottom: 30px;
        gap: 80px; /* 增加按钮间距 */
    }
    
    /* 调整背景图位置 */
    .page-content-wrapper::before {
        top: 0;
        height: 100%;
        background-color: #000; /* 确保背景是黑色的 */
        /* 背景图可能在 nav-wrapper 下面，所以需要 nav-wrapper 有背景色 */
        z-index: -1;
    }
    
    /* 修正 nav-wrapper 选中项样式 */
    /* 上方已定义恢复 PC 样式，此处删除多余覆盖 */
    /* .nav-item.active { ... } */
    /* .nav-item.active::after { ... } */
    /* .nav-item { ... } */
}
