/* =============================
   Reset & 通用樣式
============================= */
body {
  background: radial-gradient(circle at center, #0f2027, #203a43, #2c5364);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3 {
  margin-top: 0;
}

section {
  padding: 50px 20px;
  max-width: 1200px;
  margin: auto;
}

/*Hero 區塊*/
#hero {
  background: url("images/hero.jpg") center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 100px 20px;
}

#hero h1 {
  font-size: 2.5rem;
  opacity: 0;
  transform: scale(0.95);
  animation: fadeIn 1s forwards;
  animation-delay: 0.3s;
}

#hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  opacity: 0;
  transform: scale(0.95);
  animation: fadeIn 1s forwards;
  animation-delay: 0.6s;
}

#hero a {
  opacity: 0;
  transform: scale(0.95);
  animation: fadeIn 1s forwards;
  animation-delay: 0.9s;
}

/* =============================
   按鈕樣式
============================= */
.btn-primary,
button {
  background: linear-gradient(90deg, #00ff99, #00ccff);
  border: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-primary:hover,
button:hover {
  background: #00ff99;
  color: rgb(46, 127, 105);
  box-shadow: 0 0 20px #00ff99;
  transform: scale(1.1);
}

button:active {
  transform: scale(0.95);
  background: #009966;
  color: rgb(0, 234, 255);
}

/* =============================
   Header
============================= */
header {
  background: #000;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  position: relative;
  z-index: 1000;
}

header .logo img {
  height: 40px;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin-left: 20px;
}

nav a {
  color: white;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* =============================
   漢堡按鈕
============================= */
.newlogo {
  width: 60px;
  aspect-ratio: 1/1;
  background: #000000;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.newlogo span {
  width: 30px;
  height: 2px;
  background: #000;
  display: block;
  position: relative;
  transition: 0.3s;
}

.newlogo span::before,
.newlogo span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #000;
  transition: 0.3s;
}

.newlogo span::before { top: -8px; }
.newlogo span::after { top: 8px; }

.newlogo.active span { background: transparent; }
.newlogo.active span::before { top: 0; transform: rotate(45deg); }
.newlogo.active span::after { top: 0; transform: rotate(-45deg); }

/* =============================
   手機版響應式
============================= */
@media (max-width: 768px) {
  header {
    padding: 10px 20px;
  }

  .logo {
    order: 1;
  }

  .newlogo {
    display: flex;
    order: 2;
    margin-left: auto;
    z-index: 1001;
  }

  nav {
    position: fixed;
    top: 0;
    right: -500px;
    height: 100%;
    width: 250px;
    background: rgba(0,0,0,1);
    padding: 60px 20px;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 999;
  }

  nav.show { right: 0; }

  nav ul {
    flex-direction: column;
    gap: 20px;
  }

  nav ul li a {
    font-size: 18px;
  }
}

/* =============================
   輪播
============================= */
.wrapper {
  width: 100%;
  text-align: center;
}
.carousel {
  width: 90%;
  margin: 0 auto;
}
.slick-slide { margin: 10px; }
.slick-slide img { width: 100%; }
.wrapper .slick-dots li button:before { font-size: 20px; color: white; }

/* =============================
   服務項目
============================= */
.service-list article{
  height: 240px;
}
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  
}
.service-list article{
  position: relative;

}
.service-list img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}
.service-list article {
  background: #f5f5f500;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.service-list article:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

article:nth-child(1) { transition-delay: 0s; }
article:nth-child(2) { transition-delay: 0.1s; }
article:nth-child(3) { transition-delay: 0.2s; }
article:nth-child(4) { transition-delay: 0.3s; }

/* =============================
   作品案例
============================= */
.portfolio-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.portfolio-list figure {
  margin: 0;
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.portfolio-list figure.show {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-list figcaption {
  padding: 10px;
  background: #eee;
  text-align: center;
}

/* =============================
   背景效果
============================= */
#bg-image,
#vanta-bg,
#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#vanta-bg { opacity: 0.6; }

/* =============================
   Footer
============================= */
footer {
  background: #0a2f5c;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 50px;
}

/* =============================
   聯絡表單
============================= */
form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
}

label {
  margin-top: 10px;
  font-weight: bold;
}

input,
textarea {
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
}

/* =============================
   Animation
============================= */
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}
