:root {
  --primary: #002f6c;
  --secondary: #0e4c60;
  --accent: #28a745;
  --bg-light: #f4f6f8;
  --bg-highlight: #e6f0fa;
  --text-dark: #0d263b;
  --text-light: #ffffff;
  --hero-bg: url("img/hero.jpg");
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Poppins", "Roboto", sans-serif;
  background-color: var(--bg-light);
  a {
    text-decoration: none;
    color: inherit;
  }
}

@media (min-width: 1025px) {
  h1 {
    font-size: 3.5rem;
  }
  p {
    font-size: 1.25rem;
  }
}

@media (max-width: 1024px) {
  h1 {
    font-size: 3rem;
  }
  p {
    font-size: 1.15rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
  p {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  p {
    font-size: 1rem;
  }
  .btn {
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .service-content h3 {
    font-size: 1.05rem;
  }
  .service-content p {
    font-size: 0.9rem;
  }
  .contact-content h2 {
    font-size: 2rem;
  }
  .contact-content p {
    font-size: 1rem;
  }
}

/* Header */

header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  padding: 2rem 2rem;
  background: var(--text-light);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 10px 10px;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  max-width: 100%;
  height: 50px;
}
header .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: max-height 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}
.nav-links a {
  color: var(--primary);
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}
.hamburger {
  display: none;
  font-size: 1.8rem;
  color: var(--primary);
  cursor: pointer;
}
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-radius: 0 0 10px 10px;
    padding: 1rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a {
    padding: 1rem;
  }
  .hamburger {
    display: block;
  }
}

/* Hero */
.hero {
  position: relative;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: 5vh;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom right,
    rgba(0, 47, 108, 0.85),
    rgba(255, 255, 255, 0)
  );
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
  color: var(--text-light);
  padding: 2rem;
  max-width: 700px;
  margin-left: 5%;
  animation: fadeInUp 1.2s ease-out;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  letter-spacing: 1.2px;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--text-light), #cfdff9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.25rem;
  margin: 0.75rem 0;
  line-height: 1.7;
  opacity: 0.95;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--text-light);
}
.btn-primary:hover {
  background-color: #218838; /* 略深 hover */
}

.btn-outline {
  border: 2px solid var(--text-light);
  color: var(--text-light);
  background-color: transparent;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  background-color: var(--text-light);
  color: var(--primary);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  .hero-content p {
    font-size: 1.15rem;
  }
}

@media (max-width: 768px) {
  .hero {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 3vh;
  }
  .hero-content {
    margin-left: 0;
    padding: 3rem 1.5rem;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-content p {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .btn {
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
  }
}
/* About Tabs Section */
.about-section {
  display: flex;

  flex-wrap: wrap;
  padding: 4rem 2rem;
  /* background: var(--bg-light); */

  margin: 0 auto;
}
.tabs {
  flex: 1 1 200px;
  max-width: 220px;
  margin-right: 2rem;
}
.tab-btn {
  background: var(--primary);
  color: var(--white);
  padding: 1rem;
  margin-bottom: 4px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
}
.tab-btn.active {
  background: var(--secondary);
}
.tab-contents {
  flex: 3 1 400px;
}
.tab-content {
  display: none;
  margin-bottom: 2rem;
}
.tab-content.active {
  display: block;
}
.tab-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.tab-content p {
  margin-bottom: 1rem;
}
/* about card */
.about-section-carousel {
  max-width: 1440px;
  margin: 2rem auto;

  padding: 6rem 1rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.carousel-stack {
  position: relative;
  width: 100%;
  max-width: 1080px;
}

.stack-wrapper {
  position: relative;
  height: 400px;
  perspective: 1500px;
  overflow: visible;
}

.stack-track {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.card {
  position: absolute;
  width: 60%;
  height: 100%;
  transition: transform 0.6s ease, opacity 0.6s ease, box-shadow 0.4s ease;
  background: var(--text-light);
  border-radius: 20px;
  opacity: 0;
  transform: scale(0.85) translateX(100%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.card-inner {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--text-light);
  box-shadow: var(--shadow-light);
}
.card-header {
  width: 50%;
  height: 100%;
}
.card-header img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  flex: 1;
  padding: 2rem;
  background-color: #f9faff;
  text-align: left;
}

.card-body h3 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
  color: var(--primary);
  font-weight: 700;
}

.card-body p {
  font-size: 1rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.card-footer {
  padding: 1rem 2rem;
  background: var(--bg-highlight);
  text-align: right;
}

.card-footer .btn {
  font-size: 0.9rem;
}

.card {
  position: absolute;
  width: 60%;
  height: 100%;
  transition: transform 0.6s ease, opacity 0.6s ease, box-shadow 0.4s ease;
  background: white;
  border-radius: 20px;
  opacity: 0;
  transform: scale(0.85) translateX(100%);
  z-index: 1;
  display: flex;
  align-items: center;
}

.card-inner {
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #eee;
}

.card img {
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  transition: transform 0.3s ease;
}

.card.active {
  opacity: 1;
  transform: scale(1.05) translateX(0);
  z-index: 3;
  box-shadow: 0 25px 60px rgba(0, 47, 108, 0.25);
}

.card.prev-card {
  opacity: 0.4;
  transform: scale(0.9) translateX(-90%) rotateY(10deg);
  z-index: 2;
}

.card.next-card {
  opacity: 0.4;
  transform: scale(0.9) translateX(90%) rotateY(-10deg);
  z-index: 2;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #0e3a70;
  color: white;
  border: none;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease;
}

.carousel-btn:hover {
  background: #002f6c;
}

.carousel-btn.prev {
  left: -24px;
}

.carousel-btn.next {
  right: -24px;
}

.card-body.top-align {
  justify-content: flex-start !important;
  padding-top: 2.5rem;
}

.card:hover {
  background-color: var(--bg-highlight);
}

@media (max-width: 768px) {
  .card-header {
    display: none;
  }
  .card-body {
    width: 100%;
  }
  .card {
    width: 80%;
  }
}
/* Services */
.services {
  max-width: 1440px;
  margin: 2rem auto;
  padding: 4rem 2rem;
  background: var(--bg-light);
  color: var(--text-light);
}
.services h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 3px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 0 2rem;
}
.service-item {
  display: flex;
  align-items: flex-start;
}

.icon-wrapper {
  margin-top: 2rem;
  flex-shrink: 0;
  width: 75px;
  height: 75px;
  background: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  transition: background 0.3s, border 0.3s;
}
.icon-wrapper i {
  color: var(--primary);
  font-size: 2.5rem;
}
.icon-wrapper:hover {
  background: var(--primary);
  border: 2px solid var(--secondary);
}
.icon-wrapper:hover i {
  color: var(--text-light);
}

.service-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.service-content p {
  font-size: 0.95rem;
  color: var(--text-dark);
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact */
.contact {
  position: relative;
  padding: 6rem 2rem;
  background-image: url("img/contact-bg.jpg");
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--text-dark);
  z-index: 1;
}
.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.55); /* 可调透明度 */
  z-index: 0;
}
.contact-overlay {
  display: none;
}
.contact-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  z-index: 1;
}
.contact-content h2 {
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  color: var(--primary);
}
.contact-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.contact-email {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
}
@media (max-width: 768px) {
  .contact {
    background-attachment: scroll;
  }
}
/* Footer */
.footer {
  background: var(--text-light);
  color: var(--text-dark);
  padding: 2rem 2rem;
  padding-bottom: 0.5rem;
  text-align: left;
  position: relative;
  z-index: 1;
}

.footer-container {
  width: 100%;
  max-width: 800px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0 1rem;
  box-sizing: border-box;
}

.footer-logo {
  height: 40px;
  object-fit: contain;
}

.footer-description {
  color: var(--text-dark);
  font-size: 1rem;
  max-width: 600px;
  line-height: 1.6;
}

.footer-contact {
  font-size: 1rem;
  color: var(--text-dark);
  word-break: break-word;
}

.footer-contact a {
  color: var(--text-dark);
  text-decoration: underline;
}

.footer-contact a:hover {
  opacity: 0.7;
}

.footer-bottom {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
}

@media (max-width: 480px) {
  .footer-description,
  .footer-contact,
  .footer-bottom {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }

  .footer-contact a {
    font-size: 0.95rem;
  }
}
