/* ========================================
   陕西康新药业有限公司 - 全局样式
   温暖治愈亲和风 | 大地色+暖橙+米白
   ======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: #4a4a4a;
    background-color: #fef9f5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 颜色变量 */
:root {
    --primary-orange: #e88d67;
    --warm-brown: #8b6f5c;
    --soft-beige: #f5ebe0;
    --cream-white: #fef9f5;
    --earth-brown: #6b5345;
    --light-shadow: 0 4px 20px rgba(232, 141, 103, 0.15);
    --medium-shadow: 0 8px 30px rgba(139, 111, 92, 0.2);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   顶部导航栏
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 20px 0;
}

.header.scrolled {
    background: rgba(254, 249, 245, 0.98);
    box-shadow: 0 2px 20px rgba(139, 111, 92, 0.1);
    padding: 15px 0;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--light-shadow);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--earth-brown);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 16px;
    color: var(--earth-brown);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-orange);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--earth-brown);
    border-radius: 2px;
    transition: var(--transition);
}

.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);
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--cream-white);
    padding: 30px 5%;
    box-shadow: var(--medium-shadow);
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu li {
    margin-bottom: 20px;
}

.mobile-menu a {
    font-size: 18px;
    color: var(--earth-brown);
    display: block;
    padding: 10px 0;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: linear-gradient(135deg, var(--earth-brown) 0%, var(--warm-brown) 100%);
    color: var(--cream-white);
    padding: 60px 0 30px;
    margin-top: 100px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary-orange);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-orange);
    border-radius: 2px;
}

.footer-section p,
.footer-section a {
    color: var(--soft-beige);
    line-height: 2;
    font-size: 15px;
}

.footer-section a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(245, 235, 224, 0.2);
    font-size: 14px;
    color: var(--soft-beige);
}

/* ========================================
   通用组件
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 42px;
    color: var(--earth-brown);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--warm-brown));
    border-radius: 2px;
}

.section-title p {
    font-size: 18px;
    color: var(--warm-brown);
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--warm-brown) 100%);
    color: white;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: var(--light-shadow);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--medium-shadow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-orange);
    color: var(--primary-orange);
}

.btn-outline:hover {
    background: var(--primary-orange);
    color: white;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--light-shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--medium-shadow);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 20px;
    color: var(--earth-brown);
    margin-bottom: 12px;
}

.card-text {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--warm-brown);
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .section-title h2 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 3%;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title h2 {
        font-size: 24px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}
