/* ============================================================================
   智怡舞蹈教室｜五個內頁共用樣式 common.css
   適用：class.html / know.html / rule.html / express_new.html / map.html

   【修改方式】
   1. 按 Ctrl+F，搜尋下方的中文區塊名稱（例如「導覽按鈕」）。
   2. 每個區塊先放一般／電腦設定，緊接著放手機設定。
   3. @media (max-width:650px) 表示螢幕寬度 650px 以下才生效。
   4. min-height 是「最低高度」；padding 是內容到邊緣的內距。
   5. 修改前先備份；修改後若看不到效果，清除快取或重新整理。

   【色碼與尺寸小抄】
   #9999CC：原本的紫色背景。px：像素。gap：項目間距。
   margin：元素外面的距離。padding：元素裡面的距離。
   本檔已將重複的功能設定集中；手機覆寫與一般設定並存屬正常設計。
   ============================================================================ */

/* ===== 01. 全站基礎｜紫色外框、白色內容、字體 ===== */
* {
  box-sizing: border-box;  /* 尺寸包含 padding 和 border，較容易計算 */
}
html { scroll-behavior: smooth; }  /* 按「回頂端」時平順捲動 */
body.inner-page {
  margin: 0;
  padding: 8px 10px 24px; /* 白色內容外圍露出的紫色寬度 */
  background: #9999CC;      /* 網站原有的紫色 */
  color: #222;
  font-family: "Microsoft JhengHei", "PingFang TC", Arial, sans-serif;
}
.page-shell {
  width: 100%;
  max-width: 793px;         /* 網頁主體最大寬度 */
  min-width: 0;
  margin: auto;             /* 頁面水平置中 */
  background: #fff;
}
.page-main {
  min-width: 0;
  padding: 12px 24px 16px; /* 內容與白色外框的距離 */
}
.page-main h1 {
  margin: 0 0 12px;
  color: #993300;
  font-size: 20px;
  line-height: 1.5;
}
@media (max-width: 650px) {
  body.inner-page { padding: 5px 5px 16px; }
  .page-main { padding: 10px 12px 15px; }
  .page-main h1 { font-size: 19px; }
}

/* ===== 02. 頂部 Logo 與首頁橫幅 =====
   紫色 Logo 區與橘色橫幅分開；點橫幅可返回首頁。
   橫幅太高：調整 .home-banner 的 padding。
*/
.page-header { background: #fff; }
.logo-area {
  background: #9999CC;
  padding: 0 0 12px;
}
.studio-logo {
  display: block;
  max-width: 100%;
  height: auto;
  background: #9999CC;
}
.home-banner {
  display: block;
  padding: 15px 10px 0;
  text-align: center;
}
.home-banner img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}
/* 舊版「導覽列下方再放返回首頁文字」目前隱藏，保留底部返回首頁鈕。 */
.home-hint { display: none; }
@media (max-width: 650px) {
  .logo-area { padding-bottom: 9px; }
  .home-banner { padding: 10px 4px 0; }
}

/* ===== 03. 五個導覽按鈕｜顏色、高度、字體、圖示 =====
   由左至右：課程介紹／師資簡介／報名須知／活動消息／交通位置。
   改顏色：在下方 .nav-class 等五行更換兩組色碼（上色→下色）。
   改電腦高度：min-height:45px；手機高度：下方手機區的 40px。
   若字太大擠在一起：調整 font-size；圖示尺寸：.nav-icon。
   五個按鈕維持一排，勿刪 grid-template-columns。
*/
.inner-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 5px;               /* 按鈕彼此間距 */
  margin: 8px 10px 2px;
  padding: 9px 0;
  border-top: 2px solid #d9d9e5;
  border-bottom: 2px solid #d9d9e5;
}
.inner-nav a.nav-tile {
  display: flex;
  flex-direction: row;    /* 電腦：圖示與文字左右排列 */
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 45px;
  padding: 5px 4px;
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 7px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,.20);
  transition: filter .15s ease;
}
.inner-nav .nav-icon {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.inner-nav .nav-caption {
  display: block;
  min-width: 0;
  white-space: nowrap;   /* 導覽文字不要拆成兩行 */
}
/* 五顆漸層：第一個顏色在上面，第二個顏色在下面。 */
.inner-nav .nav-class { background: linear-gradient(to bottom, #BBDC55, #8FCB38); }
.inner-nav .nav-know { background: linear-gradient(to bottom, #B9A6EC, #947DD4); }
.inner-nav .nav-rule { background: linear-gradient(to bottom, #F9C36B, #EEA03E); }
.inner-nav .nav-express_new { background: linear-gradient(to bottom, #F18CAF, #E76192); }
.inner-nav .nav-map { background: linear-gradient(to bottom, #91C8F1, #5EA9E0); }
.inner-nav a.nav-tile:hover { filter: brightness(1.055); }
.inner-nav a.nav-tile:focus-visible { outline: 2px solid #493381; outline-offset: 2px; }
.inner-nav a.nav-tile[aria-current="page"] { filter: saturate(1.07); }
@media (max-width: 650px) {
  .inner-nav {
    gap: 3px;
    margin: 6px 4px 2px;
    padding: 6px 0;
  }
  .inner-nav a.nav-tile {
    flex-direction: column;  /* 手機：圖示在上、文字在下 */
    min-height: 40px;       /* 手機按鈕較扁：只改這裡即可 */
    padding: 1px;
    gap: 1px;
    font-size: clamp(12px, 3vw, 14px); /* 最小／彈性／最大 */
    border-radius: 5px;
  }
  .inner-nav .nav-icon { width: 17px; height: 17px; }
}

/* ===== 04. 頁尾｜電腦兩顆、手機三顆 =====
   電腦只顯示「回頂端、返回首頁」。
   手機多顯示左側綠色「LINE 洽詢」。
   若手機按鈕太高：改手機區塊 .inner-footer a 的 padding。
*/
.inner-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #dedee8;
}
.inner-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  background: #eeeafa;
  border: 1px solid #cfc8e7;
  border-radius: 8px;
  color: #584782;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}
.inner-footer a:hover,
.inner-footer a:focus-visible {
  background: #e0d8f5;
  text-decoration: none;
}
.inner-footer .mobile-line { display: none; }
@media (max-width: 650px) {
  .inner-footer {
    flex-wrap: nowrap;
    gap: 8px;
    padding: 12px;
  }
  .inner-footer a {
    flex: 1;
    min-width: 0;
    padding: 12px 3px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
  }
  .inner-footer .mobile-line {
    display: inline-flex;
    background: #06C755;
    border-color: #06C755;
    color: #fff;
  }
}

/* ===== 05. 課程介紹 class.html =====
   電腦版看原始課程表；手機版由 class.html 的程式自動產生卡片。
   修改課程時間、招生文字：改 class.html 的表格，不是這裡。
   修改「尚有名額」色彩：找最下方 .status.open 等設定。
*/
.course-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 1px;
  background: #999;
  font-size: 14px;
  line-height: 1.55;
}
.course-table td { padding: 8px; }
.course-table p { margin: 8px 0; }
.course-table td[height] { height: auto; } /* 避免舊 HTML 的固定列高 */
.course-table .user4 { font-weight: 700; color: #fff; }
.course-mobile { display: none; }
.course-card {
  margin: 0 0 13px;
  overflow: hidden;
  border: 1px solid #ebd9d9;
  border-radius: 9px;
  background: #fff;
}
.course-card:nth-child(odd) { background: #fff5f5; }
.course-card h2 {
  margin: 0;
  padding: 11px 12px;
  font-size: 18px;
  background: #fbe2e4;
  color: #663b40;
}
.course-card .course-meta {
  padding: 9px 12px;
  background: #fff9f9;
  font-size: 14px;
}
.course-card .course-description {
  padding: 9px 12px 14px;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.course-card p { margin: 6px 0 10px; }
.course-group {
  margin: 15px 0 9px;
  color: #84323c;
  font-size: 16px;
  font-weight: bold;
}
.course-group.adult { color: #23628a; }
.course-notes { font-size: 14px; line-height: 1.7; }
/* 課表原本的紅字、藍字、黑字：手機卡片也沿用相同顏色。 */
.course-table .style1, .course-mobile .style1 { color: #f00; font-weight: bold; }
.course-table .style3, .course-mobile .style3 { color: #00f; font-weight: bold; }
.course-table .style4, .course-mobile .style4 { color: #000; font-weight: bold; }
/* 招生狀態標籤：open=尚有名額；full=額滿；new=其他藍色提示 */
.status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.5;
  white-space: nowrap;
}
.status.open { color: #16803B; background: #DDF5E5; }
.status.full { color: #C73535; background: #FDE5E5; }
.status.new { color: #1760BC; background: #E2EFFF; }
@media (max-width: 650px) {
  /* 只有 class.html 啟用 course-js 時才切換成手機卡片。 */
  .course-js .course-table { display: none; }
  .course-js .course-mobile { display: block; }
  .course-card .course-description br { line-height: 1.4; }
}



/* ===== 05-A. 課程時間：星期／上午下午／時間／招生狀態 =====
   class.html 專用，電腦表格及手機卡片共用。
   column-gap 調整欄位空隙；最後一欄即為名額標籤前的空隙。
   不使用手動空白，因此各列能自動對齊。
*/
.course-time-list {
  display: inline-grid;
  vertical-align: top;
  max-width: 100%;
}
.course-time-row {
  display: grid;
  grid-template-columns: 2.2em 2.2em max-content max-content;
  align-items: center;
  column-gap: 8px;
  min-height: 1.9em;
}
.course-time-row .status { justify-self: start; }

@media (max-width: 650px) {
  /* 手機版縮小欄距，避免較窄螢幕出現水平捲動。 */
  .course-time-row { column-gap: 5px; font-size: 14px; }
  .course-time-row .status { padding: 3px 6px; font-size: 12px; }
}

/* ===== 06. 師資簡介 know.html =====
   電腦：左側照片＋姓名，右側介紹；手機：上下排列。
   調整照片大小：.teacher-identity img 的 width / height。
*/
.teacher-list { display: grid; gap: 14px; }
.teacher-card {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr);
  overflow: hidden;
  background: #FFE6E6;
  border-radius: 6px;
}
.teacher-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.teacher-identity img {
  width: 118px;
  height: 160px;
  object-fit: contain;
  flex-shrink: 0;
}
.teacher-identity h2 {
  margin: 0;
  font-size: 18px;
  color: #533a40;
  writing-mode: vertical-rl;
  letter-spacing: .08em;
}
.teacher-identity h2 span { margin-top: 8px; font-size: 14px; }
.teacher-description {
  padding: 12px 17px;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.teacher-description p { margin: 8px 0; }
@media (max-width: 650px) {
  .teacher-card { grid-template-columns: 1fr; }
  .teacher-identity { padding: 12px 14px 4px; gap: 15px; }
  .teacher-identity img { width: auto; max-width: 45%; height: 150px; }
  .teacher-identity h2 { writing-mode: horizontal-tb; letter-spacing: 0; }
  .teacher-identity h2 span { margin-left: 6px; }
  .teacher-description { padding: 6px 14px 15px; line-height: 1.8; }
}

/* ===== 07. 報名須知 rule.html =====
   米色底、條文間距、中文數字的清單縮排，全部在這裡調整。
   修改條文實際文字：改 rule.html，不要在 CSS 修改。
*/
.rule-content {
  padding: 10px 20px 18px;
  background: #F8F3E9;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.rule-content p { margin: 12px 0; }
.rule-content a { overflow-wrap: anywhere; }
.rule-section { margin-bottom: 25px; }
.rule-section h2 { margin: 12px 0; font-size: 19px; }
.rule-list {
  margin: 10px 0;
  padding-left: 2.2em;      /* 中文一、二、三編號的左側縮排 */
  list-style-type: cjk-ideographic;
}
.rule-list > li { padding-left: .25em; margin-bottom: 12px; }
.refund-list {
  margin: 10px 0;
  padding-left: 1.8em;      /* 退費規定內的數字子項目 */
  list-style-type: decimal;
}
.refund-list > li { margin: 8px 0; }
.rule-notices { margin-top: 20px; }
.rule-notices p { margin: 12px 0; }
@media (max-width: 650px) {
  .rule-content { padding: 10px 12px; line-height: 1.85; }
  .rule-list { padding-left: 2em; }
  .refund-list { padding-left: 1.5em; }
}

/* ===== 08. 活動消息 express_new.html =====
   兩張活動圖依螢幕大小自動縮放，不設定固定高度。
   若圖片太寬：調整 .express-section img 的 max-width。
*/
.express-main { text-align: center; }
.express-main h1 {
  margin: 12px 0 20px;
  font-size: 26px;
  color: #222;
}
.express-section { margin: 0 0 26px; }
.express-section h2 {
  margin: 12px 0;
  text-align: left;
  font-size: 20px;
  color: #0000FF;
}
.express-section img {
  display: block;
  width: 100%;
  max-width: 630px;
  height: auto;
  margin: 10px auto;
}
.express-section .express-intro {
  margin: 8px 0 15px;
  font-size: 16px;
  line-height: 1.65;
}
.express-info {
  padding: 0 8px;
  text-align: left;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
.express-info li { margin: 0 0 10px; }
@media (max-width: 650px) {
  .express-main h1 { font-size: 21px; }
  .express-section h2 { font-size: 18px; }
  .express-info { padding: 0; font-size: 15px; }
  .express-info ul { padding-left: 23px; }
}

/* ===== 09. 交通位置 map.html =====
   Google 地圖與路線圖會隨螢幕縮放。
   調整地圖高寬比例：aspect-ratio（例如 4 / 3）。
*/
.map-embed {
  display: block;
  width: 100%;
  aspect-ratio: 724 / 330;
  min-height: 250px;
  border: 0;
}
.map-image {
  display: block;
  width: 100%;
  max-width: 724px;
  height: auto;
  margin: auto;
}
.map-content {
  padding: 16px 20px;
  background: #f8f3e9;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.map-content p { margin: 0 0 14px; }
.map-content p:last-child { margin-bottom: 0; }
.map-google-link {
  display: inline-block;
  margin-bottom: 12px;
  color: #65558c;
  font-weight: 700;
}
@media (max-width: 650px) {
  .map-embed { aspect-ratio: 4 / 3; min-height: 220px; }
  .map-content { padding: 13px 12px; }
}
