/* ========================================
   杭州华康中正亲子鉴定中心 - 主样式文件
   版本：1.0
   更新时间：2026-01-29
   ======================================== */

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

/* CSS变量 */
:root {
    /* 颜色 */
    --color-primary: #1890FF;
    --color-secondary: #FFFFFF;
    --color-accent: #FF6B6B;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F7FA;
    --bg-dark: #2c3e50;
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-section: 80px;
    
    /* 圆角 */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    
    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* 容器 */
    --container-max-width: 1200px;
}

/* 基础样式 */
body {
    font-family: 'Source Han Sans', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #40a9ff;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--color-primary);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: #40a9ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--bg-primary);
}

.btn-accent {
    background: var(--color-accent);
}

.btn-accent:hover {
    background: #ff8787;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--bg-primary);
}

/* 头部导航 */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

.header.fixed {
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 60px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

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

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
}

/* 页面Banner */
.page-banner {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: 80px;
    overflow: hidden;
    background: var(--bg-dark);
}

.page-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.page-banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--bg-primary);
    z-index: 2;
    width: 100%;
    padding: 0 20px;
}

.page-banner-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-banner-content p {
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 面包屑导航 */
.breadcrumb {
    background: var(--bg-secondary);
    padding: 15px 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    font-size: 14px;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb-list a {
    color: var(--text-secondary);
}

.breadcrumb-list a:hover {
    color: var(--color-primary);
}

.breadcrumb-list li.active {
    color: var(--text-light);
}

/* 通用模块样式 */
.section {
    padding: var(--spacing-section) 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

/* 卡片样式 */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

/* 网格布局 */
.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: 30px;
}

.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

/* 表格样式 */
.table {
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--color-primary);
    color: var(--bg-primary);
    padding: 20px;
    text-align: left;
    font-size: 16px;
}

.table td {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: var(--bg-secondary);
}

/* FAQ样式 */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-secondary);
    margin-bottom: 15px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.faq-question {
    padding: 20px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: #e8e8e8;
}

.faq-question i {
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item.active .faq-answer {
    padding: 0 30px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: #ecf0f1;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--bg-primary);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-column p {
    color: #bdc3c7;
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #bdc3c7;
}

.footer-contact-item i {
    color: var(--color-primary);
    font-size: 18px;
}

.footer-qrcode img {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius-sm);
}

.footer-qrcode p {
    margin-top: 10px;
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding: 20px 0;
    text-align: center;
    color: #95a5a6;
    font-size: 14px;
}

.footer-bottom a {
    color: #95a5a6;
    text-decoration: none;
    margin: 0 10px;
}

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

/* 悬浮工具栏 */
.floating-toolbar {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
}

.floating-toolbar a {
    display: block;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--bg-primary);
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    margin-bottom: 10px;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-size: 20px;
}

.floating-toolbar a:hover {
    background: var(--color-accent);
    transform: scale(1.1);
}

.floating-wechat {
    position: relative;
}

.qrcode-popup {
    display: none;
    position: absolute;
    right: 60px;
    bottom: 0;
    background: var(--bg-primary);
    padding: 10px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    width: 200px;
}

.floating-wechat:hover .qrcode-popup {
    display: block;
}

.qrcode-popup img {
    width: 100%;
    height: auto;
}

.qrcode-popup p {
    text-align: center;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        right: 20px;
        width: 200px;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 0;
        box-shadow: var(--shadow-md);
        z-index: 999;
        border-radius: var(--border-radius-md);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        display: flex;
        align-items: center;
        padding: 0 20px;
        height: 50px;
        line-height: 50px;
        border-bottom: 1px solid #e8e8e8;
        box-sizing: border-box;
    }
    
    .nav-menu a.active::after {
        display: none;
    }
    
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-phone {
        display: none;
    }
    
    .page-banner {
        height: 300px;
    }
    
    .page-banner-content h1 {
        font-size: 32px;
    }
    
    .page-banner-content p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-toolbar {
        right: 10px;
        bottom: 10px;
    }
    
    .floating-toolbar a {
        width: 45px;
        height: 45px;
        line-height: 45px;
    }
}

/* ========================================
   首页专用样式
   ======================================== */

/* 首页Banner */
.banner {
    position: relative;
    width: 100%;
    height: 600px;
    margin-top: 80px;
    overflow: hidden;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--bg-primary);
    z-index: 2;
    width: 100%;
    padding: 0 20px;
}

.banner-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.banner-content .brand-slogan {
    font-size: 20px;
    margin-bottom: 30px;
    font-weight: 500;
}

/* 核心优势模块 */
.advantages {
    background: var(--bg-secondary);
}

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

.advantage-item {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.advantage-icon {
    font-size: 48px;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.advantage-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.advantage-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 鉴定项目模块 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 20px;
}

.project-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: var(--color-primary);
    color: var(--bg-primary);
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.project-card .btn {
    width: 100%;
    text-align: center;
}

/* 鉴定费用模块 */
.pricing {
    background: var(--bg-secondary);
}

.pricing-table {
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.pricing-table table {
    width: 100%;
    border-collapse: collapse;
}

.pricing-table th {
    background: var(--color-primary);
    color: var(--bg-primary);
    padding: 20px;
    text-align: left;
    font-size: 16px;
}

.pricing-table td {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.pricing-table tr:last-child td {
    border-bottom: none;
}

.pricing-note {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 采样方式模块 */
.sampling-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.sampling-item {
    text-align: center;
    padding: 30px 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
}

.sampling-item:hover {
    background: var(--color-primary);
    color: var(--bg-primary);
    transform: translateY(-5px);
}

.sampling-item i {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

.sampling-item:hover i {
    color: var(--bg-primary);
}

.sampling-item h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

/* 鉴定流程模块 */
.process {
    background: var(--bg-secondary);
}

.process-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 60px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    z-index: 1;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.process-icon {
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.process-step h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.process-step p {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 10px;
}

/* 机构简介模块 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-text .brand-slogan {
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 20px;
    font-weight: 500;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-info {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--border-radius-md);
}

.about-info h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.about-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.about-info-item i {
    color: var(--color-primary);
    font-size: 20px;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
}

/* 优势展示模块 */
.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-item {
    background: var(--bg-primary);
    padding: 40px 30px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-item i {
    font-size: 48px;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 首页专用响应式 */
@media (max-width: 1024px) {
    .advantage-grid,
    .projects-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sampling-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .banner {
        height: 400px;
    }
    
    .banner-content h1 {
        font-size: 32px;
    }
    
    .banner-content p {
        font-size: 18px;
    }
    
    .advantage-grid,
    .projects-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .sampling-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-timeline {
        flex-direction: column;
    }
    
    .process-timeline::before {
        display: none;
    }
    
    .process-step {
        margin-bottom: 30px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
}
