/* ===== Services Section ===== */
.hero {
  text-align: center;
  padding: 0;
}

.hero-background {
  background: url("images/shipservice.jpg") no-repeat center center;
  background-size: cover;
  padding: 100px 20px 160px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content {
  background: rgba(255, 255, 255, 0.85);
  padding: 40px;
  border-radius: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #002147;
}

.hero-subtext {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 40px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.divider {
  border: none;
  height: 4px;
  background: orange;
  width: 100%;
  margin: 0;
}

/* Service list container */
.services-extended {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1200px;
  margin: 60px auto;
}

/* Each service item */
.service-item {
  display: flex;
  align-items: flex-start; /* 改成靠上对齐 */
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.service-item:hover {
  transform: translateY(-5px);
}

/* Service image container */
.service-img {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.service-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* More Picture 按钮 */
.more-btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: #fff;
  background-color: #0077cc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.more-btn:hover {
  background-color: #005fa3;
}

/* Service text */
.service-text {
  flex: 2;
  padding: 20px 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0; /* ✅ Flexbox 下必须有，防止文字被省略 */
}

.service-text h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #003366;
}

.service-text p {
  font-size: 1rem;
  color: #000;
  line-height: 1.6;
}

/* ✅ 防止文字被截断显示省略号 */
.service-text p,
.service-text ul li {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* Responsive layout */
@media (max-width: 768px) {
  .service-item {
    flex-direction: column;
    text-align: center;
  }

  .service-text {
    padding: 20px;
    text-align: center;
  }

  .service-img {
    max-width: 100%;
  }
}

/* ===== Why Choose Us Section ===== */
.why-choose {
  max-width: 1000px;
  margin: 60px auto;
  padding: 40px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}

.why-choose h2 {
  font-size: 2rem;
  margin-bottom: 25px;
  color: #002147;
}

/* 打勾列表样式 */
.why-choose ul.choose-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 600px;
  text-align: left;
}

.why-choose ul.choose-list li {
  position: relative;
  padding-left: 35px; /* 给图标留空间 */
  margin-bottom: 12px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

.why-choose ul.choose-list li::before {
  content: "✅";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 18px;
  line-height: 1.6;
}

/* 响应式：移动端字体稍小 */
@media (max-width: 768px) {
  .why-choose ul.choose-list li {
    font-size: 1rem;
    padding-left: 30px;
  }

  .why-choose ul.choose-list li::before {
    font-size: 16px;
  }
}

/* ================== 动画效果 ================== */
.hero-content,
.service-item,
.why-choose {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.hero-content.show,
.service-item.show,
.why-choose.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== SERVICES PAGE HERO / WELCOME ===================== */
body.services .hero {
  position: relative;
  text-align: center;
  color: white;
  overflow: hidden;
  padding: 120px 20px; /* 比 Home Page 略小 */
}

body.services .hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.6),
      rgba(0, 0, 0, 0.6)
    ),
    url("images/tsw.jpg"); /* Services 背景图 */
  background-size: 80%;     /* 调小背景图 */
  background-repeat: no-repeat;
  background-position: center top; /* 让图靠上 */
  animation: zoomLoop 10s ease-in-out infinite;
  transform-origin: center;
  z-index: 0;
}

body.services .hero h1,
body.services .hero p {
  position: relative;
  z-index: 1;
}

body.services .hero h1 {
  font-size: 48px;  /* Home page 适中大小 */
}

body.services .hero p {
  font-size: 20px;
  margin-top: 10px;
}

/* 背景动画 */
@keyframes zoomLoop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); } /* 缩小幅度 */
  100% { transform: scale(1); }
}

/* ===================== SERVICES PAGE CAROUSEL ===================== */
.services-carousel {
  overflow: hidden;
  width: 95%;
  margin: 60px auto;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.8s ease-in-out;
}

.service-card {
  background: #e0e0e0;
  border-radius: 10px;
  text-align: center;          /* 内容居中 */
  flex: 0 0 calc(33.33% - 30px);
  min-height: 500px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;         /* 图片居中 */
  font-size: 16px;
  box-sizing: border-box;
  margin: 0 15px;
  padding: 15px;
  position: relative;
}

.service-card img.service-img {
  width: 80%;                  /* 控制图片大小 */
  height: 200px;               /* 固定高度 */
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  margin-bottom: 15px;
  display: block;
}

.service-card h2 {
  font-size: 20px;
  margin: 10px 0 5px 0;
  color: #003366;
}

.service-card h3 {
  font-size: 16px;
  margin: 0 0 10px 0;
  color: #333;
}

.service-card ul {
  margin: 8px 0 0 0;
  padding: 0;
  list-style: none;
}

.service-card ul li {
  margin-bottom: 6px;
}

.learn-more-btn {
  margin-top: auto;             /* 始终在底部 */
  background: #003366;
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.3s ease;
  align-self: center;           /* 水平居中 */
}

.learn-more-btn:hover {
  background: #0055aa;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex; 
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-btn:hover {
  background: rgba(0,0,0,0.8);
}

/* ===================== 响应式 ===================== */
@media (max-width: 1024px) {
  .service-card {
    flex: 0 0 50%;    /* 两列布局 */
  }
  body.services .hero {
    padding: 100px 20px;
  }
  body.services .hero h1 {
    font-size: 40px;
  }
  body.services .hero p {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .service-card {
    flex: 0 0 100%;    /* 单列布局 */
    min-height: auto;
    padding: 15px;
  }

  .service-card img.service-img {
    width: 100%;
    height: auto;
  }

  .learn-more-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  body.services .hero {
    padding: 80px 15px;
  }
  body.services .hero h1 {
    font-size: 32px;
  }
  body.services .hero p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .service-card img.service-img {
    height: 150px;
  }

  body.services .hero {
    padding: 60px 10px;
  }
  body.services .hero h1 {
    font-size: 28px;
  }
  body.services .hero p {
    font-size: 14px;
  }
}
