:root {
  --primary: #f59e0b;
  /* Amber 500 */
  --primary-hover: #d97706;
  /* Amber 600 */
  --bg-dark: #0f172a;
  /* Slate 900 */
  --bg-card: #1e293b;
  /* Slate 800 */
  --text-main: #f8fafc;
  /* Slate 50 */
  --text-muted: #94a3b8;
  /* Slate 400 */
  --font-main: 'Inter', sans-serif;
  --container-width: 1200px;
  --header-height: 80px;
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
  color: var(--primary);
}

h3 {
  font-size: 1.75rem;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: var(--bg-dark);
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--bg-dark);
}

.section {
  padding: 5rem 0;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 1px;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.6)), url('/images/hero_new.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  text-align: center;
  padding-top: var(--header-height);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Features/Services Preview */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: 8px;
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Gallery Preview */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  height: 300px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

/* Footer */
footer {
  background-color: var(--bg-card);
  padding: 3rem 0;
  margin-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-col h4 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.copyright {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  /* 確保 header 不會裁切菜單 */
  header {
    overflow: visible;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    /* 確保在浮動按鈕下方但在內容上方 */
    max-height: calc(100vh - var(--header-height));
    /* 防止超出視窗 */
    overflow-y: auto;
    /* 如果菜單項目太多，允許滾動 */
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
    z-index: 1001;
    /* 確保在菜單上方可點擊 */
  }
}


/* Floating Contact Button */
.floating-phone-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  text-decoration: none;
  border: none;
}

.floating-phone-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.6);
  animation: none;
}

.floating-phone-btn::before {
  content: '📞';
  font-size: 28px;
  filter: grayscale(1) brightness(0) invert(1);
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
  }
}

/* 響應式調整 */
@media (max-width: 768px) {
  .floating-phone-btn {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }

  .floating-phone-btn::before {
    font-size: 24px;
  }
}