/* ===========================
   青岛善水药墨企业官网 - 样式表
   简约大气 | 高端专业
   =========================== */

/* CSS 变量 - 支持主题切换 */
:root {
    /* 主色调 - 墨色系 */
    --primary: #2c3e50;
    --primary-light: #34495e;
    --primary-dark: #1a252f;
    
    /* 辅助色 - 金色点缀 */
    --accent: #c9a96e;
    --accent-light: #d4b87a;
    --accent-dark: #b8945f;
    
    /* 中性色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #adb5bd;
    --border: #dee2e6;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    
    /* 过渡 */
    --transition: all 0.3s ease;
    
    /* 间距 */
    --section-padding: 80px 0;
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-light: #6c757d;
    --border: #2c3e50;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
}

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

/* ===========================
   导航栏
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 26, 46, 0.95);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo img {
    height: 45px;
    width: auto;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary);
}

.logo-text span {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

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

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

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.nav-menu a:hover {
    color: var(--accent);
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    margin-left: 20px;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: rotate(180deg);
}

/* 移动端菜单 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ===========================
   英雄区域
   =========================== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 0 20px;
}

.hero h2 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s both;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(201, 169, 110, 0.3);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 110, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ===========================
   通用章节样式
   =========================== */
.section {
    padding: var(--section-padding);
}

.section-light {
    background: var(--bg-secondary);
}

.section-dark {
    background: var(--bg-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
}

.section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 20px;
}

/* ===========================
   关于我们页面
   =========================== */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

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

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

/* 时间线 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border);
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    text-align: right;
    padding-right: 40px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    text-align: left;
    padding-left: 40px;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    z-index: 2;
}

.timeline-content {
    width: 45%;
}

.timeline-content h4 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ===========================
   产品服务页面
   =========================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.product-card {
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

.product-image {
    height: 250px;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-info {
    padding: 30px;
}

.product-info h3 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 15px;
}

.product-info p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-features {
    list-style: none;
}

.product-features li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* 服务列表 */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-primary);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

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

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

.service-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===========================
   联系我们页面
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.contact-info {
    padding: 40px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.contact-info h3 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 5px;
}

.contact-details p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 联系表单 */
.contact-form {
    padding: 40px;
    background: var(--bg-primary);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.contact-form h3 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

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

/* 地图容器 */
.map-container {
    margin-top: 60px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 400px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
}

/* ===========================
   页脚
   =========================== */
.footer {
    background: var(--primary);
    color: white;
    padding: 60px 0 30px;
}

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

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--accent);
}

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

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

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-contact p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ===========================
   动画
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===========================
   响应式设计
   =========================== */
@media (max-width: 992px) {
    .about-intro {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }
    
    .timeline-dot {
        left: 30px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 75px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        padding: 30px;
        gap: 20px;
        box-shadow: var(--shadow-md);
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero h2 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 28px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .services-list {
        grid-template-columns: 1fr;
    }
}
