/*
Theme Name: SPA5278 Lite
Description: 海底撈娛樂 精簡前端子主題（GeneratePress child）。手刻 PHP 範本、無頁面建構器，取代 Elementor。保留 WordPress 後台 / 文章系統 / Rank Math SEO / 對外網址。
Author: gcreate
Template: generatepress
Version: 1.0.0
Text Domain: spa5278-lite
*/

/* ============================================================
   全站基礎（精簡手刻；不移植 Elementor / Flatsome 肥碼）
   ============================================================ */
/* 鎖死全站橫向捲動:手機實機(iOS Safari/WebKit)會因內部絕對定位或全寬元素
   而允許 body 左右平移(桌面 Chrome 看不出來)。在根層 clip 一次到位;
   clip 不會像 hidden 把 body 變成捲動容器,不影響 position:sticky。 */
html, body {
	overflow-x: clip;
}
@supports not (overflow: clip) {
	html, body { overflow-x: hidden; }
}

:root {
	--gc-max: 1140px;
	--gc-primary: #02b5ba;
	--gc-dark: #1a1a1a;
	--gc-text: #222;
	--gc-muted: #666;
	--gc-bg: #fff;
	--gc-line: #e5e5e5;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
	color: var(--gc-text);
	background: var(--gc-bg);
	line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.gc-container { max-width: var(--gc-max); margin: 0 auto; padding: 0 16px; }
.gc-content { padding: 32px 16px; }

/* ===== 頁首 ===== */
.gc-site-header {
	position: sticky; top: 0; z-index: 1000;
	background: var(--gc-bg);
	border-bottom: 1px solid var(--gc-line);
}
.gc-header-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; min-height: 64px;
}
.gc-logo img, .gc-logo .custom-logo, .gc-logo-img { height: 48px; width: auto; max-height: 48px; display: block; }
.gc-logo-text { font-weight: 700; font-size: 20px; color: var(--gc-dark); }

.gc-primary-nav .gc-menu {
	display: flex; flex-wrap: wrap; justify-content: flex-end;
	gap: 8px 16px; list-style: none; margin: 0; padding: 0;
}
.gc-primary-nav .gc-menu a { white-space: nowrap; }
.gc-primary-nav .gc-menu a { color: var(--gc-dark); font-weight: 500; }
.gc-primary-nav .gc-menu a:hover { color: var(--gc-primary); text-decoration: none; }

.gc-header-right { display: flex; align-items: center; gap: 10px; }

/* 全站搜尋：圖示鈕（連到 /front/search 全站搜尋頁） */
.gc-search-toggle { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--gc-dark); line-height: 0; }
.gc-search-toggle:hover { color: var(--gc-primary); }
.gc-search-toggle svg { width: 22px; height: 22px; display: block; }

/* 會員 LINE 登入 / 登出 */
.gc-line-login { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: #06C755; color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.gc-line-login:hover { filter: brightness(0.96); color: #fff; text-decoration: none; }
.gc-line-login .gc-login-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.gc-line-login.is-out { background: #eef2f3; color: var(--gc-dark); }
.gc-line-login.is-out:hover { background: #e2e8ea; color: var(--gc-dark); }

.gc-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.gc-hamburger span { width: 24px; height: 2px; background: var(--gc-dark); display: block; }

.gc-mobile-nav { border-top: 1px solid var(--gc-line); background: var(--gc-bg); }
.gc-mobile-nav .gc-mobile-menu { list-style: none; margin: 0; padding: 8px 16px; }
.gc-mobile-nav .gc-mobile-menu li { border-bottom: 1px solid var(--gc-line); }
.gc-mobile-nav .gc-mobile-menu a { display: block; padding: 12px 0; color: var(--gc-dark); }

/* ===== 內容 / 文章列表 ===== */
.gc-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gc-post-card { border: 1px solid var(--gc-line); border-radius: 8px; overflow: hidden; }
.gc-post-card .gc-post-title { font-size: 18px; margin: 12px; }
.gc-post-card .gc-post-excerpt { margin: 0 12px; color: var(--gc-muted); font-size: 14px; }
.gc-readmore { display: inline-block; margin: 12px; font-weight: 600; }

.gc-page-title, .gc-entry-title { font-size: 28px; margin: 0 0 16px; color: var(--gc-dark); }
.gc-entry-meta { color: var(--gc-muted); font-size: 14px; margin-bottom: 16px; }
.gc-entry img { margin: 16px 0; border-radius: 6px; }

/* 手機：文章/頁面內的寬表格自帶橫向捲動，不被 body 的 overflow-x:clip 裁掉而卡住
   （例：舒壓會館頁的館別比較表）。桌機維持原本 table 佈局不動。 */
@media (max-width: 768px) {
	.gc-entry table {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* ===== 共用按鈕（頁尾等全站使用，故放全站 CSS） ===== */
.gc-btn { display: inline-block; padding: 10px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.gc-btn:hover { opacity: .9; text-decoration: none; }
.gc-btn-primary { background: var(--gc-primary); color: #fff; }
.gc-btn-line { background: #00C300; color: #fff; }
.gc-btn-tel { background: var(--gc-primary); color: #fff; }
.gc-footer-contact { display: flex; flex-wrap: wrap; gap: 10px; }

/* ===== 頁尾 ===== */
.gc-site-footer { background: var(--gc-dark); color: #cfd3d6; margin-top: 48px; }
.gc-footer-top {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
	gap: 28px;
	padding: 44px 16px;
}
.gc-footer-name { font-size: 20px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.gc-footer-desc { font-size: 13px; line-height: 1.8; color: #9aa0a6; margin: 0 0 16px; }
.gc-footer-col-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0 0 12px; }
.gc-footer-col ul { list-style: none; margin: 0; padding: 0; }
.gc-footer-col li { margin-bottom: 9px; }
.gc-site-footer a { color: #b9bdc1; font-size: 14px; }
.gc-site-footer a:hover { color: #fff; }
/* 頁尾的諮詢按鈕(LINE/電話)維持白字：上面的 .gc-site-footer a(0,1,1)
   會蓋掉 .gc-btn-line/.gc-btn-tel(0,1,0)，這裡用 0,2,0 拉回白色。 */
.gc-site-footer .gc-btn,
.gc-site-footer .gc-btn:hover { color: #fff; }
.gc-footer-copy { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; }
.gc-footer-copy small { color: #80868b; font-size: 13px; }
@media (max-width: 880px) {
	.gc-footer-top { grid-template-columns: 1fr 1fr; gap: 20px 16px; padding: 32px 16px; }
}

/* 手機第一層快捷列（桌機隱藏，880 以下常駐顯示） */
/* 選單:桌機與手機一致 —— 5 顆重點快捷列常駐 + 漢堡收其餘。
   完整 11 項選單(.gc-primary-nav)一律不顯示(原本桌機會擠成兩行)。 */
.gc-primary-nav { display: none; }
.gc-hamburger { display: flex; }

.gc-mobile-quickbar {
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: center;              /* 桌機:5 顆置中於 header 中段 */
	flex: 1 1 auto;                        /* 桌機:佔 logo 與右側控制之間的空間(同一排) */
	padding: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.gc-mobile-quickbar::-webkit-scrollbar { display: none; }
.gc-mobile-quickbar .gc-qb-item {
	flex: 0 0 auto;                        /* 桌機:自然寬,不拉伸 */
	min-width: max-content;
	text-align: center;
	white-space: nowrap;
	padding: 8px 22px;
	border: 1px solid var(--gc-primary);
	border-radius: 999px;
	background: var(--gc-primary);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
}
.gc-mobile-quickbar .gc-qb-item:hover { text-decoration: none; color: #fff; }

/* 手機:快捷列換到 header 第二排(全寬)、5 顆均分填滿、字級縮小、可橫向捲 */
@media (max-width: 880px) {
	.gc-header-inner { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 0; }   /* 換行 + 頂部留白(不貼頂);底部留白交給快捷列自身 pad + 內容 margin,避免下方過高 */
	.gc-logo-img, .gc-logo img, .gc-logo .custom-logo { height: 40px; max-height: 40px; }  /* 手機 logo 略縮,騰出空間 */
	.gc-header-right { gap: 6px; }
	.gc-mobile-quickbar {
		order: 3;                            /* 排到 logo/右側控制之後 → 第二排 */
		flex: 1 1 100%;                      /* 佔整排(basis 100% 強制換行) */
		justify-content: flex-start;
		gap: 4px;
		padding: 8px 6px;
		/* 抵銷 .gc-container 的左右 16px padding → 滿版 375,5 顆才塞得下 */
		margin: 4px -16px 0;
		width: auto;
		border-top: 1px solid var(--gc-line);
	}
	.gc-mobile-quickbar .gc-qb-item {
		flex: 1 1 0;
		padding: 6px 6px;
		font-size: 12px;
	}
}

/* ===== RWD ===== */
@media (max-width: 880px) {
	.gc-post-grid { grid-template-columns: 1fr; }
}

/* 頁首橫幅(主題頁,與前台外掛頁 hero 同高同調性)。類名避開 home.css 首頁輪播的 .gc-hero */
.gc-page-hero {
	height: 150px;
	background-image: url("/wp-content/uploads/2024/06/ns_bn.jpg");
	background-size: cover;
	background-position: center;
	position: relative;
}
.gc-page-hero::after { /* 洗白,與前台 hero opacity .5 一致 */
	content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.5);
}
.gc-page-hero-inner { /* 圖上標題,對齊前台 hero(垂直置中、左 20%) */
	position: absolute; top: 50%; transform: translateY(-50%); left: 20%; z-index: 1;
}
.gc-page-hero-title {
	display: block; font-size: 32px; font-weight: 700; color: #000; line-height: 1.2;
}
.gc-page-hero-bar {
	display: block; width: 50px; height: 6px; background: var(--gc-primary); margin-top: 8px;
}
@media (max-width: 768px) {
	.gc-page-hero-inner { left: 15px; }
	.gc-page-hero-title { font-size: 24px; }
	.gc-page-hero-bar { height: 4px; margin-top: 5px; }
}
@media (max-width: 768px) {
	.gc-page-hero { height: 60px; }
}

/* 前台外掛頁 hero（#suya-header）統一比照主題 .gc-page-hero：只留中文標題+teal 底線，
   拿掉英文副標(原 inline-block 疊兩行導致容器高於橫幅→手機爆版)。電腦/手機一致。 */
#suya-header .en-title { display: none !important; } /* 蓋過 Bootstrap .d-inline-block!important */
#suya-header .main-title { color: #000 !important; line-height: 1.2; } /* 統一為主題頁標題色(原 #516377 灰藍) */
#suya-header .bar { margin-top: 8px; }
@media (max-width: 768px) {
	#suya-header .container { left: 15px; }
	#suya-header .bar { margin-top: 5px; height: 4px; }
}

/* SEO 內部連結區塊(文章尾) */
.gc-related-links {
	margin: 32px 0 8px;
	padding: 20px 22px;
	background: #f3f9f9;
	border-radius: 12px;
	border-left: 4px solid var(--gc-primary);
}
.gc-related-links h2 { font-size: 18px; margin: 0 0 12px; color: var(--gc-dark); }
.gc-related-links ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.gc-related-links li { margin: 0; }
.gc-related-links a { color: var(--gc-primary); font-weight: 600; text-decoration: none; }
.gc-related-links a:hover { text-decoration: underline; }

/* AEO 常見問題 FAQ */
.gc-aeo-faq { margin: 32px 0; }
.gc-aeo-faq > h2 { font-size: 20px; margin: 0 0 14px; }
.gc-aeo-faq-item { border: 1px solid var(--gc-line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; background: #fff; }
.gc-aeo-faq-item summary { font-weight: 700; cursor: pointer; color: var(--gc-dark); list-style: none; }
.gc-aeo-faq-item summary::-webkit-details-marker { display: none; }
.gc-aeo-faq-item summary::before { content: "＋"; color: var(--gc-primary); font-weight: 700; margin-right: 8px; }
.gc-aeo-faq-item[open] summary::before { content: "－"; }
.gc-aeo-faq-a { margin-top: 10px; color: var(--gc-muted); line-height: 1.7; }
