/* ============================================
   河北尧瑞达机电科技有限公司 - 官网样式
   配色：深蓝 #0F3867 / 橙 #E66A00
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; color: #333; line-height: 1.6; background: #fff; }
a { text-decoration: none; color: inherit; transition: color .3s; }
a:hover { color: #E66A00; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.section-padding { padding: 80px 0; }

/* --- Theme Colors --- */
:root {
  --primary: #0F3867;
  --primary-dark: #0A2A4D;
  --accent: #E66A00;
  --accent-hover: #CC5E00;
  --text: #333;
  --text-light: #666;
  --bg-light: #F5F7FA;
  --border: #E5E5E5;
  --white: #fff;
}

/* --- Header / Top Bar --- */
.topbar {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
  display: none;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: #ccc; margin-left: 20px; }
.topbar a:hover { color: #fff; }
@media (min-width: 768px) { .topbar { display: block; } }

/* --- Navigation --- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,.08);
  transition: all .3s;
}
.header .container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 44px; }
.logo-text { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.logo-text small { font-size: 12px; font-weight: 400; color: var(--text-light); display: block; }

.nav { display: none; }
.nav a { padding: 0 16px; font-size: 15px; color: var(--text); position: relative; line-height: 70px; }
.nav a:hover, .nav a.active { color: var(--accent); }
.nav a.active::after {
  content: ''; position: absolute; bottom: 0; left: 16px; right: 16px;
  height: 3px; background: var(--accent); border-radius: 2px 2px 0 0;
}
@media (min-width: 992px) { .nav { display: flex; } }

/* Mobile Nav Toggle */
.nav-toggle { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.nav-toggle span { width: 28px; height: 3px; background: var(--primary); border-radius: 2px; transition: .3s; }
@media (min-width: 992px) { .nav-toggle { display: none; } }

/* Mobile Nav Panel */
.mobile-nav {
  display: none; position: fixed; top: 70px; left: 0; right: 0; bottom: 0;
  background: var(--white); z-index: 999; overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 14px 20px; font-size: 16px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--accent); background: var(--bg-light); }

/* --- Page Hero / Banner --- */
.page-hero {
  margin-top: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, #1A4F7A 100%);
  color: var(--white); padding: 50px 0; text-align: center;
}
.page-hero .breadcrumb {
  font-size: 14px; margin-bottom: 16px; color: rgba(255,255,255,.7);
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.7); }
.page-hero .breadcrumb a:hover { color: var(--accent); }
.page-hero .breadcrumb span { color: #fff; }
.page-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 10px; }
.page-hero .subtitle { font-size: 16px; color: rgba(255,255,255,.8); }
@media (max-width: 767px) {
  .page-hero { padding: 36px 0; }
  .page-hero h1 { font-size: 26px; }
  .page-hero .subtitle { font-size: 14px; }
}

/* --- Section Title --- */
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 30px; color: var(--primary); position: relative; padding-bottom: 15px; font-weight: 700; }
.section-title h2::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60px; height: 3px; background: var(--accent);
}
.section-title p { color: var(--text-light); margin-top: 12px; font-size: 15px; }
@media (max-width: 767px) { .section-title h2 { font-size: 24px; } }

/* --- Features (4 icons) --- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  background: var(--white); border-radius: 8px; padding: 32px 20px;
  text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .3s, box-shadow .3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.feature-card .icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: var(--bg-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.feature-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* --- About Intro (left img + right text) --- */
.about-intro { display: flex; flex-direction: column; gap: 30px; align-items: center; }
.about-intro .img-wrap { width: 100%; border-radius: 8px; overflow: hidden; }
.about-intro .img-wrap img { width: 100%; height: auto; border-radius: 8px; }
.about-intro .text { flex: 1; }
.about-intro .text p { margin-bottom: 14px; font-size: 15px; color: var(--text-light); line-height: 1.8; }
.about-intro .text p:first-child { font-size: 17px; color: var(--text); font-weight: 500; }
@media (min-width: 768px) { .about-intro { flex-direction: row; } .about-intro .img-wrap { width: 48%; } }

/* --- Timeline --- */
.timeline { position: relative; padding: 20px 0; }
.timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
@media (min-width: 768px) {
  .timeline::before { left: 50%; transform: translateX(-50%); }
}
.timeline-item {
  position: relative; padding-left: 50px; margin-bottom: 30px;
}
@media (min-width: 768px) {
  .timeline-item { width: 50%; padding-left: 40px; }
  .timeline-item:nth-child(odd) { margin-left: 0; padding-right: 40px; padding-left: 0; text-align: right; }
  .timeline-item:nth-child(even) { margin-left: 50%; }
}
.timeline-item .year {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 4px 14px; border-radius: 4px; font-weight: 700; font-size: 14px;
  margin-bottom: 8px;
}
.timeline-item .dot {
  position: absolute; left: 12px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--accent);
}
@media (min-width: 768px) {
  .timeline-item:nth-child(odd) .dot { left: auto; right: -8px; }
  .timeline-item:nth-child(even) .dot { left: -8px; }
}
.timeline-item h4 { font-size: 16px; color: var(--primary); margin-bottom: 4px; }
.timeline-item p { font-size: 14px; color: var(--text-light); }

/* --- Culture Grid --- */
.culture-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .culture-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .culture-grid { grid-template-columns: repeat(4, 1fr); } }
.culture-card {
  background: var(--white); border-radius: 8px; padding: 28px 20px;
  text-align: center; border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
}
.culture-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.culture-card h3 { font-size: 17px; color: var(--primary); margin-bottom: 8px; }
.culture-card p { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* --- Factory Gallery --- */
.factory-gallery { display: grid; gap: 12px; }
@media (min-width: 480px) { .factory-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .factory-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .factory-gallery { grid-template-columns: repeat(4, 1fr); } }
.factory-gallery .gallery-item {
  border-radius: 6px; overflow: hidden; position: relative;
}
.factory-gallery .gallery-item img { width: 100%; height: 200px; object-fit: cover; transition: transform .4s; }
.factory-gallery .gallery-item:hover img { transform: scale(1.05); }
.factory-gallery .gallery-item .caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff; padding: 30px 12px 10px; font-size: 13px; text-align: center;
}

/* --- Contact Page --- */
.contact-wrap { display: flex; flex-direction: column; gap: 40px; }
@media (min-width: 768px) { .contact-wrap { flex-direction: row; } }
.contact-info { flex: 1; }
.contact-info .info-item { margin-bottom: 20px; }
.contact-info .info-item .label { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.contact-info .info-item .value { font-size: 16px; color: var(--text); }
.contact-info .info-item .value.tel { font-size: 26px; color: var(--accent); font-weight: 700; }
.contact-form { flex: 1; }
.contact-form .form-group { margin-bottom: 16px; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; transition: border-color .3s;
  font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); outline: none; }
.contact-form textarea { height: 120px; resize: vertical; }

/* --- Map --- */
.map-wrap { width: 100%; height: 380px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* --- News List --- */
.news-tabs { display: flex; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.news-tabs .tab-btn {
  padding: 8px 20px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--white); font-size: 14px; cursor: pointer; transition: all .3s;
}
.news-tabs .tab-btn:hover, .news-tabs .tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.news-list { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 768px) {
  .news-list.home-news {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

.news-list.home-news .news-item {
  flex-direction: column;
}
.news-list.home-news .news-item .thumb {
  width: 100%;
  height: 200px;
}
.news-list.home-news .news-item .info {
  padding: 16px;
}
.news-item {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--white); border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.06); transition: box-shadow .3s;
}
.news-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.news-item .thumb { width: 100%; height: 200px; overflow: hidden; }
.news-item .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-item:hover .thumb img { transform: scale(1.05); }
.news-item .info { padding: 0 16px 16px; }
.news-item .info h3 { font-size: 17px; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.news-item .info h3:hover { color: var(--accent); }
.news-item .info .meta { font-size: 13px; color: #999; margin-bottom: 10px; }
.news-item .info .meta .cat { display: inline-block; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 3px; font-size: 12px; margin-left: 8px; }
.news-item .info p { font-size: 14px; color: var(--text-light); line-height: 1.7; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 768px) {
  .news-item { flex-direction: row; }
  .news-item .thumb { width: 260px; min-height: 180px; height: auto; }
  .news-item .info { padding: 20px 24px; flex: 1; }
}

/* --- News Detail --- */
.news-detail { max-width: 800px; margin: 0 auto; }
.news-detail .article-header { margin-bottom: 30px; }
.news-detail .article-header h1 { font-size: 26px; color: var(--primary); margin-bottom: 10px; }
.news-detail .article-header .meta { font-size: 14px; color: #999; }
.news-detail .article-body { font-size: 15px; line-height: 1.9; color: var(--text); }
.news-detail .article-body p { margin-bottom: 18px; }
.news-detail .article-body img { margin: 20px auto; border-radius: 6px; }
.news-detail .article-body h2, .news-detail .article-body h3 { color: var(--primary); margin: 30px 0 14px; }

.news-prev-next {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin: 40px 0; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.news-prev-next a { font-size: 14px; color: var(--text-light); max-width: 48%; }
.news-prev-next a:hover { color: var(--accent); }

.news-related { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .news-related { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .news-related { grid-template-columns: repeat(4, 1fr); } }
.news-related .rel-item { border-radius: 6px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.news-related .rel-item img { width: 100%; height: 160px; object-fit: cover; }
.news-related .rel-item .rel-info { padding: 12px; }
.news-related .rel-item .rel-info h4 { font-size: 14px; line-height: 1.4; margin-bottom: 6px; }
.news-related .rel-item .rel-info .date { font-size: 12px; color: #999; }

/* --- Product Detail --- */
.product-wrap { display: flex; flex-direction: column; gap: 30px; }
@media (min-width: 768px) { .product-wrap { flex-direction: row; } }
.product-gallery { flex: 1; }
.product-gallery .main-img { width: 100%; border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.product-gallery .main-img img { width: 100%; border-radius: 8px; }
.product-gallery .thumb-list { display: flex; gap: 8px; }
.product-gallery .thumb-list img {
  width: 80px; height: 60px; object-fit: cover; border-radius: 4px;
  cursor: pointer; border: 2px solid transparent; transition: .3s;
}
.product-gallery .thumb-list img:hover, .product-gallery .thumb-list img.active { border-color: var(--accent); }
.product-info { flex: 1; }
.product-info h1 { font-size: 24px; color: var(--primary); margin-bottom: 6px; }
.product-info .model { font-size: 14px; color: #999; margin-bottom: 14px; }
.product-info .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.product-info .tags span {
  padding: 4px 12px; border-radius: 4px; font-size: 12px;
  background: #FFF3E0; color: var(--accent); border: 1px solid #FFE0B2;
}
.product-info .summary { background: var(--bg-light); padding: 16px; border-radius: 6px; margin-bottom: 20px; }
.product-info .summary p { font-size: 14px; color: var(--text-light); margin-bottom: 6px; padding-left: 14px; position: relative; }
.product-info .summary p::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.product-info .btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Tab Panels --- */
.tab-nav { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-nav .tab-item {
  padding: 12px 24px; font-size: 15px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .3s; color: var(--text-light);
}
.tab-nav .tab-item:hover { color: var(--primary); }
.tab-nav .tab-item.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel p { margin-bottom: 14px; font-size: 15px; line-height: 1.8; color: var(--text-light); }
.tab-panel img { margin: 16px auto; border-radius: 6px; }
.tab-panel table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.tab-panel table th, .tab-panel table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.tab-panel table th { background: var(--primary); color: #fff; font-weight: 600; }
.tab-panel table tr:nth-child(even) { background: var(--bg-light); }

/* --- FAQ --- */
.faq-item { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.faq-item .faq-q {
  padding: 14px 18px; cursor: pointer; font-weight: 500; font-size: 15px;
  position: relative; background: var(--white);
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item .faq-q::after { content: '+'; font-size: 18px; color: var(--accent); }
.faq-item.open .faq-q::after { content: '−'; }
.faq-item .faq-a { display: none; padding: 0 18px 14px; font-size: 14px; color: var(--text-light); line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* --- Sidebar --- */
.page-layout { display: flex; flex-direction: column; gap: 30px; }
.page-main { flex: 1; }
.page-sidebar {
  width: 100%;
}
@media (min-width: 992px) {
  .page-layout { flex-direction: row; }
  .page-sidebar { width: 300px; flex-shrink: 0; }
}
.sidebar-widget { background: var(--bg-light); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.sidebar-widget h3 { font-size: 16px; color: var(--primary); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.sidebar-widget ul li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.sidebar-widget ul li:last-child { border-bottom: 0; }
.sidebar-widget ul li a { font-size: 14px; color: var(--text-light); display: block; }
.sidebar-widget ul li a:hover { color: var(--accent); padding-left: 4px; }
.sidebar-widget .hot-news li { font-size: 14px; }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 40px 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 6px; font-size: 14px;
  border: 1px solid var(--border); color: var(--text);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 12px 30px; border-radius: 6px;
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
  transition: all .3s; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1DA851; color: #fff; }
.btn-tel { background: var(--primary); color: #fff; }
.btn-tel:hover { background: var(--primary-dark); color: #fff; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1A4F7A 100%);
  color: #fff; text-align: center; padding: 60px 20px;
}
.cta-banner h2 { font-size: 28px; margin-bottom: 12px; }
.cta-banner p { font-size: 16px; margin-bottom: 24px; color: rgba(255,255,255,.8); }
.cta-banner .btn { font-size: 17px; padding: 14px 40px; }

/* --- Footer --- */
.footer {
  background: #0A2A4D; color: rgba(255,255,255,.7); padding: 50px 0 0;
}
.footer .container { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer .container { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .footer .container { grid-template-columns: repeat(4, 1fr); } }
.footer-col h3 { color: #fff; font-size: 17px; margin-bottom: 14px; }
.footer-col p, .footer-col li { font-size: 14px; margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.7); }
.footer-col a:hover { color: var(--accent); }
.footer .copyright {
  grid-column: 1 / -1; text-align: center; padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 20px;
  font-size: 13px;
}

/* --- Floating Phone (Mobile) --- */
.float-phone {
  position: fixed; bottom: 30px; right: 20px; z-index: 999;
  display: flex; align-items: center; gap: 10px;
}
@media (min-width: 768px) { .float-phone { display: none; } }
.float-phone .phone-btn {
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; box-shadow: 0 3px 12px rgba(37,211,102,.4);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* --- Product Cards (Image + Name) --- */
.product-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .3s, box-shadow .3s;
  display: block;
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.product-card .card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.product-card .card-body {
  padding: 16px;
  text-align: center;
}
.product-card .card-body h3 {
  font-size: 17px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}
.product-card .card-body p {
  font-size: 13px;
  color: var(--text-light);
}
.product-card:hover .card-body h3 {
  color: var(--accent);
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.bg-light { background: var(--bg-light); }
