/* ============================================
   长沙瑞源共创科技有限公司 - 官网样式
   业务方向：工业废气处理设备 / 工业废水处理设备
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #0e8a4a;
  --primary-light: #2ecc71;
  --primary-dark: #065a2e;
  --accent: #17a2b8;
  --accent-light: #5bc0de;
  --text-dark: #1a1a2e;
  --text-body: #4a4a5a;
  --text-light: #7a7a8a;
  --bg-white: #ffffff;
  --bg-light: #f6faf8;
  --bg-section: #f0f7f4;
  --border: #e0ebe6;
  --shadow: 0 4px 24px rgba(14, 138, 74, 0.08);
  --shadow-hover: 0 8px 32px rgba(14, 138, 74, 0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

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

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

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

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

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

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

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

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

.navbar-brand img {
  height: 44px;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-body);
  border-radius: 8px;
  transition: var(--transition);
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--primary);
  background: var(--bg-section);
}

.navbar-menu a.navbar-cta.active {
  color: #fff !important;
  background: var(--primary-dark) !important;
}

.navbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.navbar-cta:hover {
  background: var(--primary-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- 三屏主结构：每段约一屏高 ---------- */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

/* ---------- Hero 区域 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f0f7f4 0%, #e8f5f0 25%, #e8f4f8 55%, #dff0f5 100%);
  overflow: hidden;
  padding-top: 72px;
  padding-bottom: 40px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(46, 204, 113, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 188, 156, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(14, 138, 74, 0.08);
  border: 1px solid rgba(14, 138, 74, 0.15);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '♻️';
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 36px;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 138, 74, 0.25);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-illustration {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.hero-illustration svg {
  width: 100%;
  height: auto;
}

/* 数据统计 */
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(14, 138, 74, 0.1);
}

.stat-item {
  text-align: left;
}

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

.stat-label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ---------- 通用 Section ---------- */
.section {
  padding: 64px 0 72px;
}

.company {
  background: var(--bg-section);
  padding-top: 48px;
  padding-bottom: 56px;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.company-header {
  margin-bottom: 24px;
}

.about-inline {
  max-width: 800px;
  margin: 0 auto 32px;
  text-align: center;
}

.about-inline p {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.75;
  margin: 0 0 20px;
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin: 0;
  padding: 0;
}

.pill-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-dark);
  font-weight: 500;
}

.pill-ico {
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(14, 138, 74, 0.08);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- 业务板块 ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.services-grid--four {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(14, 138, 74, 0.2);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card[data-type] {
  cursor: pointer;
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 12px;
  font-size: 24px;
  margin-bottom: 14px;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--primary);
  transform: scale(1.05);
}

.service-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.service-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.65;
  margin: 0;
}

/* ---------- 联系我们 ---------- */
.contact {
  background: var(--bg-white);
  padding: 56px 0 48px;
  display: flex;
  align-items: center;
  min-height: 88vh;
  box-sizing: border-box;
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  min-width: 0;
}

.contact-info {
  min-width: 0;
}

.contact-info h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.contact-text {
  min-width: 0;
  flex: 1;
}

.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 12px;
  font-size: 22px;
  flex-shrink: 0;
}

.contact-label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

/* 长地址：与电话/邮箱同 16px，自然换行约两行，比例协调 */
.contact-text--addr {
  max-width: 100%;
}

.contact-value--address {
  display: block;
  line-height: 1.65;
  word-break: normal;
  overflow-wrap: break-word;
}

/* 联系区右侧：服务与到访（替代原在线留言） */
.contact-aside {
  background: linear-gradient(145deg, #f0faf5 0%, #e8f8fc 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  box-shadow: var(--shadow);
  min-height: 0;
  align-self: stretch;
}

.contact-aside-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 12px;
  letter-spacing: -0.2px;
}

.contact-aside-lead {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.75;
  margin: 0 0 24px;
}

.contact-aside-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-aside-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px 12px;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
}

.contact-aside-list strong {
  color: var(--text-dark);
  font-weight: 600;
}

.contact-aside-ico {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 138, 74, 0.1);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
}

.contact-aside-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}

.contact-aside-link::after {
  content: "→";
  font-size: 1em;
  transition: var(--transition);
}

.contact-aside-link:hover {
  color: var(--primary-dark);
}

.contact-aside-link:hover::after {
  transform: translateX(3px);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.65);
  padding: 20px 0 24px;
}

.footer--compact {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-compact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-brand-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.footer-logo {
  height: 32px;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin: 8px 0 0;
  order: 3;
  flex-basis: 100%;
}

@media (min-width: 769px) {
  .footer-copy {
    width: auto;
    flex-basis: auto;
    order: 0;
    text-align: right;
    margin: 0;
  }
  .footer-compact-row {
    flex-wrap: nowrap;
  }
}

/* ---------- 图片展示页 ---------- */
.gallery-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: #0a1a12;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-page.active {
  opacity: 1;
  visibility: visible;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.gallery-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  min-width: 80px;
}

.gallery-back:hover { background: rgba(255,255,255,0.18); }

.gallery-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex: 1;
  text-align: center;
  padding: 0 12px;
  min-width: 0;
}

.gallery-header-spacer {
  flex-shrink: 0;
  width: 96px;
}

.gallery-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-grid {
  display: grid;
  gap: 16px;
  width: min(100%, 1000px);
  min-height: 260px;
}

.gallery-grid--four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: min(calc(100vh - 64px - 48px), 900px);
}

.gallery-grid--six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  width: min(100%, 1200px);
  height: min(calc(100vh - 64px - 48px), 920px);
}

@media (max-width: 640px) {
  .gallery-grid--six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    height: auto;
    min-height: min(120vh, 2000px);
    max-height: none;
  }
}

.gallery-img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255,255,255,0.08);
}

.gallery-img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* 大图预览弹窗 */
.gallery-lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 3000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s;
  cursor: zoom-out;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 1;
}

.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ---------- 回到顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 16px rgba(14, 138, 74, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ---------- 动画 ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

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

  .contact-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  }

  .navbar-menu.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .services-grid--four {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 28px;
  }

  .footer-compact-row {
    flex-direction: column;
    text-align: center;
  }

  .footer-brand-inline {
    flex-direction: column;
  }
}
