/* 原生 CSS 变量驱动 (全局) */
:root {
    --yy-primary: #0056b3;
    --yy-primary-hover: #004494;
    --yy-text: #333;
    --yy-text-muted: #666;
    --yy-bg: #fff;
    --yy-gray: #f5f5f5;
    --yy-font: system-ui, -apple-system, sans-serif;
    --yy-transition: all 0.3s ease;
}
body { font-family: var(--yy-font); color: var(--yy-text); margin: 0; padding: 0; line-height: 1.6; }
a { color: var(--yy-primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
.yy-container { max-width: 1500px; margin: 0 auto; padding: 0 15px; }

/* ================= 头部布局 ================= */
.yy-header-wrapper { background: #fff; border-bottom: 2px solid var(--yy-primary); }

/* 1. 顶部信息栏 */
.yy-topbar { background: #f5f5f5; color: #666; font-size: 12px; padding: 8px 0; border-bottom: 1px solid #eee; }
.yy-topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.yy-topbar-right { display: flex; align-items: center; gap: 10px; }
.yy-topbar-right a { color: #666; }
.yy-topbar-right a:hover { color: var(--yy-primary); }
.yy-sep { color: #ccc; }
.yy-lang-switch { display: flex; align-items: center; cursor: pointer; }
.yy-arrow { font-size: 10px; margin-left: 3px; }

/* 2. 中间主体区 */
.yy-header-main { padding: 25px 0; }
.yy-header-main-inner { display: flex; justify-content: space-between; align-items: center; }
.yy-logo-area { display: flex; align-items: center; gap: 30px; }
.yy-logo img { max-height: 60px; width: auto; }
.yy-slogan { border-left: 1px solid #eee; padding-left: 20px; }
.yy-slogan-main { color: var(--yy-primary); font-size: 18px; font-weight: bold; margin-bottom: 5px; }
.yy-slogan-sub { color: #888; font-size: 13px; }

.yy-hotline { display: flex; align-items: center; gap: 10px; }
.yy-hotline-text span { display: block; font-size: 12px; color: #666; }
.yy-hotline-text strong { display: block; font-size: 26px; color: var(--yy-primary); font-family: Impact, sans-serif; line-height: 1; }

.yy-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 5px; }

/* 3. 导航栏 (蓝色背景) */
.yy-nav-bar { background: var(--yy-primary); }
.yy-menu { display: flex; list-style: none; margin: 0; padding: 0; }
.yy-menu > li > a {
    display: block;
    color: #fff;
    font-size: 16px; font-weight: 600; letter-spacing: 0.5px;
    padding: 15px 30px;
    text-decoration: none;
    transition: background 0.3s;
}
.yy-menu > li > a:hover,
.yy-menu > li.current-menu-item > a {
    background: var(--yy-primary-hover);
}

/* 多级下拉菜单原生处理 */
.yy-menu li { position: relative; }
.yy-menu ul.sub-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: #fff; min-width: 200px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 0; margin: 0; list-style: none; z-index: 99;
}
.yy-menu li:hover > ul.sub-menu { display: block; }
.yy-menu ul.sub-menu a { display: block; padding: 12px 20px; color: #333; border-bottom: 1px solid #eee; font-size: 15px; font-weight: 500; }
.yy-menu ul.sub-menu a:hover { color: var(--yy-primary); background: #f9f9f9; }
/* ================= 头部结束 ================= */

/* 基础通用组件 */
.yy-grid { display: grid; gap: 20px; }
.yy-grid-2 { grid-template-columns: repeat(2, 1fr); }
.yy-grid-3 { grid-template-columns: repeat(3, 1fr); }
.yy-grid-4 { grid-template-columns: repeat(4, 1fr); }

.yy-btn { display: inline-block; padding: 10px 24px; border-radius: 4px; transition: var(--yy-transition); }
.yy-btn-primary { background: var(--yy-primary); color: #fff; }
.yy-btn-primary:hover { background: var(--yy-primary-hover); }
.yy-card { border: 1px solid #eee; border-radius: 8px; overflow: hidden; transition: 0.3s; }
.yy-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.yy-card-content { padding: 15px; }

/* ================= 全局通用 YouTube 延迟组件 ================= */
.yy-yt-lazy {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* 自动响应式比例 */
    background-color: #000;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}
.yy-yt-lazy iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}
/* 播放按钮 UI */
.yy-yt-lazy::before {
    content: "▶";
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 36px; color: rgba(255,255,255,0.9); background: rgba(0,0,0,0.5);
    width: 70px; height: 70px; line-height: 70px; text-align: center;
    border-radius: 50%; transition: var(--yy-transition); z-index: 2;
}
.yy-yt-lazy:hover::before { color: #fff; background: var(--yy-primary); }

/* ================= 全局通用多列轮播组件 (Carousel) ================= */
.yy-carousel-container { position: relative; width: 100%; padding: 0 45px; box-sizing: border-box; }
.yy-carousel-wrapper { overflow: hidden; width: 100%; padding-bottom: 10px; }
.yy-carousel-track { display: flex; transition: transform 0.4s ease-in-out; will-change: transform; gap: 20px; }
/* 默认 PC 端显示 4 列 */
.yy-carousel-slide { flex: 0 0 calc(25% - 15px); min-width: 0; box-sizing: border-box; }

.yy-carousel-btn {
    position: absolute; top: calc(50% - 20px); transform: translateY(-50%);
    background: transparent; color: #999; border: none; font-size: 40px; cursor: pointer;
    z-index: 10; transition: color 0.3s; padding: 0; line-height: 1; font-weight: 300;
}
.yy-carousel-btn:hover { color: #d32f2f; }
.yy-carousel-btn.prev { left: -10px; }
.yy-carousel-btn.next { right: -10px; }

.yy-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 25px; }
.yy-carousel-dots span { display: block; width: 8px; height: 8px; border-radius: 50%; background: #ccc; cursor: pointer; transition: 0.3s; }
.yy-carousel-dots span.active { background: #333; width: 20px; border-radius: 4px; }


/* ================= 底部深色布局 ================= */
.yy-footer-wrapper {
    background-color: #171a21; /* 深空蓝背景 */
    color: #8c94a5; /* 优雅的冷灰色文字 */
    font-size: 14px;
    margin-top: 60px;
}

.yy-footer-top {
    display: grid;
    /* 采用 5 列布局，联系方式占宽一点，中间链接平分，右侧二维码固定 */
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 30px;
    padding: 60px 15px;
}

.yy-ft-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 25px;
}

/* 列表通用去样式 */
.yy-footer-top ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 联系方式模块 */
.yy-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    line-height: 1.5;
}
.yy-contact-list svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--yy-primary); /* 图标使用主题色提亮 */
}

/* 链接模块 */
.yy-ft-links li {
    margin-bottom: 12px;
}
.yy-ft-links a {
    color: #8c94a5;
    text-decoration: none;
    transition: color 0.3s ease;
}
.yy-ft-links a:hover {
    color: var(--yy-primary);
}

/* 二维码模块 */
.yy-qr-box {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    display: inline-block;
}
.yy-qr-box img {
    width: 110px;
    height: 110px;
    display: block;
}

/* 底部版权栏 */
.yy-footer-bottom {
    background-color: #111319; /* 更深的底边栏 */
    padding: 20px 0;
    font-size: 13px;
}
.yy-bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.yy-divider {
    margin: 0 10px;
    color: #3a3f51;
}
.yy-footer-bottom a {
    color: #8c94a5;
}
.yy-footer-bottom a:hover {
    color: var(--yy-primary);
}
.yy-friend-links span {
    color: #5c6275;
}
.yy-friend-links a {
    margin: 0 8px;
}

/* ================= 移动端适配 ================= */
@media (max-width: 992px) {
    .yy-topbar, .yy-slogan { display: none; }
    .yy-logo-area { gap: 0; }
    .yy-header-main { padding: 15px 0; }
    .yy-hotline { display: none; }

    .yy-mobile-toggle { display: block; }

    .yy-nav-bar { display: none; background: #fff; border-top: 1px solid #eee; }
    .yy-nav-bar.active { display: block; }

    .yy-menu { flex-direction: column; }
    .yy-menu > li > a { color: #333; border-bottom: 1px solid #eee; padding: 15px; }
    .yy-menu > li > a:hover { background: #f5f5f5; }

    .yy-menu ul.sub-menu { position: static; box-shadow: none; display: none; background: #f9f9f9; }
    .yy-menu li:hover > ul.sub-menu { display: none; }

    .yy-carousel-container { padding: 0; }
    .yy-carousel-slide { flex: 0 0 calc(50% - 10px); }
    .yy-carousel-btn { display: none; }

    .yy-footer-top {
        grid-template-columns: 2fr;
        gap: 40px;
        padding: 40px 15px;
    }
    .yy-bottom-inner {
        gap: 15px;
    }
    .yy-divider {
        display: none;
    }
    .yy-copyright a {
        display: block;
        margin-top: 5px;
    }
}
