/* ==========================================
   巡安車務 - 主樣式表
   Mobile First Design
   ========================================== */

/* ---- CSS Variables ---- */
:root {
  --primary: #0A2647;
  --primary-light: #144272;
  --accent: #F97316;
  --accent-dark: #EA580C;
  --line-green: #06C755;
  --line-green-dark: #05A847;
  --white: #FFFFFF;
  --light-bg: #F5F7FA;
  --text-dark: #1a1a2e;
  --text-mid: #4a5568;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --font: 'Noto Sans TC', sans-serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 38, 71, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 480px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav-logo i { color: var(--accent); font-size: 1.3rem; }

.nav-contact-btn {
  background: var(--line-green);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  transition: background 0.2s, transform 0.2s;
}

.nav-contact-btn:hover { background: var(--line-green-dark); transform: scale(1.04); }

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(145deg, #061829 0%, #0A2647 40%, #144272 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 80px;
  overflow: hidden;
}

/* ── Canvas 粒子層 ── */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── 光暈球 ── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-orb-1 {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -80px;
  background: radial-gradient(circle, rgba(249,115,22,0.18) 0%, transparent 70%);
  animation: orbFloat1 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 260px;
  height: 260px;
  bottom: 60px;
  left: -60px;
  background: radial-gradient(circle, rgba(20,66,114,0.6) 0%, rgba(6,199,85,0.08) 60%, transparent 100%);
  animation: orbFloat2 10s ease-in-out infinite;
}

.hero-orb-3 {
  width: 180px;
  height: 180px;
  top: 45%;
  right: 10%;
  background: radial-gradient(circle, rgba(249,115,22,0.1) 0%, transparent 70%);
  animation: orbFloat3 6s ease-in-out infinite;
}

/* ── 道路速度線 ── */
.hero-road-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.road-line {
  position: absolute;
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(249,115,22,0.5), transparent);
  border-radius: 2px;
  animation: roadSpeed 2.4s linear infinite;
}

.road-line:nth-child(1) { left: 15%;  animation-delay: 0s;    animation-duration: 2.2s; height: 80px; }
.road-line:nth-child(2) { left: 35%;  animation-delay: 0.6s;  animation-duration: 2.8s; height: 50px; }
.road-line:nth-child(3) { left: 55%;  animation-delay: 1.1s;  animation-duration: 2.0s; height: 90px; }
.road-line:nth-child(4) { left: 72%;  animation-delay: 0.3s;  animation-duration: 3.0s; height: 60px; }
.road-line:nth-child(5) { left: 88%;  animation-delay: 1.6s;  animation-duration: 2.5s; height: 70px; }

/* ── Hero 內容 ── */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(249,115,22,0.2);
  border: 1px solid rgba(249,115,22,0.4);
  color: #FFA853;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  animation: fadeInDown 0.7s ease both;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.1em;
  line-height: 1.1;
  animation: fadeInUp 0.7s 0.1s ease both;
  text-shadow: 0 0 40px rgba(249,115,22,0.3);
}

.hero-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.15em;
  margin-top: 4px;
  margin-bottom: 16px;
  animation: fadeInUp 0.7s 0.2s ease both;
}

.hero-slogan {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
  animation: fadeInUp 0.7s 0.3s ease both;
}

.hero-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
  margin-bottom: 32px;
  animation: fadeInUp 0.7s 0.4s ease both;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  animation: fadeInUp 0.7s 0.5s ease both;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 13px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(249,115,22,0.4);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249,115,22,0.5);
}

.btn-line {
  background: var(--line-green);
  color: var(--white);
  padding: 13px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(6,199,85,0.4);
}

.btn-line:hover {
  background: var(--line-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6,199,85,0.5);
}

.btn-line.large {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: 50px;
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 20px 24px;
  animation: fadeInUp 0.7s 0.6s ease both;
  backdrop-filter: blur(6px);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  animation: bounce 2s infinite;
  z-index: 1;
}

.hero-scroll-hint i { font-size: 0.9rem; }

/* ==========================================
   SECTION COMMON
   ========================================== */
section {
  padding: 64px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.section-header { text-align: center; margin-bottom: 40px; }

.section-header.light h2,
.section-header.light p { color: var(--white); }

.section-tag {
  display: inline-block;
  background: rgba(249,115,22,0.12);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
  border: 1px solid rgba(249,115,22,0.25);
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 10px;
}

.section-header p { font-size: 0.9rem; color: var(--text-mid); line-height: 1.6; }

/* ==========================================
   SERVICES
   ========================================== */
.services { background: var(--light-bg); max-width: 100%; padding: 64px 0; }

.services .section-header { padding: 0 24px; max-width: 480px; margin: 0 auto 40px; }

.service-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 24px;
  max-width: 480px;
  margin: 0 auto;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.service-card.visible { opacity: 1; transform: translateY(0); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.service-card.featured {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, #fff 0%, #f0f5ff 100%);
}

.featured-ribbon {
  position: absolute;
  top: 16px; right: -8px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 14px 4px 10px;
  border-radius: 4px 0 0 4px;
  letter-spacing: 0.05em;
}

.card-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.card-icon-wrap.orange { background: rgba(249,115,22,0.12); color: var(--accent); }
.card-icon-wrap.blue   { background: rgba(10,38,71,0.1);    color: var(--primary); }

.card-number { font-size: 0.65rem; font-weight: 800; color: var(--text-light); letter-spacing: 0.1em; margin-bottom: 6px; }

.service-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-dark); margin-bottom: 12px; }

.card-desc { font-size: 0.85rem; color: var(--text-mid); line-height: 1.75; margin-bottom: 16px; }

.card-highlights { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.highlight-item { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-mid); }
.highlight-item i { color: var(--accent); font-size: 0.8rem; width: 16px; flex-shrink: 0; }
.highlight-item strong { color: var(--accent); font-weight: 700; }

.card-badge-row { margin: 10px 0 12px; }

.badge-high {
  display: inline-block;
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(249,115,22,0.4);
}

.card-tag {
  display: inline-block;
  background: rgba(10,38,71,0.07);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.05em;
}

/* ==========================================
   WHY US
   ========================================== */
.why-us {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  max-width: 100%;
  padding: 64px 0;
  overflow: hidden;
}

.why-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 90% 10%, rgba(249,115,22,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.why-us .section-header { padding: 0 24px; max-width: 480px; margin: 0 auto 40px; }
.why-us .section-tag { background: rgba(249,115,22,0.25); border-color: rgba(249,115,22,0.4); }

.why-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 24px;
  max-width: 480px;
  margin: 0 auto;
}

.why-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 20px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.why-item:nth-child(even) { transform: translateX(20px); }
.why-item.visible { opacity: 1; transform: translateX(0); }

.why-icon {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: 12px;
  background: rgba(249,115,22,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
}

.why-text h4 { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.why-text p  { font-size: 0.82rem; color: rgba(255,255,255,0.68); line-height: 1.7; }

/* ==========================================
   JOIN US
   ========================================== */
.join-us { background: var(--white); }

.join-content { display: flex; flex-direction: column; gap: 28px; }

.join-card {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
}

.join-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(10,38,71,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.join-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; }

.join-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.join-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-mid); line-height: 1.6; }
.join-list li i { color: var(--line-green); font-size: 0.9rem; margin-top: 2px; flex-shrink: 0; }
.join-list li strong { color: var(--accent); }

.join-steps {
  background: var(--light-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
}

.join-steps h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 20px; }

.step-item { display: flex; align-items: flex-start; gap: 14px; }

.step-num {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-info { display: flex; flex-direction: column; padding-top: 6px; }
.step-info strong { font-size: 0.9rem; color: var(--text-dark); font-weight: 700; }
.step-info span   { font-size: 0.8rem; color: var(--text-light); margin-top: 2px; }

.step-arrow { text-align: center; color: var(--accent); font-size: 0.8rem; margin: 8px 0 8px 42px; }

/* ==========================================
   CONTACT
   ========================================== */
.contact {
  background: linear-gradient(160deg, #0A2647 0%, #144272 100%);
  max-width: 100%;
  padding: 72px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(6,199,85,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.contact-inner { position: relative; z-index: 1; max-width: 440px; margin: 0 auto; }

.contact-icon {
  width: 80px; height: 80px;
  background: var(--line-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
  margin: 0 auto 24px;
  box-shadow: 0 0 40px rgba(6,199,85,0.4);
  animation: pulse-line 2s infinite;
}

.contact h2 { font-size: 1.7rem; font-weight: 800; color: var(--white); margin-bottom: 14px; line-height: 1.3; }

.contact-sub { font-size: 0.95rem; color: rgba(255,255,255,0.72); line-height: 1.7; margin-bottom: 32px; }
.contact-sub strong { color: var(--accent); font-weight: 700; }

.btn-line-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--line-green);
  color: var(--white);
  padding: 18px 28px;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 24px rgba(6,199,85,0.45);
  max-width: 360px;
  margin: 0 auto;
}

.btn-line-main i:first-child { font-size: 1.4rem; }

.btn-line-main:hover {
  background: var(--line-green-dark);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(6,199,85,0.55);
}

.arrow-right { margin-left: auto; font-size: 0.85rem; opacity: 0.8; }

.contact-hint { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 14px; }

/* ==========================================
   FOOTER
   ========================================== */
.footer { background: #060f1e; padding: 32px 24px; text-align: center; }

.footer-inner { max-width: 480px; margin: 0 auto; }

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-logo i    { color: var(--accent); font-size: 1.2rem; }
.footer-slogan    { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-bottom: 12px; }
.footer-copy      { font-size: 0.72rem; color: rgba(255,255,255,0.25); }

/* ==========================================
   FLOATING LINE BUTTON
   ========================================== */
.float-line-btn {
  position: fixed;
  bottom: 24px; right: 20px;
  width: 56px; height: 56px;
  background: var(--line-green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(6,199,85,0.5);
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: float-in 0.5s 1s ease both;
}

.float-line-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(6,199,85,0.6);
}

/* ==========================================
   KEYFRAME ANIMATIONS
   ========================================== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

@keyframes pulse-line {
  0%, 100% { box-shadow: 0 0 40px rgba(6,199,85,0.4); }
  50%       { box-shadow: 0 0 60px rgba(6,199,85,0.7); }
}

@keyframes float-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Hero 光暈浮動 ── */
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-20px, 15px) scale(1.05); }
  66%       { transform: translate(10px, -10px) scale(0.97); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(18px, -12px) scale(1.08); }
  70%       { transform: translate(-8px, 8px) scale(0.95); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(-15px, 20px); }
}

/* ── 速度線 ── */
@keyframes roadSpeed {
  0%   { top: -80px; opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 0.6; }
  100% { top: 110%; opacity: 0; }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (min-width: 480px) {
  section { max-width: 480px; }
}

@media (min-width: 640px) {
  .hero-title { font-size: 3.5rem; }
  .service-cards,
  .services .section-header,
  .why-us .section-header,
  .why-grid { max-width: 560px; }
}
