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

:root {
  /* Light theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f4f7fc;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.25);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #6c6c8a;
  --color-brand: #1a3c6e;
  --color-accent: #ff6b35;
  --color-accent-light: #ff8a5c;
  --color-green: #2ecc71;
  --color-purple: #9b59b6;
  --color-red: #e74c3c;
  --color-cyan: #00bcd4;
  --color-orange: #ff9800;
  --color-lime: #8bc34a;
  --border-color: rgba(26, 60, 110, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --gradient-hero: linear-gradient(135deg, #1a3c6e 0%, #ff6b35 100%);
  --gradient-hero2: linear-gradient(135deg, #2d5a87 0%, #e85d3a 100%);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s ease;
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 50, 0.7);
    --bg-glass: rgba(20, 20, 40, 0.35);
    --text-primary: #e8e8f0;
    --text-secondary: #b0b0c8;
    --text-muted: #8888a0;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.3);
  }
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

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

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Scroll Animations ===== */
.section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Header & Top Bar ===== */
.top-bar {
  background: var(--color-brand);
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 0;
  letter-spacing: 0.3px;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar span:first-child {
  opacity: 0.9;
}

.top-bar span:last-child {
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  padding: 2px 12px;
  border-radius: 20px;
}

/* Main Nav */
.main-nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.85);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

@media (prefers-color-scheme: dark) {
  .main-nav {
    background: rgba(15, 15, 26, 0.85);
  }
}

.main-nav.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.logo svg {
  width: 140px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links li a {
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--color-accent);
  background: rgba(255, 107, 53, 0.08);
}

.nav-links li a.active {
  font-weight: 600;
  color: var(--color-accent);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.menu-toggle:hover {
  background: rgba(0,0,0,0.05);
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: all var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  background: var(--gradient-hero);
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.slider-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
}

/* ===== Section Titles ===== */
.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  color: var(--color-brand);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 48px;
  font-weight: 400;
}

/* ===== Brand Section ===== */
.brand-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.brand-card {
  padding: 32px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-align: center;
}

.brand-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 53, 0.2);
}

.brand-card svg {
  margin: 0 auto 20px;
}

.brand-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-brand);
}

.brand-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Products Section ===== */
.products-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.product-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.product-card svg {
  margin: 0 auto 16px;
  border-radius: var(--radius-sm);
}

.product-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-brand);
}

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

/* ===== Services Section ===== */
.services-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.service-card {
  padding: 28px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all var(--transition-normal);
}

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

.service-card svg {
  margin: 0 auto 16px;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-brand);
}

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

/* FAQ Preview */
.faq-preview {
  max-width: 720px;
  margin: 0 auto;
}

.faq-preview h3 {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-brand);
  margin-bottom: 24px;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 4px 0;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast);
  font-family: var(--font-sans);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-accent);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 18px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== News Section ===== */
.news-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.news-card {
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
}

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

.news-card svg {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-content {
  padding: 20px 24px 24px;
}

.news-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-brand);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.read-more {
  display: inline-block;
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.95rem;
  transition: gap var(--transition-fast);
}

.read-more:hover {
  gap: 6px;
}

/* ===== Cases Section ===== */
.cases-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.case-card {
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
}

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

.case-card svg {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.case-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-brand);
  padding: 20px 24px 8px;
}

.case-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 0 24px 24px;
}

/* ===== Contact Section ===== */
.contact-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.contact-info {
  padding: 32px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.contact-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-brand);
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.contact-info p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.contact-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.contact-map svg {
  width: 100%;
  height: auto;
}

/* ===== Footer ===== */
footer {
  background: var(--color-brand);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 30px;
}

footer a {
  color: rgba(255,255,255,0.75);
}

footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 3px;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.7);
}

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

.footer-col ul li a {
  font-size: 0.9rem;
  display: inline-block;
  transition: all var(--transition-fast);
}

.footer-col ul li a:hover {
  transform: translateX(4px);
  color: var(--color-accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.footer-bottom p {
  margin-bottom: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero {
    height: 500px;
  }
  .section-title {
    font-size: 2rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar span:first-child {
    display: none;
  }
  .top-bar .container {
    justify-content: center;
  }
  .main-nav .container {
    height: 64px;
  }
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 999;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav-links li a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
  }
  .menu-toggle {
    display: flex;
  }
  .hero {
    height: 420px;
  }
  .hero-bg text:first-of-type {
    font-size: 2rem !important;
  }
  .hero-bg text:nth-of-type(2) {
    font-size: 1.4rem !important;
  }
  .hero-bg text:nth-of-type(3) {
    font-size: 0.9rem !important;
  }
  .hero-bg a rect {
    width: 180px !important;
    height: 44px !important;
    x: calc(50% - 90px) !important;
  }
  .hero-bg a text {
    font-size: 0.95rem !important;
  }
  .section {
    padding: 48px 0 !important;
  }
  .section-title {
    font-size: 1.7rem;
  }
  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }
  .brand-grid,
  .products-grid,
  .services-grid,
  .news-grid,
  .cases-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .hero {
    height: 360px;
  }
  .hero-bg text:first-of-type {
    font-size: 1.5rem !important;
  }
  .hero-bg text:nth-of-type(2) {
    font-size: 1.1rem !important;
  }
  .hero-bg text:nth-of-type(3) {
    font-size: 0.75rem !important;
  }
  .hero-bg a rect {
    width: 160px !important;
    height: 40px !important;
    x: calc(50% - 80px) !important;
  }
  .hero-bg a text {
    font-size: 0.85rem !important;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .brand-card,
  .product-card,
  .service-card,
  .news-card,
  .case-card {
    padding: 20px;
  }
}

/* ===== Glassmorphism Utility ===== */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (prefers-color-scheme: dark) {
  .glass {
    border-color: rgba(255, 255, 255, 0.06);
  }
}

/* ===== Smooth scroll offset ===== */
section[id] {
  scroll-margin-top: 80px;
}

/* ===== Selection ===== */
::selection {
  background: var(--color-accent);
  color: #fff;
}

/* ===== Focus styles ===== */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .section {
    opacity: 1;
    transform: none;
  }
}