/* ===== 高新嘉陵机电 - 全站样式 v2.0 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --primary-dark: #0e3a54;
    --accent: #e67e22;
    --accent-light: #f39c12;
    --accent-dark: #d35400;
    --text: #2c3e50;
    --text-light: #5d6d7e;
    --bg: #ffffff;
    --bg-gray: #f4f7f9;
    --bg-warm: #fef9f3;
    --border: #dce4ea;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body {
    font-family: "Microsoft Yahei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    scroll-behavior: smooth;
    overflow-x: hidden;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ===== 导航栏 ===== */
.navbar {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(0,0,0,0.06);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.navbar.scrolled { border-bottom-color: var(--primary); }
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 0;
}
.logo {
    font-size: 1.3rem; font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: -0.3px; white-space: nowrap;
}
.nav-links {
    display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap;
}
.nav-links a {
    padding: 8px 14px; font-weight: 500; color: var(--text);
    transition: var(--transition); font-size: 0.92rem; border-radius: 8px;
    position: relative;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary); background: rgba(26,82,118,0.06);
}
.nav-links a.active::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 24px; height: 3px; background: var(--accent); border-radius: 2px;
}
.contact-phone {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white !important; padding: 10px 22px !important; border-radius: 40px;
    font-weight: 700; font-size: 0.9rem; box-shadow: 0 4px 14px rgba(230,126,34,0.35);
    transition: var(--transition);
}
.contact-phone:hover {
    transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230,126,34,0.45);
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}
.nav-toggle {
    display: none; background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: var(--primary);
}
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none; flex-direction: column; width: 100%;
        padding: 1rem 0; gap: 0.5rem;
    }
    .nav-links.show { display: flex; }
    .nav-container { flex-wrap: wrap; }
}

/* ===== 轮播图 ===== */
.carousel {
    position: relative; width: 100%; height: 480px; overflow: hidden;
    background: var(--primary-dark);
}
.carousel-track {
    display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide {
    min-width: 100%; height: 100%; position: relative;
    display: flex; align-items: center; justify-content: center;
}
.carousel-slide img {
    width: 100%; height: 100%; object-fit: cover;
}
.carousel-slide::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(14,58,84,0.75) 0%, rgba(26,82,118,0.4) 100%);
}
.carousel-content {
    position: absolute; z-index: 2; text-align: center; color: white;
    max-width: 800px; padding: 0 24px;
    animation: fadeInUp 0.8s ease;
}
.carousel-content h1 {
    font-size: 2.8rem; font-weight: 800; margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3); line-height: 1.2;
}
.carousel-content p {
    font-size: 1.2rem; margin-bottom: 1.5rem; opacity: 0.95;
}
.carousel-btn {
    display: inline-block; background: var(--accent); color: white;
    padding: 14px 36px; border-radius: 40px; font-weight: 700;
    transition: var(--transition); box-shadow: 0 4px 20px rgba(230,126,34,0.4);
}
.carousel-btn:hover {
    background: var(--accent-dark); transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(230,126,34,0.5);
}
.carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3); color: white;
    font-size: 1.4rem; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.carousel-arrow:hover { background: rgba(255,255,255,0.35); }
.carousel-arrow.prev { left: 24px; }
.carousel-arrow.next { right: 24px; }
.carousel-dots {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 10;
}
.carousel-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.4); cursor: pointer;
    transition: var(--transition); border: none;
}
.carousel-dot.active {
    background: var(--accent); width: 32px; border-radius: 6px;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
    .carousel { height: 360px; }
    .carousel-content h1 { font-size: 1.8rem; }
    .carousel-content p { font-size: 1rem; }
    .carousel-arrow { width: 40px; height: 40px; font-size: 1.1rem; }
}

/* ===== 通用区块 ===== */
.section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title {
    font-size: 2rem; font-weight: 800; color: var(--primary-dark);
    position: relative; display: inline-block; margin-bottom: 0.8rem;
}
.section-title::after {
    content: ''; position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%); width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
}
.section-subtitle { color: var(--text-light); font-size: 1.05rem; margin-top: 1rem; }

/* ===== 面包屑 ===== */
.breadcrumb {
    background: var(--bg-gray); padding: 0.8rem 0; font-size: 0.9rem;
    color: var(--text-light); border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 0.5rem; color: #bbb; }

/* ===== 关于我们 ===== */
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
    align-items: center;
}
.about-text p { margin-bottom: 1.2rem; color: var(--text-light); line-height: 1.9; text-align: justify; }
.about-highlights {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0;
}
.highlight-item {
    background: linear-gradient(135deg, #f0f6f9, #e8f0f5);
    padding: 1.2rem; border-radius: var(--radius);
    border-left: 4px solid var(--primary); font-weight: 600;
    color: var(--primary-dark); transition: var(--transition);
}
.highlight-item:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.about-image {
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg); position: relative;
}
.about-image img { width: 100%; height: 400px; object-fit: cover; }
.about-image::before {
    content: ''; position: absolute; inset: 0;
    border: 3px solid var(--accent); border-radius: var(--radius-lg);
    transform: translate(12px, 12px); z-index: -1;
    background: var(--accent); opacity: 0.1;
}
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-highlights { grid-template-columns: 1fr; }
}

/* ===== 产品卡片 ===== */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
}
.product-card {
    background: white; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); transition: var(--transition);
    box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
    display: block;
}
.product-card:hover {
    transform: translateY(-8px); box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.product-card-img {
    height: 220px; overflow: hidden; background: var(--bg-gray);
    position: relative;
}
.product-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.08); }
.product-card-body { padding: 1.5rem; text-align: center; }
.product-card-body h3 {
    font-size: 1.1rem; color: var(--primary-dark); margin-bottom: 0.5rem;
    font-weight: 700;
}
.product-card-body p { font-size: 0.88rem; color: var(--text-light); }
.product-tag {
    display: inline-block; background: rgba(230,126,34,0.1); color: var(--accent);
    padding: 3px 12px; border-radius: 20px; font-size: 0.75rem;
    font-weight: 600; margin-bottom: 0.5rem;
}

/* ===== 新闻动态 ===== */
.news-section { background: var(--bg-gray); }
.news-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.8rem;
}
.news-card {
    background: white; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition);
    display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.news-card-img {
    height: 200px; overflow: hidden; background: var(--bg-gray);
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-date {
    font-size: 0.82rem; color: var(--accent); font-weight: 600;
    margin-bottom: 0.5rem; display: flex; align-items: center; gap: 6px;
}
.news-card-body h3 {
    font-size: 1.1rem; color: var(--primary-dark); margin-bottom: 0.8rem;
    font-weight: 700; line-height: 1.4;
}
.news-card-body h3 a:hover { color: var(--accent); }
.news-excerpt {
    font-size: 0.9rem; color: var(--text-light); line-height: 1.7;
    flex: 1; display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}
.news-more {
    margin-top: 1rem; color: var(--primary); font-weight: 600;
    font-size: 0.9rem; display: inline-flex; align-items: center; gap: 4px;
    transition: var(--transition);
}
.news-more:hover { color: var(--accent); gap: 8px; }
.news-detail-content {
    max-width: 800px; margin: 0 auto; background: white;
    padding: 3rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.news-detail-content h1 {
    color: var(--primary-dark); margin-bottom: 1rem; font-size: 1.8rem;
}
.news-detail-meta {
    color: var(--text-light); font-size: 0.9rem; margin-bottom: 2rem;
    padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.news-detail-body { line-height: 2; color: var(--text); }
.news-detail-body p { margin-bottom: 1.2rem; }
.news-detail-body img { margin: 1.5rem auto; border-radius: var(--radius); }

/* ===== 服务保障 ===== */
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: white; border-radius: var(--radius-lg); padding: 2rem 1.5rem;
    text-align: center; transition: var(--transition);
    box-shadow: var(--shadow-sm); border-top: 4px solid transparent;
}
.feature-card:hover {
    border-top-color: var(--accent); transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.feature-icon {
    width: 64px; height: 64px; margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: white;
}
.feature-card h4 { font-size: 1.1rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.88rem; color: var(--text-light); }

/* ===== 联系页面 ===== */
.contact-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.contact-card {
    background: white; border-radius: var(--radius-lg); padding: 2.5rem;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.contact-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.contact-card h3 {
    color: var(--primary-dark); margin-bottom: 1.2rem; font-size: 1.3rem;
    padding-bottom: 0.8rem; border-bottom: 2px solid var(--accent);
}
.contact-card p { margin-bottom: 0.8rem; color: var(--text-light); }
.phone-large {
    font-size: 2rem; font-weight: 800; color: var(--accent);
    margin: 1rem 0; display: block;
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(180deg, var(--primary-dark) 0%, #0a2a3d 100%);
    color: #b8d4e3; padding: 4rem 0 0;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem; padding-bottom: 2.5rem;
}
.footer-col h4 {
    color: white; font-size: 1.1rem; margin-bottom: 1.2rem;
    position: relative; padding-bottom: 0.6rem;
}
.footer-col h4::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 36px; height: 3px; background: var(--accent); border-radius: 2px;
}
.footer-col p { font-size: 0.9rem; line-height: 1.8; margin-bottom: 0.5rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a {
    color: #b8d4e3; font-size: 0.9rem; transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); padding-left: 4px; }
.footer-phone { font-size: 1rem; margin-top: 0.8rem; }
.footer-phone a { color: var(--accent-light) !important; font-weight: 700; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0;
    text-align: center; font-size: 0.85rem;
}
.footer-bottom p { margin-bottom: 0.4rem; }
.icp-link {
    color: #b8d4e3; transition: var(--transition);
}
.icp-link:hover { color: var(--accent-light); }
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ===== 移动端悬浮按钮 ===== */
.mobile-call {
    position: fixed; bottom: 24px; right: 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white; width: 60px; height: 60px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 6px 24px rgba(230,126,34,0.4); z-index: 999;
    font-size: 1.6rem; transition: var(--transition); text-decoration: none;
    animation: pulse 2s infinite;
}
.mobile-call:hover { transform: scale(1.1); }
@keyframes pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(230,126,34,0.4); }
    50% { box-shadow: 0 6px 32px rgba(230,126,34,0.6); }
}
@media (max-width: 768px) { .mobile-call { display: flex; } }

/* ===== 后台样式 ===== */
.admin-body {
    background: var(--bg-gray); font-family: "Microsoft Yahei", sans-serif;
}
.admin-header {
    background: var(--primary-dark); color: white; padding: 1rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
}
.admin-header h1 { font-size: 1.2rem; }
.admin-header a { color: #b8d4e3; margin-left: 1rem; font-size: 0.9rem; }
.admin-header a:hover { color: white; }
.admin-container { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; }
.admin-card {
    background: white; border-radius: var(--radius); padding: 2rem;
    box-shadow: var(--shadow-sm); margin-bottom: 1.5rem;
}
.admin-card h2 {
    color: var(--primary-dark); margin-bottom: 1.5rem; font-size: 1.3rem;
    padding-bottom: 0.8rem; border-bottom: 2px solid var(--accent);
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
    padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border);
}
.admin-table th { background: var(--bg-gray); font-weight: 600; color: var(--primary-dark); }
.admin-table tr:hover { background: #f8fafc; }
.btn {
    display: inline-block; padding: 8px 20px; border-radius: 8px;
    font-weight: 600; cursor: pointer; border: none; font-size: 0.9rem;
    transition: var(--transition); text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-danger { background: #e74c3c; color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block; margin-bottom: 0.5rem; font-weight: 600;
    color: var(--primary-dark); font-size: 0.92rem;
}
.form-group input[type="text"], .form-group input[type="password"],
.form-group input[type="date"], .form-group textarea, .form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 0.95rem; transition: var(--transition);
    font-family: inherit;
}
.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);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.login-box {
    max-width: 400px; margin: 6rem auto; background: white;
    padding: 2.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.login-box h2 { text-align: center; color: var(--primary-dark); margin-bottom: 1.5rem; }
.alert {
    padding: 12px 16px; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.admin-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem;
}
.stat-card {
    background: white; border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow-sm); text-align: center;
}
.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--text-light); font-size: 0.9rem; margin-top: 0.3rem; }

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