/* ========================================
   南京港洋金属材料有限公司 - 官网样式
   主色调：海军蓝 #1a3a6b、中国红 #c41230
   ======================================== */

/* --- 基础重置与变量 --- */
:root {
    --primary: #1a3a6b;
    --primary-dark: #0d1b3e;
    --primary-light: #2c5282;
    --accent: #c41230;
    --accent-dark: #9b1b2a;
    --accent-light: #e53e3e;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.3s ease;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-700);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

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

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

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

.top-contact {
    color: var(--gray-200);
    font-weight: 500;
}

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

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

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon img {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
}

.logo-text h1 {
    font-size: 22px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
}

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

.nav ul {
    display: flex;
    gap: 4px;
}

.nav a {
    display: block;
    padding: 8px 18px;
    font-size: 15px;
    color: var(--gray-700);
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.nav a:hover,
.nav a.active {
    color: var(--accent);
    background: rgba(196, 18, 48, 0.06);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* --- Hero Banner --- */
.hero {
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 480px;
    padding-top: 60px;
    padding-bottom: 60px;
    gap: 40px;
}

.hero-content {
    flex: 1;
    color: var(--white);
}

.hero-content h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 17px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 18, 48, 0.35);
}

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

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image svg {
    max-width: 100%;
    height: auto;
}

/* --- 产品分类导航 --- */
.product-nav {
    background: var(--white);
    padding: 40px 0;
    box-shadow: var(--shadow-sm);
}

.product-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    border: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
}

.cat-item:hover {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.cat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.cat-item:hover .cat-icon {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.cat-item:hover .cat-icon img {
    transform: scale(1.15);
}

.cat-item span {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
}

/* --- Section通用 --- */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

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

.section-title h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-title p {
    font-size: 15px;
    color: var(--gray-500);
}

/* --- 关于我们 --- */
.about {
    padding: 80px 0;
    background: var(--gray-50);
}

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

.about-image {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-text h3 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 18px;
    font-weight: 700;
}

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

.about-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.feature {
    text-align: center;
    padding: 16px 10px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.feature strong {
    display: block;
    font-size: 24px;
    color: var(--accent);
    font-weight: 800;
}

.feature span {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
    display: block;
}

/* --- 产品中心 --- */
.products {
    padding: 80px 0;
}

.product-section {
    margin-bottom: 60px;
}

.product-section:last-child {
    margin-bottom: 0;
}

.product-header {
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
}

.product-header h3 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 6px;
}

.product-header p {
    font-size: 14px;
    color: var(--gray-500);
}

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

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--accent);
}

.product-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-img svg {
    max-width: 90%;
    max-height: 90%;
}

.product-info {
    padding: 18px;
}

.product-info h4 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.product-info p {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.product-spec {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    background: rgba(196, 18, 48, 0.08);
    padding: 3px 10px;
    border-radius: 4px;
}

/* --- 数据统计 --- */
.stats {
    padding: 70px 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--accent-light);
    line-height: 1;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

/* --- 企业优势 --- */
.strength {
    padding: 80px 0;
    background: var(--gray-50);
}

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

.strength-card {
    background: var(--white);
    padding: 40px 24px;
    text-align: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

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

.strength-icon {
    margin-bottom: 20px;
}

.strength-card h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.strength-card p {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.7;
}

/* --- 合作钢厂 --- */
.partners {
    padding: 80px 0;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.partner-item {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-400);
    padding: 20px 40px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
    letter-spacing: 4px;
}

.partner-item:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

/* --- 新闻动态 --- */
.news {
    padding: 80px 0;
    background: var(--gray-50);
}

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

.news-card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.news-date {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
}

.news-card h4 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.5;
}

.news-card p {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.7;
}

/* --- 联系我们 --- */
.contact {
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(196, 18, 48, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 14px;
    color: var(--gray-500);
}

.contact-form {
    background: var(--gray-50);
    padding: 32px;
    border-radius: var(--radius-lg);
}

.contact-form h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    margin-bottom: 16px;
}

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

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

.contact-form .btn {
    width: 100%;
}

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

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

.footer h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 16px;
}

.footer h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-about p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 10px;
    color: var(--gray-400);
}

.footer-links ul,
.footer-products ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,
.footer-products a {
    font-size: 14px;
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-links a:hover,
.footer-products a:hover {
    color: var(--white);
}

.footer-qr {
    text-align: center;
}

.qr-code {
    display: inline-block;
    padding: 8px;
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.footer-qr span {
    font-size: 12px;
    color: var(--gray-500);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--gray-500);
}

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

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

.back-to-top:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* --- 响应式设计 --- */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-height: 300px;
    }

    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .strength-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        text-align: center;
    }

    .logo-text h1 {
        font-size: 18px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 16px;
    }

    .nav.active {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
    }

    .nav a {
        padding: 12px 16px;
        border-bottom: 1px solid var(--gray-100);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
        padding-bottom: 40px;
        min-height: auto;
    }

    .hero-content h2 {
        font-size: 30px;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }

    .product-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .stat-number {
        font-size: 36px;
    }

    .strength-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        gap: 20px;
    }

    .partner-item {
        font-size: 20px;
        padding: 14px 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .section-title h2 {
        font-size: 26px;
    }
}

/* --- 动画 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}
