/* ========== 基础样式重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 颜色变量 ========== */
:root {
    --primary-color: #a41c2e;
    --primary-dark: #8a1826;
    --primary-light: #c4354a;
    --text-dark: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-light: #f5f5f5;
    --white: #fff;
}

/* ========== 顶部导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 70px;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar .logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu a {
    font-size: 16px;
    color: var(--text-dark);
    padding: 10px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: 0.3s;
}

/* ========== 右侧悬浮侧边栏 ========== */
.sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.sidebar-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 10px;
    text-align: center;
}

.sidebar-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 2px solid var(--white);
}

.sidebar-header .brand {
    font-size: 12px;
    font-weight: bold;
}

.sidebar-header .sub {
    font-size: 10px;
    opacity: 0.9;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.sidebar-item:hover {
    background: var(--bg-light);
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item i {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.sidebar-item span {
    font-size: 12px;
    color: var(--text-light);
}

.sidebar-item .qrcode {
    display: none;
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    margin-right: 10px;
    z-index: 9999;
    width: 140px;
    height: 140px;
}

.sidebar-item .qrcode img {
    display: block;
    width: 120px;
    height: 120px;
    max-width: none;
    object-fit: contain;
}

.sidebar-item:hover .qrcode {
    display: block;
}

/* ========== 底部咨询栏 ========== */
.footer-bar {
    background: url('../img/common/footer-bg.jpg') center/cover no-repeat;
    padding: 40px 0;
    text-align: center;
    position: relative;
}

.footer-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(164, 28, 46, 0.9);
}

.footer-bar .container {
    position: relative;
    z-index: 1;
}

.footer-bar h3 {
    color: var(--white);
    font-size: 28px;
    margin-bottom: 10px;
}

.footer-bar p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

.footer-bar .input-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-bar input {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    width: 200px;
}

.footer-bar .btn-submit {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: var(--primary-dark);
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.footer-bar .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

/* ========== 页脚 ========== */
.footer {
    background: #2a2a2a;
    color: #999;
    padding: 30px 0;
    text-align: center;
    font-size: 14px;
}

.footer a {
    color: #ccc;
}

.footer a:hover {
    color: var(--white);
}

.footer .police-record {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.footer .police-record img {
    width: 18px;
    height: 18px;
    display: inline-block;
}

/* ========== 首页 Banner 轮播 ========== */
.banner {
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.banner-slider {
    display: flex;
    transition: transform 0.5s ease;
}

.banner-slide {
    min-width: 100%;
    position: relative;
}

.banner-slide img {
    width: 100%;
    display: block;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.banner-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dots .dot.active {
    background: var(--white);
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.banner-arrow.prev {
    left: 20px;
}

.banner-arrow.next {
    right: 20px;
}

/* ========== 通用标题样式 ========== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 16px;
    color: var(--text-light);
}

/* ========== 视频区域 ========== */
.video-section {
    background: url('../img/video/video-bg.png') center/cover no-repeat;
    padding: 80px 0;
    text-align: center;
}

.video-section .section-title h2 {
    color: var(--primary-color);
}

.video-section .section-title p {
    color: var(--text-light);
}

.video-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.video-wrapper video {
    width: 100%;
    display: block;
}

.video-cover {
    position: absolute;
    inset: 0;
    background: url('../img/video/video-cover.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-cover.hidden {
    display: none;
}

.play-btn {
    width: 80px;
    height: 80px;
    background: rgba(164, 28, 46, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s;
}

.play-btn::after {
    content: "";
    border: 15px solid transparent;
    border-left: 25px solid var(--white);
    margin-left: 8px;
}

.video-cover:hover .play-btn {
    transform: scale(1.1);
    background: var(--primary-color);
}

/* ========== 优势区域 ========== */
.advantages {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.advantages .section-title h2 {
    color: var(--primary-color);
}

.advantage-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.advantage-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.advantage-card .card-img {
    height: 200px;
    overflow: hidden;
}

.advantage-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.advantage-card:hover .card-img img {
    transform: scale(1.05);
}

.advantage-card .card-content {
    padding: 25px;
}

.advantage-card h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.advantage-card h3 img {
    width: 20px;
}

.advantage-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ========== 导师预览区域 ========== */
.teachers-preview {
    position: relative;
}

.teachers-preview img {
    width: 100%;
    display: block;
}

.teachers-preview-btn {
    background: var(--primary-color);
    padding: 40px 0;
    text-align: center;
}

.teachers-preview-btn .btn-more {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: var(--primary-dark);
    padding: 15px 50px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.teachers-preview-btn .btn-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

/* ========== 提分案例区域 ========== */
.cases-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.cases-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.case-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
}

.case-card .name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.case-card .scores {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.case-card .score {
    font-size: 28px;
    font-weight: bold;
}

.case-card .score.before {
    color: var(--text-muted);
}

.case-card .score.after {
    color: var(--primary-color);
}

.case-card .arrow {
    color: var(--primary-color);
    font-size: 20px;
}

.case-card .improve {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .advantage-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        padding: 0 15px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .sidebar {
        display: none;
    }

    .advantage-list {
        grid-template-columns: 1fr;
    }

    .cases-list {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .footer-bar h3 {
        font-size: 22px;
    }

    .footer-bar .input-group {
        flex-direction: column;
        align-items: center;
    }

    .footer-bar input {
        width: 100%;
        max-width: 300px;
    }
}
