@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #0b4f9c;
  --dark-blue: #004B76;
  --navy: #071d36;
  --light-blue: #eef6ff;
  --text: #25364a;
  --muted: #64748b;
  --white: #ffffff;
  --border: #dce7f2;
}

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

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  /* 關鍵：強制禁止全站出現橫向滾動條 */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--dark-blue);
}

.logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 28px;
  font-size: .92rem;
  font-weight: 600;
}

nav a:hover {
  color: var(--blue);
}

.hero {
  min-height: 680px;
  position: relative;
  display: flex;
  align-items: center;
  background:
    linear-gradient(110deg, rgba(3, 30, 62, .94), rgba(7, 62, 118, .78)),
    url("images/hero.jpeg") center/cover;
  color: white;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 90px 0;
}

.eyebrow,
.section-label {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  color: #5d9ce3;
  margin-bottom: 12px;
}

.eyebrow {
  color: #9bc8f6;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.7rem);
  line-height: 1.08;
  letter-spacing: -.045em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.035em;
  color: var(--navy);
  margin-bottom: 18px;
}

h3 {
  color: var(--navy);
  margin-bottom: 10px;
}

.hero-text {
  max-width: 650px;
  font-size: 1.12rem;
  color: #e1edf9;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ==================== 統一按鈕基礎與過渡動畫 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  /* 允許在手機窄螢幕上自動換行，不會被切字 */
  text-align: center;
  word-break: break-word;
  /* 長字自動斷行保護 */
  padding: 12px 20px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 實心藍按鈕（服務報價 / Contact） */
.btn-primary {
  background: var(--blue);
  color: white;
  border: 2px solid var(--blue);
}

.btn-primary:hover {
  background: #083e7b;
  border-color: #083e7b;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 79, 156, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(11, 79, 156, 0.2);
}

/* 外框藍按鈕（招聘 Hire / 電話聯絡） */
.btn-outline-blue {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: white;
  font-weight: 600;
}

.btn-outline-blue:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 79, 156, 0.25);
}

.btn-outline-blue:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(11, 79, 156, 0.2);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, .65);
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-white {
  background: white;
  color: var(--dark-blue);
}

.btn-white:hover {
  background: #eaf3fc;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.full-width {
  width: 100%;
}

/* ==================== 區塊結構 ==================== */
.section {
  padding: 100px 0;
}

.section-light {
  background: var(--light-blue);
}

.section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 45px;
}

.section-heading>p:last-child {
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.two-column>div>p:not(.section-label) {
  color: var(--muted);
  margin-bottom: 18px;
  text-align: justify;
}

.image-card {
  min-height: 420px;
  overflow: hidden;
  border-radius: 10px;
  background: #dbeafa;
}

.image-card img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.service-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(14, 66, 115, .12);
}

.service-image {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.service-content {
  padding: 30px;
  text-align: justify;
}

.service-number {
  display: block;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 14px;
}

.service-content h3 {
  font-size: 1.45rem;
  margin-bottom: 16px;
}

.service-content p {
  color: var(--muted);
  font-size: .94rem;
  margin-bottom: 16px;
}

.service-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--dark-blue);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: underline;
}

/* ==================== 焦點輪播相冊樣式 ==================== */
.carousel-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.carousel-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 30px 0;
}

.carousel-track {
  display: flex;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 340px;
  height: 300px;
  margin: 0 12px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.35;
  filter: grayscale(60%) brightness(0.85);
  transform: scale(0.85);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide.active {
  opacity: 1;
  filter: grayscale(0%) brightness(1);
  transform: scale(1.08);
  box-shadow: 0 15px 35px rgba(0, 75, 118, 0.25);
  z-index: 2;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(7, 29, 54, 0.85);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
  background: var(--dark-blue);
  transform: translateY(-50%) scale(1.1);
  border-color: white;
}

.prev-btn {
  left: -15px;
}

.next-btn {
  right: -15px;
}

/* ==================== CTA 與 Contact 區塊 ==================== */
.cta {
  background: var(--blue);
  color: white;
  padding: 70px 0;
}

.cta h2 {
  color: white;
}

.cta p:not(.section-label) {
  color: #d9eafb;
}

.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.light {
  color: #a9d2fa;
}

.contact-grid {
  align-items: start;
}

.contact-list {
  margin-top: 32px;
  display: grid;
  gap: 18px;
}

.contact-item {
  display: grid;
  gap: 3px;
}

.contact-item strong {
  color: var(--navy);
}

.contact-item a {
  color: var(--blue);
  font-weight: 600;
}

.contact-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 35px;
  background: #f8fbff;
}

.contact-box p {
  color: var(--muted);
  margin-bottom: 25px;
}

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

/* ==================== Footer 頁尾 ==================== */
footer {
  background: var(--navy);
  color: white;
  padding: 35px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  color: #aabbd0;
  font-size: .88rem;
  margin-top: 5px;
}

/* ==================== 響應式適應 (RWD) ==================== */
@media (max-width: 850px) {
  .nav-wrap {
    flex-direction: column;
    padding: 18px 0;
  }

  nav {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    min-height: 620px;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* 防止輪播按鈕超出螢幕邊界 */
  .prev-btn {
    left: 5px;
  }

  .next-btn {
    right: 5px;
  }
}

@media (max-width: 600px) {
  .carousel-slide {
    flex: 0 0 260px;
    height: 220px;
  }

  .prev-btn {
    left: 2px;
  }

  .next-btn {
    right: 2px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  /* 手機版縮減卡片內邊距，留出更多文字空間 */
  .contact-box {
    padding: 22px 18px;
  }

  /* 確保地址與按鈕文字在手機上能正常折行 */
  .contact-item span,
  .contact-box p {
    word-break: break-word;
  }

  /* 保持按鈕文字大小適中 */
  .full-width {
    font-size: 0.92rem;
    padding: 12px 16px;
  }

  /* 防止公司名稱在小手機上撐爆頁面寬度 */
  .logo {
    font-size: 1rem;
    text-align: center;
  }

  .logo img {
    width: 38px;
    height: 38px;
  }

  .section {
    padding: 70px 0;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 70px 0;
  }

  h1 {
    font-size: 2.2rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}