/* ========================================
   徐州唯惜通讯设备有限公司 — Modern Template
   ======================================== */

:root {
  --primary: #1a56db;
  --primary-dark: #1342b0;
  --primary-light: #e8effd;
  --accent: #059669;
  --accent-light: #d1fae5;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --font-base: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --radius: 8px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-base);
  color: var(--gray-800);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); transition: color .2s; }
a:hover { color: var(--primary-dark); text-decoration: none; }

/* ───── Navigation ───── */
.navbar-modern {
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  padding: 0 1rem;
  height: 64px;
  transition: box-shadow .3s;
}
.navbar-modern .navbar-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gray-900);
  letter-spacing: .5px;
}
.navbar-modern .navbar-nav .nav-link {
  color: var(--gray-600);
  font-size: .9rem;
  font-weight: 500;
  padding: 1.25rem .9rem !important;
  position: relative;
  transition: color .2s;
}
.navbar-modern .navbar-nav .nav-link:hover,
.navbar-modern .navbar-nav .active .nav-link {
  color: var(--primary);
}
.navbar-modern .navbar-nav .active .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: .9rem; right: .9rem;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}
.navbar-modern.scrolled { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.navbar-spacer { height: 64px; }

/* ───── Hero / Banner ───── */
.hero-section {
  background: linear-gradient(135deg, #1a56db 0%, #1e40af 50%, #0f2b7a 100%);
  color: #fff;
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: .75rem;
  letter-spacing: -.5px;
}
.hero-section p {
  font-size: 1.05rem;
  opacity: .9;
  max-width: 600px;
  line-height: 1.7;
}
.hero-section .hero-actions { margin-top: 1.5rem; }
.hero-section .btn-outline-light { border-width: 2px; }

/* ───── Page Banner ───── */
.page-banner {
  background: linear-gradient(135deg, #1a56db 0%, #2563eb 100%);
  color: #fff;
  padding: 48px 0 40px;
  text-align: center;
}
.page-banner h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.page-banner p {
  opacity: .85;
  font-size: .95rem;
  margin-bottom: 0;
}

/* ───── Section ───── */
.section { padding: 60px 0; }
.section-gray { background: var(--gray-50); }
.section-dark { background: var(--gray-900); color: #fff; }
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .5rem;
}
.section-title p {
  color: var(--gray-500);
  font-size: .95rem;
}
.section-title.light h2 { color: #fff; }
.section-title.light p { color: rgba(255,255,255,.75); }

/* ───── Card ───── */
.card-modern {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all .3s ease;
  overflow: hidden;
  background: #fff;
}
.card-modern:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card-modern .card-body { padding: 1.25rem; }
.card-modern .card-title { font-size: 1rem; font-weight: 600; }
.card-modern .card-text { font-size: .85rem; color: var(--gray-500); }

/* ───── Product Card ───── */
.product-card .card-img-wrap {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  overflow: hidden;
}
.product-card .card-img-wrap img {
  max-height: 100%;
  object-fit: contain;
  transition: transform .3s;
}
.product-card:hover .card-img-wrap img { transform: scale(1.05); }

/* ───── Feature / Advantage ───── */
.feature-grid .feature-item {
  text-align: center;
  padding: 1.5rem;
}
.feature-grid .feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #fff;
}
.feature-grid h5 { font-size: 1rem; font-weight: 600; margin-bottom: .35rem; }
.feature-grid p { font-size: .85rem; color: var(--gray-500); margin-bottom: 0; }

/* ───── Nav tabs ───── */
.nav-tabs-modern {
  border-bottom: 2px solid var(--gray-200);
  justify-content: center;
  margin-bottom: 2rem;
}
.nav-tabs-modern .nav-link {
  border: none;
  color: var(--gray-500);
  font-weight: 500;
  padding: .75rem 1.25rem;
  position: relative;
}
.nav-tabs-modern .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 1.25rem; right: 1.25rem;
  height: 2px;
  background: transparent;
  transition: background .2s;
}
.nav-tabs-modern .nav-link.active,
.nav-tabs-modern .nav-link:hover { color: var(--primary); background: transparent; }
.nav-tabs-modern .nav-link.active::after { background: var(--primary); }

/* ───── Breadcrumb ───── */
.breadcrumb-modern {
  background: transparent;
  padding: .75rem 0;
  margin-bottom: 0;
  font-size: .85rem;
}
.breadcrumb-modern a { color: var(--gray-500); }
.breadcrumb-modern .active { color: var(--gray-800); }

/* ───── Content ───── */
.content-page {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}
.content-page h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
}
.content {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--gray-600);
}
.content p { margin-bottom: 1rem; }
.content strong { color: var(--gray-800); }
.content ul, .content ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.content li { margin-bottom: .35rem; }

/* ───── Sidebar ───── */
.sidebar-list .list-group-item {
  border: none;
  border-radius: var(--radius) !important;
  margin-bottom: 4px;
  color: var(--gray-600);
  font-size: .9rem;
  padding: .65rem 1rem;
  transition: all .2s;
}
.sidebar-list .list-group-item:hover,
.sidebar-list .list-group-item.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* ───── Footer ───── */
.footer-modern {
  background: var(--gray-900);
  color: rgba(255,255,255,.7);
  padding: 48px 0 0;
}
.footer-modern h5 {
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-modern ul { list-style: none; padding: 0; }
.footer-modern ul li {
  margin-bottom: .4rem;
  font-size: .85rem;
}
.footer-modern ul li i { width: 20px; margin-right: 4px; }
.footer-modern a { color: rgba(255,255,255,.7); }
.footer-modern a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0;
  margin-top: 2.5rem;
  font-size: .82rem;
  text-align: center;
}

/* ───── Pageination ───── */
.pagination-modern .page-link {
  border: none;
  color: var(--gray-600);
  padding: .4rem .85rem;
  margin: 0 2px;
  border-radius: var(--radius) !important;
  font-size: .85rem;
}
.pagination-modern .page-item.active .page-link {
  background: var(--primary);
  color: #fff;
}
.pagination-modern .page-item .page-link:hover {
  background: var(--gray-100);
}

/* ───── Mobile Footer Nav ───── */
.mobile-bottom-nav {
  background: var(--primary);
  color: #fff;
}
.mobile-bottom-nav a {
  color: rgba(255,255,255,.85);
  font-size: .78rem;
}
.mobile-bottom-nav a:hover { color: #fff; }

/* ───── Responsive ───── */
@media (max-width: 767px) {
  .hero-section { padding: 50px 0 40px; }
  .hero-section h1 { font-size: 1.5rem; }
  .hero-section p { font-size: .9rem; }
  .section { padding: 40px 0; }
  .section-title h2 { font-size: 1.3rem; }
}

/* ===== 在线留言 ===== */
.guestbook-form-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
  padding: 50px 60px;
  max-width: 800px;
  margin: 0 auto;
}
.guestbook-form-wrap .section-subtitle {
  color: #1a237e;
  font-size: 20px;
}
.message-form .form-control {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 15px;
  font-size: 14px;
  transition: border-color .2s;
}
.message-form .form-control:focus {
  border-color: #1a237e;
  box-shadow: 0 0 0 2px rgba(26,35,126,.1);
}
.message-form label {
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}
.checkcode-img {
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}
@media (max-width: 768px) {
  .guestbook-form-wrap { padding: 25px 20px; }
}

.section-padding { padding: 50px 0; }
.section-bg { background: #f8f9fa; }

.btn-modern-primary {
  background: #1a56db;
  border: none;
  color: #fff;
  padding: 10px 35px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  transition: all .2s;
  cursor: pointer;
}
.btn-modern-primary:hover {
  background: #1e40af;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,86,219,.3);
}

/* ===== 搜索弹窗 ===== */
.search-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
}
.search-overlay.active { display: block; }
.search-overlay-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.88);
}
.search-overlay-content {
  position: relative;
  top: 35%;
  transform: translateY(-50%);
  z-index: 2;
  padding: 0 20px;
}
.search-overlay-input {
  height: 60px;
  font-size: 20px;
  border: none;
  border-radius: 4px 0 0 4px;
  padding: 0 25px;
  background: #fff;
  color: #333;
  border: 1px solid #d1d5db;
  border-right: none;
}
.search-overlay-input::placeholder { color: #9ca3af; }
.search-overlay-input:focus {
  background: #fff;
  box-shadow: none;
  border-color: #1a56db;
}
.search-overlay-content .input-group-append .btn {
  border-radius: 0 4px 4px 0;
  padding: 0 30px;
  background: #1a56db;
  border: none;
}
.search-overlay-close {
  position: absolute;
  top: -80px;
  right: 20px;
  color: #fff;
  font-size: 32px;
  opacity: .6;
  transition: opacity .2s;
  z-index: 3;
}
.search-overlay-close:hover { opacity: 1; color: #fff; text-decoration: none; }

/* ===== 浮动侧边按钮 ===== */
.float-buttons {
  position: fixed;
  right: 20px;
  bottom: 120px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.float-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
  transition: all .25s;
  text-decoration: none;
}
.float-btn:hover { transform: translateY(-2px); color: #fff; text-decoration: none; }
.float-btn-chat { background: #1a56db; }
.float-btn-chat:hover { background: #1e40af; }
.float-btn-phone { background: #059669; }
.float-btn-phone:hover { background: #047857; }
.float-btn-top {
  background: #374151;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .25s;
}
.float-btn-top.visible { opacity: 1; pointer-events: auto; }
.float-btn-top:hover { background: #1f2937; }

/* ===== 在线咨询浮窗 ===== */
.message-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
}
.message-overlay.active { display: block; }
.message-overlay-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.5);
}
.message-overlay-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  z-index: 2;
  max-height: 90vh;
  overflow-y: auto;
}
.message-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #e5e7eb;
}
.message-overlay-header h5 { margin: 0; font-weight: 600; color: #1a56db; }
.message-close-btn { color: #999; font-size: 20px; }
.message-close-btn:hover { color: #333; text-decoration: none; }
.message-overlay-body { padding: 24px; }
.message-overlay-body .form-group { margin-bottom: 14px; }
.message-overlay-body label { font-weight: 500; font-size: 14px; margin-bottom: 3px; }
.message-overlay-body .form-control {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  padding: 8px 12px;
}
.message-overlay-body .form-control:focus {
  border-color: #1a56db;
  box-shadow: 0 0 0 2px rgba(26,86,219,.1);
}

/* ===== 合作伙伴 ===== */
.partner-section { padding: 50px 0; background: #fff; }
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 30px 50px;
}
.partner-item {
  height: 50px;
  display: flex;
  align-items: center;
  opacity: .6;
  filter: grayscale(1);
  transition: all .3s;
}
.partner-item:hover { opacity: 1; filter: grayscale(0); }
.partner-item img { max-height: 100%; max-width: 140px; }

/* ===== Footer QR ===== */
.footer-qr-placeholder {
  display: inline-block;
  padding: 20px;
  border: 2px dashed rgba(255,255,255,.15);
  border-radius: 8px;
  min-width: 120px;
}

/* 页脚二维码统一样式 */
.footer-qr-wrap .qr-item { margin: 0 10px; }
.footer-qr-wrap .qr-item img.qrcode,
.footer-qr-wrap .qr-item img[alt*="二维码"] {
  width: 100px !important;
  height: 100px !important;
  object-fit: cover;
}

/* ===== 移动端右侧滑出菜单 ===== */
.mobile-menu-btn { position: relative; z-index: 1060; }

.mobile-menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.mobile-menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0; right: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 1060;
  overflow-y: auto;
  transition: right .3s ease;
  box-shadow: -4px 0 15px rgba(0,0,0,.12);
}
.mobile-menu.open { right: 0; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.mobile-menu-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
}
.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.mobile-menu-close:hover { color: #111827; }

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-nav-list li {
  border-bottom: 1px solid #f3f4f6;
}
.mobile-nav-list li a {
  display: block;
  padding: 14px 20px;
  font-size: .95rem;
  color: #374151;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.mobile-nav-list li a:hover,
.mobile-nav-list li.active a {
  background: #eff6ff;
  color: #1a56db;
}

.mobile-menu-search {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
}
.mobile-menu-search a {
  display: block;
  padding: 10px;
  text-align: center;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-decoration: none;
  transition: all .2s;
}
.mobile-menu-search a:hover {
  color: #1a56db;
  border-color: #1a56db;
}

/* 移动端隐藏桌面下拉菜单 */
@media (max-width: 991.98px) {
  .navbar-modern .navbar-collapse { display: none !important; }
  .navbar-modern .navbar-nav .nav-link { padding: .5rem .9rem !important; }
  .navbar-modern .nav-search { display: none; }
}

/* ===== 导航搜索按钮 ===== */
.nav-search {
  margin-left: 10px;
}
.nav-search a {
  color: var(--gray-500);
  font-size: 16px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  transition: all .2s;
  display: inline-block;
}
.nav-search a:hover {
  color: #1a56db;
  border-color: #1a56db;
  text-decoration: none;
}

/* ===== 分页 ===== */
.page-link {
  color: #1a56db;
  border: 1px solid #d1d5db;
  padding: 8px 14px;
  margin: 0 2px;
  border-radius: 4px;
  font-size: 14px;
}
.page-link:hover {
  background: #1a56db;
  color: #fff;
  border-color: #1a56db;
}
.page-item.active .page-link {
  background: #1a56db;
  border-color: #1a56db;
}
