/* ===== 海口海飞实业有限公司 - 全新设计 ===== */

:root {
  --primary: #1a3a5c;
  --primary-dark: #0d2137;
  --primary-light: #2c5f8a;
  --accent: #c9a84c;
  --accent-light: #e0c66a;
  --bg-light: #f5f6fa;
  --bg-white: #ffffff;
  --text-dark: #1a1a2e;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08);
  --radius: 8px;
  --radius-lg: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background: var(--bg-white);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar .logo-img {
  height: 56px;
  width: auto;
  display: block;
}

.navbar .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.navbar .logo-text small {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-gray);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.25s;
}

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

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

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 1px;
  transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
  margin-top: 72px;
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.hero .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-size: 44px;
  font-weight: 800;
  color: var(--bg-white);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-text h1 span { color: var(--accent); }

.hero-text p {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-images img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.hero-images .img-tall {
  grid-row: span 2;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  color: var(--bg-white);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-buttons { display: flex; gap: 12px; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201,168,76,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--bg-white);
  border: 1.5px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ===== Sections ===== */
.section { padding: 80px 24px; }

.section-alt { background: var(--bg-light); }

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.section-title .divider {
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto;
  border-radius: 2px;
}

.section-title p {
  color: var(--text-gray);
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto;
}

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

.about-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.about-images .main-img {
  grid-column: 1 / -1;
}

.about-images img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

.about-text h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-gray);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
}

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

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

.stat-item .number {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-item .label {
  font-size: 12px;
  color: var(--text-gray);
  margin-top: 4px;
}

/* ===== Products ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

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

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.product-card .info {
  padding: 16px 18px 20px;
}

.product-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.product-card p {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.6;
}

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

.advantage-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px 22px;
  border: 1px solid var(--border);
  transition: all 0.25s;
}

.advantage-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.advantage-card .icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.advantage-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.advantage-card p {
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.7;
}

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

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

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

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

.case-card .info {
  padding: 16px 18px 18px;
}

.case-card .info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.case-card .info p {
  font-size: 13px;
  color: var(--text-gray);
}

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

.contact-info h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--bg-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-item .icon {
  font-size: 18px;
  width: 36px;
  height: 36px;
  background: var(--bg-white);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item .text h5 {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 1px;
}

.contact-item .text p {
  font-size: 14px;
  color: var(--text-dark);
}

.contact-item .text a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
}

.contact-item .text a:hover { color: var(--accent); }

.contact-form {
  background: var(--bg-white);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
  background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(44,95,138,0.08);
}

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

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

.footer .container {
  max-width: 1100px;
  margin: 0 auto;
}

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

.footer-col h4 {
  color: var(--bg-white);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.footer-col p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.55);
}

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

.footer-col ul li {
  margin-bottom: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  line-height: 1.8;
}

/* ===== Responsive - Mobile First ===== */

/* 平板 */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .hero-text h1 { font-size: 32px; }
  .hero-text p { margin: 0 auto 28px; }
  .hero-buttons { justify-content: center; }
  .hero-images { max-width: 400px; margin: 0 auto; }

  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-imgs { max-width: 500px; margin: 0 auto; }

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

  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* 手机大屏 */
@media (max-width: 768px) {
  /* ===== Nav ===== */
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  .navbar .logo-text small { display: none; }
  .navbar .logo-img { height: 44px; }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    gap: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }
  .nav-links a { font-size: 16px; padding: 8px 0; }

  /* ===== Hero ===== */
  .hero { min-height: auto; }
  .hero .container { grid-template-columns: 1fr; gap: 24px; padding: 40px 16px; }
  .hero-text h1 { font-size: 26px; }
  .hero-text p { font-size: 14px; margin-bottom: 24px; }
  .hero-buttons { flex-direction: column; gap: 10px; }
  .btn { text-align: center; padding: 14px 20px; font-size: 15px; }
  .hero-images { max-width: 320px; margin: 0 auto; gap: 8px; }

  /* ===== About ===== */
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-imgs img { height: auto !important; }
  .about-text h3 { font-size: 20px; }
  .stats { gap: 8px; }
  .stat-item { padding: 12px 8px; }
  .stat-item .number { font-size: 20px; }

  /* ===== Products ===== */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card img { height: 140px; }
  .product-card .info { padding: 12px 14px 16px; }
  .product-card h3 { font-size: 14px; }
  .product-card p { font-size: 12px; }

  /* ===== Advantages ===== */
  .advantages-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .advantage-card { padding: 20px 16px; }
  .advantage-card .icon { font-size: 24px; }
  .advantage-card h4 { font-size: 14px; }
  .advantage-card p { font-size: 12px; }

  /* ===== Cases ===== */
  .cases-grid { grid-template-columns: 1fr; gap: 16px; }
  .case-card img { height: 200px; }

  /* ===== Gallery ===== */
  #galleryGrid { column-count: 2 !important; column-gap: 8px !important; }
  #galleryGrid img { margin-bottom: 8px !important; }

  /* ===== Contact ===== */
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-item { padding: 10px 12px; }
  .contact-item .text p { font-size: 13px; }
  .contact-form { padding: 20px; }

  /* ===== Footer ===== */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer { padding: 32px 16px 20px; }

  /* ===== Common ===== */
  .section { padding: 40px 16px; }
  .section-title h2 { font-size: 22px; }
  .section-title p { font-size: 13px; }
  .navbar .container { padding: 0 16px; height: 60px; }
  .hero .container { padding: 32px 16px; }
}

/* 手机小屏 */
@media (max-width: 480px) {
  .hero-text h1 { font-size: 22px; }
  .hero-images { max-width: 100%; }

  .products-grid { grid-template-columns: 1fr; gap: 12px; }
  .product-card { display: flex; align-items: flex-start; }
  .product-card img { width: 120px; height: 120px; flex-shrink: 0; }
  .product-card .info { padding: 10px 14px; }

  .advantages-grid { grid-template-columns: 1fr; gap: 10px; }
  .advantage-card { display: flex; gap: 12px; text-align: left; padding: 14px; }
  .advantage-card .icon { margin-bottom: 0; flex-shrink: 0; }

  .stats { grid-template-columns: 1fr; gap: 8px; }

  #galleryGrid { column-count: 2 !important; }
  .section-title h2 { font-size: 20px; }
}
