/* 江苏宇安机械科技有限公司 - 企业官网样式 */
:root {
  --primary: #1e3a5f;
  --primary-dark: #152a45;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-warm: #f1f5f9;
  --border: #e2e8f0;
  --shadow: 0 10px 40px rgba(30, 58, 95, 0.08);
  --shadow-sm: 0 4px 12px rgba(30, 58, 95, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 90px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 48px;
}

.section-header {
  margin-bottom: 48px;
}

.section-header.center {
  text-align: center;
}

.section-header.center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(14, 165, 233, 0.04);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-size: 1.15rem;
  color: var(--primary);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

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

.nav a {
  padding: 8px 16px;
  font-size: 0.95rem;
  color: var(--text);
  border-radius: 50px;
  transition: var(--transition);
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  background: rgba(14, 165, 233, 0.06);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

/* Hero */
.hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  padding-top: 76px;
  background: linear-gradient(135deg, #0f2744 0%, #1e3a5f 50%, #1d4e7a 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/factory/p007.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  mix-blend-mode: luminosity;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(14, 165, 233, 0.15), transparent 50%);
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 720px;
  color: #fff;
}

.hero-label {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title em {
  color: var(--accent);
  font-style: normal;
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 580px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.hero-stat span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 8px;
  display: inline-block;
}

/* Features / Cards */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(14, 165, 233, 0.2);
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-warm);
}

.card-body {
  padding: 24px;
}

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

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

/* Custom non-standard equipment group cards */
.custom-group-card .card-title {
  font-size: 1.25rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.custom-group-gallery {
  display: grid;
  gap: 12px;
  padding: 20px 20px 0;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
}

.custom-group-gallery.cols-1 {
  grid-template-columns: 1fr;
}

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

.custom-group-gallery.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.custom-group-gallery img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.custom-group-gallery img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-sm);
}

.product-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.product-list li:last-child {
  border-bottom: none;
}

.product-list strong {
  color: var(--primary);
  font-weight: 600;
  min-width: 7.5em;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.product-list span {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Category cards */
.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--primary);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #fff;
  transition: var(--transition);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 39, 68, 0.95), rgba(15, 39, 68, 0.3));
  z-index: 1;
}

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

.category-card > * {
  position: relative;
  z-index: 2;
}

.category-card h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.category-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.category-card .arrow {
  margin-top: 16px;
  font-size: 1.2rem;
  transition: var(--transition);
}

.category-card:hover .arrow {
  transform: translateX(6px);
}

/* About preview */
.about-section {
  background: var(--bg-soft);
}

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

.about-images.has-exterior img:first-child {
  aspect-ratio: 3 / 2;
}

.about-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-content: start;
}

.about-images img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  transition: var(--transition);
}

.about-images img:first-child {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.about-images img:nth-child(2),
.about-images img:nth-child(3) {
  aspect-ratio: 4 / 3;
}

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

.about-images.home-single {
  grid-template-columns: 1fr;
}

.about-images.home-single img {
  grid-column: span 1;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

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

.highlight-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
}

.highlight-item strong {
  display: block;
  color: var(--primary);
  margin-bottom: 4px;
  font-size: 1rem;
}

.highlight-item span {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Certifications */
.cert-section {
  background: var(--bg);
}

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

.cert-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: var(--transition);
  background: var(--bg);
}

.cert-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(14, 165, 233, 0.2);
}

.cert-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.cert-card h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.cert-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Products page tabs */
.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.25);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.product-meta span {
  font-size: 0.82rem;
  padding: 4px 10px;
  background: var(--bg-warm);
  color: var(--text-light);
  border-radius: 4px;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.contact-info-card {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px;
}

.contact-info-card h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info-item .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-info-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.contact-info-item p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.contact-form {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 40px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--primary);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

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

.map-placeholder {
  width: 100%;
  height: 360px;
  background: var(--bg-warm);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  border: 1px dashed var(--border);
  margin-top: 24px;
}

.map-placeholder strong {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* Page banner */
.page-banner {
  position: relative;
  padding: 160px 0 80px;
  background: linear-gradient(135deg, #0f2744 0%, #1e3a5f 100%);
  color: #fff;
}

.page-banner h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

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

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 0;
}

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

.footer-brand img {
  height: 48px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  font-size: 0.95rem;
  transition: var(--transition);
}

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

.footer-contact p {
  font-size: 0.95rem;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  text-align: center;
  font-size: 0.9rem;
}

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

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .hero-title { font-size: 2.2rem; }
  .hero-stats { gap: 24px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .cert-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr; }
  .custom-group-gallery.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .custom-group-gallery img { height: 130px; }

  .mobile-menu-btn { display: flex; }
  .nav {
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav a {
    width: 100%;
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.9rem; }
  .section-title { font-size: 1.6rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
