/* ========================================
   style.css - 全终端响应式（移动端下拉修复版）
   确保手机端点击父级 → 下拉平滑展开
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", serif;
    background: var(--bg-light);
    color: var(--black);
    line-height: 1.6;
    font-size: 16px;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== PC 导航 ===== */
.nav-pc {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    padding: 0 2rem;
    height: 70px;
    box-shadow: 0 4px 12px rgba(92, 61, 46, 0.3);
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 3px solid var(--gold);
    list-style: none;
}
.nav-pc > li {
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
}
.nav-pc > li > a {
    color: var(--bg-light);
    padding: 0 18px;
    font-size: 16px;
    font-weight: 500;
    height: 70px;
    line-height: 70px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: 0.3s;
}
.nav-pc > li > a:hover {
    color: var(--gold);
    border-bottom-color: var(--accent);
}
.dropdown {
    position: absolute;
    top: 70px;
    left: 0;
    min-width: 200px;
    background: #fff;
    padding: 10px 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-top: 3px solid var(--accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.25s;
    z-index: 1000;
}
.nav-pc > li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown li a {
    display: block;
    padding: 10px 24px;
    color: var(--black);
    border-left: 3px solid transparent;
    transition: 0.2s;
}
.dropdown li a:hover {
    background: var(--bg-light);
    border-left-color: var(--gold);
}

/* ========================================
   移动端适配 (≤1024px)
   重点：下拉菜单展开/收起
======================================== */
@media (max-width: 1024px) {
    /* 汉堡按钮 */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 2px solid var(--gold);
        color: var(--gold);
        padding: 6px 14px;
        font-size: 18px;
        border-radius: 4px;
        cursor: pointer;
        margin-bottom: 8px;
        align-self: flex-start;
        background: rgba(255,255,255,0.05);
    }
    .menu-toggle:focus {
        outline: 2px solid var(--accent);
    }

    /* 导航容器纵向 */
    .nav-pc {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 10px 16px;
        background: var(--primary);
        position: sticky;
        top: 0;
        z-index: 999;
        border-bottom: 3px solid var(--gold);
    }
    .nav-pc > li {
        position: relative;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        overflow: visible;
    }
    .nav-pc > li > a {
        height: 50px;
        line-height: 50px;
        padding: 0 10px;
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 15px;
        color: var(--bg-light);
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    /* 右侧箭头（仅当有下拉时显示） */
    .nav-pc > li.has-dropdown > a::after {
        content: "▾";
        font-size: 12px;
        transition: transform 0.3s;
        margin-left: 10px;
        flex-shrink: 0;
    }
    .nav-pc > li.has-dropdown.open > a::after {
        transform: rotate(180deg);
    }

    /* 下拉菜单 - 移动端展开形式 */
    .dropdown {
        position: relative;         /* 相对于父级定位，不脱离文档流 */
        top: 0;
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.08);
        backdrop-filter: blur(4px);
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        border-top: none;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
        z-index: 1001;
        pointer-events: none;
        margin-top: 0;
    }
    /* 展开状态 */
    .nav-pc > li.open .dropdown {
        opacity: 1;
        visibility: visible;
        max-height: 500px;          /* 足够容纳所有子项 */
        padding: 8px 0;
        pointer-events: auto;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    .dropdown li a {
        color: var(--bg-light);
        padding: 12px 20px;
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        font-size: 14px;
        background: transparent;
        transition: background 0.2s;
    }
    .dropdown li a:hover {
        background: var(--primary-hover);
    }
    .dropdown li:last-child a {
        border-bottom: none;
    }

    /* ---- 面包屑（横版滚动） ---- */
    .breadcrumb {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding: 10px 16px;
        background: var(--bg-light);
        border-bottom: 1px solid var(--gray-warm);
        font-size: 14px;
        color: var(--text-muted);
        gap: 6px;
        align-items: center;
        scrollbar-width: none;
    }
    .breadcrumb::-webkit-scrollbar {
        display: none;
    }
    .breadcrumb a {
        color: var(--primary);
        flex-shrink: 0;
    }
    .breadcrumb .separator {
        flex-shrink: 0;
        color: var(--gray-warm);
        margin: 0 4px;
    }
    .breadcrumb .current {
        color: var(--black);
        font-weight: 500;
        flex-shrink: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
}

/* 大于1024px隐藏汉堡 */
@media (min-width: 1025px) {
    .menu-toggle {
        display: none !important;
    }
}

/* 其他通用样式 */
#main-content {
    max-width: 1280px;
    margin: 20px auto;
    padding: 0 20px;
}
.site-footer {
    background: var(--footer-bg);
    color: var(--bg-light);
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 4px solid var(--gold);
}
.content-card {
    background: var(--card);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    border-left: 6px solid var(--gold);
}
.tab-nav {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--gray-warm);
    transition: 0.2s;
}
.tab-btn.active {
    background: var(--primary);
    color: #fff;
}