/* ==========================================
全域變數與基礎設定
========================================== */
/* Fonts are self-hosted by src/layouts/BusinessLayout.astro (@fontsource). */

:root {
--bg-dark: #0a1026;
--text-white: #ffffff;
--accent-pink: #f72f97;
--btn-text: #0a1026;
--header-height: 80px;
}

/* ✅ 消除網頁周圍白框的關鍵設定 (CSS Reset) */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html, body {
margin: 0;
padding: 0;
width: 100%;
}

html {
scroll-behavior: smooth;
}

body {
/* 修正：將 Noto Sans EN 改為正確的 Noto Sans，移除無效的 PingFang EN，補上 Helvetica, Arial */
font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, "Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
background-color: #f5f5f5;
overflow-x: hidden;
padding-top: var(--header-height);
}

.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}

/* 嚴格綁定語系字型 */
html:lang(zh) body, html:lang(zh-TW) body {
font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif !important;
}

html:lang(ja) body, html:lang(jp) body {
font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif !important;
}

html:lang(en) body {
/* 修正：使用正確的 Noto Sans 及英文安全字體 */
font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

/* ==========================================
Header 導覽列設定
========================================== */
header {
background-color: var(--bg-dark);
height: var(--header-height);
display: flex;
justify-content: space-between;
align-items: stretch;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1000;
}

.logo-area {
display: flex;
align-items: center;
padding-left: 30px;
text-decoration: none;
color: var(--text-white);
gap: 12px;
}

.logo-img-container {
display: flex;
align-items: center;
}

.logo-img-container img {
width: auto;
height: auto;
max-height: 50px;
object-fit: contain;
}

.desktop-nav {
display: flex;
align-items: stretch;
}

.nav-links {
display: flex;
align-items: stretch;
list-style: none;
}

.nav-links li {
display: flex;
}

.nav-links a {
color: var(--text-white);
text-decoration: none;
display: flex;
align-items: center;
padding: 0 20px;
font-size: 15px;
transition: color 0.3s ease;
}

.nav-links a:hover {
color: var(--accent-pink);
}

.lang-menu-container {
position: relative;
display: flex;
align-items: stretch;
}

.lang-toggle {
color: var(--text-white);
display: flex;
align-items: center;
gap: 8px;
padding: 0 25px;
cursor: pointer;
font-size: 15px;
transition: color 0.3s ease;
background: none;
border: none;
font-family: inherit;
}

.lang-icon {
width: auto;
height: auto;
object-fit: contain;
}

.lang-toggle:hover {
color: var(--accent-pink);
}

.lang-dropdown {
position: absolute;
top: 100%;
margin-top: 0;
left: 0;
right: 0;
width: auto;
background-color: var(--bg-dark);
display: flex;
flex-direction: column;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
list-style: none;
padding: 0 !important;
margin: 0 !important;
}

.lang-menu-container:hover .lang-dropdown {
opacity: 1;
visibility: visible;
}

.lang-dropdown li {
width: 100%;
display: block;
padding: 0;
margin: 0;
}

.lang-dropdown li a {
color: var(--text-white);
text-decoration: none;
display: flex;
justify-content: center !important;
align-items: center;
width: 100%;
padding: 15px 0;
text-align: center;
font-size: 15px;
transition: background-color 0.3s ease, color 0.3s ease;
box-sizing: border-box;
}

.lang-dropdown li a:hover {
color: var(--accent-pink);
background-color: rgba(255, 255, 255, 0.1);
}

.contact-menu-container {
position: relative;
display: flex;
align-items: stretch;
}

.contact-btn {
background-color: var(--accent-pink);
color: var(--btn-text);
display: flex;
align-items: center;
padding: 0 35px;
border: none;
cursor: pointer;
font-family: inherit;
font-weight: bold;
font-size: 15px;
transition: opacity 0.3s ease;
}

.contact-btn:hover {
opacity: 0.9;
}

.contact-dropdown {
position: absolute;
top: 100%;
margin-top: 0;
left: 0;
right: 0;
width: auto;
background-color: var(--bg-dark);
display: flex;
flex-direction: column;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
list-style: none;
padding: 0 !important;
margin: 0 !important;
}

.contact-dropdown.active {
opacity: 1;
visibility: visible;
}

.contact-dropdown li {
width: 100%;
display: block;
padding: 0;
margin: 0;
}

.contact-dropdown li a {
display: flex;
justify-content: center !important;
align-items: center !important;
width: 100%;
padding: 18px 0;
transition: background-color 0.3s ease;
box-sizing: border-box;
}

.contact-dropdown li a:hover {
background-color: rgba(255, 255, 255, 0.1);
}

.contact-icon {
width: 24px !important;
height: 24px !important;
object-fit: contain;
image-rendering: pixelated;
display: block;
margin: 0 !important;
}

/* 手機版選單 */
.mobile-controls {
display: none;
align-items: center;
padding-right: 20px;
}

.mobile-lang-container {
position: relative;
display: flex;
align-items: center;
}

.mobile-lang-toggle {
color: var(--text-white);
display: flex;
align-items: center;
gap: 6px;
padding-right: 20px;
font-size: 16px;
text-decoration: none;
background: none;
border: none;
font-family: inherit;
cursor: pointer;
}

.mobile-lang-icon {
width: auto;
height: auto;
object-fit: contain;
}

.mobile-lang-dropdown {
position: absolute;
top: 100%;
right: 20px;
background-color: var(--bg-dark);
display: flex;
flex-direction: column;
list-style: none;
margin-top: 15px;
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: all 0.3s ease;
z-index: 1001;
min-width: 80px;
}

.mobile-lang-dropdown.active {
opacity: 1;
visibility: visible;
transform: translateY(0);
}

.mobile-lang-dropdown li a {
color: var(--text-white);
text-decoration: none;
display: block;
padding: 12px 0;
text-align: center;
font-size: 15px;
transition: color 0.3s ease;
}

.mobile-lang-dropdown li a:hover {
color: var(--accent-pink);
}

.hamburger {
width: 35px;
height: 24px;
display: flex;
flex-direction: column;
justify-content: space-between;
background: transparent;
border: none;
cursor: pointer;
padding: 0;
}

.hamburger span {
display: block;
width: 100%;
height: 3px;
background-color: var(--accent-pink);
border-radius: 2px;
transition: all 0.3s ease;
}

.mobile-nav {
position: absolute;
top: var(--header-height);
left: 0;
width: 100%;
background-color: var(--bg-dark);
display: flex;
flex-direction: column;
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease-in-out;
border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav.active {
max-height: 500px;
}

.mobile-nav-links {
display: flex;
flex-direction: column;
list-style: none;
padding: 20px 30px;
gap: 25px;
}

.mobile-nav-links a {
color: var(--text-white);
text-decoration: none;
font-size: 16px;
font-weight: 500;
transition: color 0.3s ease;
display: block;
}

.mobile-nav-links a:hover {
color: var(--accent-pink);
}

.mobile-contact-container {
width: 100%;
display: flex;
flex-direction: column;
border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-contact-btn {
background-color: var(--accent-pink);
color: var(--btn-text);
padding: 20px 30px;
font-weight: bold;
font-size: 16px;
border: none;
cursor: pointer;
font-family: inherit;
text-align: left;
width: 100%;
display: block;
}

.mobile-contact-dropdown {
background-color: var(--bg-dark);
display: flex;
flex-direction: row;
justify-content: center;
gap: 30px;
list-style: none;
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease, padding 0.4s ease;
padding: 0;
}

.mobile-contact-dropdown.active {
max-height: 100px;
padding: 20px 0;
}

.mobile-contact-dropdown li a {
display: block;
padding: 0;
}

.mobile-contact-icon {
width: auto;
height: auto;
object-fit: contain;
image-rendering: pixelated;
}
/* ==========================================
Hero Page 主視覺區塊
========================================== */
.hero-section {
position: relative;
width: 100%;
aspect-ratio: 1420 / 580;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
border-bottom: 6px solid var(--bg-dark);
background-color: #57d0de;
}

.map-container {
position: absolute;
top: -2px;
left: -2px;
width: calc(100% + 4px);
height: calc(100% + 4px);
z-index: 1;
display: grid;
grid-template-columns: repeat(72, 1fr);
grid-template-rows: repeat(30, 1fr);
gap: 0;
background-color: #57d0de;
overflow: hidden;
}

.grid-cell {
width: 100%;
height: 100%;
position: relative;
}

.grid-cell.land {
background-color: transparent !important;
z-index: 3;
cursor: pointer;
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
z-index 0s 0.2s;
}

.grid-cell.land::before {
content: '';
position: absolute;
top: -0.5px;
left: -1px;
width: calc(100% + 2px);
height: calc(133.33% + 1px);
background-size: 100% 100% !important;
background-position: top center !important;
background-repeat: no-repeat !important;
image-rendering: pixelated;
z-index: -1;
transition: height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grid-cell.land.bg-1::before {
background-image: url('./images/Hero_TerrainTile_1.png') !important;
}

.grid-cell.land.bg-2::before {
background-image: url('./images/Hero_TerrainTile_2.png') !important;
}

.grid-cell.land.forest::before {
background-image: url('./images/Hero_TerrainTile_4.png') !important;
}

.grid-cell.land.house::before {
background-image: url('./images/Hero_TerrainTile_6.png') !important;
}

/* 地圖動畫... */
.grid-cell.land.house.spawn {
animation: house-spawn-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
z-index: 20;
}

@keyframes house-spawn-bounce {
0% { transform: scale(1); }
50% { transform: scale(1.3) translateY(-10px); }
100% { transform: scale(1); }
}

.grid-cell.land:hover {
transform: translateY(-8px) scale(1.02);
z-index: 10;
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
z-index 0s 0s;
}

.grid-cell.land:hover::before {
height: calc(124.69% + 1px);
}

.grid-cell.land::after {
display: none !important;
}

.grid-cell.water {
z-index: 1;
}

.grid-cell.water.deep {
background-color: #57d0de !important;
outline: 1px solid #57d0de;
}

.grid-cell.water.deep.wave {
background-image: url('./images/Hero_TerrainTile_5.png') !important;
background-size: 100% 100% !important;
background-position: center !important;
background-repeat: no-repeat !important;
image-rendering: pixelated;
}

.grid-cell.water.coast {
background-color: #60e6e7 !important;
outline: 1px solid #60e6e7;
}

.grid-cell.water.shore {
background-color: #60e6e7 !important;
outline: 1px solid #60e6e7;
z-index: 2;
}

.grid-cell.water.shore::before {
content: '';
position: absolute;
top: 33.33%;
left: -1px;
width: calc(100% + 2px);
height: 100%;
background-image: url('./images/Hero_TerrainTile_3.png') !important;
background-size: 100% 100% !important;
background-position: center !important;
background-repeat: no-repeat !important;
image-rendering: pixelated;
z-index: 1;
}

.cloud-layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 40;
}

.cloud {
position: absolute;
left: 100%;
animation: drift linear infinite;
object-fit: contain;
image-rendering: pixelated;
}

.cloud.size-lg { width: 120px; height: auto; }
.cloud.size-sm { width: 180px; height: auto; }

@keyframes drift {
from { left: 100%; transform: translateX(0); }
to { left: -200px; transform: translateX(-150px); }
}

.hero-text-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 30;
padding: 0 40px;
display: flex;
justify-content: center;
align-items: center;
pointer-events: none;
}

.hero-text-container img {
width: auto;
height: auto;
max-width: 100%;
object-fit: contain;
}
/* ==========================================
內容 Section 共用架構
========================================== */
.strength-section {
width: 100%;
background-color: #e2e2e2;
position: relative;
overflow: hidden;
scroll-margin-top: var(--header-height);
}

.strength-bg-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
}

.strength-bg-container img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}

.parallax-deco {
position: absolute;
top: 0;
left: 0;
right: 0;
margin: 0 auto;
pointer-events: none;
image-rendering: pixelated;
will-change: transform;
}

.deco-bottom { z-index: 0; }
.deco-top { z-index: 0; }

.retro-header-bar {
width: 100%;
display: flex;
align-items: flex-start;
position: relative;
z-index: 1;
background-image: url("./images/bar_retro.png");
background-repeat: repeat-x;
background-position: left top;
min-height: 58px;
}

.header-left-block {
width: 110px;
height: 138px;
flex-shrink: 0;
background-image: url("./images/bar_deco_header_2.png");
background-size: contain;
background-repeat: no-repeat;
image-rendering: pixelated;
position: relative;
z-index: 2;
}

.header-stairs {
position: absolute;
left: 108px;
top: 58px;
width: 385px;
height: 80px;
background-image: url("./images/bar_deco_header_1.png");
background-size: contain;
background-repeat: no-repeat;
image-rendering: pixelated;
z-index: 1;
}

.retro-footer-bar {
width: 100%;
display: flex;
justify-content: flex-end;
align-items: flex-end;
margin-top: 55px;
position: relative;
z-index: 1;
background-image: url("./images/bar_retro.png");
background-repeat: repeat-x;
background-position: left bottom;
min-height: 58px;
}

.footer-right-block {
width: 110px;
height: 138px;
flex-shrink: 0;
background-image: url("./images/bar_deco_footer_2.png");
background-size: contain;
background-repeat: no-repeat;
image-rendering: pixelated;
position: relative;
z-index: 2;
}

.footer-stairs {
position: absolute;
right: 108px;
bottom: 58px;
width: 323px;
height: 80px;
background-image: url("./images/bar_deco_footer_1.png");
background-size: contain;
background-repeat: no-repeat;
image-rendering: pixelated;
z-index: 1;
}

.retro-header-title {
color: #f72c95;
font-size: 25px;
font-weight: 900;
letter-spacing: 1px;
transform: skewX(-6deg);
position: absolute;
left: 130px;
top: 60px;
height: 60px;
display: flex;
align-items: center;
z-index: 2;
}

.strength-subtitle-container {
width: 100%;
display: flex;
justify-content: center;
margin: 45px 0;
padding: 0 20px;
position: relative;
z-index: 1;
}

.strength-subtitle {
color: #f72c95;
font-size: 50px;
font-weight: 900;
text-align: center;
letter-spacing: 2.5px;
transform: skewX(-5deg);
}

.cards-container {
width: 100%;
max-width: 1420px;
margin: 0 auto;
padding: 0 40px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 25px;
position: relative;
z-index: 1;
}

/* Section 置中設定... */
#section-1 {
min-height: 800px;
display: flex;
flex-direction: column;
justify-content: center;
}

#section-2, #section-3 {
min-height: 800px;
display: flex;
flex-direction: column;
}

#section-1 .section-content-wrapper,
#section-2 .section-content-wrapper,
#section-3 .section-content-wrapper {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
padding: 40px 0;
gap: 25px;
}

#section-1 .cards-container {
grid-template-columns: repeat(2, 1fr);
row-gap: 30px;
margin-top: 60px;    /* 拉開與上方標題框的距離 */
margin-bottom: 60px; /* 拉開與下方裝飾框的距離 */
}

#section-1 .retro-header-bar {
margin-bottom: auto;
}

#section-1 .retro-header-bar {
margin-bottom: auto;
}

#section-1 .retro-footer-bar,
#section-2 .retro-footer-bar,
#section-3 .retro-footer-bar {
margin-top: auto;
}

/* =======================================================
Section 1: 標準圖文卡片
======================================================= */
.pixel-card-body {
padding: 24px 50px;
display: flex;
align-items: center;
gap: 20px;
flex-grow: 1;
}

.pixel-card-img-wrapper {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}

.pixel-card-img-wrapper img {
width: auto;
height: auto;
image-rendering: pixelated;
}

.pixel-card-text {
color: var(--bg-dark);
font-size: 20px;
line-height: 1.6;
font-weight: bold;
text-align: justify;
}

body:lang(en) .pixel-card-text { text-align: left; }

/* =======================================================
Section 2: 實績作品 3D 輪播圖 (Coverflow) - 終極穩定版 + 獨立卡片樣式
======================================================= */
.coverflow-carousel-wrapper {
    width: 100%;
    max-width: 1150px;
    margin: 40px auto;
    padding: 0 50px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.coverflow-viewport {
    width: 100%;
    height: 450px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
    transform-style: preserve-3d;
}

/* 基礎卡片：預設為深處隱藏狀態 */
.coverflow-slide {
    position: absolute;
    width: 100%;
    max-width: 650px;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6) translateZ(-400px);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    cursor: default;
    display: flex;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}

/* 🌟 前台三個主要狀態 (加上 translate 基準修正) 🌟 */
.coverflow-slide.active {
    transform: translate(-50%, -50%) scale(1.2) translateZ(0);
    z-index: 20;
    opacity: 1;
    pointer-events: auto;
}

.coverflow-slide.prev {
    transform: translate(-90%, -50%) scale(1) translateZ(-100px);
    z-index: 10;
    opacity: 0.6;
    pointer-events: auto;
}

.coverflow-slide.next {
    transform: translate(-10%, -50%) scale(1) translateZ(-100px);
    z-index: 10;
    opacity: 0.6;
    pointer-events: auto;
}

.coverflow-slide.no-transition {
    transition: none !important;
}

/* --- 兩側深色方塊按鈕 --- */
.coverflow-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background-color: var(--bg-dark, #333); /* 加入預設色防呆 */
    color: var(--text-white, #fff);
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 30;
    transition: background-color 0.2s, transform 0.2s;
}

.coverflow-btn:hover {
    background-color: var(--accent-pink, #f72c95);
    transform: translateY(-50%) scale(1.1);
}

.coverflow-prev { left: 15px; }
.coverflow-next { right: 15px; }

/* --- 底部指示器圓點 --- */
.coverflow-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 160px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 0%;
    background-color: #b0c4de;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.indicator.active {
    background-color: var(--accent-pink, #f72c95);
    transform: scale(1.2);
}

/* =======================================================
Section 2 專屬：獨立像素卡片外框 
======================================================= */
.coverflow-card {
    background-color: var(--bg-dark, #333);
    padding: 4px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 0px rgba(0,0,0,0.12);
    clip-path: polygon(
        0 5px, 5px 5px, 5px 0,
        calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
        100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
        5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
    );
}

.coverflow-card-content {
    background-color: var(--text-white, #fff);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    clip-path: polygon(
        0 5px, 5px 5px, 5px 0,
        calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
        100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
        5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
    );
}

/* =======================================================
Section 2 專屬：卡片內部排版與文字樣式 (取代原本的行內樣式)
======================================================= */
.slide-img-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
}

.slide-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.slide-desc-wrapper {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.slide-desc-content {
    text-align: left;
}

/* 字卡標題 */
.card-title {
    font-size: 25px;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.2;
    color: var(--bg-dark, #333);
}

/* 字卡副標題 / 開發商 */
.card-subtitle {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.5;
    color: #555; 
}

/* 發行平台 */
.card-platform {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--bg-dark, #333);
}

/* 標籤容器 */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 單一標籤樣式 */
.card-tag {
    border: 1px solid #c8d1db;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    background-color: #fff;
    color: #333;
    border-radius: 2px;
}

/* =======================================================
像素字卡共用基礎 (缺角黑框)
======================================================= */
.pixel-card {
background-color: var(--bg-dark);
padding: 4px;
display: flex;
flex-direction: column;
box-shadow: 0 10px 0px rgba(0,0,0,0.12);
clip-path: polygon(
0 5px, 5px 5px, 5px 0,
calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
);
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
background-color 0.3s ease,
box-shadow 0.3s ease;
}

.pixel-card:hover {
transform: translateY(-10px);
background-color: #f72c95;
box-shadow: 0 20px 0px rgba(0,0,0,0.08);
}

.pixel-card-content {
background-color: var(--text-white);
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
clip-path: polygon(
0 5px, 5px 5px, 5px 0,
calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
);
}

.pixel-card-header {
background-color: var(--bg-dark);
color: var(--text-white);
text-align: center;
padding: 14px 10px;
font-size: 25px;
font-weight: bold;
border-bottom: 4px solid var(--bg-dark);
letter-spacing: 1px;
transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pixel-card:hover .pixel-card-header {
background-color: #f72c95;
border-bottom-color: #f72c95;
}

/* =======================================================
Section 2 上排: 高卡片 (純圖片 + 底部黑框標題)
======================================================= */
.pixel-card-image-only { flex-direction: column-reverse; }

.image-only-wrapper {
width: 100%;
height: 270px;
display: flex;
justify-content: center;
align-items: center;
background-color: #f5f5f5;
padding: 10px;
}

.image-only-wrapper img {
width: 100%;
height: 100%;
object-fit: contain;
}

.popout-card-container {
position: relative;
width: 100%;
display: flex;
flex-direction: column;
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popout-card-container:hover { transform: translateY(-10px); }

.popout-card-container:hover .pixel-card { background-color: #f72c95; }

.popout-card-container:hover .pixel-card-header {
background-color: #f72c95;
border-bottom-color: #f72c95;
}

.popout-card-container .pixel-card {
transform: none !important;
flex-grow: 1;
}

.popout-img {
position: absolute;
z-index: 10;
pointer-events: none;
left: 0;
right: 0;
margin: 0 auto;
top: 114px;
transform: translateY(-50%);
width: auto;
height: auto;
image-rendering: pixelated;
}

.popout-1 { margin-top: 25px; }
.popout-2 { margin-top: 25px; }
.popout-3 { margin-top: 25px; }

/* =======================================================
Section 2 下排: 矮數據卡片
======================================================= */
#section-2 .cards-container + .cards-container {
    margin-top: 50px !important;    
    margin-bottom: 80px !important;
}

/* ... existing code ... */
.pixel-card-stats-body {
padding: 15px 20px;
display: flex;
align-items: center;
gap: 15px;
height: 160px;
}

.pixel-card-stats-body {
padding: 15px 20px;
display: flex;
align-items: center;
gap: 15px;
height: 160px;
}

.stats-icon-wrapper {
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
}

.stats-icon-wrapper img {
width: auto;
height: auto;
image-rendering: pixelated;
}

.stats-text-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
text-align: left;
}

body:lang(en) .stats-text-wrapper { flex-direction: column-reverse; }
body:lang(en) .stats-title { margin-bottom: 0; margin-top: 4px; }

.stats-title {
font-size: 20px;
font-weight: bold;
color: var(--bg-dark);
margin-bottom: 2px;
}

.stats-value {
display: flex;
align-items: baseline;
color: var(--bg-dark);
}

.stats-number {
font-size: 46px;
font-weight: 900;
line-height: 1;
font-family: "Impact", "Arial Black", sans-serif;
}

.stats-unit {
font-size: 16px;
font-weight: bold;
margin-left: 6px;
}

.pixel-btn-wrapper {
display: flex;
justify-content: center;
margin-top: 50px;
width: 100%;
position: relative;
z-index: 2;
}

.pixel-btn-yellow {
background-color: #fca000;
color: var(--bg-dark);
font-size: 20px;
font-weight: 900;
padding: 15px 60px;
text-decoration: none;
display: inline-block;
position: relative;
transition: transform 0.2s ease, filter 0.2s ease;
cursor: pointer;
border: 4px solid var(--bg-dark);
clip-path: polygon(
0 4px, 4px 4px, 4px 0,
calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%,
4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px)
);
box-shadow: 0 6px 0 rgba(0,0,0,0.2);
}

.pixel-btn-yellow:hover {
transform: translateY(-3px);
filter: brightness(1.1);
box-shadow: 0 9px 0 rgba(0,0,0,0.2);
}

.pixel-btn-yellow:active {
transform: translateY(3px);
box-shadow: 0 0px 0 rgba(0,0,0,0.2);
}

/* =======================================================
Section 3: 費用圖片 & 表格
======================================================= */
.pricing-table-container {
width: 100%;
max-width: 900px;
margin: 0 auto;
position: relative;
z-index: 2;
background-color: var(--bg-dark);
padding: 4px;
box-shadow: 0 10px 0px rgba(0,0,0,0.12);
clip-path: polygon(
0 5px, 5px 5px, 5px 0,
calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
);
}

.pricing-table-content {
background-color: var(--text-white);
width: 100%;
clip-path: polygon(
0 5px, 5px 5px, 5px 0,
calc(100% - 5px) 0, calc(100% - 5px) 5px, 100% 5px,
100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
5px 100%, 5px calc(100% - 5px), 0 calc(100% - 5px)
);
}

.pricing-table {
width: 100%;
border-collapse: collapse;
text-align: left;
}

.pricing-table thead {
background-color: var(--bg-dark);
color: var(--text-white);
}

.pricing-table th {
padding: 20px 30px;
font-size: 18px;
font-weight: 900;
letter-spacing: 1px;
width: 33.33%;
}

.pricing-table td {
padding: 16px 30px;
font-size: 16px;
font-weight: bold;
color: var(--bg-dark);
border-bottom: 1px solid #e0e4eb;
}

.pricing-table tbody tr:last-child td { border-bottom: none; }

.price-number {
font-size: 26px;
font-weight: 900;
margin-right: 4px;
}

.price-unit { font-size: 14px; }

.rates-image-container {
width: 100%;
max-width: 1000px;
margin: 0 auto;
padding: 0 40px;
display: flex;
justify-content: center;
align-items: center;
position: relative;
z-index: 10;
}

.rates-image-container img {
width: auto;
height: auto;
max-width: 100%;
object-fit: contain;
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rates-image-container img:hover { transform: translateY(-10px); }
/* ==========================================
Footer 頁尾區塊
========================================== */
.main-footer {
width: 100%;
height: 120px;
background-color: var(--bg-dark);
display: flex;
justify-content: center;
align-items: center;
position: relative;
z-index: 10;
}

.footer-links {
display: flex;
align-items: center;
gap: 25px;
}

.footer-icon-link {
display: block;
width: 45px;
height: 45px;
transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-icon-link:hover {
transform: translateY(-4px);
opacity: 0.8;
}

.footer-icon-link img {
width: 100%;
height: 100%;
object-fit: contain;
image-rendering: pixelated;
}

/* ==========================================
🔥 地圖陸地點擊裝飾物跳出動畫 (Deco Popup) 🔥
========================================== */
.deco-popup-container {
position: fixed !important;
pointer-events: none !important;
z-index: 2147483647 !important;
animation: brutal-bounce-fade 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.deco-popup-img {
width: 60px !important;
height: auto !important;
display: block !important;
image-rendering: pixelated !important;
}

@keyframes brutal-bounce-fade {
0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
40%  { transform: translate(-50%, -120%) scale(1.2); opacity: 1; }
70%  { transform: translate(-50%, -100%) scale(1); opacity: 1; }
100% { transform: translate(-50%, -100%) scale(1); opacity: 0; }
}

/* STREAMING_CHUNK: FAQ 容器與項目基礎設定 /
/* ==========================================
FAQ Accordion Styles
========================================== */
.faq-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    /* 👇 關鍵修改：強制加入上方外距，把整個 FAQ 區塊往下推 */
    margin-top: 100px !important; 
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

.faq-item {
transition: all 0.3s ease;
}

.faq-item:hover {
transform: translateY(-2px);
box-shadow: 0 15px 0px rgba(0,0,0,0.1);
}

/* STREAMING_CHUNK: FAQ 問題區塊樣式 (按鈕與互動) */
.faq-question {
width: 100%;
background: none;
border: none;
padding: 20px 25px;
text-align: left;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
color: var(--bg-dark);
font-size: 20px;
font-weight: 900;
font-family: inherit;
outline: none;
-webkit-tap-highlight-color: transparent;
transition: background-color 0.3s ease;
}

.faq-question:hover span:first-child {
color: var(--accent-pink);
}

.faq-item.active .faq-question span:first-child {
color: var(--accent-pink);
}

.faq-icon {
font-size: 20px;
color: var(--bg-dark);
transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.faq-question:hover .faq-icon {
color: var(--accent-pink);
}

.faq-item.active .faq-icon {
transform: rotate(180deg);
}

/* STREAMING_CHUNK: FAQ 答案區塊展開動畫與基礎文字樣式 */
.faq-answer-wrapper {
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease-out;
}

.faq-answer {
padding: 0 25px 25px 25px;
font-size: 20px;
line-height: 1.8;
color: var(--bg-dark);
font-weight: 500;
text-align: justify;
/* 確保設定為 block，不使用 flex，以相容大部分網頁環境的文字排版 */
display: block !important;
}

/* 👇 關鍵修改：消除最後一段下方的多餘空白 /
/ 確保最後一個段落沒有下邊距，才不會破壞外層原先設定好的 padding-bottom */
.faq-answer p:last-child {
margin-bottom: 0 !important;
}

/* STREAMING_CHUNK: 語系特殊處理與卡片佈局修正 */
body:lang(en) .faq-answer { text-align: left; }

.faq-item .pixel-card-content {
display: block;
}

/* ==========================================
RWD 手機版設定 (優化版)
========================================== */
@media screen and (max-width: 950px) {
    .desktop-nav { display: none; }
    .mobile-controls { display: flex; }
    
    /* 漢堡選單動畫 */
    .hamburger.active span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

    /* --------------------------------------
       1. 修正標題列與頁尾裝飾 (精準比例與對齊調整) 
    -------------------------------------- */
    .retro-header-bar, .retro-footer-bar {
        min-height: 29px; 
        /* 👇 關鍵：讓原本的橫條背景圖高度也等比縮放為原來的 50% (原高度為 58px) */
        background-size: auto 29px; 
    }
    
    .header-left-block, .footer-right-block {
        width: 55px;  
        height: 69px; 
    }
    
    .header-stairs {
        left: 54px;   
        top: 29px;    
        width: 192px; 
        height: 40px; 
    }
    
    .footer-stairs {
        right: 54px;  
        bottom: 29px; 
        width: 161px; 
        height: 40px; 
    }
    
    .retro-header-title {
        /* 👇 關鍵：重新定位文字，讓它往左靠、往下移，避開紅線並置中於下半部黑框 */
        left: 50px; 
        top: 24px; 
        font-size: 16px; /* 稍微再縮小一點點，看起來更精緻 */
        height: auto;
    }

    /* --------------------------------------
       2. 基礎卡片容器與間距調整
    -------------------------------------- */
    .cards-container {
        grid-template-columns: 1fr !important; /* 強制單欄 */
        gap: 25px;
        max-width: 100%; /* 釋放寬度 */
        padding: 0 20px; /* 增加左右留白，避免貼邊 */
    }

    /* 確保 Section 1 的卡片在手機上也是單欄，取消 2x2 */
    #section-1 .cards-container {
        margin-top: 30px !important;
        margin-bottom: 30px !important;
    }

    .pixel-card-body {
        flex-direction: column;
        gap: 15px;
        padding: 30px 20px;
    }
    .pixel-card-text { text-align: center !important; }

    /* --------------------------------------
       3. 實績 Coverflow 輪播圖 (手機版原生滑動輪播)
    -------------------------------------- */
    .coverflow-carousel-wrapper {
        padding: 0; 
    }
    
    .coverflow-viewport {
        height: auto;           /* 讓內容自動撐開 */
        min-height: 520px;
        display: flex !important;           /* 覆蓋原本設定，改為水平排列 */
        flex-wrap: nowrap !important;
        overflow-x: auto;                   /* 開啟橫向滾動 */
        scroll-snap-type: x mandatory;      /* 開啟 X 軸滾動捕捉 */
        perspective: none;                  /* 關閉 3D */
        transform-style: flat;
        
        /* 設定左右內縮與間距，讓第一張卡片能置中並露出兩側 */
        gap: 15px;
        padding: 20px 7.5% !important;
        
        /* 隱藏原生捲軸 */
        -ms-overflow-style: none;  
        scrollbar-width: none;  
        
        /* 取消原本的絕對置中，讓元素由左至右排列 */
        justify-content: flex-start !important;
        align-items: stretch !important;
    }
    
    .coverflow-viewport::-webkit-scrollbar {
        display: none;
    }

    /* 覆蓋所有輪播卡片 (包含被 JS 加上 prev/next 狀態的卡片) */
    .coverflow-slide, 
    .coverflow-slide.prev, 
    .coverflow-slide.next, 
    .coverflow-slide.active {
        position: relative !important;   /* 解除絕對定位 (浮空狀態) */
        top: auto !important;
        left: auto !important;
        transform: none !important;      /* 移除所有 Z 軸位移與縮放 */
        
        flex: 0 0 85% !important;        /* 每張卡片佔據 85% 寬度 */
        width: 100% !important;
        max-width: none !important;
        
        scroll-snap-align: center;       /* 停止滑動時，自動對齊畫面正中央 */
        
        opacity: 1 !important;           /* 強制全部顯示，覆蓋 JS 的隱藏狀態 */
        pointer-events: auto !important; /* 確保內容與連結可點擊 */
        z-index: 1 !important;
        transition: none !important;     /* 關閉 JS 動畫，交給手機原生滑動 */
    }

    /* 手機版隱藏左右按鈕與下方圓點，改用純手指直覺滑動 */
    .coverflow-btn, 
    .coverflow-indicators {
        display: none !important;
    }

    /* --------------------------------------
       4. 下排數據卡片修正
    -------------------------------------- */
    /* 修正下排卡片與上排的距離 (手機版不需要那麼遠) */
    #section-2 .cards-container + .cards-container {
        margin-top: 80px !important;
        margin-bottom: 50px !important;
    }

    .pixel-card-stats-body {
        flex-direction: column;
        height: auto;
        padding: 30px 20px;
        justify-content: center;
    }
    .stats-text-wrapper {
        align-items: center;
        text-align: center;
    }
    body:lang(en) .stats-text-wrapper { align-items: center; }
    
    /* --------------------------------------
       5. 費用表格與 FAQ 微調
    -------------------------------------- */
    .strength-subtitle { font-size: 24px; }
    .pricing-table-container { max-width: 95%; }
    .pricing-table th, .pricing-table td {
        padding: 10px;
        font-size: 13px;
    }
    .price-number { font-size: 18px; }
    
    .faq-container { padding: 0 15px; }
}

@media screen and (max-width: 768px) {
    .faq-question {
        font-size: 15px; /* 稍微縮小字體 */
        padding: 15px;   /* 減少 padding 避免文字太擠 */
    }
    .faq-answer {
        font-size: 14px;
        padding: 0 15px 20px 15px;
    }
}