/* ========================================
   济宁鸿业工矿设备有限公司 - 企业官网样式
   风格：简约大气 · 工业蓝 + 活力橙
   ======================================== */

/* === CSS 变量 === */
:root {
    --primary: #1a3a5c;
    --primary-light: #2a5278;
    --primary-dark: #0f2540;
    --accent: #e8821e;
    --accent-light: #f5a040;
    --accent-dark: #c46c15;
    --dark: #0f1e2e;
    --gray-900: #1a1a2e;
    --gray-700: #4a5568;
    --gray-500: #718096;
    --gray-300: #cbd5e0;
    --gray-100: #f0f2f5;
    --gray-50: #f8f9fb;
    --white: #ffffff;
    --success: #2ecc71;
    --text: #2d3748;
    --text-light: #718096;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

/* === 容器 === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* === 顶部信息栏 === */
.top-bar {
    background: var(--primary-dark);
    color: var(--gray-300);
    font-size: 14px;
    padding: 13px 0;
}

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

.top-bar-info {
    display: flex;
    gap: 24px;
}

.top-bar-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-info svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.top-bar-social {
    display: flex;
    gap: 12px;
}

.top-bar-social a {
    opacity: 0.7;
}

.top-bar-social a:hover {
    opacity: 1;
    color: var(--accent);
}

.top-bar-social svg {
    width: 16px;
    height: 16px;
}

/* === 导航栏 === */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

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

.logo-img {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    display: block;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -1px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.logo-text .name {
    font-size: 23px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.logo-text .en {
    font-size: 11.5px;
    color: var(--gray-500);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--radius);
    position: relative;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--primary);
    background: var(--gray-50);
}

.nav-menu > li > a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* 下拉菜单 */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    min-width: 200px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--gray-700);
    border-left: 3px solid transparent;
}

.dropdown li a:hover {
    background: var(--gray-50);
    color: var(--primary);
    border-left-color: var(--accent);
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232,130,30,0.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
}

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

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

.btn-dark:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,58,92,0.3);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

/* === 页面横幅 === */
.page-banner {
    height: 320px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
}

.page-banner .container {
    position: relative;
    z-index: 1;
}

.page-banner h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.page-banner .breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.8;
}

.page-banner .breadcrumb a:hover {
    color: var(--accent-light);
}

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

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

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

.section-header .label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.section-header p {
    font-size: 15px;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

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

/* === 卡片 === */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

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

/* === 页脚 === */
.footer {
    background: var(--primary-dark);
    color: var(--gray-300);
    padding: 60px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 0.8fr 1.3fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand .logo-img {
    width: 52px;
    height: 52px;
}

.footer-brand .logo-text .name {
    color: var(--white);
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

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

.footer-col ul li a {
    font-size: 14px;
    color: var(--gray-500);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-light);
    padding-left: 4px;
}

/* 页脚产品分类紧凑网格 */
.footer-cat-grid {
    columns: 2;
    column-gap: 14px;
}

.footer-cat-grid li {
    margin-bottom: 7px;
    break-inside: avoid;
}

.footer-cat-grid li a {
    font-size: 13px;
    white-space: nowrap;
}

.footer-all-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-light);
    transition: var(--transition);
}

.footer-all-link:hover {
    gap: 8px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 14px;
}

.footer-contact svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    color: var(--gray-500);
}

.footer-bottom a {
    color: var(--gray-300);
}

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

/* === 动画 === */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === 返回顶部 === */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

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

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 22px;
    height: 22px;
}

/* === 响应式 === */
@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav {
        height: 72px;
    }
    
    .logo-img {
        width: 46px;
        height: 46px;
    }
    
    .logo-text .name {
        font-size: 18px;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-menu.active {
        max-height: 500px;
        overflow-y: auto;
    }
    
    .nav-menu > li > a {
        padding: 14px 16px;
        border-radius: 0;
        border-bottom: 1px solid var(--gray-100);
    }
    
    .nav-menu > li > a.active::after {
        display: none;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .has-dropdown:hover .dropdown {
        transform: none;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .page-banner h1 {
        font-size: 28px;
    }
    
    .section {
        padding: 56px 0;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
}

/* === 主打产品 === */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.featured-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-100);
}

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

.featured-image {
    position: relative;
    height: 240px;
    background: var(--gray-100);
    overflow: hidden;
}

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

.featured-card:hover .featured-image img {
    transform: scale(1.06);
}

.featured-model {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: rgba(26, 58, 92, 0.88);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.featured-body {
    padding: 24px 22px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.featured-cat {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    color: var(--accent);
    background: rgba(232, 130, 30, 0.1);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 10px;
}

.featured-body h3 {
    font-size: 19px;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 700;
}

.featured-body p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--gray-500);
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.featured-card:hover .featured-link {
    color: var(--accent);
}

@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .featured-image {
        height: 260px;
    }
}
