/* ========================================
   恒美微站 - 全局样式文件
   行业：网站建设 | 域名：hmyw.cn
   风格：研学专业风 | 配色：纯白 + 天蓝 + 浅灰
======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.75;
    color: #333333;
    background-color: #ffffff;
    overflow-x: hidden;
    word-wrap: break-word;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   顶部导航栏
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 4px 30px rgba(0, 102, 204, 0.15);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 48px;
    width: auto;
}

.logo-text {
    font-size: 26px;
    font-weight: 700;
    color: #0066cc;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 500;
    color: #444444;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0066cc;
    background: rgba(0, 102, 204, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0066cc;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: #0066cc;
    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: 280px;
        height: calc(100vh - 80px);
        background: #ffffff;
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
        transition: left 0.4s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 16px 20px;
        width: 100%;
    }
}

/* ========================================
   页脚
======================================== */
.footer {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 18px;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #0066cc;
    border-radius: 2px;
}

.footer-col p {
    color: #666666;
    line-height: 1.8;
    margin-bottom: 12px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #555555;
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #0066cc;
    padding-left: 6px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    color: #555555;
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid #d0d5dc;
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: #777777;
    font-size: 13px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   通用动画
======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   按钮样式
======================================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #0088ff 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}

.btn-secondary {
    background: #ffffff;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-secondary:hover {
    background: #0066cc;
    color: #ffffff;
}

/* ========================================
   卡片样式
======================================== */
.card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 102, 204, 0.15);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 12px;
}

.card-text {
    color: #666666;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #888888;
}

/* ========================================
   波浪分割线
======================================== */
.wave-divider {
    position: relative;
    height: 80px;
    overflow: hidden;
}

.wave-divider svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wave-top {
    margin-top: -80px;
}

/* ========================================
   页面标题区
======================================== */
.page-header {
    background: linear-gradient(135deg, #f0f6fc 0%, #e0ebf7 100%);
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 18px;
    color: #666666;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 32px;
    }

    .page-header p {
        font-size: 16px;
    }
}

/* ========================================
   内容区块
======================================== */
.section {
    padding: 80px 0;
}

.section-light {
    background: #f8fafc;
}

.section-white {
    background: #ffffff;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 16px;
}

.section-title p {
    font-size: 16px;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   网格布局
======================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   非对称布局
======================================== */
.asymmetric-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.asymmetric-layout.reverse {
    grid-template-columns: 0.8fr 1.2fr;
}

.asymmetric-layout .content-side {
    padding: 40px;
}

.asymmetric-layout .image-side {
    position: relative;
}

.asymmetric-layout .image-side img {
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 102, 204, 0.15);
}

.asymmetric-layout .image-side::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #0066cc 0%, #0088ff 100%);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.2;
}

@media (max-width: 992px) {
    .asymmetric-layout,
    .asymmetric-layout.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .asymmetric-layout .image-side::before {
        display: none;
    }
}

/* ========================================
   表单样式
======================================== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333333;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e5ec;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

/* ========================================
   资讯列表
======================================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-item {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.news-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.12);
}

.news-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
}

.news-item-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 12px;
}

.news-item-content p {
    color: #666666;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.news-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #888888;
}

@media (max-width: 768px) {
    .news-item {
        grid-template-columns: 1fr;
    }

    .news-item img {
        height: 200px;
    }
}

/* ========================================
   面包屑导航
======================================== */
.breadcrumb {
    padding: 20px 0;
    background: #f8fafc;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.breadcrumb-list a {
    color: #666666;
    transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
    color: #0066cc;
}

.breadcrumb-list span {
    color: #cccccc;
}

.breadcrumb-list .current {
    color: #0066cc;
    font-weight: 500;
}

/* ========================================
   侧边栏
======================================== */
.sidebar-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.sidebar {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e5ec;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 16px;
    color: #555555;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #0066cc;
    color: #ffffff;
}

@media (max-width: 992px) {
    .sidebar-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }
}

/* ========================================
   分页
======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #ffffff;
    color: #555555;
    font-weight: 500;
    border: 2px solid #e0e5ec;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
}

/* ========================================
   工具类
======================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.hidden {
    display: none;
}

/* ========================================
   服务行布局 (services.html 专用)
======================================== */
.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.service-row.reverse {
    direction: rtl;
}

.service-row.reverse > * {
    direction: ltr;
}

.service-row:last-child {
    margin-bottom: 0;
}

.service-image {
    position: relative;
}

.service-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 102, 204, 0.15);
    transition: transform 0.4s ease;
}

.service-image:hover img {
    transform: scale(1.02);
}

.service-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #0066cc 0%, #0088ff 100%);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.15;
}

.service-content {
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.service-tag {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #e8f4fc 0%, #d0e8f8 100%);
    color: #0066cc;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
}

.service-content h3 {
    font-size: 26px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 16px;
}

.service-content p {
    color: #666666;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.service-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.service-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 14px;
    color: #444444;
    font-weight: 500;
}

.service-feature-item::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #0066cc;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .service-row,
    .service-row.reverse {
        grid-template-columns: 1fr;
        gap: 40px;
        direction: ltr;
    }
    
    .service-row.reverse > * {
        direction: ltr;
    }

    .service-image::before {
        display: none;
    }

    .service-features {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   打印样式
======================================== */
@media print {
    .header,
    .footer,
    .hamburger {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .section {
        padding: 20px 0;
    }
}

/* ========================================
   发展历程时间线样式 (about.html 专用)
======================================== */
.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    padding-left: 40px;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #0066cc 0%, #0088ff 100%);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 32px;
    width: 14px;
    height: 14px;
    background: #0066cc;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.2);
}

.timeline-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.12);
}

.timeline-year {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #e8f4fc 0%, #d0e8f8 100%);
    color: #0066cc;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: 12px;
}

.timeline-item h3 {
    font-size: 20px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 10px;
}

.timeline-item p {
    color: #666666;
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .timeline-list {
        padding-left: 30px;
    }

    .timeline-item::before {
        left: -36px;
        width: 12px;
        height: 12px;
    }

    .timeline-item {
        padding: 20px;
    }
}
