/**
 * 内蒙古九仁医药有限公司 - 官网首页样式
 * 参考 沃德商协会 布局：顶部欢迎条、白卡片区块、中英标题、查看更多
 */
:root {
    --primary: #1890ff;
    --primary-dark: #1573d4;
    --text: #333;
    --text-muted: #666;
    --text-muted-light: #999;
    --border: #e8e8e8;
    --bg-page: #f5f5f5;
    --bg-card: #fff;
}

* {
    box-sizing: border-box;
}

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

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--primary); }

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

/* ========== 顶部欢迎条 ========== */
.top-bar {
    background: var(--primary);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
    text-align: center;
}
.top-bar .container {
    text-align: left;
}

/* ========== 主导航 ========== */
.site-header {
    background: #f0f4f8;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.logo img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}
.logo-text {
    margin-left: 8px;
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
}
.logo:hover { color: var(--primary); }
.logo:hover img { opacity: 0.9; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
}
.main-nav a {
    padding: 0 20px;
    line-height: 64px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 3px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; min-height: 64px; padding: 10px 0; }
    .main-nav { flex-wrap: wrap; }
    .main-nav a { padding: 10px 14px; line-height: 1.5; font-size: 16px; }
    .about-row { flex-direction: column; }
    .about-slogan-col { flex: 1 1 100%; }
    .section-head { flex-direction: column; align-items: flex-start; }
}

/* ========== Banner 主视觉 ========== */
.hero-banner {
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f7ff 100%);
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 轮播图样式 */
.banner-carousel {
    min-height: 420px;
    overflow: hidden;
}
.banner-slides {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
.banner-slide {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}
.banner-slide.active {
    opacity: 1;
    z-index: 1;
}
.banner-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.03);
}
.banner-carousel .banner-title {
    color: #0d2137;
    text-shadow: 0 0 2px #fff, 0 0 6px rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.2);
    font-weight: 600;
}
.banner-carousel .banner-slogan {
    color: #1e3a5f;
    text-shadow: 0 0 2px #fff, 0 0 4px rgba(255,255,255,0.8), 0 1px 3px rgba(0,0,0,0.2);
    font-weight: 500;
}
.banner-carousel .banner-arrow {
    background: rgba(255,255,255,0.95);
    color: var(--primary);
}
.banner-carousel .banner-arrow:hover {
    background: var(--primary);
    color: #fff;
}
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.banner-dots button {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s;
}
.banner-dots button:hover {
    background: rgba(255,255,255,0.8);
}
.banner-dots button.active {
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary);
}

.banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    padding: 40px 60px;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    color: var(--primary);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.banner-arrow:hover {
    background: var(--primary);
    color: #fff;
}
.banner-arrow-prev { left: 20px; }
.banner-arrow-next { right: 20px; }

.banner-content {
    text-align: center;
}

.banner-title {
    font-size: 28px;
    font-weight: 300;
    color: var(--text);
    margin: 0 0 12px;
    letter-spacing: 2px;
}

.banner-slogan {
    font-size: 18px;
    color: var(--primary);
    margin: 0;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hero-banner { min-height: 240px; }
    .banner-carousel { min-height: 280px; }
    .banner-overlay { min-height: 280px; }
    .banner-inner { padding: 30px 50px; }
    .banner-title { font-size: 22px; }
    .banner-slogan { font-size: 16px; }
    .banner-arrow { width: 36px; height: 36px; font-size: 16px; }
    .banner-arrow-prev { left: 10px; }
    .banner-arrow-next { right: 10px; }
    .banner-dots { bottom: 12px; }
}

/* ========== 主内容区 ========== */
.main-content {
    padding: 40px 0 50px;
}

/* ========== 区块通用：白卡片 + 标题行 ========== */
.section-card {
    /* section 本身只负责上下留白，背景用页面灰色 */
    background: transparent;
    margin: 24px 0;
    padding: 0;
}

/* 让每个模块像居中的白色卡片，而不是横向顶满 */
.section-card > .container {
    background: var(--bg-card);
    padding: 28px 24px 32px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 两列布局里的卡片内部容器（避免嵌套 container 导致超宽） */
.section-inner {
    background: var(--bg-card);
    padding: 28px 24px 32px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    height: 100%;
}

/* 两列模块行：例如 产品中心 + 新闻中心、医药知识 + 政策 */
.section-row-2col {
    display: flex;
    gap: 24px;
    margin: 24px auto;
    max-width: 1200px;
    padding: 0 15px;
}

.section-row-2col .section-card {
    flex: 1;
    margin: 0; /* 行内时取消自身上下 margin，由 .section-row 控制 */
}

@media (max-width: 992px) {
    .section-row-2col {
        flex-direction: column;
    }
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.section-head-left { }
.section-title-main {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}
.section-title-en {
    font-size: 12px;
    color: var(--text-muted-light);
    margin: 0;
    letter-spacing: 0.5px;
}
.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: transparent;
    color: var(--primary) !important;
    border-radius: 4px;
    border: 1px solid var(--primary);
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}
.btn-more:hover {
    background: rgba(24,144,255,0.06);
    color: var(--primary-dark) !important;
}

/* 兼容旧 section-title（若有单独使用） */
.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title i { color: var(--primary); }

/* ========== 产品中心 ========== */
.section-product {
    background: #fff;
}
.section-card .product-tabs {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.product-tabs li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-muted);
    border-radius: 4px;
}
.product-tabs li a:hover,
.product-tabs li.active a {
    color: var(--primary);
    background: #e8f4fc;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
}

.product-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 12px 0;
    background: transparent;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
}

.product-img-wrap {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #e8f4fc;
    border-radius: 6px;
    overflow: hidden;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info { flex: 1; min-width: 0; }
.product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--text);
}
.product-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* 产品中心横版展示（首页放在帮助上方） */
.section-product-horizontal .product-list-horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    border-top: none;
    margin: 0 -6px;
}
.section-product-horizontal .product-item-card {
    flex: 0 1 calc(25% - 18px);
    min-width: 200px;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border-bottom: none;
    background: var(--bg-page);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}
.section-product-horizontal .product-item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.section-product-horizontal .product-item-card .product-img-wrap {
    width: 100%;
    height: 160px;
    border-radius: 0;
}
.section-product-horizontal .product-item-card .product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.section-product-horizontal .product-item-card .product-name {
    font-size: 15px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.section-product-horizontal .product-item-card .product-desc {
    font-size: 12px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 12px;
}
.section-product-horizontal .product-item-card .btn-more {
    align-self: flex-start;
}
@media (max-width: 992px) {
    .section-product-horizontal .product-item-card {
        flex: 0 1 calc(50% - 12px);
    }
}
@media (max-width: 576px) {
    .section-product-horizontal .product-item-card {
        flex: 1 1 100%;
        min-width: 0;
    }
    .section-product-horizontal .product-item-card .product-img-wrap {
        height: 140px;
    }
}

/* ========== 新闻中心 ========== */
.news-tabs {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.news-tabs li a {
    display: block;
    padding: 6px 14px;
    color: var(--text-muted);
}
.news-tabs li a:hover,
.news-tabs li.active a {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.news-list { }
.news-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.news-item a { color: var(--text); }
.news-item a:hover { color: var(--primary); }
.news-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* 新闻列表页：固定列表高度，避免分页上下跳动 */
.news-list-page .news-list {
    min-height: 260px;
}
.news-list-page .pagination-wrap {
    margin-top: 24px;
}

/* ========== 帮助中心（FAQ） ========== */
.help-faq-list {
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-card);
}
.help-faq-item + .help-faq-item {
    border-top: 1px solid var(--border);
}
.help-faq-header {
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
}
.help-faq-header:focus {
    outline: none;
}
.help-faq-title {
    text-align: left;
}
.help-faq-arrow {
    color: var(--text-muted-light);
    transition: transform 0.2s;
}
.help-faq-body {
    display: none;
    background: var(--bg-page);
}
.help-faq-content {
    padding: 14px 20px 18px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
    white-space: pre-wrap;
}
.help-faq-content p {
    margin: 0 0 10px;
}
.help-faq-content ul,
.help-faq-content ol {
    padding-left: 20px;
    margin: 0 0 10px;
}
.help-faq-item.open .help-faq-body {
    display: block;
}
.help-faq-item.open .help-faq-arrow {
    transform: rotate(90deg);
}

/* ========== 公司简介（双栏布局） ========== */
.about-row {
    display: flex;
    align-items: stretch;
    gap: 32px;
    flex-wrap: wrap;
}
.about-text-col {
    flex: 1;
    min-width: 280px;
}
.about-slogan-col {
    flex: 0 0 380px;
    min-width: 280px;
}
.about-text {
    margin: 0 0 20px;
    color: var(--text-muted);
    line-height: 1.8;
}
.about-slogan-col .about-slogan-img {
    margin-bottom: 0;
    min-height: 200px;
}
.about-contact {
    margin: 0;
    padding: 0;
    list-style: none;
}
.about-contact p {
    margin: 0 0 8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.about-contact i {
    color: var(--primary);
    width: 18px;
}

.about-slogan-img {
    min-height: 180px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}
.about-slogan-img .about-slogan-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 兼容旧 about-content */
.about-content { max-width: 800px; }

/* 占位区块 */
.section-placeholder .about-text {
    margin-bottom: 0;
}

/* ========== 公司简介独立页（左侧菜单 + 主内容） ========== */
.about-page-wrap { padding: 40px 0 60px; }
.about-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.about-sidebar {
    flex: 0 0 220px;
    min-width: 200px;
    position: sticky;
    top: 90px;
}
.about-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    overflow: hidden;
}
.about-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: var(--text);
    background: #fff;
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.about-sidebar-link:last-child { border-bottom: none; }
.about-sidebar-link:hover { background: #f5f9fc; color: var(--primary); }
.about-sidebar-link.active {
    background: #0c8e59;
    color: #fff;
    border-bottom-color: #0c8e59;
}
.about-sidebar-link.active:hover { background: #0a7a4d; color: #fff; }
.about-sidebar-link .fa-angle-right { font-size: 14px; opacity: 0.8; }
.about-main { flex: 1; min-width: 0; }
.about-section { margin-bottom: 32px; }
.about-section:last-child { margin-bottom: 0; }
.about-panel { display: none; }
.about-panel.active { display: block; }
@media (max-width: 992px) {
    .about-sidebar { flex: 1 1 100%; position: static; }
    .about-sidebar-nav { flex-direction: row; flex-wrap: wrap; }
    .about-sidebar-link { flex: 1 1 auto; min-width: 140px; border-bottom: none; border-right: 1px solid var(--border); }
    .about-sidebar-link:last-child { border-right: none; }
}

.main-content-about { padding: 40px 0 60px; }
.about-page-row {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.about-page-left {
    flex: 1;
    min-width: 0;
    max-width: 66.66%;
}
.about-page-right {
    flex: 0 0 320px;
    min-width: 280px;
}
.about-page-banner {
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    margin-bottom: 24px;
}
.about-page-card {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px 28px 28px;
    border: 1px solid var(--border);
}
.about-page-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}
.about-page-content {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.9;
}
.about-page-content p {
    margin: 0 0 14px;
    text-indent: 2em;
}
.about-page-content img { max-width: 100%; height: auto; }
.about-contact-card {
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
    border: 1px solid var(--border);
}
.about-contact-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 20px;
    text-align: center;
}
.about-contact-list p {
    margin: 0 0 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
}
.about-contact-list i {
    color: var(--primary);
    margin-top: 2px;
}
.about-contact-list a { color: var(--primary); }
/* 地图卡片 */
.about-map-card {
    margin-top: 24px;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 20px 20px 18px;
    border: 1px solid var(--border);
}
.about-map-img {
    width: 100%;
    border-radius: 6px;
    display: block;
}
.about-map-placeholder {
    width: 100%;
    height: 200px;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}
.about-map-tip {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}
@media (max-width: 992px) {
    .about-page-left { max-width: 100%; }
    .about-page-right { flex: 1 1 100%; }
}

/* ========== 联系我们页 ========== */
.contact-page-wrap { padding: 40px 0 60px; }
.contact-page-heading {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary);
}
.contact-cards-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}
.contact-card {
    flex: 1;
    min-width: 240px;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    padding: 28px 24px;
    text-align: center;
}
.contact-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.contact-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px;
}
.contact-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}
.contact-map-wrap {
    margin-top: 0;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    padding: 20px;
    overflow: hidden;
}
.contact-map-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}
.contact-map-placeholder {
    width: 100%;
    min-height: 200px;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 24px;
}
@media (max-width: 768px) {
    .contact-cards-row { flex-direction: column; }
    .contact-card { min-width: 0; }
}
