/* HomePage.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html, body {
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  }

.main-wrapper {
    background-color: #f1f5f9;
    color: #1f2937;
    min-height: 100vh;
  }
  
  /* Header */
  .header {
    background-color: #222222;
    color: white;
    padding: 1.2rem 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
  }
  .header:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #AA5656, #C17979, #AA5656);
  }
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .header-content {
    position: relative;
  }
  .logo {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 1px;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  }
  .nav-links {
    display: flex;
    gap: 1.5rem;
  }
  .nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
  }
  .nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #AA5656;
    transition: width 0.3s ease;
  }
  .nav-links a:hover {
    text-decoration: none;
    color: #F4F1ED;
  }
  .nav-links a:hover:after {
    width: 100%;
  }
  
  /* Hero */
  .hero {
    background-color: #e2e8f0;
    text-align: center;
    padding: 6rem 1rem;
    background-image: linear-gradient(rgba(244, 241, 237, 0.9), rgba(244, 241, 237, 0.8)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
  }

  .hero-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #2E2E2E;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
    line-height: 1.3;
  }

  .hero-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #AA5656, #C17979);
    margin: 15px auto 0;
    border-radius: 2px;
  }

  .hero-text {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #4A4A4A;
  }
  
  /* Projects */
  .projects {
    text-align: center;
    padding: 5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  .section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
  }
  .section-title:after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    bottom: 0;
    left: 20%;
    background-color: #AA5656;
    border-radius: 2px;
  }
  .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
  .project-item {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
  }
  .project-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 40%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
  }
  .project-item:hover:before {
    opacity: 1;
  }
  .project-image {
    width: 100%;
    height: 18rem;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  .project-item:hover .project-image {
    transform: scale(1.05);
  }
  .project-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  }
  
  /* Services */
  .services {
    background-color: #f1f5f9;
    padding: 5rem 1rem;
    text-align: center;
    background-color: #F4F1ED;
    position: relative;
    overflow: hidden;
  }

  .services:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/pattern.png');
    background-size: 200px;
    opacity: 0.03;
  }

  .service-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
  }

  .service-grid.single-line {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .service-item {
    background-color: white;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
  }

  .service-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #AA5656, #C17979);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
  }

  .service-item:hover:before {
    transform: scaleX(1);
  }

  .service-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    text-align: center;
    color: #2E2E2E;
  }

  .service-desc {
    color: #4b5563;
    line-height: 1.6;
  }

  .service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }
  
  /* Contact */
  .contact {
    background-color: #e2e8f0;
    text-align: center;
    padding: 5rem 1rem;
    background-color: #F4F1ED;
    background-image: linear-gradient(rgba(244, 241, 237, 0.92), rgba(244, 241, 237, 0.92)), url('images/contact-bg.jpg');
    background-size: cover;
    background-position: center;
  }
  .contact-text {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #4A4A4A;
  }
  .contact-boss {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
  }
  .contact-button {
    background-color: #1e293b;
    color: white;
    padding: 0.85rem 2.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 1px;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid transparent;
  }
  .contact-button:hover {
    background-color: #AA5656;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(170, 86, 86, 0.3);
  }
  
  /* Footer */
  .footer {
    background-color: #222222;
    color: white;
    text-align: center;
    padding: 1.5rem;
  }

  .footer p {
    margin: 0.5rem 0;
  }

  .footer-tech-support {
    font-size: 0.85rem;
    color: #BCBCBC;
  }

  .footer-tech-support a {
    color: #BCBCBC;
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .footer-tech-support a:hover {
    color: #FFFFFF;
  }
  
  /* ===== 日式風格主題顏色 ===== */
.japanese-theme {
    background-color: #FAF8F0;
    color: #4A4A4A;
  }
  
  .header {
    background-color: #2E2E2E;
  }
  
  .nav-links a {
    color: #FAF8F0;
  }
  .nav-links a:hover {
    color: #AA5656;
  }
  
  .hero {
    background-color: #F4F1ED;
  }
  
  .project-item {
    background-color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(74, 74, 74, 0.1);
  }
  
  .service-item {
    background-color: #FFFFFF;
  }
  
  .contact {
    background-color: #F4F1ED;
  }
  
  .contact-button {
    background-color: #AA5656;
    color: white;
  }
  .contact-button:hover {
    background-color: #9C2B23;
  }
  
  .footer {
    background-color: #2E2E2E;
  }
  
  /* ===== 響應式設計 (RWD) ===== */

  /* 小型桌面和筆電 (1024px 以下) */
  @media (max-width: 1024px) {
    .project-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .service-grid.single-line {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  /* 平板 (768px 以下) */
  @media (max-width: 768px) {
    .header-content {
      position: relative;
      flex-direction: column;
      text-align: center;
      padding: 0.5rem 0;
    }
    
    .mobile-menu-button {
      display: flex;
      position: absolute;
      right: 20px;
      top: 20px;
    }

    .nav-links {
      position: fixed;
      top: 0;
      right: -100%;
      width: 70%;
      height: 100vh;
      background-color: #2E2E2E;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 2rem 0;
      transition: right 0.3s ease;
      z-index: 10;
      margin-top: 0;
    }
    
    .nav-links a {
      margin: 1rem 0;
      font-size: 1.2rem;
    }
    
    .nav-links a:hover:after {
      width: 50%;
      left: 25%;
    }
    
    .nav-links.active {
      right: 0;
    }
    
    .hero {
      padding: 4rem 1rem;
      background-attachment: scroll;
    }
    
    .hero-content {
      padding: 1.5rem;
    }
    
    .hero-title {
      font-size: 2rem;
    }
    
    .hero-text {
      font-size: 1rem;
    }
    
    .project-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
    }
    
    .service-grid.single-line {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .service-item {
      text-align: center;
    }
    
    .service-desc {
      text-align: center;
    }
    
    .section-title:after {
      width: 80%;
      left: 10%;
    }
  }

  /* 手機 (480px 以下) */
  @media (max-width: 480px) {
    .logo {
      font-size: 1rem;
    }
    
    .nav-links a {
      margin-left: 0.5rem;
      font-size: 0.9rem;
    }
    
    .hero {
      padding: 2rem 1rem;
    }
    
    .hero-title {
      font-size: 1.5rem;
    }
    
    .section-title {
      font-size: 1.25rem;
    }
    
    .project-grid {
      grid-template-columns: 1fr;
    }
    
    .service-grid.single-line {
      grid-template-columns: 1fr;
    }
    
    .projects, .services, .contact {
      padding: 2rem 1rem;
    }
  }

  /* 小型手機 (375px 以下) */
  @media (max-width: 375px) {
    .hero-title {
      font-size: 1.25rem;
    }
    
    .nav-links {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .nav-links a {
      margin-left: 0;
    }
    
    .service-title {
      font-size: 1.1rem;
    }
  }

/* Mobile Menu Button */
.mobile-menu-button {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 20;
}

.mobile-menu-button span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #FAF8F0;
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Mobile menu button animation when active */
.mobile-menu-button.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-button.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
  
.text-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}
  
/* Language Switch */
.lang-switch {
  position: relative;
  padding-left: 1.5rem !important;
  margin-left: 1.5rem !important;
}

.lang-switch:before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .lang-switch {
    margin-top: 1.5rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: none;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
  
  .lang-switch:before {
    display: none;
  }
}
  