/**
 * 前台样式 - 现代化、年轻风格
 */

/* ===== 全局样式 ===== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-gray: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

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

/* ===== 头部导航 ===== */
.header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    max-height: 90px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 兼容旧的.logo类（如果有的话） */
.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-menu a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== 轮播图 ===== */
.swiper-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.swiper-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.swiper-item.active {
    opacity: 1;
}

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

.swiper-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 100%;
    padding: 0 20px;
}

.swiper-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

.swiper-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

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

.swiper-dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

.swiper-prev,
.swiper-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
}

.swiper-prev:hover,
.swiper-next:hover {
    background: rgba(255, 255, 255, 0.5);
}

.swiper-prev {
    left: 30px;
}

.swiper-next {
    right: 30px;
}

/* ===== 区块样式 ===== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

/* ===== 服务卡片 ===== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-color);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===== 新闻列表 ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--bg-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.news-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 25px;
}

.news-meta {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-content p {
    color: var(--text-light);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

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

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

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ===== 页脚 ===== */
.footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

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

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #374151;
}

/* ===== 提示消息 ===== */
.message-box {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.message-box.show {
    transform: translateX(0);
}

.message-success {
    border-left: 4px solid var(--success-color);
}

.message-error {
    border-left: 4px solid var(--error-color);
}

.message-info {
    border-left: 4px solid var(--primary-color);
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ===== 动画 ===== */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: var(--shadow);
        display: none;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu li {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .swiper-container {
        height: 350px;
    }
    
    .swiper-content h2 {
        font-size: 32px;
    }
    
    .swiper-content p {
        font-size: 16px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .service-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .swiper-prev,
    .swiper-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .swiper-prev {
        left: 10px;
    }
    
    .swiper-next {
        right: 10px;
    }
}

/* ===== 新闻详情页 ===== */
.news-detail-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.news-detail-header h1 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.4;
}

.news-detail-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--text-light);
    font-size: 14px;
}

.news-detail-image {
    width: 100%;
    max-width: 800px;
    display: block;
    margin: 0 auto 40px;
    border-radius: 12px;
}

/* 富文本内容样式 */
.news-detail-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 2;
    color: var(--text-color);
}

.news-detail-content p {
    margin-bottom: 20px;
}

.news-detail-content h1,
.news-detail-content h2,
.news-detail-content h3,
.news-detail-content h4,
.news-detail-content h5,
.news-detail-content h6 {
    margin: 30px 0 20px;
    font-weight: 600;
    line-height: 1.4;
}

.news-detail-content h1 { font-size: 28px; }
.news-detail-content h2 { font-size: 24px; }
.news-detail-content h3 { font-size: 20px; }
.news-detail-content h4 { font-size: 18px; }

.news-detail-content strong {
    font-weight: 600;
    color: var(--text-dark);
}

.news-detail-content em {
    font-style: italic;
}

.news-detail-content u {
    text-decoration: underline;
}

.news-detail-content s {
    text-decoration: line-through;
}

.news-detail-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.news-detail-content a:hover {
    text-decoration: underline;
}

.news-detail-content ul,
.news-detail-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.news-detail-content li {
    margin-bottom: 10px;
}

.news-detail-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background: var(--bg-gray);
    border-left: 4px solid var(--primary-color);
    color: var(--text-light);
    font-style: italic;
}

.news-detail-content code {
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.news-detail-content pre {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow-x: auto;
}

.news-detail-content pre code {
    padding: 0;
    background: none;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

.news-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.news-detail-content table th,
.news-detail-content table td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.news-detail-content table th {
    background: var(--bg-gray);
    font-weight: 600;
}

/* 响应式 */
@media (max-width: 768px) {
    .news-detail-header h1 {
        font-size: 24px;
    }
    
    .news-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== 招聘模块样式 ===== */
.job-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.job-list {
    display: grid;
    gap: 20px;
}

.job-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    cursor: pointer;
}

.job-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.job-title {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.job-tag {
    display: inline-block;
    padding: 5px 15px;
    background: var(--bg-gray);
    color: var(--text-light);
    border-radius: 15px;
    font-size: 13px;
}

.job-tag.salary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-weight: 500;
}

.job-count {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.job-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-light);
    font-size: 14px;
}

.job-info span::before {
    content: '•';
    margin-right: 8px;
    color: var(--primary-color);
}

.job-section {
    margin-bottom: 40px;
}

.job-content {
    color: var(--text-color);
    line-height: 2;
}

.job-content ul {
    padding-left: 20px;
}

.job-content li {
    margin-bottom: 10px;
}

.job-content p {
    margin-bottom: 15px;
}

.job-content strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* 联系表单样式 */
.contact-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .job-filter {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .job-card {
        padding: 20px;
    }
    
    .job-header {
        flex-direction: column;
    }
    
    .job-title {
        font-size: 18px;
    }
    
    .job-count {
        align-self: flex-start;
        margin-top: 10px;
    }
    
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
}

