﻿@charset "UTF-8";

/* 字體 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&display=swap");


/* =========================
   0. RESET / BASE
========================= */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figure,
figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}

body {
	line-height: 1;
}

ol, ul, li {
	list-style: none;
}

blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* links */
a {
	text-decoration: none;
	color: inherit;
}

/* general */
html {
	-webkit-text-size-adjust: none;
	scroll-behavior: smooth;
}

body {
	font-family: "Noto Sans TC", system-ui, sans-serif;
	background: #f7f7f9;
	color: #222;
	margin: 0;
	line-height: 1.5;
}

/* mobile global helpers */
@media screen and (max-width: 768px) {
	* {
		box-sizing: border-box;
	}
	html,
	body {
		-webkit-text-size-adjust: none; /* iPhone 旋轉後避免字體放大 */
	}
}


/* =========================
   1. LAYOUT / WRAPPER / HEADER / HERO
========================= */

#WRAPPER {
	width: 100%;
	min-width: 1100px;
	margin: 0 auto;
}

@media screen and (max-width: 768px) {
	#WRAPPER { min-width: 100%; }
}

header {
	clear: both;
	width: 100%;
	margin: 0 auto;
	background-color: #727171;
	padding: 5px 0;
}
header img {
	padding-left: 15px;
}
@media screen and (max-width: 768px) {
	header img {
		width: 60%;
		padding-left: 5px;
	}
}

article {
	width: 100%;
	margin: 0 auto;
}

/* 桌機版首屏 title */
#title {
	width: 100%;
	height: 530px;
	margin: 0 auto;
	overflow: hidden;
	text-align: center;
	background: #fed000;
}
#title div {
	width: 1200px;
	margin: 0 auto;
}
#title div h1 {
	width: 580px;
	font-size: 1.65rem;
	color: #fff100;
	background: #547ebf;
	padding: 5px 10px;
	font-weight: 600;
	line-height: 1.65;
	text-align: left;
}
#title div ul {
	width: 580px;
	background: #547ebf;
	padding: 0 10px;
	text-align: left;
}
#title div li {
	font-size: 1.155rem;
	color: #FFF;
	margin: 15px 0;
}
#title div li span {
	font-size: 1.35rem;
	font-weight: 600;
	padding-right: 10px;
}

/* 手機版首屏 title_m */
#title_m {
	display: none;
}
@media screen and (max-width: 768px) {
	#title { display: none; }
	#title_m { display: block; }
	#title_m img { width: 100%; }
}


/* =========================
   2. TOP NAV / TABS (桌機+手機)
========================= */

/* 外層整條 nav 是 sticky */
.top-nav {
	background: #ffffff;
	border-bottom: 1px solid #e5e6eb;
	box-shadow: 0 4px 20px rgba(0,0,0,.06);
	position: sticky;
	top: 0;
	z-index: 1000;
	font-family: "Noto Sans TC", system-ui, sans-serif;
}

/* 這層用來啟用手機版橫向捲動 */
.top-nav-scroll {
	max-width: 1200px;
	margin: 0 auto;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* 內層按鈕容器 */
.top-nav-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 25px;
	padding: 12px 16px;
	min-width: max-content;
}

/* 單一導覽 tab */
.nav-item {
	position: relative;
	flex-shrink: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: #444;
	background: #f5f6ff;
	border: 1px solid #d5d9ff;
	border-radius: 10px;
	padding: 10px 16px;
	line-height: 1.2;
	text-align: center;
	min-width: 150px;
	user-select: none;
	cursor: pointer;
	transition: all .18s ease;
	box-shadow: 0 4px 10px rgba(0,0,0,.04);
}
.nav-item .sub {
	display: block;
	margin-top: 5px;
	font-size: .85rem;
	font-weight: 500;
	line-height: 1.2;
	color: #6b6f85;
}

/* hover 效果 */
.nav-item:hover {
	background: #4a6cff;
	border-color: #4a6cff;
	color: #fff;
	box-shadow: 0 10px 24px rgba(74,108,255,.3);
}
.nav-item:hover .sub {
	color: #fff;
}

/* active tab */
.nav-item.active {
	background: #4a6cff;
	border-color: #4a6cff;
	color: #fff;
	box-shadow: 0 10px 24px rgba(74,108,255,.3);
}
.nav-item.active .sub {
	color: #fff;
}

/* 手機：橫向滑條、tab 拉寬、左對齊文案 */
@media (max-width: 768px) {
	.top-nav-inner {
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 12px;
		min-width: max-content;
	}

	.nav-item {
		min-width: 180px;
		text-align: left;
		line-height: 1.4;
		font-size: 1rem;
	}

	.nav-item .sub {
		white-space: normal;
		font-size: .7rem;
		margin-top: 4px;
	}

	.top-nav-scroll::-webkit-scrollbar {
		height: 4px;
	}
	.top-nav-scroll::-webkit-scrollbar-thumb {
		background: #c6c9ff;
		border-radius: 999px;
	}
	.top-nav-scroll::-webkit-scrollbar-track {
		background: transparent;
	}
}


/* =========================
   3. MAIN CONTENT WRAPPER / SECTION BLOCKS
========================= */

.main-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 20px 30px;
}

.section-block {
	display: none;
	background: #fff;
	border: 1px solid #e5e6eb;
	border-radius: 16px;
	box-shadow: 0 10px 24px rgba(0,0,0,.05);
	padding: 24px;
	margin-top: 30px;
}
.section-block.active {
	display: block;
}

.block-title {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: 16px;
}
.block-title .main {
	font-size: 1.5rem;
	font-weight: 600;
	color: #222;
}
.block-title .sub {
	font-size: .95rem;
	color: #666;
	font-weight: 500;
}

/* 小段落標題 */
.section-subtitle {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: 24px 0 12px;
	font-size: 1.125rem;
	font-weight: 700;
	color: #d91e18;
}
.section-subtitle::before {
	content:"";
	width: 4px;
	height: 1.2em;
	background: #d91e18;
	border-radius: 2px;
}


/* =========================
   4. 套組優惠卡 (bundle-card)
========================= */

.bundle-card {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	background: linear-gradient(135deg, #ff8a3d 0%, #ff8a3d 100%);;
	color: #fff;
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

.bundle-left {
	flex: 1 1 260px;
	min-width: 260px;
	display: flex;
	align-items: flex-start;
	gap: 30px;
}
.bundle-cover-group {
	display: flex;
	flex-direction: row;
	gap: 30px;
}
.bundle-cover-group img {
	width: 130px;
	height: auto;
	object-fit: cover;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 10px rgba(0,0,0,.25);
	border: 2px solid rgba(255,255,255,.6);
}

.bundle-info {
	color: #fff;
}
.bundle-title {
	font-size: 1.35rem;
	font-weight: 700;
	margin-bottom: 6px;
	line-height: 1.4;
}
.bundle-desc {
	font-size: 1.05rem;
	line-height: 1.4;
	opacity: .9;
	margin-bottom: 10px;
}
.bundle-price {
	font-size: .95rem;
	line-height: 1.4;
}
.bundle-price .orig {
	text-decoration: line-through;
	opacity: .8;
}
.bundle-price .now {
	display: inline-block;
	margin-top: 4px;
	padding: 5px 12px;
	border-radius: 6px;
	background: #fff;
	color: #ff8a3d;
	font-size: 1.3rem;
	font-weight: 700;
}

.bundle-right {
	flex: 0 1 200px;
	min-width: 200px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
}
.bundle-cta {
	background: #fef9bd;
	color: #fb851a;
	font-weight: 600;
	font-size: 1.25rem;
	border: 0;
	border-radius: 10px;
	padding: 12px 16px;
	box-shadow: 0 6px 14px rgba(0,0,0,.18);
	cursor: pointer;
}
.bundle-note {
	font-size: .8rem;
	line-height: 1.4;
	margin-top: 8px;
	opacity: .9;
	color: #fee689;
}

/* bundle RWD */
@media (max-width: 768px) {
  .bundle-card {
    flex-direction: column;
    padding: 20px 16px;
  }

  /* 讓左側內容變成上下堆疊：
     第一行：封面群
     第二行：文字資訊 bundle-info
  */
  .bundle-left {
    flex-direction: column;    /* ⬅ 由 row 改 column */
    align-items: flex-start;
    gap: 12px;
  }

  .bundle-cover-group {
    flex-direction: row;       /* 封面們仍橫向排 */
    gap: 8px;
  }

  .bundle-cover-group img {
    width: 70px;
    height: 94px;
  }

  .bundle-info {
    flex: 1;
    width: 100%;               /* 吃滿整列，放在封面下方 */
  }

  .bundle-title {
    font-size: 1rem;
  }

  .bundle-price .now {
    font-size: 1rem;
    padding: 2px 6px;
  }

  /* CTA 區往下放，置中 */
  .bundle-right {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    align-items: center;
    margin-top: 12px;
  }

  .bundle-cta {
    width: 100%;
    max-width: 320px;
  }

  .bundle-note {
    font-size: .75rem;
    margin-top: 6px;
    line-height: 1.4;
  }
}

/* =========================
   5. 單本書卡 + 試讀 (book-row-compact)
========================= */

.book-row-compact {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	justify-content: flex-start;
	margin-top: 24px;
}

.book-card-compact {
	flex: 1 1 calc(50% - 24px);
	background: #fff;
	border: 1px solid #e5e6eb;
	border-radius: 14px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.06);
	padding: 16px 20px;
	box-sizing: border-box;
}

/* 第一行：封面+文字 / 加入購物車按鈕 */
.book-head-row-tight {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

/* 左塊：主圖 + 書名 + 價格 */
.book-line-left {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}
.book-thumb {
	width: 120px;
	height: auto;
	object-fit: cover;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #f0f0f3;
	flex-shrink: 0;
}
.book-line-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.title-tight {
	font-weight: 600;
	font-size: 1.2rem;
	color: #222;
	line-height: 1.5;
	margin-bottom: 4px;
}
.price-tight {
	display: flex;
	flex-direction: column; /* 價格上下排：定價 / 優惠價 */
	gap: 2px;
	font-size: .9rem;
	line-height: 1.4;
}
.price-tight .orig {
	color: #666;
	text-decoration: line-through;
}
.price-tight .discount {
	color: #d9534f;
	font-weight: 700;
	font-size: 1.125rem;
}

/* 右塊：購物車按鈕 */
.book-line-right {
	flex-shrink: 0;
	display: flex;
	align-items: flex-start;
	margin-top: 10px;
}
.btn-cart-small {
	font-size: 1.05rem;
	font-weight: 600;
	border-radius: 6px;
	padding: 6px 10px;
	background: #f5f6ff;
	color: #4a6cff;
	border: 1px solid #d5d9ff;
	cursor: pointer;
	white-space: nowrap;
	transition: 0.2s;
}
.btn-cart-small:hover {
	background: #e6e9ff;
}

/* 第二行：試讀縮圖列 */
.sample-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}
.sample-row img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border: 1px solid #cfcfd8;
	border-radius: 4px;
	background: #fafafa;
	box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

@media (max-width: 768px) {
	.book-card-compact {
		flex: 1 1 100%;
	}
/* 第二行：試讀縮圖列 */
.sample-row {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

/* 右塊：購物車按鈕 */
.book-line-right {
	flex-shrink: 0;
	display: flex;
	align-items: flex-start;
	margin-top: 10px;
}
.btn-cart-small {
	font-size: 1.05rem;
	font-weight: 600;
	border-radius: 6px;
	padding: 6px 10px;
	background: #f5f6ff;
	color: #4a6cff;
	border: 1px solid #d5d9ff;
	cursor: pointer;
	white-space: nowrap;
	transition: 0.2s;
}
.book-line-right {
    width: 100%;
    justify-content: center;   /* 按鈕置中 */
    margin-top: 12px;
  }

  .btn-cart-small {
    width: 100%;               /* 按鈕滿版 */
    max-width: 320px;          /* 可加上上限寬度讓它不太長 */
    font-size: 1rem;
    text-align: center;
  }
}


/* =========================
   6. 名師教學區 (teacher-block)
========================= */

.teacher-block {
	padding: 10px;
	color: #222;
	line-height: 1.6;
	max-width: 1200px;
	margin: 0 auto;
	font-family: "Noto Sans TC", system-ui, sans-serif;
}

/* (1) 亮點宣言 */
.teacher-headlines {
	margin-bottom: 16px;
}
.teacher-headlines .tagline-line {
	font-size: 1.125rem;
	font-weight: 700;
	color: #d91e18;
	line-height: 1.5;
}
.teacher-headlines .subline {
	font-size: 1.285rem;
	font-weight: 700;
	color: #d91e18;
	line-height: 1.5;
}
.teacher-headlines .keyword {
	color: #ff6b00;
}

/* (2) 說明段落 */
.teacher-desc {
	font-size: 1rem;
	color: #444;
	background: #fffdfa;
	border: 1px solid #ffe6b5;
	border-radius: 10px;
	padding: 16px 20px;
	margin-bottom: 24px;
}
.teacher-desc p {
	margin: 0 0 .8em;
}
.teacher-desc a.more-link {
	color: #4a6cff;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	white-space: nowrap;
}

/* (3) 下方左右 */
.teacher-flex {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

/* 左側：影音教學示範 */
.teacher-media {
	flex: 1 1 320px;
	min-width: 280px;
	background: #fafafa;
	border: 1px solid #dcdde3;
	border-radius: 12px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.06);
	padding: 16px;
}
.teacher-media .media-header {
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: .5rem;
}
.teacher-media .media-box {
	background: #fff;
	border: 1px solid #dcdde3;
	border-radius: 10px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.05);
	padding: 16px;
	text-align: center;
	font-size: .85rem;
	color: #444;
	line-height: 1.5;
}
.teacher-media .media-box .video-thumb {
	width: 100%;
	height: 320px;
	background: #ccc;
	border-radius: 8px;
	margin-bottom: 12px;
	border: 1px solid #bbb;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 600;
	font-size: .9rem;
}
.teacher-media .note-link a {
	color: #4a6cff;
	word-break: break-all;
	font-size: .8rem;
}
.teacher-media iframe {
	display: block;
	width: 95%;
	height: 300px;
	position: static;
	overflow: hidden;
}

/* 右側：課綱資訊 */
.teacher-syllabus {
	flex: 1 1 400px;
	min-width: 320px;
}
.syllabus-meta {
	font-size: 1rem;
	line-height: 1.5;
	color: #333;
	border-left: 4px solid #f39800;
	padding-left: 12px;
	margin-bottom: 16px;
	font-weight: 600;
}
.syllabus-meta div + div {
	margin-top: 10px;
}

/* 週次表 */
.syllabus-card {
	border: 1px solid #dcdde3;
	border-radius: 12px;
	box-shadow: 0 4px 14px rgba(0,0,0,.06);
	overflow: hidden;
	font-size: .85rem;
	color: #fff;
}
.syllabus-row {
	display: flex;
	width: 100%;
	min-height: 32px;
	border: 1px solid #FFF;
}
.syllabus-week {
	flex: 0 0 70px;
	font-weight: 600;
	color: #fff;
	background: #6a1b9a;
	padding: 8px 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.syllabus-content {
	flex: 1 1 auto;
	background: #f39800;
	color: #fff;
	padding: 8px 12px;
	line-height: 1.4;
	font-weight: 500;
	border-left: 1px solid rgba(255,255,255,.4);
}

/* teacher-block RWD */
@media (max-width: 768px) {

.teacher-media .media-box .video-thumb {
	width: 100%;
	height: 200px;
}

	.teacher-media iframe {
		width: 100%;
		height: 200px;
	}
}


/* =========================
   7. 閱讀｜聽力 商品格 (reading-grid)
========================= */

.reading-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	justify-content: flex-start;
}

.reading-card {
	width: 250px;
	height:400px;
	background: #fff;
	border: 1px solid #e5e6eb;
	border-radius: 14px;
	box-shadow: 0 6px 16px rgba(0,0,0,0.06);
	padding: 16px 16px 20px;
	box-sizing: border-box;
	text-align: center;
	display: flex;
	flex-direction: column;
	transition: all 0.18s ease;
	float:left;
	margin:15px;
}
.reading-card:hover {
	box-shadow: 0 12px 28px rgba(0,0,0,0.08);
	transform: translateY(-4px);
}

.reading-cover {
	width: 100%;
	height: 185px;
	border: 1px solid #ccc;
	background: #f5f5f7;
	border-radius: 8px;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .8rem;
	color: #999;
	font-weight: 500;
}

.reading-cover a img {
max-width:100%;
	height: 182px;
border-radius:6px;
}

.reading-title {
	font-size: 1.15rem;
	font-weight: 600;
	color: #222;
	line-height: 1.4;
	min-height: 2.8em; /* 兩行高度，避免高度不齊 */
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.reading-priceblock {
	font-size: 1rem;
	line-height: 1.5;
	margin-bottom: 12px;
}
.reading-priceblock .sale {
	color: #d9534f;
	font-weight: 700;
}
.reading-priceblock small {
	font-size: .95rem;
	color: #999;
	font-weight: 400;
	margin-left: .25em;
}
.reading-priceblock .list {
	color: #555;
	font-size: .85rem;
}

.reading-cartbtn {
	appearance: none;
	border: none;
	border-radius: 8px;
	background: #e53935;
	color: #fff;
	font-size: .8rem;
	font-weight: 600;
	padding: 8px 10px;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(229,57,53,.4);
	transition: all .18s ease;
}
.reading-cartbtn:hover {
	background: #c62828;
	box-shadow: 0 6px 14px rgba(229,57,53,.5);
}

/* reading-grid RWD */
@media (max-width: 768px) {

.reading-grid {
	gap: 30px;
}

.reading-card {
	width: 46%;
	height:430px;
	padding: 5px;
	margin:5px;
}

.reading-cover {
	width: 100%;
	height: auto;
	margin-bottom: 20px;
}

.reading-cover a img {
max-width:100%;
	height: auto;
border-radius:6px;
}

.reading-title {
	font-size: 0.95rem;
	line-height: 1.5;
	margin: 10px;
}

.reading-priceblock {
	line-height: 1.5;
	margin-top: 20px;
	margin-bottom: 12px;
}
	
}

/* =========================
   8. 其他小區塊 / footer / cart
========================= */

/* 特價提示塊 */
.book_sale img {
	width: 30%;
	margin: 10px;
}

/* reading-grid RWD */
@media (max-width: 768px) {

.book_sale img {
	width: 100%;
	margin: 10px;
}
}

/* footer */
footer {
	clear: both;
	width: 100%;
	margin: 0 auto;
	background: #4B3100;
	color: #FFF;
	padding: 8px 0;
	text-align: center;
	font-size: 0.85rem;
	line-height: 1.5;
}

/* 浮動購物車 */
#car {
	width: 145px;
	position: fixed;
	z-index: 999999;
}
#car a {
	position: fixed;
	top: 42px;
	right: 5px;

	display: inline-block;
	width: 25px;
	padding: 5px 3px;

	background: #ff4f81;
	border: 1px solid #EEE;
	border-radius: 15px;
	box-shadow: 0 5px 15px #193047;

	color: #FFF;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
}

/* cart iframe (桌機版右上角的小購物車總覽) */
iframe {
	width: 140px;
	position: fixed;
	right: 40px;
	top: 42px;
	height: 180px;
	overflow: hidden;
	border: 0;
}

/* tab-content 裡的 iframe (如果內頁嵌東西用) */
.tab-content iframe {
	width: 100%;
	height: 600px;
	position: static;
	border: 0;
}

/* cart RWD: 手機時只留粉紅按鈕，隱藏右上iframe */
@media screen and (max-width: 768px) {
	#car {
		width: auto;
	}
	#car a {
		width: 35px;
		border-radius: 5px;
		top: 80%;
		line-height: 1.5;
	}
	iframe {
		display: none;
	}
}
