/* ========================================
   海城市东震冶金耐火材料有限公司
   统一样式表
   ======================================== */

/* CSS 变量 */
:root {
    --primary: #1a5276;
    --primary-dark: #0e3a54;
    --primary-light: #2980b9;
    --accent: #e67e22;
    --accent-hover: #d35400;
    --success: #27ae60;
    --danger: #e74c3c;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #1a1a2e;
    --border: #e0e0e0;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 5px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-menu a {
    display: block;
    padding: 10px 18px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary);
    color: #fff;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* 页面横幅 */
.page-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.page-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 区域标题 */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

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

.section-header p {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* 卡片 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #e8ecf1;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

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

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

/* 通用区域 */
section {
    padding: 60px 0;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #0e3a54 0%, #1a5276 50%, #2980b9 100%);
    color: #fff;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    animation: heroPulse 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes heroPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 特性区 */
.features {
    background: var(--bg-white);
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-item h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* 产品卡片 */
.product-card {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

/* 产品图片区域 */
.product-image {
    flex: 0 0 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 产品信息区域 */
.product-info {
    flex: 1;
    padding: 20px;
}

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

.product-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #e8ecf1, #d5dbdb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

/* 产品图片占位（水平布局适配） */
.product-image .product-card-img {
    height: 250px;
}

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

/* 水平布局下产品信息区域内的 card-body 不需要额外内边距 */
.product-info .product-card-body {
    padding: 0;
}

.product-card-body h3 {
    color: var(--primary);
    margin-bottom: 8px;
}

.product-tag {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* 产品标签组 */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
}

.tag-primary {
    background: var(--primary);
}

.tag-success {
    background: #27ae60;
}

.tag-warning {
    background: var(--accent);
}

/* 产品参数 */
.product-params {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.product-params span {
    font-size: 0.85rem;
    color: #666;
}

.product-params span strong {
    color: var(--primary);
}

/* 产品图片占位 */
.product-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e8ecf1, #d5dbdb);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-img-icon {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.6;
}

.product-img-label {
    font-size: 0.9rem;
    color: #999;
}

/* 联系信息卡片 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.contact-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
}

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

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-card h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.contact-detail p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* 联系表单 */
.contact-form-section {
    background: var(--bg);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text);
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
}

/* 地图区 */
.map-placeholder {
    background: linear-gradient(135deg, #e8ecf1, #d5dbdb);
    border-radius: var(--radius);
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.map-content {
    color: var(--text-light);
}

.map-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.map-hint {
    font-size: 0.9rem;
    margin-top: 5px;
}

/* 工厂展示 */
.factory-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.factory-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius);
    background: #e8ecf1;
    transition: var(--transition);
}

.factory-img:hover {
    transform: scale(1.02);
}

/* 规格表 */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.spec-table th,
.spec-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.spec-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.spec-table tr:hover {
    background: #f0f4f8;
}

/* 页脚 */
.footer {
    background: var(--bg-dark);
    color: #ccc;
    padding: 50px 0 20px;
}

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

.footer h3,
.footer h4 {
    color: #fff;
    margin-bottom: 15px;
}

.footer-info p {
    line-height: 1.8;
}

.footer-contact p {
    margin-bottom: 8px;
}

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

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

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

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

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

/* 响应式 */
@media (max-width: 992px) {
    .grid-3,
    .grid-4,
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-list {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        transition: var(--transition);
    }
    .nav-list.active {
        left: 0;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .grid-2,
    .grid-3,
    .grid-4,
    .contact-grid,
    .factory-gallery,
    .form-row {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .contact-form {
        padding: 25px;
    }
    .product-card {
        flex-direction: column;
    }
    .product-card .product-image {
        width: 100%;
    }
    .product-detail-content {
        flex-direction: column;
    }
    .product-detail-content.reverse {
        flex-direction: column;
    }
    .product-detail-image,
    .product-detail-info {
        width: 100%;
    }
    .spec-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    .map-placeholder {
        height: 250px;
    }
    .product-image {
        flex: 0 0 auto;
    }
    .product-detail-image img {
        max-width: 100%;
        height: auto;
    }
    .product-img-placeholder {
        max-width: 100%;
        height: auto;
    }
    .product-img-icon {
        max-width: 100%;
        height: auto;
    }
    .product-img-label {
        max-width: 100%;
    }
}

/* 工厂展示页面图片统一尺寸 */
.factory-image img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.equipment-icon img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}
