/*
Theme Name: Thundem
Theme URI: https://thundem.com
Author: Thundem Precision Manufacturing
Author URI: https://thundem.com
Description: Official theme for Thundem (象鼎) Precision Manufacturing — CNC precision turning and multi-axis compound machining. Features iOS 26 Liquid Glass effects, 9-language support, dark mode, and responsive design.
Version: 4.3.49
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thundem
Tags: custom-logo, custom-menu, featured-images, translation-ready, one-column
*/

/* ============================================
   Thundem Precision Manufacturing — Main Stylesheet
   Version: 3.0 — iOS 26 Liquid Glass Enhanced
   ============================================ */

/* Global SVG size constraint — prevent inline SVGs from rendering oversized */
svg:not([width]):not([height]) {
  width: 24px;
  height: 24px;
}
.icon-sm svg { width: 16px; height: 16px; }
.icon-md svg { width: 24px; height: 24px; }
.icon-lg svg { width: 32px; height: 32px; }

/* --- CSS Custom Properties (Light Theme) --- */
:root {
  color-scheme: light dark;
  --primary: #013a0f;
  --primary-light: #2a6a3f;
  --primary-lighter: #3c653d;
  --primary-dark: #002d00;
  --primary-bg: #e8f5e9;
  --accent: #c8a960;
  --accent-light: #dcc07a;

  --bg-primary: #fafcfa;
  --bg-secondary: #f3f6f3;
  --bg-tertiary: #eaeff0;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.38);
  --bg-glass-border: rgba(255, 255, 255, 0.22);
  --bg-glass-shadow: rgba(0, 45, 0, 0.07);

  --text-primary: #1a1a1a;
  --text-secondary: #4a5548;
  --text-tertiary: #5e6e60;
  --text-on-primary: #ffffff;
  --text-muted: #a0a8a0;

  --border: #dde5dd;
  --border-light: #eef2ee;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.10);
  --shadow-glass: 0 8px 32px rgba(0, 45, 0, 0.10);

  /* iOS 26 Liquid Glass Rainbow */
  --glass-rainbow: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 80, 80, 0.35),
    rgba(255, 170, 50, 0.35),
    rgba(255, 240, 60, 0.35),
    rgba(80, 230, 100, 0.35),
    rgba(60, 180, 255, 0.35),
    rgba(140, 90, 255, 0.35),
    rgba(255, 100, 200, 0.35),
    rgba(255, 80, 80, 0.35)
  );
  --glass-rainbow-soft: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 80, 80, 0.15),
    rgba(255, 170, 50, 0.15),
    rgba(255, 240, 60, 0.15),
    rgba(80, 230, 100, 0.15),
    rgba(60, 180, 255, 0.15),
    rgba(140, 90, 255, 0.15),
    rgba(255, 100, 200, 0.15),
    rgba(255, 80, 80, 0.15)
  );
  --glass-highlight: rgba(255, 255, 255, 0.25);
  --glass-refraction: rgba(255, 255, 255, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'Noto Sans', sans-serif;
  --font-display: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height: 72px;
  --section-padding: 56px;
  --container-width: 1200px;
  --container-narrow: 900px;
}

/* --- Dark Theme Variables --- */
[data-theme="dark"] {
  --primary: #4aad4a;
  --primary-light: #6ecf6e;
  --primary-lighter: #8ddb8d;
  --primary-dark: #2a7a2a;
  --primary-bg: #0d200f;
  --accent: #d4b870;
  --accent-light: #e8cc8a;

  --bg-primary: #131813;
  --bg-secondary: #191f19;
  --bg-tertiary: #202820;
  --bg-card: #1b231b;
  --bg-glass: rgba(25, 35, 25, 0.52);
  --bg-glass-border: rgba(80, 180, 80, 0.12);
  --bg-glass-shadow: rgba(0, 0, 0, 0.30);

  --text-primary: #e2ece2;
  --text-secondary: #a4bca4;
  --text-tertiary: #6a8a6a;
  --text-on-primary: #ffffff;
  --text-muted: #4a6a4a;

  --border: #2a3a2a;
  --border-light: #223022;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.38);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.30);

  --glass-rainbow: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 80, 80, 0.25),
    rgba(255, 170, 50, 0.25),
    rgba(255, 240, 60, 0.25),
    rgba(80, 230, 100, 0.25),
    rgba(60, 180, 255, 0.25),
    rgba(140, 90, 255, 0.25),
    rgba(255, 100, 200, 0.25),
    rgba(255, 80, 80, 0.25)
  );
  --glass-rainbow-soft: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255, 80, 80, 0.10),
    rgba(255, 170, 50, 0.10),
    rgba(255, 240, 60, 0.10),
    rgba(80, 230, 100, 0.10),
    rgba(60, 180, 255, 0.10),
    rgba(140, 90, 255, 0.10),
    rgba(255, 100, 200, 0.10),
    rgba(255, 80, 80, 0.10)
  );
  --glass-highlight: rgba(80, 200, 80, 0.08);
  --glass-refraction: rgba(60, 150, 60, 0.05);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

ul { list-style: none; }

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

.section-header {
  text-align: center;
  margin-bottom: 28px;
}

.section-header h2 {
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

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

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- iOS 26 Liquid Glass Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: all var(--transition);
}

.nav-inner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: calc(var(--container-width) + 80px);
  height: calc(var(--nav-height) - 20px);
  border-radius: var(--radius-xl);
  background: var(--bg-glass);
  backdrop-filter: blur(44px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(44px) saturate(180%) brightness(1.04);
  border: 1px solid rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  padding: 0 28px;
  transition: all var(--transition);
  overflow: visible;

  /* Realistic glass depth — inset refraction + outer shadow */
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.28),
    inset 0 0.5px 0 rgba(255,255,255,0.50),
    inset 0 -0.5px 0 rgba(0,0,0,0.04),
    inset 1px 0 8px rgba(255,255,255,0.03),
    inset -1px 0 8px rgba(255,255,255,0.03),
    0 8px 32px rgba(0,45,0,0.07),
    0 2px 8px rgba(0,0,0,0.03);
}

/* Prismatic shimmer — very subtle edge color shift */
@keyframes glassPrismatic {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.55; }
}

/* Prismatic refraction layer — behind glass, only visible at edges */
.nav-inner::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  background: conic-gradient(
    from 180deg,
    rgba(255, 80, 80, 0.08),
    rgba(255, 180, 50, 0.08),
    rgba(220, 240, 60, 0.06),
    rgba(80, 220, 100, 0.08),
    rgba(60, 160, 255, 0.08),
    rgba(140, 80, 255, 0.08),
    rgba(255, 100, 200, 0.06),
    rgba(255, 80, 80, 0.08)
  );
  z-index: -1;
  pointer-events: none;
  animation: glassPrismatic 14s ease-in-out infinite;
}

/* Top specular highlight — glass inner reflection */
.nav-inner::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 10px;
  right: 10px;
  height: 48%;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.32) 0%,
    rgba(255,255,255,0.06) 55%,
    transparent 100%
  );
  border-radius: var(--radius-xl) var(--radius-xl) 60% 60%;
  pointer-events: none;
  z-index: 0;
}

.nav.scrolled .nav-inner {
  top: 6px;
  height: calc(var(--nav-height) - 16px);
}

/* Logo Image */
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.nav-logo .logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* Dark mode: swap logo to light-colored version */
[data-theme="dark"] .nav-logo .logo-img,
[data-theme="dark"] .footer-logo-img,
[data-theme="dark"] .nav-logo .custom-logo,
[data-theme="dark"] .footer-logo .custom-logo {
  content: url('assets/images/logo-dark.svg');
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(1, 58, 15, 0.08);
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
  background: rgba(60, 150, 60, 0.15);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  position: relative;
  z-index: 1100;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(1, 58, 15, 0.06);
  border: 1px solid rgba(1, 58, 15, 0.12);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all var(--transition);
  cursor: pointer;
}

.lang-btn:hover {
  background: rgba(1, 58, 15, 0.12);
}

.lang-btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.lang-selector.open .lang-btn svg {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 160px;
  background: rgba(245, 248, 245, 0.95);
  backdrop-filter: blur(44px) saturate(180%);
  -webkit-backdrop-filter: blur(44px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.40);
  border-radius: var(--radius-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 2000;
  overflow: hidden;
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,0.40),
    inset 0 -0.5px 0 rgba(0,0,0,0.03),
    0 12px 40px rgba(0,0,0,0.12),
    0 4px 12px rgba(0,0,0,0.06);
}

[data-theme="dark"] .lang-dropdown {
  background: rgba(18, 28, 18, 0.96);
  border-color: rgba(60, 150, 60, 0.18);
}

.lang-selector.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-align: left;
}

.lang-dropdown button:hover,
.lang-dropdown button.active {
  background: rgba(1, 58, 15, 0.08);
  color: var(--primary);
}

.lang-dropdown button .lang-flag {
  font-size: 1.1rem;
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: rgba(1, 58, 15, 0.08);
  color: var(--primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  z-index: 1100;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: all var(--transition);
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: all var(--transition);
}

.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* Hamburger X animation when menu is open */
.menu-toggle.active span { background: transparent; }
.menu-toggle.active span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.active span::after { top: 0; transform: rotate(-45deg); }

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: calc(var(--nav-height) + 60px) 24px 80px;
  position: relative;
  overflow: hidden;
}

/* Hero background layer */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, #001a05 0%, #013a0f 40%, #002208 100%);
}
.hero-bg-media .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,15,0,0.72) 0%, rgba(0,30,5,0.55) 50%, rgba(0,20,0,0.65) 100%);
  z-index: 1;
}
.hero-bg:not(.hero-bg-media) .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,20,5,0.65) 0%, rgba(1,50,18,0.5) 40%, rgba(0,35,12,0.7) 100%);
  z-index: 1;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-bg-poster {
  transition: opacity 0.6s ease;
}
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-bg-video.playing {
  opacity: 1;
}
.hero-bg-video.stalled {
  opacity: 0;
  transition: opacity 0.3s ease;
}
@media (max-width: 768px) {
  .hero-bg-video { display: none !important; }
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(1, 58, 15, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(42, 106, 63, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(200, 169, 96, 0.03) 0%, transparent 50%);
  z-index: 2;
}
.hero-bg-media .hero-bg-gradient { background: none; }

[data-theme="dark"] .hero-bg-gradient {
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(60, 150, 60, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(42, 106, 63, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(200, 169, 96, 0.04) 0%, transparent 50%);
}
[data-theme="dark"] .hero-bg-media .hero-bg-gradient { background: none; }

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: orbFloat 20s ease-in-out infinite;
  z-index: 2;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(1, 58, 15, 0.15);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(42, 106, 63, 0.1);
  bottom: 10%;
  left: -80px;
  animation-delay: -7s;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: rgba(200, 169, 96, 0.1);
  top: 40%;
  right: 15%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
  margin-left: max(24px, calc((100vw - 1200px) / 2));
}

/* Welcome badge — accent line style like WayKen */
.hero-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.hero-welcome-line {
  width: 40px;
  height: 3px;
  background: #c8a960;
  border-radius: 2px;
}
.hero-welcome-text {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c8a960;
}

.hero-headline {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero h1 {
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero h1 .text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Hero highlight bullets */
.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  line-height: 1.5;
}
.hero-highlights li svg {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex-shrink: 0;
  stroke: #c8a960;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero .btn-primary {
  background: linear-gradient(135deg, #2a8a3f, #1a6a2f);
  box-shadow: 0 4px 20px rgba(42, 138, 63, 0.4);
  border: 1.5px solid rgba(255,255,255,0.15);
  padding: 14px 32px;
  font-size: 0.92rem;
  min-height: 48px;
  box-sizing: border-box;
}
.hero .btn-primary:hover {
  background: linear-gradient(135deg, #35a04a, #208a38);
  box-shadow: 0 6px 28px rgba(42, 138, 63, 0.55);
  transform: translateY(-2px);
}
.hero .btn-outline {
  border-color: rgba(255,255,255,0.4);
  color: #ffffff !important;
  background: rgba(255,255,255,0.06);
  padding: 14px 32px;
  font-size: 0.92rem;
  min-height: 48px;
  box-sizing: border-box;
}
.hero .btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

@media (max-width: 768px) {
  .hero { align-items: center; text-align: center; padding-bottom: 60px; }
  .hero-content { margin-left: 0; max-width: 100%; }
  .hero-welcome { justify-content: center; }
  .hero-highlights { align-items: center; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(1, 58, 15, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 6px 24px rgba(1, 58, 15, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(1, 58, 15, 0.04);
}

.btn svg {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  pointer-events: none;
}

.scroll-indicator span {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 0; transform: translateX(-50%) translateY(12px); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* --- Stats Bar --- */
.stats-bar {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-value .suffix {
  font-size: 1.4rem;
  font-weight: 600;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* --- Sections --- */
section {
  padding: var(--section-padding) 0;
}

section:nth-child(even) {
  background: var(--bg-secondary);
}

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

.service-card {
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow:
    var(--shadow-md),
    inset 0 0.5px 0 rgba(255,255,255,0.3);
  border-color: rgba(1, 58, 15, 0.15);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
}

.service-icon svg {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
}

.service-illustr {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-bg, #e8f5e9), var(--bg-tertiary, #eaeff0));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
}
[data-theme="dark"] .service-illustr {
  background: linear-gradient(135deg, #0d200f, #1a2a1a);
}
.service-illustr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.service-card h3 {
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Equipment */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.equipment-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

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

.equipment-image {
  height: 240px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.equipment-image .placeholder-icon {
  font-size: 3rem;
  opacity: 0.2;
}

.equipment-image .equip-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Case page video styles */
.case-video-wrap .case-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}
.case-video-wrap iframe.case-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.case-video-wrap .placeholder-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.video-placeholder-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  opacity: 0.7;
}
.video-placeholder-label svg {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  opacity: 0.5;
}

.equipment-image .tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  background: var(--primary);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.equipment-info {
  padding: 28px;
}

.equipment-info h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.equipment-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.equipment-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.spec-item svg {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Materials */
.materials-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.material-tag {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.material-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

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

.case-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  cursor: pointer;
}

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

.case-image {
  height: 180px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.case-image .placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.15;
}

.case-image .case-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.case-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.case-card:hover .case-image::after {
  opacity: 1;
}

.case-info {
  padding: 20px;
}

.case-info h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.case-info p {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.55;
}

.cases-more {
  text-align: center;
  margin-top: 40px;
}

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

.knowledge-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

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

.knowledge-image {
  height: 180px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
}

.knowledge-image .placeholder-icon {
  font-size: 2rem;
  opacity: 0.15;
}

.knowledge-image .knowledge-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.knowledge-body {
  padding: 24px;
}

.knowledge-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

/* Explicit light mode overrides for knowledge elements */
html:not([data-theme="dark"]) .knowledge-card {
  background: #ffffff !important;
  border-color: #eef2ee !important;
}
html:not([data-theme="dark"]) .knowledge-tag {
  background: #e8f5e9 !important;
  color: #013a0f !important;
}

.knowledge-body h3 {
  font-size: 1.02rem;
  margin-bottom: 10px;
  line-height: 1.45;
}

.knowledge-body p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.knowledge-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.knowledge-link:hover {
  gap: 10px;
}

.knowledge-link svg {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 16px;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
}

.contact-item-text h4 {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.contact-item-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.contact-ai-banner {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  margin-top: 8px;
}

.contact-ai-banner h4 {
  color: white;
  margin-bottom: 8px;
  font-size: 1rem;
}

.contact-ai-banner p {
  font-size: 0.88rem;
  opacity: 0.9;
  margin-bottom: 16px;
  line-height: 1.55;
}

.contact-ai-banner .btn {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 24px;
  font-size: 0.85rem;
}

.contact-ai-banner .btn:hover {
  background: rgba(255,255,255,0.3);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* === Industrial Visual Effects — Contact Page === */

/* CNC precision crosshair on contact icons */
.contact-item-icon {
  position: relative;
  overflow: hidden;
}
.contact-item-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: crosshairPulse 4s ease-in-out infinite;
}
.contact-item-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, transparent, var(--primary), transparent);
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: crosshairPulse 4s ease-in-out infinite 0.5s;
}
@keyframes crosshairPulse {
  0%, 100% { opacity: 0; }
  30%, 70% { opacity: 0.4; }
}

/* LED status dot on contact items */
.contact-item {
  position: relative;
}
.contact-item::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.5;
  animation: ledPulse 3s ease-in-out infinite;
}
.contact-item:nth-child(2)::before { animation-delay: 1s; }
.contact-item:nth-child(3)::before { animation-delay: 2s; }
@keyframes ledPulse {
  0%, 100% { opacity: 0.2; box-shadow: none; }
  50% { opacity: 0.8; box-shadow: 0 0 6px var(--primary); }
}

/* Animated toolpath line on the AI banner */
.contact-ai-banner {
  position: relative;
  overflow: hidden;
}
.contact-ai-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: toolpathSweep 6s ease-in-out infinite;
  will-change: transform;
}
@keyframes toolpathSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(267%); }
}

/* Precision grid pattern on contact form card area */
.contact-grid {
  position: relative;
}
.contact-grid::before {
  content: '';
  position: absolute;
  inset: -20px;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
  border-radius: var(--radius-lg);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

/* Subtle metallic shimmer on form submit button */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: none;
  animation: btnShimmer 5s ease-in-out infinite;
  will-change: transform;
}
@keyframes btnShimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(350%); }
}

/* Spinning gear accent (decorative) */
@keyframes gearSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Form status success animation */
.form-status.success {
  animation: statusSlideIn 0.4s ease;
}
@keyframes statusSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === End Industrial Visual Effects === */

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(1, 58, 15, 0.08);
  animation: inputBreathing 2.5s ease-in-out infinite;
}

@keyframes inputBreathing {
  0%, 100% { box-shadow: 0 0 0 3px rgba(1, 58, 15, 0.08), 0 0 8px rgba(1, 58, 15, 0.06); }
  50% { box-shadow: 0 0 0 5px rgba(1, 58, 15, 0.14), 0 0 20px rgba(1, 58, 15, 0.10); }
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
  border-color: var(--primary);
  animation: inputBreathingDark 2.5s ease-in-out infinite;
}

@keyframes inputBreathingDark {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74, 173, 74, 0.10), 0 0 8px rgba(74, 173, 74, 0.08); }
  50% { box-shadow: 0 0 0 5px rgba(74, 173, 74, 0.18), 0 0 20px rgba(74, 173, 74, 0.14); }
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
}

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

.upload-btn svg {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
}

.upload-file-name {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.form-status {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(1, 58, 15, 0.08);
  color: var(--primary);
  border: 1px solid rgba(1, 58, 15, 0.2);
}
.form-status.error {
  display: block;
  background: rgba(200, 30, 30, 0.08);
  color: #c41e1e;
  border: 1px solid rgba(200, 30, 30, 0.2);
}
.form-status.sending {
  display: block;
  background: rgba(100, 120, 100, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(100, 120, 100, 0.2);
}
[data-theme="dark"] .form-status.success {
  background: rgba(80, 180, 80, 0.12);
  border-color: rgba(80, 180, 80, 0.3);
}
[data-theme="dark"] .form-status.error {
  background: rgba(220, 80, 80, 0.12);
  border-color: rgba(220, 80, 80, 0.3);
}

/* --- About Page --- */
.about-hero {
  padding: calc(var(--nav-height) + 36px) 0 36px;
  text-align: center;
}

.about-hero h1 {
  margin-bottom: 16px;
}

.about-hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 40px;
}

.about-intro {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: center;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 36px;
}

.about-feature {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.about-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.about-feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--primary);
}

.about-feature-icon svg {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
}

.about-feature h3 {
  margin-bottom: 12px;
}

.about-feature p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

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

.advantage-card {
  display: flex;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

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

.advantage-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.3;
  line-height: 1;
  flex-shrink: 0;
}

.advantage-card h4 {
  margin-bottom: 8px;
}

.advantage-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Mission */
.mission-block {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.mission-block h3 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.mission-block p {
  font-size: 1.05rem;
  opacity: 0.9;
  line-height: 1.75;
}

/* ============================================
   CTA Banner + Footer
   ============================================ */
.footer-cta {
  padding: 0;
  background: linear-gradient(135deg, #013a0f 0%, #002d00 100%);
}

.footer-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 0;
  gap: 12px;
}

.footer-cta-inner h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  margin: 0;
  line-height: 1.3;
}

.footer-cta-inner p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.85) !important;
  margin: 0 0 8px;
}

.btn-cta {
  display: inline-block;
  padding: 14px 40px;
  background: transparent;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.7);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  margin-top: 12px;
  letter-spacing: 0.3px;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.12);
  border-color: #ffffff;
}

/* Dark mode CTA: slightly brighter border */
[data-theme="dark"] .btn-cta {
  border-color: rgba(255,255,255,0.5);
  color: #ffffff !important;
}

[data-theme="dark"] .btn-cta:hover {
  background: rgba(255,255,255,0.1);
  border-color: #ffffff;
}

.footer {
  padding: 64px 0 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
}

/* --- Button Loading Spinner --- */
.btn-loading {
  position: relative;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  pointer-events: none;
}

.btn-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

/* --- Warp Tunnel Effect (Hero) --- */
.warp-tunnel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.warp-streak {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent, rgba(120, 220, 120, 0.5), transparent);
  opacity: 0;
  transform-origin: center top;
  animation: warpStreak var(--dur) var(--delay) ease-out infinite;
}

@keyframes warpStreak {
  0%   { opacity: 0; height: 0; transform: rotate(var(--angle)) translateY(0); }
  15%  { opacity: 0.7; }
  70%  { opacity: 0.3; height: var(--len); transform: rotate(var(--angle)) translateY(var(--dist)); }
  100% { opacity: 0; height: var(--len); transform: rotate(var(--angle)) translateY(calc(var(--dist) + 60px)); }
}

/* --- Enhanced Scroll Reveal --- */
.fade-up {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-slogan {
  font-size: 0.88rem;
  color: var(--text-tertiary);
  line-height: 1.7;
  max-width: 280px;
  margin: 0;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-col a,
.footer-col .footer-contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 5px 0;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-contact-link {
  color: var(--text-secondary);
}

.footer-contact-link svg {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.footer-bottom a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* --- Back to Top with Rainbow Glass --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition);
  z-index: 999;
  box-shadow:
    inset 0 0.5px 0 rgba(255,255,255,0.35),
    var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* --- Page Header (Sub Pages) --- */
.page-header {
  padding: calc(var(--nav-height) + 28px) 0 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header .hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(1, 58, 15, 0.05) 0%, transparent 70%);
}

/* Decorative gear ring in page header */
.page-header .hero-bg-gradient::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 8%;
  width: 100px;
  height: 100px;
  border: 2px dashed var(--border);
  border-radius: 50%;
  opacity: 0.3;
  animation: gearSpin 30s linear infinite;
}
.page-header .hero-bg-gradient::before {
  content: '';
  position: absolute;
  top: 35px;
  right: calc(8% + 15px);
  width: 70px;
  height: 70px;
  border: 1.5px dashed var(--border);
  border-radius: 50%;
  opacity: 0.2;
  animation: gearSpin 20s linear infinite reverse;
}

.page-header h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.page-header .subtitle {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  :root {
    --section-padding: 44px;
  }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .equipment-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
  .about-features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-cta-inner { padding: 48px 0; }
  .footer-cta-inner h2 { font-size: 1.3rem; }
  .btn-cta { width: 100%; text-align: center; }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 36px;
    --nav-height: 64px;
  }

  /* iOS safe-area padding */
  body {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  /* Force hide nav links on mobile - only show via hamburger */
  .nav-links {
    display: none !important;
  }

  /* Mobile menu overlay — reparented to <nav> by JS to escape backdrop-filter containing block */
  .nav-links.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    justify-content: flex-start;
    align-items: center;
    padding-top: 40px;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    gap: 4px;
    z-index: 2000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.mobile-open a {
    font-size: 1.1rem;
    padding: 14px 32px;
    width: 80%;
    text-align: center;
    border-radius: var(--radius-md);
    color: var(--text-primary);
  }

  .nav-links.mobile-open a:hover,
  .nav-links.mobile-open a.active {
    background: var(--primary-bg);
    color: var(--primary);
  }

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden !important;
  }

  .menu-toggle { display: flex; }

  /* Ensure lang selector stays accessible above overlay */
  .lang-selector {
    z-index: 1100;
    position: relative;
  }

  .lang-dropdown {
    position: fixed;
    top: auto;
    right: 16px;
    left: 16px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 1200;
  }

  /* Hide scroll indicator on mobile — overlaps CTA on shorter viewports */
  .scroll-indicator {
    display: none !important;
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .services-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
  .advantages-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-cta-inner { padding: 40px 0; }
  .footer-cta-inner h2 { font-size: 1.2rem; }
  .btn-cta { width: 100%; text-align: center; }

  .hero { min-height: 100svh; min-height: 100vh; padding: calc(var(--nav-height) + 40px) 16px 60px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  .section-header { margin-bottom: 28px; }
  .section-header p { font-size: 0.92rem; }

  .equipment-card:hover,
  .service-card:hover,
  .case-card:hover,
  .knowledge-card:hover {
    transform: none;
  }

  /* Fix for nav-inner on small screens */
  .nav-inner {
    padding: 0 16px;
    width: calc(100% - 16px);
  }

  /* Ensure page-header spacing works on mobile */
  .page-header {
    padding: calc(var(--nav-height) + 20px) 16px 20px;
  }

  .container { padding: 0 16px; }
  .container-narrow { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stat-value { font-size: 1.6rem; }
  .section-header { margin-bottom: 20px; }
  .equipment-specs { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .hero-subtitle { font-size: 0.88rem; }
  .nav-inner { padding: 0 12px; width: calc(100% - 12px); }
  .nav-logo { font-size: 1.1rem; gap: 8px; }
  .nav-logo .logo-img { width: 30px; height: 30px; }
  .lang-btn span:not(.lang-flag) { display: none; }
  .lang-btn { padding: 7px 8px; }
}

/* ============================================
   AI Consultation Modal
   ============================================ */
.ai-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ai-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.ai-modal {
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.1));
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 420px;
  width: 90%;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
}
.ai-modal-overlay.active .ai-modal {
  transform: translateY(0) scale(1);
}
.ai-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-secondary, #666);
  cursor: pointer;
  font-size: 1.4rem;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.2s;
  line-height: 1;
}
.ai-modal-close:hover {
  background: var(--bg-secondary, rgba(0,0,0,0.05));
}
.ai-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
  color: #fff;
}
.ai-modal h3 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary, #111);
}
.ai-modal-desc {
  text-align: center;
  color: var(--text-secondary, #555);
  margin: 0 0 24px;
  font-size: 0.92rem;
  line-height: 1.65;
}
.ai-modal-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-modal-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border, rgba(0,0,0,0.1));
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary, #111);
  transition: all 0.2s;
  font-size: 0.95rem;
}
.ai-modal-option:hover {
  background: var(--bg-secondary, rgba(0,0,0,0.03));
  border-color: var(--primary, #3b82f6);
  transform: translateX(3px);
}
.ai-modal-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.ai-modal-option-icon.email-icon { background: #e0f2fe; color: #0284c7; }
.ai-modal-option-icon.wechat-icon { background: #dcfce7; color: #16a34a; }
.ai-modal-option-icon.whatsapp-icon { background: #dcfce7; color: #25d366; }

/* Dark mode overrides for modal icons */
[data-theme="dark"] .ai-modal-option-icon.email-icon { background: rgba(2,132,199,0.2); color: #38bdf8; }
[data-theme="dark"] .ai-modal-option-icon.wechat-icon { background: rgba(22,163,74,0.2); color: #4ade80; }
[data-theme="dark"] .ai-modal-option-icon.whatsapp-icon { background: rgba(37,211,102,0.2); color: #4ade80; }
.ai-modal-option-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ai-modal-option-label {
  font-weight: 600;
  font-size: 0.95rem;
}
.ai-modal-option-detail {
  font-size: 0.82rem;
  color: var(--text-secondary, #888);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .ai-modal { padding: 28px 20px; border-radius: 16px; }
  .ai-modal-option { padding: 12px 14px; }
}

/* ============================================
   Toast Notification
   ============================================ */
.thundem-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary, #013a0f);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.thundem-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   Manual Copy Dialog
   ============================================ */
.copy-dialog-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.copy-dialog-overlay.show { opacity: 1; visibility: visible; }
.copy-dialog {
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 360px;
  width: 88%;
  position: relative;
  text-align: center;
}
.copy-dialog-label {
  font-size: 0.92rem;
  color: var(--text-secondary, #555);
  margin-bottom: 16px;
}
.copy-dialog-input-wrap {
  display: flex;
  gap: 8px;
}
.copy-dialog-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border, #ddd);
  border-radius: 10px;
  font-size: 1rem;
  font-family: monospace;
  text-align: center;
  background: var(--bg-secondary, #f5f5f5);
  color: var(--text-primary, #111);
  outline: none;
}
.copy-dialog-input:focus { border-color: var(--primary, #013a0f); }
.copy-dialog-select {
  padding: 10px 18px;
  background: var(--primary, #013a0f);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.copy-dialog-select:hover { opacity: 0.85; }
.copy-dialog-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-tertiary, #999);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

/* ============================================
   Night Mode Tooltip (positioned near theme toggle)
   ============================================ */
.night-tooltip {
  position: fixed;
  z-index: 9998;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.1));
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 0.88rem;
  color: var(--text-primary, #333);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  text-align: center;
  max-width: 260px;
  pointer-events: none;
}
.night-tooltip.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.night-tooltip-arrow {
  display: block;
  text-align: center;
  font-size: 1.1rem;
  color: var(--primary, #013a0f);
  animation: nightArrowBounce 1.2s ease-in-out infinite;
}
.night-tooltip-arrow.arrow-up {
  margin-bottom: 6px;
}
.night-tooltip-arrow.arrow-down {
  margin-top: 6px;
  margin-bottom: 0;
  animation: nightArrowBounceDown 1.2s ease-in-out infinite;
}
@keyframes nightArrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes nightArrowBounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.night-tooltip-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary, #555);
}
@media (max-width: 768px) {
  .night-tooltip { max-width: 200px; padding: 10px 14px; }
  .night-tooltip-text { font-size: 0.76rem; }
}

/* ============================================
   WeChat Add Friend Dialog
   ============================================ */
.wechat-add-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10003;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.wechat-add-overlay.show { opacity: 1; visibility: visible; }
.wechat-add-dialog {
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 340px;
  width: 88%;
  text-align: center;
}
.wechat-add-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}
.wechat-add-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary, #111);
}
.wechat-add-desc {
  font-size: 0.88rem;
  color: var(--text-secondary, #555);
  margin-bottom: 20px;
  line-height: 1.5;
}
.wechat-add-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.wechat-add-btn {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.wechat-add-btn:hover { opacity: 0.85; }
.wechat-add-btn-yes {
  background: #07c160;
  color: #fff;
}
.wechat-add-btn-no {
  background: var(--bg-secondary, #f0f0f0);
  color: var(--text-secondary, #666);
}

/* ============================================
   AI 客服助手 — 悬浮组件
   ============================================ */

/* Floating trigger button */
.ai-chat-trigger {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(1,58,15,0.85) 0%, rgba(1,80,25,0.75) 100%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 20px rgba(1,58,15,0.35),
    0 2px 6px rgba(0,0,0,0.1),
    inset 0 1px 1px rgba(255,255,255,0.15);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
}
/* Water ripple rings */
.ai-chat-trigger::before,
.ai-chat-trigger::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(1,58,15,0.25);
  opacity: 0;
  pointer-events: none;
  animation: aiRipple 3s ease-out infinite;
}
.ai-chat-trigger::after {
  animation-delay: 1.5s;
}
@keyframes aiRipple {
  0%   { transform: scale(1);   opacity: 0.6; border-width: 1.5px; }
  70%  { transform: scale(1.5); opacity: 0;   border-width: 0.5px; }
  100% { transform: scale(1.5); opacity: 0;   border-width: 0.5px; }
}
.ai-chat-trigger:hover {
  transform: scale(1.08);
  box-shadow:
    0 6px 28px rgba(1,58,15,0.45),
    inset 0 1px 2px rgba(255,255,255,0.2);
  background: linear-gradient(135deg, rgba(1,70,20,0.9) 0%, rgba(1,90,30,0.8) 100%);
}
.ai-chat-trigger.hidden { display: none; }
.ai-chat-trigger svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.ai-chat-trigger .ai-logo-text {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 1px;
  position: relative;
  z-index: 1;
}
.ai-chat-trigger .close-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
}

[data-theme="dark"] .ai-chat-trigger {
  background: linear-gradient(135deg, rgba(60,150,60,0.7) 0%, rgba(40,120,40,0.6) 100%);
  border-color: rgba(120,200,120,0.2);
  box-shadow:
    0 4px 20px rgba(60,150,60,0.3),
    inset 0 1px 1px rgba(255,255,255,0.08);
}
[data-theme="dark"] .ai-chat-trigger::before,
[data-theme="dark"] .ai-chat-trigger::after {
  border-color: rgba(100,200,100,0.25);
}
[data-theme="dark"] .ai-chat-trigger:hover {
  background: linear-gradient(135deg, rgba(70,170,70,0.8) 0%, rgba(50,140,50,0.7) 100%);
}
[data-theme="dark"] .ai-chat-window {
  background: #0b141a !important;
  border-color: rgba(134,150,160,0.15) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(80,180,80,0.06) !important;
}
[data-theme="dark"] .ai-chat-header {
  background: linear-gradient(135deg, #1a4a1a 0%, #0d2d0d 100%) !important;
}
[data-theme="dark"] .ai-chat-messages .ai-msg.assistant .ai-msg-bubble {
  background: #1f2c33 !important;
  border-color: rgba(134,150,160,0.15) !important;
  color: #e9edef !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}
[data-theme="dark"] .ai-chat-messages .ai-msg.user .ai-msg-bubble {
  background: linear-gradient(135deg, #005c4b 0%, #025144 100%) !important;
  color: #e9edef !important;
}

/* Chat window */
.ai-chat-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.ai-chat-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Force explicit light mode background to prevent dark mode leakage */
html:not([data-theme="dark"]) .ai-chat-window {
  background: #ffffff !important;
  border-color: #dde5dd !important;
}

/* Header */
.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #002d00) 100%);
  color: #fff;
  flex-shrink: 0;
}
.ai-chat-header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.ai-chat-header-info { flex: 1; min-width: 0; }
.ai-chat-header-name { font-weight: 600; font-size: 0.92rem; }
.ai-chat-header-status {
  font-size: 0.72rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ai-chat-header-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}
.ai-chat-header-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.ai-chat-header-close:hover { background: rgba(255,255,255,0.25); }
.ai-chat-header-close svg { width: 16px; height: 16px; }

/* Messages area */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #efeae2 !important;
  -webkit-overflow-scrolling: touch;
}
[data-theme="dark"] .ai-chat-messages {
  background: #0b141a !important;
}

.ai-msg {
  display: flex;
  gap: 8px;
  max-width: 90%;
  animation: aiMsgIn 0.3s ease;
}
@keyframes aiMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.ai-msg.assistant { align-self: flex-start; }

.ai-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.ai-msg.assistant .ai-msg-avatar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light, #2a6a3f) 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}
.ai-msg.user .ai-msg-avatar {
  background: linear-gradient(135deg, var(--accent, #c8a960) 0%, #b89840 100%);
  color: #fff;
}

.ai-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}
/* Light mode: assistant bubble = white on light beige background */
.ai-chat-messages .ai-msg.assistant .ai-msg-bubble {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  color: #111b21 !important;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.ai-chat-messages .ai-msg.user .ai-msg-bubble {
  background: linear-gradient(135deg, #005c4b 0%, #025144 100%) !important;
  color: #e9edef !important;
  border-bottom-right-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.ai-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}
.ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: aiTypingDot 1.2s ease-in-out infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiTypingDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* Input area */
.ai-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-light);
  background: #f0f2f5 !important;
  flex-shrink: 0;
}
[data-theme="dark"] .ai-chat-input-area {
  background: #1f2c33 !important;
  border-top-color: rgba(134,150,160,0.15) !important;
}
[data-theme="dark"] .ai-chat-input {
  background: #2a3942 !important;
  border-color: rgba(134,150,160,0.2) !important;
  color: #e9edef !important;
}
.ai-chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: none;
  max-height: 80px;
  outline: none;
  background: #ffffff;
  color: #111b21;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-chat-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(74,173,74,0.12); }
.ai-chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.15s;
}
.ai-chat-send:hover:not(:disabled) { transform: scale(1.06); }
.ai-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.ai-chat-send svg { width: 16px; height: 16px; }

/* Explicit light/dark mode overrides for send button */
html:not([data-theme="dark"]) .ai-chat-send {
  background: #013a0f !important;
  color: #ffffff !important;
}
[data-theme="dark"] .ai-chat-send {
  background: #4aad4a !important;
  color: #ffffff !important;
}

/* ===== Voice: TTS Speaker Button on Messages ===== */
.ai-tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  color: var(--text-muted, #888);
  cursor: pointer;
  vertical-align: middle;
  margin-left: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.ai-tts-btn svg { width: 14px; height: 14px; }
.ai-tts-btn:hover {
  background: rgba(1,58,15,0.12);
  color: var(--primary, #013a0f);
}
/* Playing state — animated sound waves */
.ai-tts-btn.playing {
  color: var(--primary, #013a0f);
  background: rgba(1,58,15,0.1);
  animation: ai-tts-wave 1.5s ease-in-out infinite;
}
@keyframes ai-tts-wave {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
[data-theme="dark"] .ai-tts-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
}
[data-theme="dark"] .ai-tts-btn:hover,
[data-theme="dark"] .ai-tts-btn.playing {
  background: rgba(74,173,74,0.2);
  color: #4aad4a;
}

/* ===== TTS Source Notice ===== */
.ai-tts-notice {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  z-index: 10010;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.ai-tts-notice.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ai-tts-notice.hide { opacity: 0; transform: translateX(-50%) translateY(-8px); }

/* Disclaimer overlay */
.ai-disclaimer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.ai-disclaimer-overlay.show { opacity: 1; visibility: visible; }
.ai-disclaimer-box {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 24px;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.ai-disclaimer-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--primary-bg, #e8f5e9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.4rem;
}
.ai-disclaimer-box h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.ai-disclaimer-box p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}
.ai-disclaimer-btns { display: flex; gap: 8px; justify-content: center; }
.ai-disclaimer-btns button {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.ai-disclaimer-btns button:hover { opacity: 0.85; }
.ai-disclaimer-accept { background: var(--primary); color: #fff; }
.ai-disclaimer-decline { background: var(--bg-secondary); color: var(--text-secondary); }

/* Beta badge */
.ai-beta-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.25);
  color: #fff;
  vertical-align: middle;
  margin-left: 5px;
  letter-spacing: 0.3px;
  line-height: 1.5;
  cursor: help;
  border: 1px solid rgba(255,255,255,0.3);
}

/* Clear chat button */
.ai-chat-header-clear {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.ai-chat-header-clear:hover { background: rgba(255,255,255,0.3); }
.ai-chat-header-clear svg { width: 15px; height: 15px; }

/* Model Selector */
.ai-model-select {
  max-width: 140px;
  padding: 3px 6px;
  font-size: 0.7rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  background: rgba(255,255,255,0.12);
  color: inherit;
  cursor: pointer;
  outline: none;
  flex-shrink: 1;
  appearance: auto;
  transition: border-color 0.2s;
}
.ai-model-select:hover { border-color: rgba(255,255,255,0.5); }
.ai-model-select:focus { border-color: rgba(255,255,255,0.7); }
.ai-model-select option {
  background: #1a1a2e;
  color: #fff;
  font-size: 0.72rem;
}
[data-theme="light"] .ai-model-select,
:root:not([data-theme]) .ai-model-select {
  border-color: rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .ai-model-select option,
:root:not([data-theme]) .ai-model-select option {
  background: #fff;
  color: #333;
}

/* Unsatisfied link */
.ai-unsatisfied-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: var(--text-tertiary, #999);
  cursor: pointer;
  transition: color 0.2s;
  text-align: center;
  flex-shrink: 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg-primary);
}
.ai-unsatisfied-link:hover { color: var(--primary); }
.ai-unsatisfied-link svg { flex-shrink: 0; }

/* Contact popup overlay */
.ai-contact-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.ai-contact-popup-overlay.show { opacity: 1; visibility: visible; }
.ai-contact-popup {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 24px;
  max-width: 300px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.ai-contact-popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: none;
  font-size: 1.3rem;
  color: var(--text-tertiary);
  cursor: pointer;
  line-height: 1;
}
.ai-contact-popup-close:hover { color: var(--text-primary); }
.ai-contact-popup h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-primary);
  padding-right: 20px;
}
.ai-contact-popup-items { display: flex; flex-direction: column; gap: 10px; }
.ai-contact-popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-secondary, #f5f5f5);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
a.ai-contact-popup-item:hover { background: var(--primary-bg, #e8f5e9); }
.ai-contact-popup-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.ai-contact-popup-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: block;
}
.ai-contact-popup-value {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
  display: block;
}

/* Clear confirm dialog */
.ai-clear-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.ai-clear-confirm-overlay.show { opacity: 1; visibility: visible; }
.ai-clear-confirm-box {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 24px;
  max-width: 280px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.ai-clear-confirm-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: #fef2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
[data-theme="dark"] .ai-clear-confirm-icon { background: rgba(220,38,38,0.15); }
.ai-clear-confirm-box h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.ai-clear-confirm-box p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}
.ai-clear-confirm-btns { display: flex; gap: 8px; justify-content: center; }
.ai-clear-confirm-btns button {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.ai-clear-confirm-btns button:hover { opacity: 0.85; }
.ai-clear-confirm-yes { background: #dc2626; color: #fff; }
.ai-clear-confirm-no { background: var(--bg-secondary); color: var(--text-secondary); }

/* Mobile adjustments */
@media (max-width: 768px) {
  .ai-chat-trigger {
    bottom: 80px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  .ai-chat-window {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    border: none;
    z-index: 9999;
    /* iOS fix: disable transform animation on fullscreen mobile */
    transform: none !important;
    -webkit-transform: none !important;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  .ai-chat-window.open {
    transform: none !important;
    -webkit-transform: none !important;
  }
  .ai-chat-header {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
  }
  .ai-chat-header-close {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  .ai-chat-header-close svg {
    width: 20px;
    height: 20px;
  }
  .ai-chat-header-clear {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  .ai-model-select {
    max-width: 110px;
    font-size: 0.65rem;
    padding: 2px 4px;
  }
  .ai-chat-input-area {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  /* iOS/Android auto-zoom fix: inputs must be ≥16px to prevent zoom */
  .ai-chat-input,
  .ai-chat-input-area textarea,
  .ai-chat-input-area input {
    font-size: 16px !important;
    touch-action: manipulation;
  }
  /* Prevent all form inputs from zooming on mobile */
  input, textarea, select {
    font-size: 16px !important;
  }
  /* Prevent body scroll when chat is open on mobile */
  body.ai-chat-open,
  html.ai-chat-open {
    overflow: hidden !important;
    touch-action: none;
  }
}

/* ============================================
   Contact Channels — Professional Cards
   ============================================ */
.contact-channels {
  padding: 36px 0 44px;
  background: var(--bg-secondary);
}

.contact-channels .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-primary);
}

.channel-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.channel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  border-color: var(--ch-color, var(--primary-light));
}

.channel-card:active {
  transform: translateY(-1px);
}

.channel-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--ch-color, #013a0f) 10%, transparent);
  color: var(--ch-color, #013a0f);
  border: 1px solid color-mix(in srgb, var(--ch-color, #013a0f) 20%, transparent);
  overflow: hidden;
}

.channel-icon svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  flex-shrink: 0;
}

.channel-info {
  flex: 1;
  min-width: 0;
}

.channel-info h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 3px;
  color: var(--text-primary);
}

.channel-info p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
  font-family: monospace;
  letter-spacing: 0.3px;
}

.channel-copy-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--ch-color, var(--primary));
  color: var(--ch-color, var(--primary));
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.channel-copy-btn:hover {
  background: var(--ch-color, var(--primary));
  color: #fff;
}

/* --- QR Modal Overlay --- */
.qr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.qr-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.qr-modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 36px 32px 28px;
  max-width: 300px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  transform: scale(0.92);
  transition: transform 0.25s ease;
}

.qr-modal-overlay.show .qr-modal {
  transform: scale(1);
}

.qr-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px;
}

.qr-modal-close:hover { color: var(--text-primary); }

.qr-modal h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.qr-modal #qrModalCode {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.qr-modal #qrModalCode img,
.qr-modal #qrModalCode canvas {
  border-radius: 8px;
}

.qr-modal #qrModalValue {
  font-size: 0.88rem;
  color: var(--text-secondary);
  word-break: break-all;
  margin: 0;
  font-family: monospace;
  user-select: all;
  -webkit-user-select: all;
}

/* --- Toast --- */
.channel-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 26, 26, 0.92);
  color: #fff;
  padding: 10px 28px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.channel-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* --- Dark mode: contact channels --- */
[data-theme="dark"] .channel-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .channel-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--ch-color, var(--primary-light));
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

[data-theme="dark"] .channel-icon {
  background: color-mix(in srgb, var(--ch-color, #013a0f) 15%, transparent);
}

[data-theme="dark"] .qr-modal {
  background: var(--bg-secondary);
}

[data-theme="dark"] .qr-modal #qrModalCode img,
[data-theme="dark"] .qr-modal #qrModalCode canvas {
  background: #fff;
  padding: 8px;
}

[data-theme="dark"] .channel-toast {
  background: rgba(255, 255, 255, 0.92);
  color: #1a1a1a;
}

/* --- Responsive: Contact Channels --- */
@media (max-width: 768px) {
  .contact-channels {
    padding: 48px 0 56px;
  }

  .contact-channels .section-title {
    font-size: 1.2rem;
    margin-bottom: 28px;
  }

  .channel-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .channel-card {
    padding: 18px;
  }

  .channel-icon {
    width: 46px;
    height: 46px;
  }

  .channel-icon svg {
    width: 22px;
    height: 22px;
  }

  .qr-modal {
    padding: 28px 24px 22px;
    max-width: 280px;
  }

  .channel-toast {
    bottom: 24px;
    font-size: 0.8rem;
    padding: 8px 22px;
  }
}

/* ============================================
   COMPREHENSIVE LIGHT/DARK MODE BULLETPROOF
   Ensures WhatsApp-style chat colors and button
   readability regardless of cascade order or
   admin JS overrides.
   ============================================ */

/* --- Light mode: buttons --- */
html:not([data-theme="dark"]) .btn-primary {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html:not([data-theme="dark"]) .btn-primary:hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html:not([data-theme="dark"]) .btn-cta {
  background: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 2px solid rgba(255,255,255,0.7) !important;
}
html:not([data-theme="dark"]) .btn-cta:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* --- Dark mode: buttons --- */
[data-theme="dark"] .btn-primary {
  background: #4aad4a !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
[data-theme="dark"] .btn-primary:hover {
  background: #3d9a3d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* --- Light mode: AI Chat — WhatsApp-style colors --- */
html:not([data-theme="dark"]) .ai-chat-window {
  background: #ffffff !important;
}
html:not([data-theme="dark"]) .ai-chat-messages {
  background: #efeae2 !important;
}
html:not([data-theme="dark"]) .ai-chat-messages .ai-msg.assistant .ai-msg-bubble {
  background: #ffffff !important;
  color: #111b21 !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  border-radius: 14px !important;
  border-bottom-left-radius: 4px !important;
}
html:not([data-theme="dark"]) .ai-chat-messages .ai-msg.user .ai-msg-bubble {
  background: linear-gradient(135deg, #005c4b 0%, #025144 100%) !important;
  color: #e9edef !important;
  border: none !important;
  border-radius: 14px !important;
  border-bottom-right-radius: 4px !important;
}
html:not([data-theme="dark"]) .ai-chat-input-area {
  background: #f0f2f5 !important;
  border-top-color: #e0ddd6 !important;
}
html:not([data-theme="dark"]) .ai-chat-input {
  background: #ffffff !important;
  color: #111b21 !important;
  border-color: #dde5dd !important;
}
html:not([data-theme="dark"]) .ai-chat-header {
  background: linear-gradient(135deg, #013a0f 0%, #002d00 100%) !important;
  color: #ffffff !important;
}
html:not([data-theme="dark"]) .ai-chat-send {
  background: #013a0f !important;
  color: #ffffff !important;
}

/* --- Dark mode: AI Chat — WhatsApp dark colors --- */
[data-theme="dark"] .ai-chat-window {
  background: #0b141a !important;
}
[data-theme="dark"] .ai-chat-messages {
  background: #0b141a !important;
}
[data-theme="dark"] .ai-chat-messages .ai-msg.assistant .ai-msg-bubble {
  background: #1f2c33 !important;
  color: #e9edef !important;
  border-color: rgba(134,150,160,0.15) !important;
}
[data-theme="dark"] .ai-chat-messages .ai-msg.user .ai-msg-bubble {
  background: linear-gradient(135deg, #005c4b 0%, #025144 100%) !important;
  color: #e9edef !important;
}
[data-theme="dark"] .ai-chat-input-area {
  background: #1f2c33 !important;
}
[data-theme="dark"] .ai-chat-input {
  background: #2a3942 !important;
  color: #e9edef !important;
}
[data-theme="dark"] .ai-chat-send {
  background: #4aad4a !important;
  color: #ffffff !important;
}

/* --- Light mode: knowledge card and tags --- */
html:not([data-theme="dark"]) .knowledge-card {
  background: var(--bg-card, #ffffff) !important;
  border-color: var(--border, #dde5dd) !important;
}
html:not([data-theme="dark"]) .knowledge-tag {
  background: var(--primary-bg, #e8f5e9) !important;
  color: var(--primary, #013a0f) !important;
}

/* --- Equipment tag: always white text --- */
.equipment-image .tag {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* --- Light mode: CTA section (green gradient + white text) --- */
html:not([data-theme="dark"]) .footer-cta {
  background: linear-gradient(135deg, #013a0f 0%, #002d00 100%) !important;
  border-top-color: transparent !important;
}
html:not([data-theme="dark"]) .footer-cta-inner h2 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html:not([data-theme="dark"]) .footer-cta-inner p {
  color: rgba(255,255,255,0.85) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.85) !important;
}
html:not([data-theme="dark"]) .btn-cta {
  background: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 2px solid rgba(255,255,255,0.7) !important;
}
html:not([data-theme="dark"]) .btn-cta:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* --- Dark mode: CTA section (same green gradient + white text) --- */
[data-theme="dark"] .footer-cta {
  background: linear-gradient(135deg, #013a0f 0%, #002d00 100%) !important;
  border-top-color: transparent !important;
}
[data-theme="dark"] .footer-cta-inner h2 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
[data-theme="dark"] .footer-cta-inner p {
  color: rgba(255,255,255,0.85) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.85) !important;
}
[data-theme="dark"] .btn-cta {
  background: transparent !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 2px solid rgba(255,255,255,0.5) !important;
}
[data-theme="dark"] .btn-cta:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}


/* ============================================================
   Process / How We Work Section
   ============================================================ */
.process-section {
  padding: 48px 0;
  background: var(--bg-secondary, #f8faf8);
}
[data-theme="dark"] .process-section {
  background: var(--bg-secondary, #0a1a0c);
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin-top: 24px;
}
.process-step {
  text-align: center;
  padding: 0 20px;
  position: relative;
}
.process-step-num {
  font-size: 13px;
  font-weight: 800;
  color: #c8a960;
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.process-step-icon {
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #013a0f, #0a5a1f);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(1,58,15,0.25);
  overflow: hidden;
}
[data-theme="dark"] .process-step-icon {
  background: linear-gradient(135deg, #0a5a1f, #1a7a2f);
  box-shadow: 0 8px 24px rgba(10,90,31,0.4);
}
.process-step-icon svg {
  width: 30px;
  height: 30px;
  max-width: 30px;
  max-height: 30px;
  stroke: #ffffff;
  flex-shrink: 0;
}
.process-step h3 {
  font-size: 1.05em;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 10px;
}
.process-step p {
  font-size: 0.88em;
  color: var(--text-secondary, #666);
  line-height: 1.65;
}
.process-connector {
  position: absolute;
  top: 72px;
  right: -10%;
  width: 60%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #c8a960 0, #c8a960 6px, transparent 6px, transparent 12px);
  z-index: 1;
  opacity: 0.5;
}
@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 40px 20px;
  }
  .process-connector { display: none; }
}
@media (max-width: 560px) {
  .process-steps { grid-template-columns: 1fr; gap: 36px; }
}


/* ============================================================
   Testimonials Section
   ============================================================ */
.testimonials-section {
  padding: 48px 0;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.testimonial-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e8ece8);
  border-radius: var(--radius-lg, 12px);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
[data-theme="dark"] .testimonial-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.testimonial-stars {
  display: flex;
  gap: 3px;
}
.testimonial-stars svg {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
}
.testimonial-text {
  font-size: 0.92em;
  line-height: 1.75;
  color: var(--text-primary, #333);
  font-style: italic;
  flex: 1;
  position: relative;
  padding-left: 20px;
  border-left: 3px solid #c8a960;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color, #eee);
}
.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #013a0f, #0a5a1f);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.testimonial-name {
  font-weight: 700;
  font-size: 0.9em;
  color: var(--text-primary, #1a1a1a);
}
.testimonial-role {
  font-size: 0.78em;
  color: var(--text-tertiary, #999);
  margin-top: 2px;
}
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   Quality & Certifications Section
   ============================================================ */
.quality-section {
  padding: 48px 0;
  background: var(--bg-secondary, #f8faf8);
}
[data-theme="dark"] .quality-section {
  background: var(--bg-secondary, #0a1a0c);
}
.quality-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: center;
}
.quality-content h2 {
  font-size: 1.8em;
  font-weight: 800;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 16px;
}
.quality-content > p {
  font-size: 0.95em;
  line-height: 1.75;
  color: var(--text-secondary, #555);
  margin-bottom: 32px;
}
.quality-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.quality-badge-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e8ece8);
  border-radius: var(--radius-md, 10px);
  transition: transform 0.2s, box-shadow 0.2s;
}
.quality-badge-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.quality-badge-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(1,58,15,0.08), rgba(1,58,15,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .quality-badge-icon {
  background: linear-gradient(135deg, rgba(10,90,31,0.2), rgba(10,90,31,0.3));
}
.quality-badge-icon svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  max-height: 20px;
  stroke: #013a0f;
}
[data-theme="dark"] .quality-badge-icon svg {
  stroke: #4ade80;
}
.quality-badge-item strong {
  display: block;
  font-size: 0.88em;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 4px;
}
.quality-badge-item span {
  font-size: 0.78em;
  color: var(--text-tertiary, #888);
  line-height: 1.5;
}

/* Quality visual side — metric cards */
.quality-visual {
  display: flex;
  align-items: center;
}
.quality-metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.quality-metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e8ece8);
  border-radius: var(--radius-md, 12px);
  transition: transform 0.2s, box-shadow 0.2s;
}
.quality-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.quality-metric-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(200,169,96,0.1), rgba(200,169,96,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quality-metric-icon svg {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  stroke: #c8a960;
}
.quality-metric-card strong {
  display: block;
  font-size: 1.3em;
  font-weight: 800;
  color: #c8a960;
  line-height: 1.2;
}
.quality-metric-card span {
  display: block;
  font-size: 0.78em;
  color: var(--text-tertiary, #999);
  margin-top: 2px;
}
@media (max-width: 900px) {
  .quality-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .quality-visual { order: -1; }
  .quality-badges { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .quality-badges { grid-template-columns: 1fr; }
}

/* ========================================
   Mobile Performance Optimization
   Hide expensive decorative elements on mobile
   ======================================== */
@media (max-width: 768px) {
  /* Reduce nav backdrop-filter cost */
  .nav-inner {
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
  }

  /* Hide hero orbs — 3 × filter:blur(80px) + infinite animation */
  .hero-orb { display: none !important; }

  /* Hide warp tunnel — 28 animated streaks */
  .warp-tunnel { display: none !important; }

  /* Hide contact grid pattern */
  .contact-grid::before { display: none; }

  /* Disable continuous shimmer on mobile — saves layout recalc */
  .btn-primary::after { animation: none; display: none; }
  .contact-ai-banner::after { animation: none; display: none; }

  /* Simplify contact item animations */
  .contact-item-icon::before,
  .contact-item-icon::after { animation: none !important; }
  .contact-item::before { animation: none !important; }

  /* Disable gear spin decoration */
  .page-header::before,
  .page-header::after { animation: none !important; }

  /* Back-to-top: no backdrop-filter when hidden */
  .back-to-top {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .back-to-top.visible {
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
  }

  /* Form focus: static ring instead of animated box-shadow */
  .form-group input:focus,
  .form-group textarea:focus {
    animation: none !important;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Touch optimization: disable double-tap zoom and long-press callout on interactive elements */
#aiChatWidget,
#aiChatWidget button,
#aiChatWidget input,
#aiChatWidget textarea,
#aiChatWidget select,
#aiChatWidget a {
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

