/* 全局变量 */
:root {
    /* 主色调 */
    --primary-blue: #1e88e5;
    --secondary-green: #43a047;
    --accent-orange: #ff7043;
    --accent-purple: #7e57c2;

    /* 中性色 */
    --text-dark: #333333;
    --text-light: #666666;
    --background-light: #f5f5f5;
    --white: #ffffff;
    --gray-light: #e0e0e0;

    /* 效果 */
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* 渐变 */
    --gradient-blue: linear-gradient(135deg, #1e88e5 0%, #0d47a1 100%);
    --gradient-green: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    --gradient-orange: linear-gradient(135deg, #ff7043 0%, #e64a19 100%);
}

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* 通用样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    margin-bottom: 1rem;
}

/* 导航栏样式 */
.navbar {
    background: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: var(--shadow-md);
}

.logo-img {
    height: 70px;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-links a.active {
    color: var(--primary-blue);
    position: relative;
    font-weight: bold;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 3px;
    animation: fadeIn 0.3s ease-out forwards;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phone {
    color: var(--primary-blue);
    font-weight: bold;
}

.consultation-btn {
    background: #0d47a1;
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(13, 71, 161, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.consultation-btn:hover {
    background: #0a2e5c;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(13, 71, 161, 0.4);
}

.consultation-btn:active {
    transform: translateY(0);
}

.consultation-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.consultation-btn:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* 主视觉区域样式 */
.hero {
    height: auto;
    min-height: 500px;
    max-height: 800px;
    background: linear-gradient(135deg, #1565c0 0%, #0a2e5c 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
    position: relative;
}

.hero-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    display: block;
    white-space: nowrap;
    font-size: 0;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    display: inline-block;
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    vertical-align: top;
    white-space: normal;
    font-size: 1rem;
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nav-dot.active {
    background: var(--white);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.carousel-prev,
.carousel-next {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.5);
}

.carousel-slide {
    position: relative;
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 15%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    padding: 20px;
    text-align: center;
    color: white;
    z-index: 10;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .hero-content {
        width: 94%;
        padding: 15px;
        bottom: 10%;
    }
}

.hero-content h1 {
    margin-bottom: 15px;
}

.hero-content p {
    margin-bottom: 20px;
}

.hero-content .cta-button {
    background-color: #1a73e8;
    padding: 12px 30px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.hero-content .cta-button:hover {
    background-color: #0d5bba;
}

@media (max-width: 768px) {
    .hero-content {
        width: 95%;
        padding: 15px;
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-button {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: var(--white);
    border: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    box-shadow: 0 6px 12px rgba(21, 101, 192, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #0a2e5c 100%);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(21, 101, 192, 0.4);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.cta-button:focus:not(:active)::after {
    animation: ripple 0.8s ease-out;
}

/* 核心服务样式 */
.services {
    padding: 5rem 5%;
    background: var(--background-light);
    text-align: center;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, transparent, var(--primary-blue), transparent);
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.service-item:hover::before {
    left: 0;
}

.service-item i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.service-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.service-item h3 {
    transition: color 0.3s ease;
}

.service-item:hover h3 {
    color: var(--primary-blue);
}

.service-item p {
    transition: transform 0.3s ease;
}

.service-item:hover p {
    transform: translateX(10px);
}

/* 差异化优势样式 */
.advantages {
    padding: 5rem 5%;
    background: var(--white);
    text-align: center;
}

.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.stat-item {
    padding: 1rem;
}

.number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    display: block;
}

.certifications {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cert-tag {
    background: var(--background-light);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    color: var(--text-dark);
}

/* 成功案例样式 */
.cases,
.news-section,
.success-cases {
    padding: 5rem 5%;
    background: var(--background-light);
    text-align: center;
}

/* 资讯公告样式 */
.news-section {
    background: var(--white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-item {
    background: var(--background-light);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    cursor: pointer;
}

.news-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, transparent, var(--primary-blue), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-item:hover::after {
    transform: scaleX(1);
}

.news-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
    text-align: left;
    transition: transform 0.3s ease;
}

.news-item:hover .news-content {
    transform: translateY(-10px);
}

.news-content h3 {
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.news-item:hover .news-content h3 {
    color: var(--primary-blue);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-green);
}

.read-more:hover::after {
    transform: scaleX(1);
}

.news-item:hover .read-more {
    color: var(--secondary-green);
}

/* 成功案例样式 */
.success-cases {
    background: var(--white);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.case-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.case-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.case-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    padding: 2rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.case-item:hover .case-overlay {
    transform: translateY(0);
}

.case-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--white);
    text-decoration: none;
    border: 2px solid var(--white);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
}

.case-link:hover {
    background: var(--white);
    color: var(--primary-blue);
}

.school-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.case-studies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.case {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.case-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* 客户评价样式 */
.testimonials {
    padding: 5rem 5%;
    background: var(--white);
    text-align: center;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 10px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.quote {
    font-style: italic;
    margin: 1rem 0;
}

.author {
    font-weight: bold;
    color: var(--primary-blue);
}

/* 底部样式 */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 5% 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-section i {
    margin-right: 0.5rem;
    color: var(--primary-blue);
}

.qr-code img {
    width: 150px;
    margin-bottom: 1rem;
}

.quick-links a {
    color: var(--white);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.quick-links a:hover {
    color: var(--primary-blue);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: var(--transition);
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        display: block;
        margin: 1rem 0;
        font-size: 1.2rem;
    }

    .contact-info {
        display: none;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        width: 30px;
        height: 30px;
        position: relative;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--text-dark);
        margin: 5px 0;
        transition: var(--transition);
    }

    .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, -7px);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .stats {
        flex-direction: column;
    }

    .stat-item {
        margin-bottom: 1rem;
    }
}

/* 480px以下设备 */
@media (max-width: 480px) {
    .hero {
        min-height: 400px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .service-grid,
    .news-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .service-item,
    .news-item,
    .case-item {
        margin-bottom: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .team-member {
        flex: 0 0 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-item,
.case,
.testimonial {
    animation: fadeIn 0.5s ease-out forwards;
}

/* 关于我们样式 */
.about-section {
    padding: 5rem 5%;
    background: var(--white);
}

.about-section h2 {
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
}

.about-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.team-section {
    margin: 4rem 0;
}

.team-carousel {
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
    padding: 0 50px;
    /* 为控制按钮留出空间 */
}

.team-grid {
    display: flex;
    width: 100%;
    gap: 2rem;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.team-member {
    flex: 0 0 calc(25% - 1.5rem);
    /* 4个成员，考虑gap */
    min-width: 0;
    /* 防止内容溢出 */
    text-align: center;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.team-carousel-controls {
    position: absolute;
    top: 50%;
    width: calc(100% - 100px);
    /* 减去两侧padding */
    left: 50px;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .team-member {
        flex: 0 0 calc(33.333% - 1.5rem);
        /* 3个成员 */
    }
}

@media (max-width: 992px) {
    .team-member {
        flex: 0 0 calc(50% - 1.5rem);
        /* 2个成员 */
    }
}

@media (max-width: 768px) {
    .team-carousel {
        padding: 0 40px;
    }

    .team-member {
        flex: 0 0 calc(100% - 1.5rem);
        /* 1个成员 */
    }

    .team-carousel-controls {
        width: calc(100% - 80px);
        left: 40px;
    }
}

.team-member {
    text-align: center;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 10px;
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 5px solid var(--primary-blue);
}

.team-carousel-controls {
    position: absolute;
    top: 50%;
    width: 90%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.team-carousel-prev,
.team-carousel-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-blue);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.team-carousel-prev {
    left: 20px;
}

.team-carousel-next {
    right: 20px;
}

.team-carousel-prev:hover,
.team-carousel-next:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.team-carousel-prev:active,
.team-carousel-next:active {
    transform: translateY(-50%) scale(0.95);
}

.timeline-section {
    margin: 4rem 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-blue);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-date {
    position: absolute;
    left: -70px;
    top: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.timeline-content {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-date {
        left: -50px;
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* 为固定导航栏留出空间 */
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}