/* ==========================================
   长沙树语科技有限公司 - 官网样式表
   ========================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --primary: #2b8a3e;
  --primary-dark: #1a6b2e;
  --primary-light: #ebfbee;
  --dark: #212529;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #adb5bd;
  --gray-600: #868e96;
  --gray-700: #495057;
  --white: #ffffff;
  --font-family: 'Noto Sans SC', -apple-system, 'Microsoft YaHei', sans-serif;
  --max-width: 1200px;
  --header-height: 64px;
  --tag-industry-bg: #e7f5ff;
  --tag-industry-text: #1971c2;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

.logo img {
  height: 40px;
  width: auto;
  border-radius: 50%;
}

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

.nav-menu a {
  font-size: 14px;
  color: var(--gray-700);
  transition: color 0.2s;
  position: relative;
}

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

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: 0.3s;
  display: block;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: 100px 0 50px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.page-hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-hero p {
  font-size: 15px;
  opacity: 0.9;
}

/* --- Section --- */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 36px;
  color: var(--dark);
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-gray {
  background: var(--gray-100);
}

/* --- Hero Banner (homepage) --- */
.hero-banner {
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 100px 20px 60px;
}

.hero-banner h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-banner p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.card .icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
}

/* --- Service Cards (services page) --- */
.service-block {
  margin-bottom: 48px;
}

.service-block:last-child {
  margin-bottom: 0;
}

.service-block h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-item {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 20px 16px;
  text-align: center;
  transition: background 0.2s;
}

.service-item:hover {
  background: var(--primary-light);
}

.service-item h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.service-item p {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
}

/* --- About Section --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 15px;
  color: var(--gray-700);
}

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

.culture-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
}

.culture-card .icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.culture-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* --- News List --- */
.news-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
}

.news-item:first-child {
  padding-top: 0;
}

.news-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  width: fit-content;
}

.news-tag.company {
  background: var(--primary);
  color: var(--white);
}

.news-tag.industry {
  background: var(--tag-industry-bg);
  color: var(--tag-industry-text);
}

.news-item h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.news-item .date {
  font-size: 12px;
  color: var(--gray-500);
}

.news-more {
  text-align: center;
  margin-top: 32px;
}

.news-more button {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  padding: 10px 32px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.news-more button:hover {
  background: var(--gray-200);
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

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

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

.contact-item .icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-family);
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

.contact-form .submit-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: fit-content;
}

.contact-form .submit-btn:hover {
  background: var(--primary-dark);
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: var(--gray-500);
  padding: 40px 0 24px;
  text-align: center;
  font-size: 13px;
  line-height: 2;
}

.footer .company-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-100);
  margin-bottom: 8px;
}

.footer .beian a {
  color: var(--gray-500);
}

.footer .beian a:hover {
  color: var(--white);
}

/* --- Responsive (mobile first) --- */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  }

  .nav-menu.open {
    max-height: 300px;
  }

  .nav-menu a {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
  }

  .nav-menu a.active::after {
    display: none;
  }

  .nav-menu a.active {
    color: var(--primary);
    background: var(--primary-light);
  }

  .nav-toggle {
    display: flex;
  }

  .hero-banner h1 { font-size: 28px; }
  .hero-banner p { font-size: 15px; }

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

  .section { padding: 40px 0; }
  .section-title { font-size: 20px; margin-bottom: 28px; }
  .page-hero h1 { font-size: 22px; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .hero-banner h1 { font-size: 24px; }
  .hero-banner { min-height: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
  }
}
