/*
Theme Name: 甘泉集团 WordPress 迁移版 v2
Theme URI: https://www.ganquan.com.cn
Author: Tianjin Ganquan Group
Description: 基于原站 wezhan.cn CSS 像素级复刻，包含本地图片/图标资源，精确还原蓝色水工业风格
Version: 2.0.0
License: GPL v2 or later
Text Domain: ganquan
*/

/* ===== CSS 变量（原站精确色值） ===== */
:root {
    --nav-hover-bg: #df0000;
    --nav-text: #f2f2f2;
    --primary-blue: #1a3375;
    --accent-red: #df0000;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --border-dotted: #CCC;
    --product-hover: #E43939;
    --font-family: Tahoma, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    --container-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-dark);
    background: #fff;
    line-height: 1.6;
}
a { color: var(--primary-blue); text-decoration: none; }
a:hover { color: var(--accent-red); }
img { max-width: 100%; height: auto; }
.wp-container { width: var(--container-width); margin: 0 auto; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ===== 页头 ===== */
.site-header { background: #fff; position: relative; z-index: 1000; }
.header-top {
    height: 53px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo img { height: 46px; width: auto; }
.company-name { font-size: 22px; font-weight: bold; color: var(--primary-blue); letter-spacing: 2px; }

.header-right { text-align: right; }
.header-phone .label { font-size: 14px; color: var(--text-dark); }
.header-phone .number { font-size: 20px; color: var(--accent-red); font-weight: bold; letter-spacing: 1px; }
.header-language { margin-top: 4px; display: flex; gap: 10px; justify-content: flex-end; }
.header-language a { font-size: 14px; color: var(--text-dark); font-family: var(--font-family); }
.header-language a:hover { color: var(--text-dark); }

/* ===== 主导航（原站精确还原） ===== */
.main-nav {
    background: transparent url(images/35696054.jpeg) repeat 50% 100%;
    min-height: 92px;
    position: relative;
}
.main-nav-inner {
    width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    min-height: 92px;
    padding-bottom: 0;
}
.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    height: 73px;
}
.main-nav ul li {
    width: 104px;  /* 833px / 8 ≈ 104px */
    height: 73px;
    line-height: 73px;
    text-align: center;
    transition: background-color .2s;
}
.main-nav ul li a {
    display: block;
    color: var(--nav-text);
    font-family: var(--font-family);
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 100%;
}
.main-nav ul li:hover,
.main-nav ul li.current-menu-item {
    background-color: var(--accent-red);
}
.main-nav ul li:hover a,
.main-nav ul li.current-menu-item a {
    color: #ffffff;
}

/* ===== Banner 轮播 ===== */
.home-banner {
    position: relative;
    overflow: hidden;
    height: 562px;
}
.banner-slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity .8s ease-in-out;
}
.banner-slide.active { opacity: 1; }
.banner-dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px;
}
.banner-dots span {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
}
.banner-dots span.active { background: #fff; }

/* ===== 区块标题（原站样式） ===== */
.section-wrap { background: #fff; }
.section-wrap.alt { background: #f8f9fb; }
.home-section { padding: 50px 0; }
.section-title {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}
.section-title h2 {
    font-size: 28px;
    color: var(--primary-blue);
    font-weight: bold;
    display: inline-block;
    padding-bottom: 12px;
}
.section-title h2::after {
    content: '';
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 3px;
    background: var(--primary-blue);
}
.section-title .more-link {
    position: absolute; right: 0; top: 8px;
    font-size: 13px; color: var(--primary-blue);
}
.section-title .more-link:hover { color: #000; text-decoration: underline; }

/* ===== 工程案例（原站 album 布局） ===== */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.case-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 0;
}
.case-card img {
    width: 100%; height: 200px;
    object-fit: cover;
    transition: transform .3s;
    display: block;
}
.case-card:hover img { transform: scale(1.1); }
.case-card .caption {
    position: absolute; bottom: 0; left: 0; width: 100%;
    height: 34px; line-height: 34px;
    background: rgba(0,0,0,.6);
    color: #fff; font-size: 14px; font-weight: bold;
    padding: 0 8px;
    text-align: left;
    font-family: var(--font-family);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 产品展示（原站 w-list 布局） ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.product-card {
    background: #fff;
    border: 1px solid #f5f5f5;
    text-align: center;
    padding: 0;
    transition: border-color .2s linear;
    overflow: hidden;
}
.product-card:hover { border-color: var(--product-hover); }
.product-card .prod-img {
    width: 100%; height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.product-card:hover .prod-img { transform: scale(1.1); }
.product-card .prod-info { padding: 10px; }
.product-card h3 {
    font-size: 14px; color: #444;
    font-weight: normal;
    text-align: center;
    font-family: var(--font-family);
    line-height: 28px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card:hover h3 { text-decoration: underline; color: #444; }

/* ===== 新闻列表（原站 w-list 精确还原） ===== */
.news-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.news-list-col h3 {
    font-size: 16px; color: var(--primary-blue);
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e0e0e0;
}
.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 26px;
    line-height: 26px;
    border-bottom: 1px dotted var(--border-dotted);
    padding: 0;
}
.news-item a {
    color: var(--text-dark);
    font-size: 13px;
    font-family: var(--font-family);
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-left: 5px;
    margin-left: 13px;
}
.news-item a:hover { color: var(--text-dark); text-decoration: none; }
.news-item .date {
    color: var(--text-gray);
    font-size: 14px;
    font-family: var(--font-family);
    white-space: nowrap;
    padding: 0 5px 0 10px;
}

/* ===== 面包屑 & 页面标题 ===== */
.breadcrumb { padding: 12px 0; font-size: 13px; color: var(--text-light); }
.breadcrumb a { color: var(--primary-blue); }
.page-title {
    font-size: 24px;
    color: var(--primary-blue);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-blue);
}

/* ===== 关于我们 ===== */
.about-layout { display: flex; gap: 40px; align-items: flex-start; }
.about-layout .text-col { flex: 1; line-height: 2; color: #555; }
.about-layout .img-col { flex: 0 0 400px; }
.about-layout .img-col img { width: 100%; border-radius: 0; }

/* ===== 资质认证 ===== */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cert-card { text-align: center; padding: 20px; border: 1px solid #f5f5f5; transition: box-shadow .3s; }
.cert-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.cert-card img { height: 160px; object-fit: contain; margin-bottom: 10px; }
.cert-card h4 { font-size: 14px; color: var(--text-dark); font-weight: normal; }

/* ===== 联系我们 ===== */
.contact-layout { display: flex; gap: 40px; }
.contact-info { flex: 1; }
.contact-info p { margin-bottom: 12px; color: #555; }
.contact-info .label { color: var(--primary-blue); font-weight: bold; }
.contact-map { flex: 1; min-height: 350px; background: #f0f0f0; }
.contact-map iframe { width: 100%; height: 350px; border: none; }

/* ===== 分页 ===== */
.pagination { text-align: center; margin-top: 30px; }
.pagination a, .pagination span {
    display: inline-block; padding: 6px 14px; margin: 0 3px;
    border: 1px solid #ddd; color: var(--text-dark); border-radius: 0;
}
.pagination .current { background: var(--primary-blue); color: #fff; border-color: var(--primary-blue); }

/* ===== 产品详情 ===== */
.prod-detail { display: flex; gap: 30px; }
.prod-detail .gallery { flex: 0 0 400px; }
.prod-detail .gallery img { width: 100%; border-radius: 0; }
.prod-detail .info { flex: 1; }
.prod-detail .info h1 { font-size: 22px; color: var(--primary-blue); margin-bottom: 15px; }
.prod-detail .info .meta { color: var(--text-gray); line-height: 2; }

/* ===== 页脚 ===== */
.site-footer { background: var(--primary-blue); color: rgba(255,255,255,.8); padding: 40px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.2); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,.7); font-size: 13px; }
.footer-col ul a:hover { color: #fff; }
.footer-col p { font-size: 13px; line-height: 1.8; }
.footer-qr { text-align: center; }
.footer-qr .qr-placeholder { background: #fff; padding: 10px; border-radius: 4px; display: inline-block; width: 120px; height: 120px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; color: rgba(255,255,255,.5); }

/* ===== 页面内容区 ===== */
.page-content { background: #fff; padding: 40px 0; min-height: 500px; }
.content-area { background: #fff; padding: 30px; box-shadow: 0 1px 6px rgba(0,0,0,.06); border-radius: 0; }

/* ===== 营销网络 ===== */
.network-placeholder {
    text-align: center; padding: 60px 20px;
    background: #f8f9fb; border: 1px solid #eee; border-radius: 0;
}
.network-placeholder p { color: var(--text-gray); font-size: 16px; line-height: 2; }

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .wp-container, .main-nav-inner { width: 100%; padding: 0 15px; }
}
@media (max-width: 768px) {
    .header-top { flex-direction: column; height: auto; padding: 10px; }
    .main-nav ul { flex-wrap: wrap; height: auto; }
    .main-nav ul li { width: 50%; height: 40px; line-height: 40px; }
    .case-grid, .product-grid, .cert-grid { grid-template-columns: 1fr; }
    .news-two-col { grid-template-columns: 1fr; }
    .about-layout, .contact-layout, .footer-grid, .prod-detail { flex-direction: column; }
    .home-banner { height: 280px; }
    .header-phone { display: none; }
    .header-language { display: none; }
}
