/* ============================================
   Minimalist Modern Design System - SaaS Style
   安徽络嵌控制系统有限公司
   ============================================ */

/* ---- Design Tokens ---- */
:root {
  /* Colors - Electric Blue Theme */
  --background: #FAFAFA;
  --foreground: #0F172A;
  --muted: #F1F5F9;
  --muted-foreground: #64748B;
  --accent: #0052FF;
  --accent-secondary: #4D7CFF;
  --accent-foreground: #FFFFFF;
  --border: #E2E8F0;
  --card: #FFFFFF;
  --ring: #0052FF;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0052FF, #4D7CFF);
  --gradient-text: linear-gradient(to right, #0052FF, #4D7CFF);
  --gradient-underline: linear-gradient(to right, rgba(0, 82, 255, 0.15), rgba(77, 124, 255, 0.1));
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
  --shadow-accent: 0 4px 14px rgba(0,82,255,0.25);
  --shadow-accent-lg: 0 8px 24px rgba(0,82,255,0.35);
  
  /* Typography */
  --font-display: 'Calistoga', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --container-width: 1200px;
  --section-padding: 100px;
  
  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

section {
  padding: var(--section-padding) 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--accent-foreground);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--muted);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--accent);
  background: rgba(0, 82, 255, 0.05);
}

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all var(--transition-medium);
}

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

/* ---- Section Labels ---- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 82, 255, 0.08);
  border: 1px solid rgba(0, 82, 255, 0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 82, 255, 0.4);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(0, 82, 255, 0);
  }
}

/* ---- Inputs ---- */
.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* ---- Page Layout ---- */
.page-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 60px 24px;
}

.page-header {
  text-align: center;
  margin-bottom: 60px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.page-header p {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--muted-foreground);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--border);
}

/* ---- Page Content ---- */
.page-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-content p {
  color: var(--muted-foreground);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* ---- About Page ---- */
.about-hero {
  margin-bottom: 48px;
  border-radius: 24px;
  overflow: hidden;
}

.about-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.about-body {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.about-body p {
  text-indent: 2em;
  margin-bottom: 20px;
}

/* ---- Contact Page ---- */
.contact-hero {
  margin-bottom: 48px;
  border-radius: 24px;
  overflow: hidden;
}

.contact-hero img {
  width: 100%;
  height: auto;
  display: block;
}

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

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: all var(--transition-medium);
}

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

.contact-icon {
  width: 56px;
  height: 56px;
  background: var(--gradient-primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  margin: 0 auto 16px;
}

.contact-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-card p {
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
}

.invoice-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.invoice-section h2,
.invoice-section h3 {
  font-family: var(--font-display);
  margin-bottom: 24px;
}

.invoice-section h3 {
  margin-top: 32px;
}

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

.invoice-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.invoice-label {
  font-weight: 600;
  color: var(--foreground);
  font-size: 14px;
}

.invoice-value {
  color: var(--muted-foreground);
  font-size: 14px;
}

/* ---- Careers Page ---- */
.careers-hero {
  margin-bottom: 48px;
  border-radius: 24px;
  overflow: hidden;
}

.careers-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.job-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

.job-header h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
}

.job-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(0, 82, 255, 0.08);
  border: 1px solid rgba(0, 82, 255, 0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.job-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.job-section {
  margin-bottom: 32px;
}

.job-section h3 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--foreground);
}

.job-section ul {
  list-style: none;
  padding: 0;
}

.job-section ul li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--muted-foreground);
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}

.job-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.job-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

.job-footer p {
  color: var(--muted-foreground);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.text-muted { color: var(--muted-foreground); }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .invoice-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 48px;
    --container-width: 100%;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .page-container {
    padding: 32px 16px;
  }
  
  .page-header {
    margin-bottom: 32px;
  }
  
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .page-header p {
    font-size: 1rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  
  .footer-brand .footer-logo {
    margin: 0 auto 16px;
  }
  
  .footer-brand p {
    margin: 0 auto;
  }
  
  .footer-links ul {
    align-items: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .about-hero,
  .contact-hero,
  .careers-hero {
    border-radius: 16px;
    margin-bottom: 32px;
  }
  
  .invoice-section {
    padding: 24px;
  }
  
  .invoice-item {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 0;
  }
  
  .job-card {
    padding: 24px;
  }
  
  .job-header h2 {
    font-size: 1.375rem;
  }
  
  .job-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .job-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .job-footer .btn {
    width: 100%;
  }
}

/* ---- Footer ---- */
footer {
  background: var(--foreground);
  color: var(--accent-foreground);
}

.footer-main {
  padding: 60px 0 40px;
}

.footer-grid {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .footer-logo {
  height: 36px;
  width: auto;
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-links .footer-heading {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links ul li a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition-fast);
}

.footer-links ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
}

.footer-bottom-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-content p {
  color: var(--muted-foreground);
  font-size: 13px;
}

.footer-bottom-content a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition-fast);
}

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

/* ---- WeChat QR Code ---- */
.wechat-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--muted-foreground);
  font-size: 18px;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.wechat-link:hover {
  color: var(--success, #07c160);
}

/* 二维码图片 */
.wechat-link::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  width: 180px;
  height: 180px;
  background-image: url("../img/wechat.jpg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-xl);
  z-index: 100;
}

/* 悬停显示二维码 */
.wechat-link:hover::after {
  display: block;
}

/* 小箭头 */
.wechat-link::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
  z-index: 101;
}

.wechat-link:hover::before {
  display: block;
}

/* Mobile: center QR code */
@media (max-width: 768px) {
  .wechat-link::after {
    position: fixed;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
  }
  
  .wechat-link::before {
    display: none !important;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* ---- Image Aspect Ratio & CLS Prevention ---- */
img {
  max-width: 100%;
  height: auto;
}

.product-image img,
.solution-image img,
.article-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.nav-logo img,
.footer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}


/* ---- Form Utilities (migrated from inline styles) ---- */
.card-narrow {
  max-width: 640px;
  margin: 0 auto;
}

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

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.required-mark {
  color: #ef4444;
}

.form-error {
  color: #ef4444;
  font-size: 13px;
  margin-top: 4px;
}

.alert-inline {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.alert-inline.success {
  background: rgba(7, 193, 96, 0.1);
  color: var(--success, #07c160);
  border-color: rgba(7, 193, 96, 0.2);
}

.alert-inline.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error, #ef4444);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-block {
  width: 100%;
}

.textarea {
  height: 120px;
  padding: 12px 16px;
  resize: vertical;
}

/* ---- Selector (migrated from inline styles) ---- */
.selector-option-title {
  font-size: 1.125rem;
  margin: 0;
}

.selector-actions {
  margin-top: 40px;
}

.grid-full {
  grid-column: 1 / -1;
}

/* ---- Contact (migrated from inline styles) ---- */
.contact-card-title {
  font-size: 1.125rem;
  margin-bottom: 12px;
}

/* ---- Pagination (migrated from inline styles) ---- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-sm.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 14px;
  color: var(--muted-foreground);
}

/* ---- Selector Results (缺失的样式) ---- */
.results-section {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.results-section.active {
  display: block;
}

.results-section h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.results-section .results-subtitle {
  color: var(--muted-foreground);
  margin-bottom: 32px;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  transition: all var(--transition-fast);
}

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

.result-card .result-image {
  height: 180px;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card .result-image img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.result-card .result-body {
  padding: 20px;
}

.result-card .result-model {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 4px;
}

.result-card .result-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
}

.result-card .result-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.result-card .result-tags span {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--muted);
  border-radius: 100px;
  color: var(--muted-foreground);
}

.result-card .result-actions {
  display: flex;
  gap: 8px;
}

.result-card .result-actions .btn {
  flex: 1;
  text-align: center;
  font-size: 13px;
  padding: 8px 12px;
}

@media (max-width: 768px) {
  .result-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .result-cards {
    grid-template-columns: 1fr;
  }
}
