@charset "UTF-8";
/* ============================================================
   main.css — 台南市第二區居家托育服務中心
   ------------------------------------------------------------
   建立：2026-08-26
   取代：style.css(80KB) + css/responsive.css(37KB) + css/shortcodes.css
        + css/layerslider.css + css/prettyPhoto.css

   重寫原因：
   1. 舊版 style.css 引用 39 個版型圖片，這些圖檔全部不存在 → 破圖
      本檔完全不依賴任何背景圖，所有裝飾以純 CSS 繪製
   2. 舊版排版以 float + 固定寬度為主，手機幾乎不能看
      本檔改用 Flexbox / Grid，並用 clamp() 做流體字級
   3. 舊版指定 "Microsoft Yahei"（簡體中文字型），改為繁體中文字型堆疊

   配色沿用原版型：teal #008c99 / 金 #df9b00 / 橘 #cf571b
   ============================================================ */

/* ------------------------------------------------------------
   1. 設計變數
   ---------------------------------------------------------- */
:root {
    /* 主色 */
    --c-primary:        #008c99;
    --c-primary-dark:   #006d77;
    --c-primary-light:  #e6f4f5;

    --c-accent:         #df9b00;
    --c-accent-dark:    #b87f00;

    --c-orange:         #cf571b;
    --c-red:            #b70400;
    --c-green:          #7a9a3f;

    /* 導航彩虹色（延續原本的托育／親子活潑風格） */
    --nav-1: #d9534f;   /* 紅   */
    --nav-2: #df9b00;   /* 金   */
    --nav-3: #7a9a3f;   /* 綠   */
    --nav-4: #e0b400;   /* 黃   */
    --nav-5: #3c8dbc;   /* 藍   */
    --nav-6: #8e79b8;   /* 薰衣草 */
    --nav-7: #7256a8;   /* 紫   */
    --nav-8: #d46a92;   /* 粉   */

    /* 中性色 */
    --c-text:      #333334;
    --c-text-soft: #5f6060;
    --c-muted:     #8a8c8c;
    --c-line:      #e2e5e5;
    --c-bg:        #ffffff;
    --c-bg-soft:   #f6f7f7;

    /* 版面 */
    --wrap:      1180px;
    --gap:       24px;
    --radius:    10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .07);
    --shadow:    0 4px 16px rgba(0, 0, 0, .09);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .13);

    --ease: .25s cubic-bezier(.4, 0, .2, 1);

    /* 繁體中文字型堆疊（原本用的是簡體的 Microsoft Yahei） */
    --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
                 "微軟正黑體", "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------
   2. 基礎重設
   ---------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .6em;
    line-height: 1.35;
    font-weight: 700;
    color: var(--c-text);
}

h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.05rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color var(--ease);
}
a:hover { color: var(--c-accent-dark); }

/* 圖片一律流體化 —— 這是舊版手機破版的主因之一 */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border: 0;
}

ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }

hr {
    height: 1px;
    margin: 2.5rem 0;
    border: 0;
    background: var(--c-line);
}

/* 表格在窄螢幕可橫向捲動，不撐破版面 */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem .9rem; border-bottom: 1px solid var(--c-line); text-align: left; }
th { background: var(--c-bg-soft); font-weight: 700; }

:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}

/* 螢幕閱讀器專用文字 */
.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;
}

.tn-icon { display: inline-block; vertical-align: -.15em; }

/* ------------------------------------------------------------
   3. 版面容器
   ---------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 20px;
}

.section { padding: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) 0; }
.section--soft { background: var(--c-bg-soft); }
.section--primary { background: var(--c-primary); color: #fff; }
.section--primary h2,
.section--primary h3 { color: #fff; }

/* 區塊標題：原版型用背景圖做花朵裝飾，這裡改用純 CSS 圓點 */
.section-title {
    position: relative;
    margin: 0 0 2.2rem;
    padding-bottom: 1rem;
    text-align: center;
    color: var(--c-primary);
}
.section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 68px;
    height: 4px;
    border-radius: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg,
        var(--c-accent) 0 33%,
        var(--c-primary) 33% 66%,
        var(--c-orange) 66% 100%);
}
.section--primary .section-title { color: #fff; }
.section--primary .section-title::after { background: #fff; opacity: .85; }

.text-center { text-align: center; }

/* 通用網格 */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ------------------------------------------------------------
   4. 按鈕
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: .7em 1.5em;
    border: 2px solid transparent;
    border-radius: 999px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    background: var(--c-primary);
    cursor: pointer;
    transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:hover {
    color: #fff;
    background: var(--c-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.btn:active { transform: translateY(0); }

.btn--accent { background: var(--c-accent); }
.btn--accent:hover { background: var(--c-accent-dark); }

.btn--ghost {
    color: var(--c-primary);
    background: transparent;
    border-color: currentColor;
}
.btn--ghost:hover { color: #fff; background: var(--c-primary); }

.btn--sm { padding: .45em 1.1em; font-size: .9rem; }
.btn--lg { padding: .85em 2em; font-size: 1.1rem; }

/* ------------------------------------------------------------
   5. 頁首
   ---------------------------------------------------------- */
.site-header {
    position: relative;
    z-index: 50;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    padding-block: 14px;
}

.site-logo { flex: 0 0 auto; display: block; }
.site-logo img { max-height: 62px; width: auto; }

.header-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem 1.4rem;
    margin: 0;
    font-size: .92rem;
    color: var(--c-text-soft);
}
.header-contact a { color: inherit; }
.header-contact a:hover { color: var(--c-primary); }
.header-contact .item {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    white-space: nowrap;
}
.header-contact .tn-icon { color: var(--c-primary); flex: 0 0 auto; }

/* 社群圖示 */
.social-list {
    display: flex;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.social-list a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: var(--c-primary);
    transition: transform var(--ease), background var(--ease);
}
.social-list a:hover { transform: translateY(-3px) scale(1.06); }
.social-list .is-facebook a { background: #1877f2; }
.social-list .is-youtube  a { background: #ff0000; }
.social-list .is-line     a { background: #06c755; }

/* ------------------------------------------------------------
   6. 主導覽
   ---------------------------------------------------------- */
.nav-bar { background: var(--c-primary); }
.nav-bar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: .5em;
    padding: .6em .9em;
    margin: 6px 0;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .5);
    border-radius: 8px;
    cursor: pointer;
}

.main-menu {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-menu > li { position: relative; }
.main-menu > li > a {
    display: block;
    padding: 1.05em 1.25em;
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    transition: background var(--ease);
}

/* 彩虹配色：延續原本托育／親子的活潑感，但改用純 CSS */
.main-menu > li:nth-child(1) > a:hover, .main-menu > li:nth-child(1).is-current > a { background: var(--nav-1); }
.main-menu > li:nth-child(2) > a:hover, .main-menu > li:nth-child(2).is-current > a { background: var(--nav-2); }
.main-menu > li:nth-child(3) > a:hover, .main-menu > li:nth-child(3).is-current > a { background: var(--nav-3); }
.main-menu > li:nth-child(4) > a:hover, .main-menu > li:nth-child(4).is-current > a { background: var(--nav-4); }
.main-menu > li:nth-child(5) > a:hover, .main-menu > li:nth-child(5).is-current > a { background: var(--nav-5); }
.main-menu > li:nth-child(6) > a:hover, .main-menu > li:nth-child(6).is-current > a { background: var(--nav-6); }
.main-menu > li:nth-child(7) > a:hover, .main-menu > li:nth-child(7).is-current > a { background: var(--nav-7); }
.main-menu > li:nth-child(8) > a:hover, .main-menu > li:nth-child(8).is-current > a { background: var(--nav-8); }
/* 第 9 項（尋找托育人員啟用後）循環回第一個顏色 */
.main-menu > li:nth-child(9) > a:hover, .main-menu > li:nth-child(9).is-current > a { background: var(--nav-1); }

.main-menu > li > a { color: #fff; }

/* 子選單 */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 60;
    min-width: 210px;
    margin: 0;
    padding: .4rem 0;
    list-style: none;
    background: #fff;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
}
.main-menu > li:hover > .sub-menu,
.main-menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.sub-menu a {
    display: block;
    padding: .6em 1.2em;
    color: var(--c-text);
    font-size: .95rem;
}
.sub-menu a:hover { color: var(--c-primary); background: var(--c-primary-light); }

.menu-expand { display: none; }

/* ------------------------------------------------------------
   7. 首頁輪播（取代 layerslider + greensock）
   ---------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--c-primary-light);
}
.hero-track {
    position: relative;
    width: 100%;
    /*
     * 用 aspect-ratio 取代舊版寫死的 height:610px。
     *
     * 2026-08-27：新版主視覺原稿是 3136x1344（比例 2.33），
     * 舊的 1920/610（比例 3.15）會把上下各裁掉一截，
     * 波浪背景與底部裝飾都會不見。改成對齊圖檔本身的比例，
     * 五張橫幅都完整顯示、不裁切。
     * 換圖時若比例不同，改這一行即可。
     */
    aspect-ratio: 1920 / 823;
    min-height: 180px;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .9s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: rgba(0, 0, 0, .34);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background var(--ease);
}
.hero-nav:hover { background: rgba(0, 0, 0, .58); }
.hero-nav--prev { left: 16px; }
.hero-nav--next { right: 16px; }

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 3;
    display: flex;
    gap: .5rem;
    transform: translateX(-50%);
}
.hero-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: background var(--ease), transform var(--ease);
}
.hero-dots button.is-active { background: #fff; transform: scale(1.3); }

/* 內頁標題橫幅 */
.page-hero {
    padding: clamp(2rem, 1.4rem + 2.4vw, 3.5rem) 0;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
}
.page-hero h1 { margin: 0; color: #fff; }
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin: .8rem 0 0;
    padding: 0;
    list-style: none;
    font-size: .9rem;
    color: rgba(255, 255, 255, .85);
}
.breadcrumb a { color: #fff; text-decoration: underline; }
.breadcrumb li + li::before { content: "／"; margin-right: .4rem; opacity: .7; }

/* ------------------------------------------------------------
   8. 卡片
   ---------------------------------------------------------- */
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    transition: transform var(--ease), box-shadow var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-media {
    position: relative;
    display: block;
    overflow: hidden;
    /* 固定比例 → 不同尺寸的上傳圖也能排得整齊 */
    aspect-ratio: 4 / 3;
    background: var(--c-bg-soft);
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.card:hover .card-media img { transform: scale(1.06); }

.card-media .zoom {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 140, 153, .78);
    opacity: 0;
    transition: opacity var(--ease);
}
.card:hover .card-media .zoom { opacity: 1; }

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.15rem 1.25rem 1.35rem;
}
.card-title {
    margin: 0 0 .5rem;
    font-size: 1.08rem;
    line-height: 1.5;
}
.card-title a { color: var(--c-text); }
.card-title a:hover { color: var(--c-primary); }

.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35em 1rem;
    margin-bottom: .6rem;
    font-size: .85rem;
    color: var(--c-muted);
}
.card-meta .tn-icon { color: var(--c-accent); }

.card-excerpt {
    flex: 1;
    margin: 0 0 1rem;
    font-size: .94rem;
    color: var(--c-text-soft);
    /* 摘要限 3 行，避免長短不一撐壞卡片 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ------------------------------------------------------------
   9. 文章內容
   ---------------------------------------------------------- */
.entry-content { font-size: 1.02rem; }
.entry-content img {
    height: auto;
    border-radius: var(--radius);
}
.entry-content iframe,
.entry-content video {
    max-width: 100%;
    border-radius: var(--radius);
}
/* 編輯器內容常見寫死寬度的表格，包一層可捲動 */
.entry-content table { display: block; overflow-x: auto; white-space: nowrap; }

.entry-header { margin-bottom: 1.6rem; padding-bottom: 1.2rem; border-bottom: 2px solid var(--c-line); }
.entry-header h1 { margin-bottom: .5rem; }

/* ------------------------------------------------------------
   10. 表單
   ---------------------------------------------------------- */
.form-row { margin-bottom: 1.1rem; }
.form-row label {
    display: block;
    margin-bottom: .35rem;
    font-weight: 700;
    font-size: .95rem;
}
.form-row .required { color: var(--c-red); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: .68em .9em;
    font-family: inherit;
    font-size: 1rem;
    color: var(--c-text);
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    transition: border-color var(--ease), box-shadow var(--ease);
}
input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(0, 140, 153, .16);
}
textarea { min-height: 150px; resize: vertical; }

.check-list { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.check-list label { display: inline-flex; align-items: center; gap: .4em; font-weight: 400; }
.check-list input { width: auto; }

.form-note { font-size: .88rem; color: var(--c-muted); }

/* ------------------------------------------------------------
   11. 檔案下載列表
   ---------------------------------------------------------- */
.file-list { margin: 0; padding: 0; list-style: none; }
.file-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    transition: border-color var(--ease), box-shadow var(--ease);
}
.file-list li + li { margin-top: .7rem; }
.file-list li:hover { border-color: var(--c-primary); box-shadow: var(--shadow-sm); }
.file-list .name { flex: 1; min-width: 200px; font-weight: 700; }
.file-list .tn-icon { color: var(--c-primary); flex: 0 0 auto; }

/* ------------------------------------------------------------
   12. 分頁
   ---------------------------------------------------------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}
.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .7em;
    color: var(--c-text);
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 8px;
}
.pagination a:hover { color: #fff; background: var(--c-primary); border-color: var(--c-primary); }
.pagination .is-current {
    color: #fff;
    background: var(--c-primary);
    border-color: var(--c-primary);
    font-weight: 700;
}

/* ------------------------------------------------------------
   13. 燈箱（取代 prettyPhoto）
   ---------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, .88);
}
.lightbox.is-open { display: grid; }
.lightbox img {
    max-width: 100%;
    max-height: 88vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .3); }

/* ------------------------------------------------------------
   14. 頁尾
   ---------------------------------------------------------- */
.site-footer {
    padding: clamp(2.2rem, 1.6rem + 2vw, 3.5rem) 0 0;
    color: rgba(255, 255, 255, .82);
    background: var(--c-primary-dark);
}
.site-footer h3 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.08rem;
}
.site-footer a { color: rgba(255, 255, 255, .82); }
.site-footer a:hover { color: #fff; }

.footer-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    padding-bottom: 2rem;
}
.footer-list { margin: 0; padding: 0; list-style: none; }
.footer-list li { margin-bottom: .5rem; }
.footer-list .item { display: flex; align-items: flex-start; gap: .55em; }
.footer-list .tn-icon { margin-top: .25em; flex: 0 0 auto; color: var(--c-accent); }

.footer-bottom {
    padding: 1.1rem 0;
    font-size: .87rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .16);
}
.footer-bottom p { margin: 0; }

/* 回到頂端 */
.to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #fff;
    background: var(--c-accent);
    border: 0;
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ------------------------------------------------------------
   15. 訊息提示
   ---------------------------------------------------------- */
.alert {
    padding: 1rem 1.2rem;
    margin-bottom: 1.4rem;
    border-left: 4px solid var(--c-primary);
    border-radius: 8px;
    background: var(--c-primary-light);
}
.alert--error { border-left-color: var(--c-red); background: #fdecec; }
.alert--ok    { border-left-color: var(--c-green); background: #f0f6e7; }

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--c-muted);
}

/* ------------------------------------------------------------
   16. 響應式
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
    .grid--4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .header-top { flex-direction: column; text-align: center; }
    .header-contact { justify-content: center; }

    /* 導覽改為漢堡選單 */
    .nav-toggle { display: inline-flex; }
    .nav-bar .wrap { flex-wrap: wrap; }

    .main-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-bottom: .6rem;
    }
    .main-menu.is-open { display: flex; }
    .main-menu > li { width: 100%; }
    .main-menu > li > a {
        padding: .85em 1rem;
        border-top: 1px solid rgba(255, 255, 255, .16);
    }

    /* 子選單改為展開式，不再依賴 hover（觸控裝置沒有 hover） */
    .sub-menu {
        position: static;
        display: none;
        min-width: 0;
        padding: 0;
        background: rgba(0, 0, 0, .16);
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .sub-menu.is-open { display: block; }
    .sub-menu a { color: #fff; padding-left: 2.2rem; }
    .sub-menu a:hover { background: rgba(0, 0, 0, .24); }

    .menu-expand {
        position: absolute;
        top: 0;
        right: 0;
        display: grid;
        place-items: center;
        width: 52px;
        height: 52px;
        color: #fff;
        background: transparent;
        border: 0;
        cursor: pointer;
    }
    .menu-expand.is-open { transform: rotate(180deg); }
}

@media (max-width: 768px) {
    .grid--2,
    .grid--3,
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .hero-nav { width: 36px; height: 36px; }
    .hero-nav--prev { left: 8px; }
    .hero-nav--next { right: 8px; }
}

@media (max-width: 560px) {
    body { font-size: 15px; }
    .grid--2,
    .grid--3,
    .grid--4,
    .grid--auto { grid-template-columns: 1fr; }
    .header-contact { flex-direction: column; gap: .3rem; }
    .file-list li { flex-direction: column; align-items: flex-start; }
    .to-top { right: 12px; bottom: 12px; width: 42px; height: 42px; }
}

/* ------------------------------------------------------------
   17. 列印
   ---------------------------------------------------------- */
@media print {
    .site-header,
    .nav-bar,
    .site-footer,
    .to-top,
    .hero { display: none !important; }
    body { font-size: 12pt; color: #000; }
    a { color: #000; text-decoration: underline; }
}

/* 尊重使用者的減少動態偏好設定 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
