/* ========================================
   鞍山热工仪表阀门制造有限公司 - 网站样式
   现代化响应式设计 - 支持手机/电脑自适应
   ======================================== */

/* CSS 变量 - 全站配色统一管理 */
:root {
    --color-primary: #1a56a8;       /* 主色 - 科技蓝 */
    --color-primary-dark: #0d3d72;  /* 深色 - 导航栏 */
    --color-accent: #e8821e;        /* 强调色 - 橙色按钮 */
    --color-text: #333333;          /* 正文文字 */
    --color-text-light: #666666;    /* 次要文字 */
    --color-bg: #ffffff;            /* 背景色 */
    --color-bg-gray: #f5f7fa;        /* 浅灰背景 */
    --color-border: #e0e6ed;        /* 边框色 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
    --radius: 8px;
    --max-width: 1200px;
    --header-height: 70px;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部导航栏
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary-dark);
}

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

.logo-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.logo-text {
    line-height: 1.3;
}

.logo-text small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--color-text-light);
}

/* 桌面导航 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.nav-menu > li > a {
    display: block;
    padding: 10px 18px;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--color-primary);
    background: rgba(26, 86, 168, 0.08);
}

/* 手机汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-primary-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   首页 Banner 轮播
   图片自带宣传文字和电话，直接完整显示
   ======================================== */
.banner {
    margin-top: var(--header-height);
    position: relative;
    /* 按原图宽高比(1920x710)显示，保证图上文字完整可见 */
    aspect-ratio: 1920 / 710;
    overflow: hidden;
    background: var(--color-primary-dark);
}

.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

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

.banner-slide img {
    width: 100%;
    height: 100%;
    /* contain = 完整显示整张图，不裁剪、不加任何遮挡 */
    object-fit: contain;
}

/* 通用按钮（查看全部产品等） */
.banner-btn {
    display: inline-block;
    padding: 12px 40px;
    background: var(--color-accent);
    color: white;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--color-accent);
}

.banner-btn:hover {
    background: transparent;
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 轮播指示器 */
.banner-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

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

.banner-dots .dot.active {
    background: white;
    width: 35px;
    border-radius: 6px;
}

/* ========================================
   通用区块
   ======================================== */
.section {
    padding: 70px 0;
}

.section-gray {
    background: var(--color-bg-gray);
}

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

.section-header h2 {
    font-size: 32px;
    color: var(--color-primary-dark);
    font-weight: 700;
    margin-bottom: 10px;
}

.section-header .subtitle {
    color: var(--color-text-light);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-header .divider {
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ========================================
   首页 - 关于我们
   ======================================== */
.about-home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-home-img img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

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

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

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.about-feature .icon {
    width: 45px;
    height: 45px;
    background: rgba(26, 86, 168, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.about-feature .text h4 {
    font-size: 15px;
    color: var(--color-primary-dark);
    margin-bottom: 4px;
}

.about-feature .text p {
    font-size: 13px;
    margin: 0;
}

/* ========================================
   产品网格
   ======================================== */
.product-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 24px;
    border: 2px solid var(--color-border);
    background: white;
    color: var(--color-text);
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.product-card-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--color-bg-gray);
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    transition: transform 0.3s ease;
}

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

.product-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-category {
    font-size: 12px;
    color: var(--color-primary);
    background: rgba(26, 86, 168, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
    align-self: flex-start;
}

.product-card h3 {
    font-size: 16px;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-card p {
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* ========================================
   案例展示
   ======================================== */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.case-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: white;
}

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

.case-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: var(--color-bg-gray);
}

.case-card-body {
    padding: 15px;
}

.case-card-body h4 {
    font-size: 14px;
    color: var(--color-text);
}

/* ========================================
   新闻列表
   ======================================== */
.news-list {
    display: grid;
    gap: 20px;
}

.news-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 25px;
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.news-date {
    text-align: center;
    border-right: 2px solid var(--color-border);
    padding-right: 25px;
}

.news-date .day {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.news-date .month {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 5px;
}

.news-content h3 {
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 8px;
}

.news-content p {
    font-size: 14px;
    color: var(--color-text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   联系我们
   ======================================== */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

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

.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

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

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

.contact-list .label {
    font-size: 13px;
    color: var(--color-text-light);
    margin-bottom: 3px;
}

.contact-list .value {
    font-size: 16px;
    color: var(--color-text);
    font-weight: 500;
}

.contact-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 400px;
    display: flex;
    align-items: center;
    background: #f4f6f9;
}

.contact-map img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.85);
    padding: 50px 0 20px;
}

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

.footer-col h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.7);
}

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

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
}

/* ========================================
   关于我们页面
   ======================================== */
.page-banner {
    margin-top: var(--header-height);
    height: 250px;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.page-banner h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-banner .breadcrumb {
    font-size: 14px;
    opacity: 0.8;
}

.page-banner .breadcrumb a {
    color: rgba(255,255,255,0.8);
}

.about-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-detail-img img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

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

/* ========================================
   产品详情页
   ======================================== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.product-detail-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: white;
}

.product-detail-img img {
    width: 100%;
    height: auto;
}

.product-detail-info h1 {
    font-size: 26px;
    color: var(--color-primary-dark);
    margin-bottom: 15px;
}

.product-detail-info .product-cat {
    display: inline-block;
    background: rgba(26, 86, 168, 0.1);
    color: var(--color-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 20px;
}

.product-detail-info .product-desc {
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 25px;
}

.product-contact-box {
    background: var(--color-bg-gray);
    border-radius: var(--radius);
    padding: 25px;
    margin-top: 25px;
}

.product-contact-box h4 {
    font-size: 16px;
    color: var(--color-primary-dark);
    margin-bottom: 15px;
}

.product-contact-box p {
    font-size: 14px;
    margin-bottom: 8px;
}

.product-contact-box .phone {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-accent);
}

/* ========================================
   新闻详情页
   ======================================== */
.news-detail {
    max-width: 900px;
    margin: 0 auto;
}

.news-detail h1 {
    font-size: 28px;
    color: var(--color-text);
    margin-bottom: 10px;
    text-align: center;
}

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

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

.news-detail .news-body p {
    margin-bottom: 15px;
}

/* ========================================
   返回按钮
   ======================================== */
.back-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 25px;
    background: var(--color-bg-gray);
    color: var(--color-text);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* ========================================
   手机底部浮动按钮
   ======================================== */
.mobile-action-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 10px;
}

.mobile-action-bar-inner {
    display: flex;
    gap: 10px;
}

.mobile-action-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-action-btn.call {
    background: var(--color-primary);
    color: white;
}

.mobile-action-btn.sms {
    background: var(--color-accent);
    color: white;
}

/* ========================================
   响应式 - 手机适配
   ======================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .container {
        padding: 0 15px;
    }

    /* 手机导航 */
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 15px;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        gap: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-menu > li > a {
        padding: 12px 15px;
        border-bottom: 1px solid var(--color-border);
        border-radius: 0;
    }

    /* Banner 手机端：固定高度，图片完整居中显示 */
    .banner {
        aspect-ratio: auto;
        height: 200px;
    }

    .banner-btn {
        padding: 10px 30px;
        font-size: 14px;
    }

    /* Section */
    .section {
        padding: 40px 0;
    }

    .section-header h2 {
        font-size: 24px;
    }

    /* 关于我们 */
    .about-home,
    .about-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    /* 产品 */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-card-img {
        height: 140px;
    }

    .product-card-body {
        padding: 12px;
    }

    .product-card h3 {
        font-size: 14px;
    }

    .product-card p {
        font-size: 12px;
    }

    .product-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 16px;
        font-size: 13px;
    }

    /* 产品详情 */
    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-detail-info h1 {
        font-size: 20px;
    }

    /* 案例 */
    .case-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .case-card img {
        height: 130px;
    }

    /* 新闻 */
    .news-item {
        grid-template-columns: 70px 1fr;
        gap: 15px;
        padding: 15px;
    }

    .news-date .day {
        font-size: 24px;
    }

    .news-date {
        padding-right: 15px;
    }

    .news-content h3 {
        font-size: 15px;
    }

    .news-content p {
        font-size: 13px;
    }

    .news-detail h1 {
        font-size: 20px;
    }

    /* 联系我们 */
    .contact-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-map {
        min-height: 250px;
    }

    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    /* 手机底部操作栏 */
    .mobile-action-bar {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }

    .logo-text {
        font-size: 14px;
    }

    .logo-text small {
        font-size: 10px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .logo-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}
