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

:root {
  --primary: #0a4d8c;
  --primary-dark: #063a6b;
  --accent: #00b4d8;
  --dark: #0f172a;
  --gray: #64748b;
  --light: #f1f5f9;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

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

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 50px;
  color: var(--dark);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

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

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.lang-btn:hover {
  background: rgba(255,255,255,0.2);
}

.lang-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}

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

.lang-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--dark);
  transition: var(--transition);
}

.lang-dropdown button:hover,
.lang-dropdown button.active {
  background: var(--light);
  color: var(--primary);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.85;          /* 提高清晰度，原来是 0.45 */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* 减弱遮罩，让背景图更清晰，同时保证白字可读 */
  background: linear-gradient(135deg, rgba(10,77,140,0.35) 0%, rgba(15,23,42,0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  border-radius: 30px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background: #0096c7;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,180,216,0.4);
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about-text p {
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

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

.stat-item {
  text-align: center;
  padding: 16px 8px;
  background: var(--light);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 4px;
}

/* ===== Products ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.2);
}

.product-img {
  height: 200px;
  overflow: hidden;
  background: var(--light);
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-img img {
  transform: scale(1.08);
}

.product-body {
  padding: 20px;
}

.product-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.product-body p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.5;
}

/* ===== Strength ===== */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 28px;
}

.strength-card {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
}

.strength-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.strength-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.strength-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.strength-card p {
  font-size: 0.9rem;
  color: var(--gray);
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  height: 220px;
  background: var(--light);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

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

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-item .icon {
  width: 44px;
  height: 44px;
  background: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 2px;
}

.contact-item p {
  font-size: 1.05rem;
  color: var(--dark);
  font-weight: 500;
}

.contact-form {
  background: var(--light);
  padding: 32px;
  border-radius: var(--radius);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.15);
}

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

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-social {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.2rem;
  transition: var(--transition);
  text-decoration: none;
}

.footer-social a:hover {
  background: #1877f2;
  transform: translateY(-3px);
}

/* ===== Loading ===== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}

.loading-screen.hide {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .section {
    padding: 60px 0;
  }

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

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

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

  .hero h1 {
    font-size: 1.8rem;
  }
}

/* Placeholder image style when missing */
.img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.9rem;
}
