/* ==================== CSS Variables ==================== */
:root {
  --color-primary: #0F3460;
  --color-secondary: #1A75FF;
  --color-accent: #36E4DA;
  --color-bg-dark: #0A1929;
  --color-bg-darker: #061220;
  --color-bg-card: #0d1f3c;
  --color-text-light: #FFFFFF;
  --color-text-gray: #B0BEC5;
  --color-text-dim: #7A8FA3;
  --font-heading: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 40px rgba(26, 117, 255, 0.2);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --section-padding: 100px 0;
  --container-max: 1200px;
}

/* ==================== Global Reset & Base ==================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ==================== Section Common ==================== */
.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(54, 228, 218, 0.1);
  border: 1px solid rgba(54, 228, 218, 0.3);
  border-radius: 20px;
  padding: 4px 16px;
  margin-bottom: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--color-text-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== Fade-in Animations ==================== */
.fade-in, .fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible, .fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* ==================== 1. Navigation ==================== */
.navbar-section {
  background: transparent;
  padding: 16px 0;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
  z-index: 1050;
}

.navbar-section.scrolled {
  background: rgba(10, 25, 41, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  padding: 10px 0;
}

.navbar-section .navbar {
  padding: 0;
}

/* Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-light) !important;
}

.brand-logo {
  height: 36px;
  width: auto;
}

.brand-text {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav links */
.navbar-nav .nav-link {
  color: var(--color-text-gray) !important;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 16px !important;
  position: relative;
  transition: var(--transition-smooth);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--color-text-light) !important;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

/* 在线咨询按钮 */
.btn-accent {
  background: var(--color-accent);
  color: var(--color-bg-dark) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 24px;
  border-radius: 25px;
  border: none;
  transition: var(--transition-smooth);
}

.btn-accent:hover {
  background: #2dd4c8;
  color: var(--color-bg-darker) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(54, 228, 218, 0.4);
}

/* Toggler */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.1) !important;
  padding: 6px 10px;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ==================== 2. Hero Section ==================== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(6, 18, 32, 0.7) 0%, 
    rgba(15, 52, 96, 0.6) 50%, 
    rgba(10, 25, 41, 0.9) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-gray);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary-custom {
  background: var(--color-secondary);
  color: var(--color-text-light);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 30px;
  border: 2px solid var(--color-secondary);
  transition: var(--transition-smooth);
}

.btn-primary-custom:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg-dark);
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(26, 117, 255, 0.3);
}

.btn-outline-custom {
  background: transparent;
  color: var(--color-text-light);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition-smooth);
}

.btn-outline-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: scale(1.03);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-gray);
  font-size: 0.8rem;
  animation: scrollBounce 2s infinite;
}

.scroll-arrow {
  font-size: 1.2rem;
  color: var(--color-secondary);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ==================== 3. About Section ==================== */
.about-section {
  padding: var(--section-padding);
  background: var(--color-bg-darker);
  position: relative;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(26, 117, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.about-text {
  padding-right: 40px;
}

.about-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 20px;
}

.about-desc {
  font-size: 1.05rem;
  color: var(--color-text-gray);
  margin-bottom: 32px;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1;
}

.stat-suffix {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-gray);
  margin-top: 8px;
}

/* About Image */
.about-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.about-image img {
  border-radius: 12px;
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about-image-decoration {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-secondary);
  border-radius: 12px;
  z-index: -1;
  opacity: 0.3;
}

/* ==================== 4. Services Section ==================== */
.services-section {
  padding: var(--section-padding);
  background: var(--color-bg-dark);
  position: relative;
}

.services-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(26, 117, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.services-section .section-header {
  margin-bottom: 60px;
}

/* Service Card */
.service-card {
  background: var(--color-bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(26, 117, 255, 0.2);
}

.service-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.service-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--color-bg-card));
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-body {
  padding: 24px;
}

.service-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text-light);
}

.service-body p {
  font-size: 0.95rem;
  color: var(--color-text-gray);
  margin-bottom: 16px;
  line-height: 1.7;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-features li {
  font-size: 0.9rem;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-features li i {
  color: var(--color-accent);
  font-size: 0.8rem;
}

/* Tech Stack */
.tech-stack {
  margin-top: 80px;
  text-align: center;
}

.tech-stack-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-gray);
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.tech-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
  cursor: default;
  min-width: 80px;
}

.tech-item:hover {
  background: rgba(26, 117, 255, 0.1);
  border-color: rgba(26, 117, 255, 0.3);
  transform: translateY(-4px);
}

.tech-item i {
  font-size: 1.8rem;
  color: var(--color-secondary);
}

.tech-item span {
  font-size: 0.8rem;
  color: var(--color-text-gray);
  font-weight: 500;
}

/* ==================== 5. Cases Section ==================== */
.cases-section {
  padding: var(--section-padding);
  background: var(--color-bg-darker);
  position: relative;
  overflow: hidden;
}

.cases-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/case-bg.jpg') center/cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
}

.cases-section .section-header {
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

/* Cases Carousel */
.cases-carousel {
  position: relative;
  overflow: hidden;
  padding: 0 10px;
}

.cases-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 10px 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cases-track::-webkit-scrollbar {
  display: none;
}

/* Case Card */
.case-card {
  min-width: 350px;
  max-width: 350px;
  background: var(--color-bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(26, 117, 255, 0.2);
}

.case-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.case-card:hover .case-image img {
  transform: scale(1.05);
}

.case-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-secondary);
  color: var(--color-text-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.case-info {
  padding: 24px;
}

.case-info h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text-light);
}

.case-info p {
  font-size: 0.9rem;
  color: var(--color-text-gray);
  margin-bottom: 16px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.case-link:hover {
  color: var(--color-accent);
  gap: 10px;
}

/* Carousel Navigation */
.cases-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: var(--color-text-light);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.cases-nav:hover {
  background: var(--color-accent);
  color: var(--color-bg-dark);
}

.cases-nav-prev {
  left: -10px;
}

.cases-nav-next {
  right: -10px;
}

/* ==================== 6. Contact Section ==================== */
.contact-section {
  padding: var(--section-padding);
  background: var(--color-bg-dark);
}

/* Contact Image */
.contact-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.contact-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 16px;
}

.contact-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(6, 18, 32, 0.9));
  border-radius: 0 0 16px 16px;
}

.contact-image-overlay h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-image-overlay p {
  color: var(--color-text-gray);
  font-size: 1rem;
}

/* Contact Form */
.contact-form-wrap {
  background: var(--color-bg-card);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-desc {
  font-size: 1rem;
  color: var(--color-text-gray);
  margin-bottom: 32px;
}

.contact-form .form-group {
  margin-bottom: 24px;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.required {
  color: #ff4757;
}

.contact-form .form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--color-text-light);
  padding: 12px 16px;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.contact-form .form-control::placeholder {
  color: var(--color-text-dim);
}

.contact-form .form-control:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(26, 117, 255, 0.15);
  outline: none;
}

.contact-form textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.error-msg {
  font-size: 0.8rem;
  color: #ff4757;
  margin-top: 6px;
  min-height: 20px;
}

.btn-submit {
  width: 100%;
  background: var(--color-accent);
  color: var(--color-bg-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 10px;
  border: none;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-submit:hover {
  background: #2dd4c8;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(54, 228, 218, 0.3);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Submit Success */
.submit-success {
  text-align: center;
  padding: 30px;
}

.submit-success i {
  font-size: 3rem;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.submit-success p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  font-weight: 600;
}

/* ==================== Footer ==================== */
.footer-section {
  padding: 40px 0;
  background: var(--color-bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}


.footer-copy {
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

/* ==================== Back to Top ==================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: var(--color-text-light);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(26, 117, 255, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-accent);
  color: var(--color-bg-dark);
  transform: translateY(-4px);
}

/* ==================== Responsive Design ==================== */

/* Tablet */
@media (max-width: 991.98px) {
  :root {
    --section-padding: 80px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .about-text {
    padding-right: 0;
  }

  .about-image img {
    height: 300px;
  }

  .about-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .contact-image img {
    height: 350px;
  }

  .contact-form-wrap {
    padding: 30px;
  }

  /* Navbar collapse */
  .navbar-collapse {
    background: rgba(10, 25, 41, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
  }

  .btn-accent {
    margin-top: 16px;
    display: inline-block;
    text-align: center;
  }

  .cases-nav {
    display: none;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  :root {
    --section-padding: 60px 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-desc {
    font-size: 1rem;
  }

  .hero-section {
    min-height: 600px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .btn-primary-custom,
  .btn-outline-custom {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .scroll-indicator {
    bottom: 20px;
  }

  .about-stats {
    justify-content: space-between;
  }

  .stat-item {
    flex: 1;
    text-align: center;
    align-items: center;
  }

  .tech-icons {
    gap: 16px;
  }

  .tech-item {
    padding: 12px 16px;
    min-width: 70px;
  }

  .case-card {
    min-width: 280px;
    max-width: 280px;
  }

  .contact-image img {
    height: 250px;
  }

  .contact-form-wrap {
    padding: 24px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* Small Mobile */
@media (max-width: 575.98px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .about-stats {
    flex-direction: column;
    gap: 16px;
  }

  .stat-item {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .stat-label {
    margin-top: 0;
  }

  .case-card {
    min-width: 260px;
    max-width: 260px;
  }
}
