/* 基本設定 */
:root {
  --primary-color: #0B0F1A;
  --secondary-color: #1C2331;
  --accent-color: #B8A164;
  --accent-light: #D4C28C;
  --text-color: #333333;
  --background-color: #FFFFFF;
  --gradient-dark: linear-gradient(135deg, #0B0F1A 0%, #1C2331 100%);
  --gradient-gold: linear-gradient(135deg, #B8A164 0%, #D4C28C 100%);
  --shadow-soft: 0 10px 30px rgba(11, 15, 26, 0.08);
  --shadow-strong: 0 20px 40px rgba(11, 15, 26, 0.12);
  --font-family: "Noto Sans JP", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  letter-spacing: 0.02em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header 樣式 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: #fff;
  z-index: 1000;
  border-bottom: 1px solid rgba(184, 161, 100, 0.1);
}

.header .container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

/* Logo 區域樣式 */
.header__logo {
  display: flex;
  align-items: center;
}

.header__logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
}

.header__logo .logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.header__logo h1 {
  font-size: 24px;
  color: var(--accent-color);
  margin: 0;
  white-space: nowrap;
}

/* 導航區域樣式 */
.header__nav {
  margin-left: auto; /* 推到右邊 */
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.header__right {
  display: flex;
  align-items: center;
  margin-left: 40px;
}

.header__nav a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-gold);
  transition: width 0.3s ease;
}

.header__nav a:hover::after {
  width: 100%;
}

/* 漢堡選單按鈕 */
.menu-toggle {
  display: none !important; /* 完全隱藏漢堡選單按鈕 */
}

/* Hero 區塊樣式 */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
              url('../images/hero-bg.jpg') center/cover;
  display: flex;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(11, 15, 26, 0.7), rgba(11, 15, 26, 0.7));
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero__title {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
  line-height: 1.3;
}

.hero__subtitle {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.3s forwards;
  line-height: 1.6;
}

/* 添加動畫 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 章節通用的樣式 */
section {
  padding: 100px 0;
}

.section-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  line-height: 1.4;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background-color: var(--accent-color);
  margin: 20px auto;
}

/* About 區塊樣式 */
.about {
  background-color: #f8f8f8;
}

.about__content {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 50px;
  align-items: start;
}

.about__text {
  font-size: 18px;
  line-height: 1.8;
}

.about__text p {
  margin-bottom: 30px;
}

.about__image {
  position: relative;
  height: 100%;
  min-height: 400px;
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Services 區塊樣式 */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: white;
  padding: 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.5s ease;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-strong);
}

.service-card__image {
  margin: -30px -30px 20px -30px;
  height: 200px;
  overflow: hidden;
}

.service-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover img {
  transform: scale(1.05);
}

.service-card h3 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 25px 0 15px;
  color: var(--primary-color);
}

.service-card__description {
  margin-bottom: 20px;
  line-height: 1.8;
}

.service-card__features {
  list-style: none;
  margin-top: 20px;
  padding: 20px;
  background: rgba(184, 161, 100, 0.05);
  border-radius: 4px;
}

.service-card__features li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 14px;
}

.service-card__features li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* Contact 區塊樣式更新 */
.contact {
  background: var(--gradient-dark);
  color: white;
  position: relative;
  overflow: hidden;
}

.contact .section-title {
  color: white;
}

.contact .section-title::after {
  background: var(--gradient-gold);
}

.contact__content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

.contact__info {
  background: var(--background-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.contact__info h3 {
  color: var(--accent-color);
  margin-bottom: 20px;
  font-size: 20px;
}

/* 聯絡資訊項目樣式 */
.info-item {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.info-item i {
  color: var(--accent-color);
  font-size: 20px;
  margin-top: 3px;
}

.info-item p {
  margin: 0;
  color: var(--text-color); /* 確保文字顏色與背景形成對比 */
  font-size: 15px;
  line-height: 1.6;
}

/* 表單樣式 */
.contact__form {
  background: var(--background-color);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 500;
  font-size: 15px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(184, 161, 100, 0.3);
  border-radius: 4px;
  font-size: 15px;
  color: var(--text-color);
  background-color: #fff;
}

.btn-large {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-family);
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

.btn {
  background: var(--gradient-gold);
  color: var(--primary-color);
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 15px 40px;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-dark);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 0.1;
}

/* Footer 樣式 */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 20px 0;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .footer {
    padding: 15px 0;
  }
  
  .footer p {
    font-size: 12px;
  }
}

/* 響應式設計 */
@media (max-width: 768px) {
  .header {
    height: 60px;
  }

  .header .container {
    height: 60px;
    padding: 0 20px;
    display: flex;
    justify-content: center; /* 置中 logo */
    align-items: center;
  }

  .header__logo {
    text-align: center;
  }

  .header__logo h1 {
    font-size: 24px;
    color: var(--accent-color);
    margin: 0;
  }

  /* 完全隱藏導航選單 */
  .header__nav {
    display: none !important;
  }

  /* Hero 區塊調整 */
  .hero {
    margin-top: 60px;
  }
} 

/* Message 區塊樣式 */
.message {
  background: linear-gradient(to right, var(--background-color) 50%, #f8f8f8 50%);
  padding: 100px 0;
}

.message__content {
  position: relative;
  align-items: start;
}

.message__text {
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.message__text h3 {
  font-size: 24px;
  margin-bottom: 30px;
  line-height: 1.6;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.05em;
}

.message__text p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.message__signature {
  margin-top: 40px;
  border-top: 1px solid rgba(184, 161, 100, 0.2);
  padding-top: 30px;
  text-align: right;
}

.message__signature p:first-child {
  font-size: 14px;
  margin-bottom: 5px;
}

.message__signature p:last-child {
  font-size: 20px;
  font-weight: 500;
}

/* 響應式設計補充 */
@media (max-width: 768px) {
  .message__signature {
    text-align: center;
  }
} 

/* Map Section 樣式 */
.map-section {
  width: 100%;
  height: 600px;
  position: relative;
  padding: 0;
  margin: 0;
}

.map-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 語言切換器樣式 */
.language-switcher {
    position: relative;
    margin-left: 20px;
}

.current-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.current-lang:hover {
    background: var(--accent-color);
    color: white;
}

.current-lang i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.language-switcher.active .current-lang i {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 4px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 150px;
}

.language-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li {
    padding: 12px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-dropdown li:hover {
    background: rgba(184, 161, 100, 0.1);
    color: var(--accent-color);
}

.lang-dropdown li.active {
    background: var(--accent-color);
    color: white;
}

.lang-flag {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    object-fit: cover;
} 

/* 預設隱藏所有語言版本 */
[data-lang] {
    display: none;
}

/* 顯示當前語言版本 */
.lang-ja [data-lang="ja"],
.lang-zh-tw [data-lang="zh-tw"],
.lang-zh-cn [data-lang="zh-cn"],
.lang-en [data-lang="en"] {
    display: block;
}

/* 沒有語言設定時顯示日語版本 */
[data-lang="ja"] {
    display: block;
} 

/* 在大螢幕時隱藏漢堡選單按鈕 */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .header__nav {
        display: flex !important;
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        height: auto;
        overflow: visible;
    }

    .header__right {
        margin: 0 0 0 40px;
    }
} 

/* 手機版樣式調整 */
@media (max-width: 768px) {
    .header {
        height: 60px;
    }

    .header .container {
        height: 60px;
        padding: 0 20px;
        display: flex;
        justify-content: space-between; /* 改為兩端對齊 */
        align-items: center;
    }

    .header__logo {
        text-align: center;
    }

    .header__logo h1 {
        font-size: 24px;
        color: var(--accent-color);
        margin: 0;
    }

    /* 隱藏導航選單，但保留語言切換器 */
    .header__nav {
        display: none !important;
    }

    /* 語言切換器在手機版的特別樣式 */
    .header__right {
        display: block !important;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .language-switcher {
        margin: 0;
    }

    .current-lang {
        padding: 6px 12px;
        font-size: 14px;
    }

    .lang-dropdown {
        right: 0;
        left: auto;
        top: 100%;
        min-width: 120px;
    }

    /* Section 標題在手機版的樣式 */
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .section-title::before {
        content: '';
        display: block;
        width: 40px;
        height: 2px;
        background-color: var(--accent-color);
        margin: 0 auto;
    }

    /* 移除原本的下劃線 */
    .section-title::after {
        display: none;
    }
}

/* 確保電腦版正常顯示 */
@media screen and (min-width: 769px) {
    .section-title {
        font-size: 36px;
        text-align: center;
        margin-bottom: 50px;
        position: relative;
    }

    .section-title::after {
        content: '';
        display: block;
        width: 50px;
        height: 2px;
        background-color: var(--accent-color);
        margin: 20px auto;
    }
}

/* 針對 iOS Safari 的特殊處理 */
@supports (-webkit-touch-callout: none) {
    @media screen and (max-width: 768px) {
        .header__right {
            display: block !important;
            position: absolute;
            right: 20px;
        }
    }
}

/* 針對 Chrome Mobile 的特殊處理 */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    .header__right {
        display: block !important;
        position: absolute;
        right: 20px;
    }
}

/* 手機版聯絡表單樣式 */
@media (max-width: 768px) {
    .contact__content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact__info {
        padding: 20px;
    }

    .contact__form {
        padding: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        display: block;
        margin-bottom: 5px;
        font-size: 14px;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 10px;
        border: 1px solid rgba(184, 161, 100, 0.2);
        border-radius: 4px;
        font-size: 16px; /* 適合手機輸入的字體大小 */
    }

    .form-group textarea {
        height: 120px;
    }

    .info-item {
        margin-bottom: 15px;
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    .info-item i {
        color: var(--accent-color);
        font-size: 18px;
        margin-top: 3px;
    }

    .info-item p {
        margin: 0;
        font-size: 14px;
        line-height: 1.5;
    }

    /* 提交按鈕樣式 */
    .btn-large {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        margin-top: 20px;
    }

    /* 聯絡資訊標題 */
    .contact__info h3 {
        font-size: 18px;
        margin-bottom: 15px;
        color: var(--accent-color);
    }

    /* Section 標題調整 */
    .contact .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
} 

/* 手機版樣式調整 */
@media (max-width: 768px) {
    .contact__content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .info-item p {
        font-size: 14px;
        color: var(--text-color); /* 確保手機版也有正確的文字顏色 */
    }

    .form-group label {
        font-size: 14px;
        color: var(--text-color);
    }

    /* 更新表單標籤文字 */
    .form-group label[for="name"] {
        content: "姓名";
    }

    .form-group label[for="email"] {
        content: "電子郵件";
    }

    .form-group label[for="message"] {
        content: "查詢詳情";
    }
} 

/* 電腦版導航選單樣式 */
.header__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 60px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

/* 手機版樣式（使用標準的手機版中斷點） */
@media screen and (max-width: 768px), 
       screen and (max-device-width: 768px) {
    .header {
        height: 60px;
    }

    .header .container {
        height: 60px;
        padding: 0 20px;
        display: flex;
        justify-content: center; /* logo 置中 */
        align-items: center;
    }

    .header__logo {
        text-align: center;
    }

    .header__logo h1 {
        font-size: 24px;
        color: var(--accent-color);
        margin: 0;
    }

    /* 在所有手機瀏覽器中隱藏導航選單 */
    .header__nav {
        display: none !important; /* 使用 !important 確保一定會隱藏 */
    }

    /* 移除漢堡選單按鈕 */
    .menu-toggle {
        display: none !important;
    }

    /* Hero 區塊調整 */
    .hero {
        margin-top: 60px;
    }
}

/* 確保電腦版正常顯示導航選單 */
@media screen and (min-width: 769px) {
    .header__nav {
        display: flex !important;
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        height: auto;
        overflow: visible;
    }

    .header__right {
        margin: 0 0 0 40px;
    }

    /* 隱藏漢堡選單按鈕 */
    .menu-toggle {
        display: none !important;
    }
}

/* 針對 iOS Safari 的特殊處理 */
@supports (-webkit-touch-callout: none) {
    @media screen and (max-width: 768px) {
        .header__nav {
            display: none !important;
        }
    }
}

/* 針對 Chrome Mobile 的特殊處理 */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    .header__nav {
        display: none !important;
    }
} 

/* 手機版樣式調整 */
@media screen and (max-width: 768px) {
    .hero__title {
        font-size: 32px; /* 縮小標題大小 */
        margin-bottom: 20px;
        padding: 0 15px; /* 增加左右間距 */
        letter-spacing: 0.05em; /* 調整字間距 */
    }

    .hero__subtitle {
        font-size: 18px; /* 縮小副標題大小 */
        padding: 0 20px; /* 增加左右間距 */
        letter-spacing: 0.03em; /* 調整字間距 */
        line-height: 1.8; /* 增加行高 */
    }

    .section-title {
        font-size: 24px; /* 縮小區塊標題大小 */
        margin-bottom: 30px;
        padding: 0 15px; /* 增加左右間距 */
    }

    /* 調整 section 標題下方的裝飾線 */
    .section-title::after {
        width: 40px; /* 縮短裝飾線長度 */
        margin: 15px auto; /* 調整間距 */
    }

    /* 確保多語言文字在手機版也能正確顯示 */
    [data-lang] {
        display: none;
    }

    /* 根據當前語言顯示對應文字 */
    .lang-ja [data-lang="ja"],
    .lang-zh-tw [data-lang="zh-tw"],
    .lang-zh-cn [data-lang="zh-cn"],
    .lang-en [data-lang="en"] {
        display: block;
    }

    /* Hero 區塊在手機版的額外調整 */
    .hero .container {
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        height: 100%;
    }
}

/* 針對特小螢幕的額外調整 */
@media screen and (max-width: 320px) {
    .hero__title {
        font-size: 28px;
        padding: 0 10px;
    }

    .hero__subtitle {
        font-size: 16px;
        padding: 0 15px;
    }

    .section-title {
        font-size: 22px;
        padding: 0 10px;
    }
} 

/* Logo 樣式 */
.header__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
}

.header__logo .logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.header__logo h1 {
    color: var(--accent-color);
    margin: 0;
    font-size: 28px;
}

/* 手機版 Logo 樣式 */
@media screen and (max-width: 768px) {
    .header__logo .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .header__logo h1 {
        font-size: 20px;
    }

    .header__logo a {
        gap: 10px;
    }
} 

/* 手機版樣式 */
@media screen and (max-width: 768px) {
    .header {
        height: 60px;
    }

    .header .container {
        padding: 0 15px;
    }

    .logo-img {
        width: 32px;
        height: 32px;
    }

    .header__logo h1 {
        font-size: 20px;
    }

    .logo-link {
        gap: 8px;
    }

    /* 隱藏導航選單但保留語言切換 */
    .nav-links {
        display: none !important;
    }
}

/* 確保在所有瀏覽器中保持一致性 */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari */
    .header__logo {
        display: flex;
        align-items: center;
    }
}

@supports (-webkit-appearance: none) {
    /* Chrome, Safari */
    .header__logo {
        display: flex;
        align-items: center;
    }
}

@supports (-moz-appearance: none) {
    /* Firefox */
    .header__logo {
        display: flex;
        align-items: center;
    }
} 

/* Header 基本樣式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #fff;
    z-index: 1000;
    border-bottom: 1px solid rgba(184, 161, 100, 0.1);
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo 樣式 */
.header__logo {
    display: flex;
    align-items: center;
}

.header__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.header__logo .logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.header__logo h1 {
    font-size: 24px;
    color: var(--accent-color);
    margin: 0;
    white-space: nowrap;
}

/* 手機版通用樣式 */
@media screen and (max-width: 768px) {
    .header {
        height: 60px;
        -webkit-transform: translateZ(0); /* Safari 效能優化 */
    }

    .header .container {
        height: 60px;
        padding: 0 15px;
        -webkit-backface-visibility: hidden; /* Safari 渲染優化 */
    }

    .header__logo {
        display: flex;
        align-items: center;
        -webkit-transform: translateZ(0);
    }

    .header__logo a {
        display: flex;
        align-items: center;
        gap: 8px;
        -webkit-transform: translateZ(0);
    }

    .header__logo .logo-img {
        width: 32px;
        height: 32px;
        -webkit-transform: translateZ(0);
    }

    .header__logo h1 {
        font-size: 20px;
        -webkit-transform: translateZ(0);
    }

    /* 隱藏導航選單 */
    .nav-links {
        display: none !important;
    }

    /* 保留語言切換器 */
    .header__right {
        display: block !important;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        -webkit-transform: translateY(-50%);
    }

    /* 語言切換器樣式 */
    .language-switcher {
        margin: 0;
        -webkit-transform: translateZ(0);
    }

    .current-lang {
        padding: 6px 12px;
        font-size: 14px;
    }

    /* 確保下拉選單在 Safari 中正確顯示 */
    .lang-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: #fff;
        border-radius: 4px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        -webkit-transform: translateZ(0);
    }
}

/* iOS Safari 特定樣式 */
@supports (-webkit-touch-callout: none) {
    .header {
        -webkit-overflow-scrolling: touch;
    }

    .header__logo,
    .header__logo a,
    .header__logo img,
    .header__logo h1 {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .header__right {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Android Chrome 特定樣式 */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    .header {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* Firefox 特定樣式 */
@-moz-document url-prefix() {
    .header {
        transform: translateZ(0);
    }
}

/* 確保內容在所有瀏覽器中可見 */
[data-lang] {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 根據當前語言顯示對應內容 */
html:not([lang]) [data-lang],
html[lang="ja"] [data-lang]:not([data-lang="ja"]),
html[lang="zh-tw"] [data-lang]:not([data-lang="zh-tw"]),
html[lang="zh-cn"] [data-lang]:not([data-lang="zh-cn"]),
html[lang="en"] [data-lang]:not([data-lang="en"]) {
    display: none !important;
}

html[lang="ja"] [data-lang="ja"],
html[lang="zh-tw"] [data-lang="zh-tw"],
html[lang="zh-cn"] [data-lang="zh-cn"],
html[lang="en"] [data-lang="en"] {
    display: block !important;
} 