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

html,
body {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  scroll-behavior: smooth;
}

/* CSS variables for light and dark mode */
:root {
  --primary: #005bab;
  --primary-light: #2d8ef3;
  --secondary: #0c9;
  --accent: #ffc107;
  --bg-color: #ffffff;
  --text-color: #222222;
  --muted-text: #555555;
  --card-bg: #f7f9fc;
  --border-color: #e5e7eb;
}

body.dark {
  --bg-color: #121212;
  --text-color: #f4f4f4;
  --muted-text: #cccccc;
  --card-bg: #1f1f1f;
  --border-color: #333333;
}

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

/* Header */
.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

/* Hamburger and mode toggle buttons */
/* Navigation toggle for mobile (hidden by default) */
.nav-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.25rem;
  cursor: pointer;
  margin-left: 1rem;
  display: none;
}

/* Dark mode toggle is visible on all screen sizes */
.mode-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.25rem;
  cursor: pointer;
  margin-left: 1rem;
  display: inline-block;
  /* Increase hit area for better clickability */
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

/* Hero */
/* Hero section
   Use a background image directly on the hero container instead of relying on
   absolutely positioned img elements. The gradient overlay darkens the image
   so that white hero text remains visible. */
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  /* Darken the background image with a gradient overlay */
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('../images/hero.png') no-repeat center/cover;
}

/* Remove unused hero-bg and hero-overlay classes since the background is now set on .hero */

.hero-content {
  text-align: center;
  max-width: 800px;
  z-index: 1;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  /* Place the typed headline on a semi-transparent background so it is readable
     on top of the busy hero image */
  background-color: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero-buttons .btn {
  margin: 0 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Mission & Vision grid */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.mission-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.mission-item p {
  color: var(--muted-text);
  font-size: 0.95rem;
}

/* Timeline */
.timeline-wrapper {
  position: relative;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 3px solid var(--primary);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 0;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
}

.timeline-content {
  padding-left: 1rem;
}

.timeline-date {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.3rem;
  display: inline-block;
}

.timeline-content h4 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.2rem;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--muted-text);
  line-height: 1.6;
}

/* Section general */
.section-padding {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.section-title::after {
  content: '';
  width: 60px;
  height: 3px;
  background: var(--primary);
  display: block;
  margin: 0.5rem auto 0;
}

/* Advantages cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.adv-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.adv-card i {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.adv-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.adv-card p {
  font-size: 0.95rem;
  color: var(--muted-text);
}

.adv-card:hover {
  transform: translateY(-6px);
}

/* Animation states for reveal */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Solutions preview */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.solution-item {
  background: var(--card-bg);
  padding: 2rem;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  position: relative;
  transition: box-shadow 0.3s ease;
}

.solution-item i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.solution-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.solution-item p {
  font-size: 0.95rem;
  color: var(--muted-text);
  min-height: 55px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  color: var(--primary);
  margin-top: 0.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.link-arrow i {
  margin-left: 0.3rem;
}

.solution-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Core value */
.core-value-text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--muted-text);
}

/* ROI calculator */
.roi-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.roi-form .form-group {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
}

.roi-form label {
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.roi-form input {
  padding: 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--text-color);
}

.roi-result {
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  margin-top: 1rem;
  color: var(--primary);
}

.roi-result.hidden {
  display: none;
}

/* CTA section */
.cta {
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  color: #fff;
  text-align: center;
  padding: 4rem 0;
}

.cta-container h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-container p {
  margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
  background: var(--card-bg);
  color: var(--muted-text);
  padding: 2rem 0;
  font-size: 0.9rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-col {
  flex: 1 1 200px;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--text-color);
}

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

.footer-col ul li a {
  color: var(--muted-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

/* Project flow steps */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.flow-step {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  flex: 1 1 180px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.flow-step:hover {
  transform: translateY(-5px);
}

.flow-step .flow-icon {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  margin-bottom: 0.6rem;
  font-size: 1.5rem;
}

.flow-step h4 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.flow-step p {
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Responsive styles */
@media (max-width: 768px) {
  .main-nav ul {
    position: fixed;
    top: 60px;
    right: 0;
    background: var(--bg-color);
    flex-direction: column;
    width: 200px;
    height: calc(100% - 60px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 1rem;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.05);
  }

  .main-nav.open ul {
    transform: translateX(0);
  }

  /* Show the hamburger menu on small screens */
  .nav-toggle {
    display: block;
  }

  .main-nav ul li {
    margin-bottom: 1rem;
  }

  .hero {
    height: 70vh;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
}