*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  margin: 0;
  line-height: inherit;
  background-color: #f8fafc; /* bg-slate-50 equivalent */
  color: #334155; /* text-slate-700 equivalent */
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p {
  margin: 0;
}

a {
  text-decoration: none;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc; /* Light gray background */
  color: #334155; /* Darker text color */
}
.section-padding {
  padding: 4rem 1rem; /* Responsive padding */
}
@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 2rem;
  }
}
.text-gradient {
  background: linear-gradient(to right, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- 2. 佈局 (Layout) --- */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.flex {
  display: flex;
}
.hidden {
  display: none;
}
.grid {
  display: grid;
}

.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.top-0 {
  top: 0;
}
.z-0 {
  z-index: 0;
}
.z-10 {
  z-index: 10;
}
.z-20 {
  z-index: 20;
}

.w-full {
  width: 100%;
}
.h-screen {
  height: 100vh;
}
.min-h-screen {
  min-height: 100vh;
}

.w-10 {
  width: 2.5rem;
}
.h-10 {
  height: 2.5rem;
}
.w-6 {
  width: 1.5rem;
}
.h-6 {
  height: 1.5rem;
}
.w-16 {
  width: 4rem;
}
.h-16 {
  height: 4rem;
}
.w-36 {
  width: 9rem;
}
.h-36 {
  height: 9rem;
}
.h-96 {
  height: 24rem;
}

/* Grid Columns */
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* Flexbox Utilities */
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}

/* Spacing (Padding & Margin) */
.p-4 {
  padding: 1rem;
}
.p-6 {
  padding: 1.5rem;
}
.p-8 {
  padding: 2rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.py-20 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}
.pt-40 {
  padding-top: 10rem;
}

.m-0 {
  margin: 0;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-6 {
  margin-top: 1.5rem;
}
.mt-10 {
  margin-top: 2.5rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}
.mb-8 {
  margin-bottom: 2rem;
}
.mb-12 {
  margin-bottom: 3rem;
}

.space-x-2 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0.5rem;
}
.space-x-6 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 1.5rem;
}
.space-x-8 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 2rem;
}
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.5rem;
}

.gap-8 {
  gap: 2rem;
}
.gap-10 {
  gap: 2.5rem;
}

/* --- 3. 外觀 (Appearance) --- */
/* Colors */
.bg-white {
  background-color: #ffffff;
}
.bg-black\/50 {
  background-color: rgb(0 0 0 / 0.5);
}
.bg-gray-50 {
  background-color: #f9fafb;
}
.bg-gray-100 {
  background-color: #f3f4f6;
}
.bg-gray-800 {
  background-color: #1f2937;
}

/* Gradient */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}
.from-indigo-500 {
  --tw-gradient-from: #6366f1;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(99 102 241 / 0));
}
.to-purple-600 {
  --tw-gradient-to: #9333ea;
}

/* Text Colors */
.text-white {
  color: #ffffff;
}
.text-gray-400 {
  color: #9ca3af;
}
.text-gray-600 {
  color: #4b5563;
}
.text-gray-700 {
  color: #374151;
}
.text-gray-800 {
  color: #1f2937;
}
.text-indigo-500 {
  color: #6366f1;
}
.text-indigo-600 {
  color: #4f46e5;
}
.text-purple-600 {
  color: #9333ea;
}
.text-blue-600 {
  color: #2563eb;
}

/* Typography */
.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}
.font-extrabold {
  font-weight: 800;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-center {
  text-align: center;
}
.leading-tight {
  line-height: 1.25;
}
.leading-relaxed {
  line-height: 1.625;
}

/* Borders & Radius */
.rounded-md {
  border-radius: 0.375rem;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.rounded-full {
  border-radius: 9999px;
}
.border-4 {
  border-width: 4px;
}
.border-indigo-300 {
  border-color: #a5b4fc;
}
.border-blue-300 {
  border-color: #93c5fd;
}
.border-purple-300 {
  border-color: #d8b4fe;
}

/* Effects */
.shadow-lg {
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.shadow-xl {
  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.opacity-20 {
  opacity: 0.2;
}
.opacity-90 {
  opacity: 0.9;
}

.object-cover {
  object-fit: cover;
}
.overflow-hidden {
  overflow: hidden;
}

/* Transitions & Animations */
.transition {
  transition-property:
    color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow,
    transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-300 {
  transition-duration: 300ms;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate))
    skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x))
    scaleY(var(--tw-scale-y));
}

/* Custom Animation: Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}
.delay-200 {
  animation-delay: 200ms;
}
.delay-400 {
  animation-delay: 400ms;
}

/* Hover States */
.hover\:text-white:hover {
  color: #ffffff;
}
.hover\:text-indigo-600:hover {
  color: #4f46e5;
}
.hover\:bg-gray-100:hover {
  background-color: #f3f4f6;
}
.hover\:shadow-xl:hover {
  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.hover\:scale-105:hover {
  --tw-scale-x: 1.05;
  --tw-scale-y: 1.05;
  transform: scale(1.05);
}
.hover\:-translate-y-1:hover {
  --tw-translate-y: -0.25rem;
  transform: translateY(-0.25rem);
}

/* --- 4. 響應式設計 (Responsive / Media Queries) --- */
@media (min-width: 768px) {
  .md\:block {
    display: block;
  }
  .md\:hidden {
    display: none;
  }
  .md\:flex {
    display: flex;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:flex-row {
    flex-direction: row;
  }

  .md\:space-x-12 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 3rem;
  }

  .md\:w-1\/2 {
    width: 50%;
  }

  .md\:px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .md\:px-12 {
    padding-left: 3rem;
    padding-right: 3rem;
  }
  .md\:pt-48 {
    padding-top: 12rem;
  }

  .md\:mb-0 {
    margin-bottom: 0;
  }

  .md\:text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
  .md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .md\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
}

/* --- 補充修正 (Fixes & Missing Styles) --- */

/* 1. 列表樣式修正 (關於我們、產品介紹頁的清單圓點) */
.list-disc {
  list-style-type: disc;
}
.list-inside {
  list-style-position: inside;
}
.pl-4 {
  padding-left: 1rem;
}

/* 2. 邊框顏色 (核心團隊照片外框) */
.border-indigo-300 {
  border-color: #a5b4fc;
}
.border-blue-300 {
  border-color: #93c5fd;
}
.border-purple-300 {
  border-color: #d8b4fe;
}

/* 3. 按鈕與互動修正 */
.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
button:focus {
  outline: 1px dotted;
  outline: 5px auto -webkit-focus-ring-color;
}
.hover\:bg-gray-100:hover {
  background-color: #f3f4f6;
}
.hover\:text-indigo-600:hover {
  color: #4f46e5;
}

/* 4. 變形效果修正 (Hero 區塊按鈕與服務卡片浮動) */
/* 確保 transform 類別能正確啟用 GPU 加速與變數 */
.transform {
  transform: translate(var(--tw-translate-x, 0), var(--tw-translate-y, 0))
    rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0))
    scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1));
}
.hover\:scale-105:hover {
  --tw-scale-x: 1.05;
  --tw-scale-y: 1.05;
  transform: scale(1.05);
}
.hover\:-translate-y-1:hover {
  --tw-translate-y: -0.25rem;
  transform: translateY(-0.25rem); /* 強制覆寫 */
}

/* 5. SVG 與圖片修正 */
/* 確保 SVG 圖示能正確縮放 */
svg {
  display: block;
  vertical-align: middle;
}

/* 6. 手機版選單的顯示控制 (非常重要，否則選單可能會打不開或關不掉) */
/* 預設隱藏 */
.hidden {
  display: none;
}

/* 手機版選單按鈕樣式 */
#mobile-menu-button svg {
  width: 1.5rem; /* w-6 */
  height: 1.5rem; /* h-6 */
}

/* 7. 響應式補強 (確保桌機版導覽列正常顯示) */
@media (min-width: 768px) {
  .md\:flex {
    display: flex !important;
  }
  .md\:hidden {
    display: none !important;
  }
  .md\:block {
    display: block !important;
  }
  .md\:w-1\/2 {
    width: 50%;
  }
  .md\:px-12 {
    padding-left: 3rem;
    padding-right: 3rem;
  }

  /* 修正網格佈局 */
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
