/* ========================================
   北京万诚堂医药有限公司 官网样式
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a6b4c;
    --primary-dark: #14553d;
    --primary-light: #2a8d66;
    --accent: #c8a96a;
    --accent-dark: #b09350;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #fff;
    --bg-gray: #f5f7f6;
    --border: #e5e8e6;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.12);
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

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

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

ul, li {
    list-style: none;
}

.container {
    width: 1200px;
    max-width: 95%;
    margin: 0 auto;
}

/* ---------- 顶部信息栏 ---------- */
.top-bar {
    background: #f5f7f6;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
}

.top-bar .top-left span {
    margin-right: 20px;
}

.top-bar .top-right a {
    margin-left: 16px;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

.logo-text h1 {
    font-size: 18px;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-lighter);
    letter-spacing: 1px;
}

.navi {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;
}

.navi li a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text);
    border-radius: 4px;
    transition: all 0.3s;
    white-space: nowrap;
}

.navi li a:hover,
.navi li a.active {
    background: var(--primary);
    color: #fff;
}

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

/* ---------- Banner 轮播 ---------- */
.banner {
    position: relative;
    height: 480px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.45), rgba(0,0,0,0.15));
}

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

.banner-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.banner-content h2 {
    font-size: 42px;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 24px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--accent);
    color: #fff !important;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary) !important;
}

.banner-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

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

.banner-dots span.active {
    background: var(--accent);
    width: 30px;
    border-radius: 6px;
}

/* ---------- 通用板块 ---------- */
.section {
    padding: 70px 0;
}

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

.section-title h2 {
    font-size: 32px;
    color: var(--primary-dark);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

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

.section-title p {
    color: var(--text-lighter);
    font-size: 15px;
    margin-top: 18px;
    letter-spacing: 1px;
}

/* ---------- 首页优势板块 ---------- */
.features {
    background: var(--bg-gray);
}

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

.feature-item {
    background: #fff;
    padding: 36px 24px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
}

.feature-item h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.feature-item p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.7;
}

/* ---------- 产品/新闻列表 ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.card-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-img img {
    transform: scale(1.08);
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 17px;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.4;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body h3 a:hover {
    color: var(--primary);
}

.card-body p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.7;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-lighter);
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.card-meta .more {
    color: var(--primary);
    font-weight: 500;
}

/* ---------- 关于板块 ---------- */
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
}

.about-img img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

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

.about-text .lead {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.9;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 14px;
    line-height: 1.9;
}

/* ---------- 文化板块 ---------- */
.culture-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.culture-item {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 28px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all 0.3s;
}

.culture-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-hover);
}

.culture-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.culture-item h3 {
    font-size: 19px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

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

/* ---------- 列表页 ---------- */
.page-banner {
    height: 220px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.page-banner h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.page-banner p {
    font-size: 15px;
    opacity: 0.9;
}

.breadcrumb {
    padding: 16px 0;
    background: var(--bg-gray);
    font-size: 13px;
    color: var(--text-light);
}

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

.breadcrumb .sep {
    margin: 0 8px;
    color: var(--text-lighter);
}

.page-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding: 40px 0;
}

.side-menu {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: fit-content;
}

.side-menu-title {
    background: var(--primary);
    color: #fff;
    padding: 18px;
    font-size: 18px;
    text-align: center;
}

.side-menu li a {
    display: block;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
    position: relative;
}

.side-menu li a:hover,
.side-menu li a.active {
    background: var(--bg-gray);
    color: var(--primary);
    padding-left: 28px;
}

.side-menu li a::before {
    content: '›';
    position: absolute;
    left: 16px;
    color: var(--text-lighter);
}

.main-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    min-height: 500px;
}

.content-title {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

/* ---------- 文章列表 ---------- */
.article-list li {
    padding: 20px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    gap: 20px;
}

.article-list li:last-child {
    border-bottom: none;
}

.article-thumb {
    width: 160px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

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

.article-info {
    flex: 1;
    min-width: 0;
}

.article-info h3 {
    font-size: 17px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-info h3 a:hover {
    color: var(--primary);
}

.article-info p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 8px;
}

/* ---------- 分页 ---------- */
.pagination {
    text-align: center;
    margin-top: 40px;
}

.pagination a {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ---------- 详情页 ---------- */
.detail-title {
    font-size: 28px;
    color: var(--text);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.4;
}

.detail-meta {
    text-align: center;
    color: var(--text-lighter);
    font-size: 13px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.detail-meta span {
    margin: 0 12px;
}

.detail-body {
    color: var(--text);
    font-size: 15px;
    line-height: 2;
}

.detail-body p {
    margin-bottom: 18px;
    text-indent: 2em;
}

.detail-body img {
    max-width: 100%;
    border-radius: 6px;
    margin: 20px auto;
}

/* ---------- 联系页面 ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

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

.contact-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

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

.contact-item h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.contact-item p {
    color: var(--text-light);
}

.contact-form .form-row {
    margin-bottom: 18px;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* ---------- 招聘页面 ---------- */
.job-list li {
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s;
}

.job-list li:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.job-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.job-head h3 {
    font-size: 18px;
    color: var(--primary-dark);
}

.job-salary {
    color: #e74c3c;
    font-size: 16px;
    font-weight: 500;
}

.job-meta {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 10px;
}

.job-meta span {
    margin-right: 16px;
}

.job-desc {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.8;
}

/* ---------- 加盟页面 ---------- */
.join-banner {
    background: linear-gradient(135deg, #1a6b4c, #2a8d66);
    color: #fff;
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
}

.join-banner h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.join-banner p {
    font-size: 16px;
    opacity: 0.95;
}

.join-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.step-item {
    text-align: center;
    padding: 30px 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
}

.step-num {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.step-item h4 {
    font-size: 15px;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.step-item p {
    font-size: 12px;
    color: var(--text-light);
}

/* ---------- 底部 ---------- */
.footer {
    background: #2c3e35;
    color: #b8c5bd;
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col p {
    font-size: 13px;
    line-height: 2;
    margin-bottom: 8px;
}

.footer-col ul li {
    margin-bottom: 10px;
    font-size: 13px;
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-contact p {
    display: flex;
    gap: 10px;
}

.footer-bottom {
    background: #1f2c26;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: #8a9a91;
}

.footer-bottom a {
    color: #b8c5bd;
}

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

/* ---------- 返回顶部 ---------- */
.back-top {
    position: fixed;
    right: 20px;
    bottom: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    font-size: 20px;
}

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

.back-top:hover {
    background: var(--primary-dark);
}

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .container { width: 95%; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .about-wrap { grid-template-columns: 1fr; }
    .culture-grid { grid-template-columns: 1fr; }
    .page-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .join-steps { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .top-bar { display: none; }
    .header .container { height: 64px; }
    .logo-text h1 { font-size: 17px; }
    .logo-icon { width: 40px; height: 40px; font-size: 18px; }
    .mobile-toggle { display: block; }
    .navi {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 10px;
        box-shadow: var(--shadow);
        gap: 0;
    }
    .navi.open { display: flex; }
    .navi li a { padding: 12px 16px; }
    .banner { height: 300px; }
    .banner-content h2 { font-size: 26px; }
    .banner-content p { font-size: 14px; }
    .section { padding: 40px 0; }
    .section-title h2 { font-size: 24px; }
    .features-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .article-list li { flex-direction: column; }
    .article-thumb { width: 100%; height: 180px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .join-banner { padding: 30px 20px; }
    .join-steps { grid-template-columns: repeat(2, 1fr); }
    .main-content { padding: 20px; }
    .detail-title { font-size: 22px; }
}
