/*
Theme Name: 九百钢构 - 独立站主题 (Jiubai Steel Theme)
Theme URI: https://jiubaisteel.com
Author: Antigravity Team
Description: 广东九百钢构有限公司 - 高级B2B外贸钢结构企业官网 WordPress 独立站主题 (支持PC端与手机端全响应式设计稿)
Version: 1.2.0
Text Domain: jiubai-steel
*/

/* ==========================================================================
   1. Design System & CSS Variables
   ========================================================================== */
:root {
  --primary-blue: #0066ff;
  --primary-hover: #0052cc;
  --primary-dark: #003d99;
  --navy-dark: #0b1e36;
  --navy-footer: #06152b;
  --accent-light: #eef5ff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 102, 255, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 30, 54, 0.1);
  --shadow-lg: 0 16px 40px rgba(11, 30, 54, 0.16);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-max: 1240px;
  --motion-fast: 150ms;
  --motion-medium: 280ms;
  --motion-slow: 420ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--text-primary);
  background-color: #ffffff;
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, opacity var(--motion-fast) ease;
}

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

ul, ol {
  list-style: none;
}

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

/* ==========================================================================
   3. Header & Navigation (PC & Mobile)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 100px;
  width: auto;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-navigation a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-dark);
  padding: 8px 0;
  position: relative;
}

.main-navigation a:hover,
.main-navigation li.current-menu-item > a {
  color: var(--primary-blue);
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-blue);
  transition: width 0.25s ease;
}

.main-navigation a:hover::after,
.main-navigation li.current-menu-item > a::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-quote {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background-color: var(--primary-blue);
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.btn-quote:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Mobile Hamburger Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--navy-dark);
  cursor: pointer;
  padding: 8px;
}

/* ==========================================================================
   4. Mobile Slide-out Drawer Navigation (Matching 手机菜单.png)
   ========================================================================== */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 54, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 360px;
  height: 100%;
  background: #ffffff;
  z-index: 1999;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  transition: transform 300ms var(--ease-out), visibility 300ms ease;
  will-change: transform;
  overflow-y: auto;
}

.mobile-drawer.active {
  transform: translate3d(0, 0, 0);
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--navy-dark);
  cursor: pointer;
}

.mobile-drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-list li a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--navy-dark);
  font-weight: 600;
  font-size: 0.98rem;
  background: #ffffff;
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.mobile-nav-list li a .icon {
  width: 32px;
  font-size: 1.1rem;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
}

.mobile-nav-list li a .arrow {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mobile-nav-list li.active a,
.mobile-nav-list li a:hover {
  background: var(--accent-light);
  color: var(--primary-blue);
}

.mobile-lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-dark);
  cursor: pointer;
}

.mobile-drawer-contact {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-drawer-contact .contact-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
}

.mobile-drawer-contact .contact-row strong {
  display: block;
  color: var(--navy-dark);
}

.mobile-drawer-contact .contact-row span {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.mobile-drawer-banner {
  background: linear-gradient(135deg, var(--navy-dark), #102a4e);
  color: #ffffff;
  padding: 24px 16px;
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mobile-drawer-banner h4 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.mobile-drawer-banner p {
  font-size: 0.78rem;
  color: #cbd5e1;
}

/* ==========================================================================
   5. Floating Customer Service Widget (Matching 手机浮动客服弹窗.png)
   ========================================================================== */
.floating-chat-container {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 1800;
}

.floating-chat-btn {
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease, background-color 0.25s ease;
  font-size: 0.95rem;
  font-weight: 700;
}

.floating-chat-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.floating-chat-btn .chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  font-weight: 800;
}

.chat-popup-card {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 320px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 20px, 0) scale(.985);
  transform-origin: right bottom;
  transition: opacity 200ms ease, transform 200ms var(--ease-standard), visibility 200ms ease;
  will-change: transform, opacity;
}

.chat-popup-card.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition-duration: 280ms;
  transition-timing-function: var(--ease-out);
}

.chat-popup-header {
  background: var(--primary-blue);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-popup-header .header-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
}

.chat-popup-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

.chat-popup-body {
  padding: 18px;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 300px;
  overflow-y: auto;
}

.chat-message-bot {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy-dark);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.message-bubble {
  background: #ffffff;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.chat-quick-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.quick-chip:hover {
  background: var(--primary-blue);
  color: #ffffff;
}

.chat-popup-footer {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.chat-popup-footer form {
  display: flex;
  gap: 8px;
}

.chat-popup-footer input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.btn-send-chat {
  background: var(--primary-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  cursor: pointer;
}

/* ==========================================================================
   6. Page Banner & Typography
   ========================================================================== */
.page-banner {
  background: linear-gradient(135deg, var(--navy-dark) 0%, #102a4e 100%);
  color: #ffffff;
  padding: 60px 0;
  position: relative;
}

.page-banner-sub {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.82rem;
  color: var(--primary-blue);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

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

.page-banner-desc {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 600px;
  margin-bottom: 16px;
}

.breadcrumbs {
  font-size: 0.88rem;
  color: #94a3b8;
}

.breadcrumbs a {
  color: #cbd5e1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

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

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

.btn-outline {
  border-color: #ffffff;
  color: #ffffff;
  background: transparent;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.btn-outline-dark {
  border-color: var(--navy-dark);
  color: var(--navy-dark);
  background: transparent;
}

.btn-outline-dark:hover {
  background-color: var(--navy-dark);
  color: #ffffff;
}

/* ==========================================================================
   7. Sections, Grids & Cards
   ========================================================================== */
.section-padding {
  padding: 80px 0;
}

.section-subtitle {
  color: var(--primary-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy-dark);
}

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

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

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

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--motion-medium) var(--ease-out), box-shadow var(--motion-medium) ease, border-color var(--motion-fast) ease, opacity var(--motion-slow) ease;
}

.featured-article {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-blue);
}

/* ==========================================================================
   8. Footer Styles
   ========================================================================== */
.site-cta-bar {
  background: linear-gradient(90deg, #0b1e36 0%, #0d386c 100%);
  color: #ffffff;
  padding: 50px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-bar-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.cta-bar-text h2 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cta-bar-features {
  display: flex;
  gap: 24px;
}

.cta-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

.site-footer {
  background-color: var(--navy-footer);
  color: #94a3b8;
  padding-top: 60px;
  padding-bottom: 24px;
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.5fr 1.5fr;
  gap: 36px;
  margin-bottom: 50px;
}

.footer-widget h4 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
}

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

.footer-widget ul a {
  color: #94a3b8;
}

.footer-widget ul a:hover {
  color: #ffffff;
}

.footer-contact-info p {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-newsletter input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #1e293b;
  background-color: #0d223f;
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}

/* ==========================================================================
   9. Responsive Media Queries (Tablets & Mobile Screens)
   ========================================================================== */

/* Tablet Screens (≤ 992px) */
@media (max-width: 992px) {
  .main-navigation {
    display: none;
  }

  .btn-quote {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

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

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

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

/* Mobile Screens (≤ 768px - Matching Mobile Design稿) */
@media (max-width: 768px) {
  .header-container {
    min-height: 84px;
    height: auto;
    padding: 6px 0;
  }

  .site-logo img {
    height: 76px;
  }

  /* Hero Section */
  .hero-section {
    padding: 80px 0 60px !important;
  }

  .hero-section h1 {
    font-size: 2.2rem !important;
  }

  .hero-section p {
    font-size: 1rem !important;
    margin-bottom: 24px !important;
  }

  /* Page Banner */
  .page-banner {
    padding: 45px 0;
  }

  .page-banner-title {
    font-size: 1.85rem;
  }

  .page-banner-desc {
    font-size: 0.92rem;
  }

  /* Stats Bar: 2x2 grid */
  .stats-bar .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Section Padding & Headings */
  .section-padding {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  /* About section stacked */
  .section-padding .container[style*="grid-template-columns: 1fr 1fr"],
  .section-padding .container[style*="grid-template-columns: 1.8fr 1fr"],
  .section-padding .container[style*="grid-template-columns: 1.3fr 1fr"],
  .section-padding .container[style*="grid-template-columns: 280px 1fr"],
  .section-padding .container[style*="grid-template-columns: 1fr 300px"] {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* Grids to single / double column */
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .grid-5 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* CTA Bar */
  .site-cta-bar {
    padding: 40px 0;
  }

  .cta-bar-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-bar-features {
    flex-direction: column;
    gap: 16px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Floating Chat Widget */
  .floating-chat-container {
    bottom: 16px;
    left: 14px;
  }

  .floating-chat-btn {
    padding: 10px 16px;
    font-size: 0.88rem;
  }

  .chat-popup-card {
    width: 290px;
    bottom: 54px;
  }

  .featured-article {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile Screens (≤ 480px) */
@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.85rem !important;
  }

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

  .stats-bar .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

/* ========================================================================== 
   10. Design artwork alignment refinements
   ========================================================================== */
body {
  color: #12204f;
  background: #fff;
}

.container {
  max-width: 1180px;
}

.site-header {
  box-shadow: 0 1px 0 rgba(12, 42, 92, .08);
}

.header-container {
  min-height: 88px;
}

.site-logo img,
.custom-logo {
  width: auto;
  height: 76px;
  object-fit: contain;
}

.main-navigation ul {
  gap: 38px;
}

.main-navigation a {
  color: #071d61;
  font-size: .9rem;
}

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 510px;
  padding: 90px 0 82px !important;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(0, 47, 103, .92) 0%, rgba(0, 72, 145, .58) 44%, rgba(0, 39, 84, .1) 78%), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-section::after {
  content: 'BUILT\A FOR A\A STRONGER\A TOMORROW';
  white-space: pre;
  position: absolute;
  top: 58px;
  right: max(30px, calc((100vw - 1180px) / 2));
  padding-left: 18px;
  border-left: 2px solid rgba(255,255,255,.55);
  color: rgba(255,255,255,.88);
  font-size: .85rem;
  line-height: 1.28;
  letter-spacing: .05em;
}

.hero-section h1 {
  max-width: 690px;
  font-size: clamp(3rem, 5vw, 4.4rem) !important;
  letter-spacing: -.035em;
}

.hero-section .container > div > .section-subtitle,
.hero-section .container > div > span:first-child {
  color: rgba(255,255,255,.92) !important;
}

.stats-bar {
  padding: 28px 0 !important;
}

.stats-bar .grid-4 > div {
  padding: 4px 26px;
  border-right: 1px solid var(--border-color);
}

.stats-bar .grid-4 > div:last-child {
  border-right: 0;
}

.section-padding {
  padding: 62px 0;
}

.section-title {
  color: #071d61;
  font-size: 2rem;
  line-height: 1.14;
  letter-spacing: -.02em;
}

.section-subtitle,
.page-banner-sub {
  color: #0875ee;
}

.page-banner {
  min-height: 290px;
  display: flex;
  align-items: center;
  padding: 54px 0;
  background-image: linear-gradient(90deg, rgba(0, 47, 103, .9), rgba(0, 82, 162, .32)), url('images/project-clean.png');
  background-position: center;
  background-size: cover;
}

.page-banner-title {
  max-width: 780px;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.04;
}

.page-banner-desc {
  color: #fff;
}

.card {
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(14, 54, 110, .035);
}

.card img {
  transition: transform .4s ease;
}

.card:hover img {
  transform: scale(1.025);
}

.post-type-archive-product .main-content .grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

.spec-table tr:nth-child(odd) {
  background: var(--bg-light);
}

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

.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-secondary);
  font-size: .9rem;
}

.check-list i {
  margin-right: 6px;
  color: var(--primary-blue);
}

.product-faq {
  margin-bottom: 40px;
}

.product-faq h3 {
  margin-bottom: 15px;
  color: var(--navy-dark);
  font-size: 1.3rem;
}

.product-faq details {
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-bottom: 0;
}

.product-faq details:last-child {
  border-bottom: 1px solid var(--border-color);
}

.product-faq summary {
  cursor: pointer;
  color: var(--navy-dark);
  font-weight: 700;
}

.product-faq p {
  padding-top: 10px;
  color: var(--text-secondary);
}

.spec-table th {
  width: 35%;
  color: var(--navy-dark);
}

.spec-table td {
  color: var(--text-secondary);
}

.site-cta-bar {
  padding: 46px 0;
  background-image: linear-gradient(90deg, rgba(0, 57, 114, .96), rgba(0, 77, 151, .72)), url('images/project-clean.png');
  background-size: cover;
  background-position: center;
}

.site-footer {
  padding-top: 46px;
  background: #002b55;
}

.site-footer .footer-widget img {
  max-width: 240px;
  object-fit: contain;
}

.floating-chat-container {
  right: 20px;
  left: auto;
}

.chat-popup-card {
  right: 0;
  left: auto;
}

#newsletter-response {
  min-height: 18px;
  margin-top: 4px;
  color: #7dd3fc;
  font-size: .78rem;
}

#newsletter-response.is-error {
  color: #fca5a5;
}

@media (max-width: 768px) {
  .container {
    padding-right: 24px;
    padding-left: 24px;
  }

  .header-container {
    min-height: 66px;
    padding: 0 16px;
  }

  .site-logo img,
  .custom-logo {
    height: 60px;
    max-width: 250px;
  }

  .hero-section {
    min-height: 500px;
    padding: 64px 0 50px !important;
    background-position: 62% center;
  }

  .hero-section::after {
    top: 28px;
    right: 24px;
    font-size: .68rem;
  }

  .hero-section h1 {
    max-width: 500px;
    font-size: clamp(2.15rem, 10vw, 3.25rem) !important;
  }

  .stats-bar .grid-4 > div {
    min-height: 84px;
    padding: 12px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .section-padding {
    padding: 44px 0;
  }

  .page-banner {
    min-height: 245px;
    padding: 40px 0;
  }

  .page-banner-title {
    font-size: 2.4rem;
  }

  .post-type-archive-product .main-content .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-type-archive-product .sidebar {
    display: none;
  }

  .floating-chat-container {
    right: 14px;
    left: auto;
  }
}

@media (max-width: 520px) {
  .site-logo img,
  .custom-logo {
    max-width: 225px;
    height: 56px;
  }

  .hero-section {
    min-height: 520px;
  }

  .hero-section::after {
    display: none;
  }

  .floating-chat-btn {
    width: 52px;
    height: 52px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
  }

  .floating-chat-btn .chat-label {
    display: none;
  }

  .hero-section .btn {
    min-width: 150px;
  }

  .post-type-archive-product .main-content .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .post-type-archive-product .main-content .card {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .post-type-archive-product .main-content .card > div:first-child {
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  .post-type-archive-product .main-content .card > div:last-child {
    padding: 12px !important;
  }

  .post-type-archive-product .main-content .card h3 {
    font-size: 1rem !important;
    line-height: 1.4;
  }
}

/* Product archive: keep the catalogue above the fold. */
.post-type-archive-product .page-banner {
  min-height: 210px;
  padding: 34px 0;
}

@media (max-width: 768px) {
  .post-type-archive-product .page-banner {
    min-height: 0;
    padding: 0;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
  }

  .post-type-archive-product .page-banner-content {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .post-type-archive-product .page-banner-sub,
  .post-type-archive-product .page-banner-title,
  .post-type-archive-product .page-banner-desc {
    display: none;
  }

  .post-type-archive-product .page-banner {
    background: #fff;
  }

  .post-type-archive-product .page-banner .breadcrumbs {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 1.6em;
    line-height: 1.6;
    color: #b1bac6;
  }

  .post-type-archive-product .page-banner .breadcrumbs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 13px;
  }

  .post-type-archive-product .page-banner .breadcrumbs a::before {
    content: "\f015";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    color: #8b98a9;
  }

  .post-type-archive-product .page-banner .breadcrumbs span {
    position: relative;
    color: var(--navy-dark);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .post-type-archive-product .page-banner .breadcrumbs span::after {
    content: "";
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--primary-blue);
  }

  .post-type-archive-product .page-banner + .section-padding {
    padding-top: 24px;
  }
}

/* ========================================================================== 
   Mobile interaction and motion system
   ========================================================================== */
body.menu-open {
  overflow: hidden;
}

.mobile-drawer .mobile-nav-list li {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 220ms ease, transform 260ms var(--ease-out);
}

.mobile-drawer.active .mobile-nav-list li {
  opacity: 1;
  transform: translateX(0);
}

.mobile-drawer.active .mobile-nav-list li:nth-child(1) { transition-delay: 45ms; }
.mobile-drawer.active .mobile-nav-list li:nth-child(2) { transition-delay: 75ms; }
.mobile-drawer.active .mobile-nav-list li:nth-child(3) { transition-delay: 105ms; }
.mobile-drawer.active .mobile-nav-list li:nth-child(4) { transition-delay: 135ms; }
.mobile-drawer.active .mobile-nav-list li:nth-child(5) { transition-delay: 165ms; }
.mobile-drawer.active .mobile-nav-list li:nth-child(6) { transition-delay: 195ms; }

.motion-ready .reveal-item {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity var(--motion-slow) ease var(--reveal-delay, 0ms), transform var(--motion-slow) var(--ease-out) var(--reveal-delay, 0ms);
}

.motion-ready .card.reveal-item {
  transition: opacity var(--motion-slow) ease var(--reveal-delay, 0ms), transform var(--motion-medium) var(--ease-out) var(--reveal-delay, 0ms), box-shadow var(--motion-medium) ease, border-color var(--motion-fast) ease;
}

.motion-ready .reveal-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.motion-ready .card.reveal-item.is-visible:hover {
  transform: translateY(-4px);
}

.home.motion-ready .hero-section .container > div > * {
  opacity: 0;
  animation: jiubai-content-rise 520ms var(--ease-out) forwards;
}

.home.motion-ready .hero-section .container > div > *:nth-child(1) { animation-delay: 80ms; }
.home.motion-ready .hero-section .container > div > *:nth-child(2) { animation-delay: 140ms; }
.home.motion-ready .hero-section .container > div > *:nth-child(3) { animation-delay: 220ms; }
.home.motion-ready .hero-section .container > div > *:nth-child(4) { animation-delay: 300ms; }

@keyframes jiubai-content-rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.btn i.fa-arrow-right,
.btn-quote i.fa-arrow-right,
.card a i.fa-arrow-right {
  transition: transform var(--motion-fast) var(--ease-out);
}

.btn:hover i.fa-arrow-right,
.btn-quote:hover i.fa-arrow-right,
.card a:hover i.fa-arrow-right {
  transform: translateX(3px);
}

#inquiry-response {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease, transform 240ms var(--ease-out);
}

#newsletter-response {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 220ms var(--ease-out);
}

#newsletter-response.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#inquiry-response.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.btn.is-loading {
  cursor: wait;
  opacity: .82;
}

.btn-send-chat.is-loading,
#jiubai-newsletter-form button.is-loading {
  cursor: wait;
  opacity: .7;
}

@keyframes jiubai-chat-attention {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.07); box-shadow: 0 8px 26px rgba(0, 102, 255, .5); }
}

@media (max-width: 992px) {
  .floating-chat-btn.attention {
    animation: jiubai-chat-attention 720ms var(--ease-out) 1;
  }
}

@media (max-width: 992px) {
  .header-container,
  .site-logo img,
  .custom-logo {
    transition: min-height 200ms ease, height 200ms ease, max-width 200ms ease;
  }

  .site-header.is-compact .header-container {
    min-height: 58px;
  }

  .site-header.is-compact .site-logo img,
  .site-header.is-compact .custom-logo {
    height: 50px;
    max-width: 210px;
  }

  .chat-popup-card {
    width: min(360px, calc(100vw - 28px));
    max-height: min(70dvh, 560px);
    bottom: 62px;
  }

  .chat-popup-body {
    overscroll-behavior: contain;
  }

  .floating-chat-container {
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .motion-ready .card.reveal-item.is-visible:hover,
  .card:hover img {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  .card:active,
  .motion-ready .card.reveal-item.is-visible:active {
    transform: scale(.985);
    box-shadow: 0 2px 8px rgba(14, 54, 110, .1);
  }

  .btn:active,
  .btn-quote:active,
  .floating-chat-btn:active,
  .quick-chip:active,
  .mobile-nav-list li a:active {
    transform: scale(.97);
  }
}

/* Keep contact access on the right, 70% down the viewport. */
.floating-chat-container {
  top: 70%;
  bottom: auto;
  left: auto;
  right: max(14px, env(safe-area-inset-right));
  transform: translateY(-50%);
}

.floating-chat-container .chat-popup-card {
  top: 50%;
  bottom: auto;
  left: auto;
  right: 0;
  width: min(320px, calc(100vw - 28px));
  max-height: calc(100dvh - 54px);
  overflow-y: auto;
  transform-origin: right 70%;
  transform: translateY(-70%) scale(.96);
}

.floating-chat-container .chat-popup-card.active {
  transform: translateY(-70%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }

  .motion-ready .reveal-item,
  .home.motion-ready .hero-section .container > div > * {
    opacity: 1;
    transform: none;
  }
}
