/* static/css/base.css */
html {
    -webkit-text-size-adjust: 100%;
    /* 兼容 iOS Safari 和旧版 Chrome */
    -ms-text-size-adjust: 100%;
    /* 兼容旧版 IE */
    text-size-adjust: 100%;
    /* 标准属性 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f4f9fe;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    position: -webkit-sticky;
    /* 兼容旧版 Safari 浏览器 */
    position: sticky;
    top: 0;
    /* 触发吸附的临界位置 */
    z-index: 1000;
    background-color: #fff;
}


.main-header {
    background: linear-gradient(135deg, #1A3E60, #2C5A7A);
    color: white;
    padding: 0.8rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #e6b422;
    height: auto;

    border-radius: 28px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

}

.logo {
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 1.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
    cursor: pointer;
    font-weight: 500;
}

.nav-item span {
    font-size: 1.2rem;
}

.nav-item a {
    font-size: 1.2rem;
}

.nav-item a {
    color: white;
    text-decoration: none;
}

.dropdown-content {
    position: absolute;
    background: #2C5A7A;
    top: 100%;
    left: 0;
    min-width: 150px;
    border-radius: 12px;
    padding: 0.5rem 0;
    display: none;
    z-index: 100;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    font-size: 0.8rem;
}

.dropdown-content a {
    font-size: 1.0rem;
}


.dropdown-content a {
    display: block;
    padding: 0.5rem 1rem;
    color: #ffdd99;
    text-decoration: none;
    transition: 0.2s;
}

.dropdown-content a:hover {
    background: #1A3E60;
    color: white;
}

.nav-item:hover .dropdown-content {
    display: block;
}

.red-links a {
    color: #ff7b72;
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.main-footer {
    background: #1e2f3a;
    color: #cddce9;
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    margin-top: -1rem;
}

.footer-links a {
    color: #bcd0df;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.footer-info {
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-info a {
    color: white;
}

/* 视频模态框 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* 模态框内容容器 */
.modal-content {
    position: relative;
    /* 使关闭按钮相对定位 */
    background: #000;
    /* 黑色背景更协调 */
    border-radius: 12px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    /* 防止内容溢出 */
    padding: 0;
    /* 移除内边距，视频撑满 */
}


/* 修改关闭按钮样式 */
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    z-index: 1001;
    transition: 0.2s;
}

.close-modal:hover {
    background: #ff4d4d;
    color: #fff;
}

.modal-content video {
    width: 100%;
    outline: none;
}

.slogan {
    font-size: 1.2rem;
    opacity: 0.9;
}


/* 播放器容器 */
#modalPlayerContainer {
    width: 100%;
    height: 70vh;
    /* 视口高度的70%，适配各种屏幕 */
    min-height: 400px;
    /* 确保控制条可见的最小高度 */
    background: #000;
}

#modalPlayerContainer iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 移动端适配 */
@media (max-width: 600px) {
    #modalPlayerContainer {
        height: 50vh;
        min-height: 300px;
    }

    .close-modal {
        top: 5px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 24px;
        line-height: 32px;
    }
}

/* 计数器*/
.visitor-count {
    margin-top: 8px;
    color: #faf7f7;
    font-size: 14px;
}

.visitor-count span {
    color: #c0392b;
    font-weight: bold;
    font-size: 18px;
}

/* 留言模态框定制 */
#contactModal .modal-content {
    background: #fff;
    padding: 30px 35px;
    border-radius: 16px;
    max-width: 550px;
}

#contactModal input,
#contactModal textarea {
    font-family: inherit;
}

#contactModal label {
    font-size: 14px;
    color: #333;
    margin-bottom: 3px;
    display: block;
}

/* 侧边栏留言按钮 */
.sidebar-contact {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-contact .sidebar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #2C5A7A;
    color: white;
    padding: 12px 6px;
    border-radius: 8px 0 0 8px;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: background 0.3s, transform 0.2s;
    min-width: 64px;
}

.sidebar-contact .sidebar-btn:hover {
    background: #1A3E60;
    transform: scale(1.05);
}

.sidebar-contact .sidebar-btn img {
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
}

/* 移动端适配：缩小尺寸，避免遮挡 */
@media (max-width: 600px) {
    .sidebar-contact {
        right: 10px;
    }

    .sidebar-contact .sidebar-btn {
        padding: 8px 4px;
        min-width: 50px;
        font-size: 12px;
        border-radius: 6px 0 0 6px;
    }

    .sidebar-contact .sidebar-btn img {
        width: 28px;
        height: 28px;
    }
}

/* ===== 侧边栏微信按钮 ===== */
.sidebar-contact .weixin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #2C5A7A;
    color: white;
    padding: 12px 6px;
    border-radius: 8px 0 0 8px;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: background 0.3s, transform 0.2s;
    min-width: 64px;
    margin-top: 8px;
    /* 与留言按钮间隔 */
    position: relative;
    /* 让内部弹窗相对于此定位 */
    cursor: pointer;
}

.sidebar-contact .weixin:hover {
    background: #1A3E60;
    transform: scale(1.05);
}

.sidebar-contact .weixin img {
    width: 36px;
    height: 36px;
    margin-bottom: 4px;
}

/* 二维码弹窗（默认隐藏） */
.sidebar-contact .weixin .weixin_nr {
    display: none;
    position: absolute;
    right: 100%;
    /* 从左侧弹出 */
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    margin-right: 10px;
}

.sidebar-contact .weixin .weixin_nr img {
    width: 152px;
    height: 152px;
    display: block;
}

/* 鼠标悬停或通过 JS 添加 .on 类时显示弹窗 */
.sidebar-contact .weixin.on .weixin_nr,
.sidebar-contact .weixin:hover .weixin_nr {
    display: block;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .sidebar-contact .weixin {
        padding: 8px 4px;
        min-width: 50px;
        font-size: 12px;
        border-radius: 6px 0 0 6px;
        margin-top: 6px;
    }

    .sidebar-contact .weixin img {
        width: 28px;
        height: 28px;
    }

    .sidebar-contact .weixin .weixin_nr {
        right: 100%;
        margin-right: 6px;
        padding: 4px;
    }

    .sidebar-contact .weixin .weixin_nr img {
        width: 100px;
        height: 100px;
    }
}

/* 修复微信按钮内部布局，使其与在线留言按钮一致 */
.sidebar-contact .weixin a {
    display: flex;
    flex-direction: column;
    /* 垂直排列 */
    align-items: center;
    /* 水平居中 */
    justify-content: center;
    /* 垂直居中 */
    text-decoration: none;
    /* 去掉下划线 */
    color: white;
    /* 文字颜色 */
    width: 100%;
    height: 100%;
}