/* ========================================
   山西金维消防 - 统一浅蓝色主题
   包含前台所有样式
   ======================================== */

:root {
    --bg-light: #f0f8ff;
    --primary-light: #d9eaff;
    --primary: #b8d9ff;
    --accent: #0077be;
    --accent-light: #4da6ff;
    --text-dark: #2c3e50;
    --text-light: #5a6c7e;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 119, 190, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 119, 190, 0.15);
    --border-radius: 12px;
    --border-color: #c0d8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 0.8rem 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    min-height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
    padding: 0.5rem 0.3rem;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-right {
    flex-shrink: 0;
}

.nav-recruit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.nav-recruit-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.nav-recruit-btn.active {
    background: var(--accent-light);
}

.hamburger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0 10px;
}

/* ===== 主内容区域 ===== */
.main-content {
    padding-top: 80px;
    min-height: calc(100vh - 160px);
}

/* ===== 通用区块 ===== */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* ===== 卡片通用 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 119, 190, 0.2);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    flex: 1;
}

.card-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--accent);
    align-self: flex-start;
}

/* 产品卡片附加样式 */
.product-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0.5rem 0;
}

.product-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

.btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-small {
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
}

/* ===== 表单样式 ===== */
.contact-form,
.career-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--accent);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s;
    background: var(--bg-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 1rem;
    min-height: 2rem;
}

/* ===== 招聘标签 ===== */
.position-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin: 2rem 0;
}

.position-tag {
    background: var(--primary-light);
    color: var(--accent);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    border: 1px solid var(--accent);
    transition: 0.3s;
}

.position-tag:hover {
    background: var(--accent);
    color: white;
}

/* ===== 轮播样式 ===== */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.carousel-slides {
    width: 100%;
    height: 100%;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: 0.3s;
    z-index: 10;
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-control:hover {
    background: var(--accent);
    color: white;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* ===== 规范列表样式 ===== */
.specs-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.specs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.specs-header h3 {
    color: var(--accent);
    font-size: 1.3rem;
}

.refresh-btn {
    background: var(--primary-light);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.refresh-btn:hover {
    background: var(--accent);
    color: white;
}

.specs-list-items {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.spec-list-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background: white;
    margin: 0.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: 0.2s;
}

.spec-list-item:hover {
    background: var(--primary-light);
}

.spec-item-icon {
    font-size: 1.2rem;
    margin-right: 1rem;
    color: var(--accent);
}

.spec-item-name {
    flex: 1;
    color: var(--text-dark);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spec-item-gb {
    background: var(--primary-light);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 1rem;
    border: 1px solid var(--accent);
}

.spec-item-size {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-right: 1.5rem;
}

.spec-item-download {
    color: var(--accent);
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--accent);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: 0.3s;
}

.spec-item-download:hover {
    background: var(--accent);
    color: white;
}

.loading-item {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.specs-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.note-icon {
    font-size: 1.2rem;
}

/* ===== 关于页面统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== 关于页面布局 ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.about-text {
    color: var(--text-dark);
}

.about-tagline {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--white);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    margin-top: 3rem;
}

.footer p {
    margin: 0.3rem 0;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ===== 移动端响应式 ===== */
@media (max-width: 700px) {
    .navbar {
        padding: 0.8rem 1rem;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background: white;
        padding: 1rem 0;
        box-shadow: var(--shadow);
        gap: 0;
        z-index: 999;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-right {
        order: 2;
        margin-left: auto;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .specs-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .spec-list-item {
        flex-wrap: wrap;
    }

    .spec-item-name {
        width: 100%;
        margin: 0.3rem 0;
        white-space: normal;
    }

    .spec-item-download {
        margin-left: auto;
    }

    .carousel-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .spec-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .spec-item-download {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .carousel-container {
        height: 200px;
    }
}