/* ========================================
   途站设计 - 留学行业专属网站定制
   全局样式文件 - studyingabroad.cn
   绿色农业风格：翠绿 + 金黄 + 浅棕
======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: #3d3d3d;
    background-color: #f9fbf9;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 颜色变量 */
:root {
    --primary-green: #2d7a3e;
    --light-green: #4caf50;
    --dark-green: #1b5e20;
    --golden: #d4a017;
    --light-brown: #c4a574;
    --beige: #f5f0e6;
    --white: #ffffff;
    --text-dark: #3d3d3d;
    --text-light: #666666;
    --border-color: #e0e0e0;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部导航栏
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
    padding: 20px 0;
}

.header.scrolled {
    background: rgba(45, 122, 62, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 12px 22px;
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--golden);
    color: var(--dark-green);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 移动端菜单 */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--dark-green);
        flex-direction: column;
        padding: 30px 20px;
        gap: 10px;
        transition: left 0.4s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        padding: 18px 25px;
        font-size: 17px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ========================================
   页脚
======================================== */
.footer {
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--primary-green) 100%);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--golden);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--golden);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 2;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--golden);
    padding-left: 8px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 25px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Hero Banner 区域
======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(45, 122, 62, 0.9) 0%, rgba(27, 94, 32, 0.85) 100%),
                url('../images/banner-bg.jpg') center/cover no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 22px);
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn {
    display: inline-block;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--golden);
    color: var(--dark-green);
}

.btn-primary:hover {
    background: #e5b530;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 160, 23, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-green);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   通用区块样式
======================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 8px 25px;
    background: rgba(45, 122, 62, 0.1);
    color: var(--primary-green);
    font-size: 14px;
    font-weight: 600;
    border-radius: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.section-desc {
    font-size: 17px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   服务卡片网格
======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.service-card-img {
    height: 220px;
    overflow: hidden;
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-img img {
    transform: scale(1.1);
}

.service-card-content {
    padding: 30px;
}

.service-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 12px;
}

.service-card-desc {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--golden);
    font-weight: 600;
    transition: gap 0.3s ease;
}

.service-card-link:hover {
    gap: 15px;
}

/* ========================================
   优势特色板块
======================================== */
.features {
    background: linear-gradient(135deg, var(--beige) 0%, #fff 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 40px;
    height: 40px;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.feature-desc {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========================================
   资讯列表
======================================== */
.news-section {
    background: var(--beige);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.news-card-img {
    height: 180px;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img img {
    transform: scale(1.08);
}

.news-card-content {
    padding: 22px;
}

.news-card-date {
    font-size: 13px;
    color: var(--golden);
    margin-bottom: 10px;
}

.news-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   内页 Banner
======================================== */
.page-banner {
    position: relative;
    height: 50vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(45, 122, 62, 0.85) 0%, rgba(27, 94, 32, 0.8) 100%),
                url('../images/banner-bg.jpg') center/cover no-repeat;
    margin-top: 80px;
}

.page-banner-content {
    text-align: center;
    color: var(--white);
}

.page-banner-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: 15px;
}

.page-banner-desc {
    font-size: 16px;
    opacity: 0.9;
}

/* ========================================
   内容页面布局
======================================== */
.content-wrapper {
    padding: 80px 0;
    min-height: calc(100vh - 500px);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   文章列表页
======================================== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .article-item {
        grid-template-columns: 1fr;
    }
}

.article-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.article-item-img {
    height: 200px;
    overflow: hidden;
}

.article-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-item:hover .article-item-img img {
    transform: scale(1.08);
}

.article-item-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-item-date {
    font-size: 14px;
    color: var(--golden);
    margin-bottom: 10px;
}

.article-item-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-item-excerpt {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-item-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-green);
    font-weight: 600;
}

/* ========================================
   侧边栏
======================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--beige);
}

.sidebar-category ul li {
    margin-bottom: 12px;
}

.sidebar-category ul li a {
    display: block;
    padding: 12px 18px;
    background: var(--beige);
    border-radius: 8px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.sidebar-category ul li a:hover,
.sidebar-category ul li a.active {
    background: var(--primary-green);
    color: var(--white);
}

.sidebar-news ul li {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--beige);
}

.sidebar-news ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-news-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-news-date {
    font-size: 13px;
    color: var(--text-light);
}

/* ========================================
   文章详情页
======================================== */
.article-detail {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.article-detail-header {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--beige);
}

.article-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-detail-meta {
    display: flex;
    gap: 25px;
    color: var(--text-light);
    font-size: 14px;
}

.article-detail-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-detail-content {
    line-height: 2;
    color: var(--text-dark);
}

.article-detail-content p {
    margin-bottom: 25px;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
}

/* ========================================
   相关新闻
======================================== */
.related-news {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid var(--beige);
}

.related-news-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--beige);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.related-card:hover {
    background: var(--primary-green);
    transform: translateY(-5px);
}

.related-card:hover .related-card-title,
.related-card:hover .related-card-date {
    color: var(--white);
}

.related-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-date {
    font-size: 13px;
    color: var(--text-light);
}

/* ========================================
   关于我们页面
======================================== */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

@media (max-width: 992px) {
    .about-intro {
        grid-template-columns: 1fr;
    }
}

.about-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.about-text h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 25px;
}

.about-text p {
    color: var(--text-light);
    line-height: 2;
    margin-bottom: 20px;
}

/* ========================================
   团队展示
======================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-card {
    text-align: center;
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.team-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--beige);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.team-position {
    color: var(--golden);
    font-weight: 600;
    margin-bottom: 15px;
}

.team-desc {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
}

/* ========================================
   联系表单
======================================== */
.contact-section {
    background: var(--beige);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info-box {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.contact-info-box h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 25px;
}

.contact-detail {
    margin-bottom: 30px;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-detail-icon {
    width: 45px;
    height: 45px;
    background: var(--beige);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-detail-icon img {
    width: 22px;
    height: 22px;
}

.contact-detail-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.contact-detail-text p {
    color: var(--text-light);
    font-size: 14px;
}

.contact-form-box {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

.contact-form-box h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    padding: 16px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    background: var(--dark-green);
}

/* ========================================
   滚动动画
======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式调整
======================================== */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .hero {
        min-height: 500px;
    }

    .services-grid,
    .features-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ========================================
   工具类
======================================== */
.text-center {
    text-align: center;
}

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}

.hidden {
    display: none;
}
