/* ============================================================
   font.css — 鐵工網站全站樣式（黑橘主色、閃耀亮眼）
   所有頁面共用，請勿將 CSS 分散至各 .asp 檔案
   ============================================================ */

/* ── Google Font (可選) ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;700;900&display=swap');

/* ── CSS 變數 ── */
:root {
    --primary:   #1a1a1a;       /* 深黑底色 */
    --secondary: #2a2a2a;       /* 次黑 */
    --accent:    #ff6a00;       /* 橘色亮點 */
    --accent2:   #ff9900;       /* 黃橘漸層尾 */
    --text-light:#f0f0f0;       /* 淺色文字 */
    --text-muted:#aaaaaa;       /* 灰色說明文字 */
    --border:    #333333;       /* 深色邊框 */
    --card-bg:   #212121;       /* 卡片背景 */
    --nav-bg:    #111111;       /* 導覽列背景 */
    --glow:      0 0 12px rgba(255,106,0,0.6);  /* 橘色光暈 */
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans TC', '微軟正黑體', Arial, sans-serif;
    background: #141414;
    color: var(--text-light);
    line-height: 1.7;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent2); }

/* ── 通用橘色漸層標題 ── */
.page-title,
h1.brand {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: 2px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 60%, #2a1000 100%);
    border-bottom: 3px solid var(--accent);
    padding: 10px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 3px 20px rgba(255,106,0,0.3);
}

.header h1 {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #ff6a00, #ffcc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    white-space: nowrap;
}

.header-contact {
    display: flex;
    gap: 18px;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.header-contact span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-contact strong {
    color: var(--accent);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    background: var(--nav-bg);
    border-bottom: 2px solid var(--accent);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav a {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 16px;
    display: inline-block;
    position: relative;
    letter-spacing: 0.5px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transition: width 0.3s, left 0.3s;
}

.nav a:hover {
    color: #fff;
    background: rgba(255,106,0,0.1);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
    left: 0;
}

.nav a.active {
    color: var(--accent);
}

/* ============================================================
   ANNOUNCEMENT（公告區）
   ============================================================ */
.announcement {
    background: linear-gradient(90deg, #1a0d00, #2a1500, #1a0d00);
    border-left: 5px solid var(--accent);
    border-top: 1px solid #3a2000;
    border-bottom: 1px solid #3a2000;
    padding: 10px 20px;
    color: #ffcc88;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: left;          /* 公告文字靠左 */
    letter-spacing: 0.5px;
    margin: 0;
}

.announcement-icon {
    color: var(--accent);
    margin-right: 6px;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    padding: 12px 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.search-bar label {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.search-bar input,
.search-bar select {
    background: #2a2a2a;
    color: var(--text-light);
    border: 1px solid #444;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
}

.search-bar input:focus,
.search-bar select:focus {
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.search-bar select option { background: #2a2a2a; }

.search-bar button,
.btn-orange {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 8px 22px;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: box-shadow 0.2s, transform 0.1s;
}

.search-bar button:hover,
.btn-orange:hover {
    box-shadow: var(--glow);
    transform: translateY(-1px);
}

/* ============================================================
   PROJECT CARD GRID
   ============================================================ */
.container {
    width: 90%;
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1100px) { .container { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .container { grid-template-columns: repeat(2, 1fr); gap: 12px; width: 95%; } }
@media (max-width: 480px)  { .container { grid-template-columns: repeat(2, 1fr); gap: 8px; width: 96%; } }

.card {
    background: var(--card-bg);
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 8px 28px rgba(255,106,0,0.35);
}

.card-header {
    padding: 10px 12px;
    background: #1a1a1a;
    border-bottom: 2px solid var(--accent);
}

.card-header h3 {
    font-size: 0.95rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.card img {
    width: 100%;
    height: 185px;
    object-fit: cover;
    display: block;
    filter: brightness(0.9);
    transition: filter 0.25s;
}

.card:hover img { filter: brightness(1.05); }

.card-body {
    padding: 10px 12px;
    flex: 1;
}

.card-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.date-small { font-size: 0.78rem; color: #666; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 5%;
    font-size: 0.88rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 768px) {
    .pagination {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin: 10px 3%;
    }
    .pagination-info { order: 1; font-size: 0.82rem; }
    .pagination-pages { order: 2; flex: unset; width: 100%; text-align: center; }
    .pagination-size { order: 3; font-size: 0.82rem; }
}

.pagination-info {
    flex: 0 0 auto;
    white-space: nowrap;
    color: var(--text-muted);
}

.pagination-pages {
    flex: 1;
    text-align: center;
}

.pagination-pages a {
    padding: 5px 10px;
    border: 1px solid #333;
    background: #1e1e1e;
    color: var(--text-muted);
    margin: 0 2px;
    border-radius: 3px;
    display: inline-block;
    transition: 0.2s;
}

.pagination-pages a:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.pagination-pages a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000;
    border-color: var(--accent);
    font-weight: 900;
}

.pagination-size {
    flex: 0 0 auto;
    white-space: nowrap;
    color: var(--text-muted);
}

.pagination-size select {
    background: #2a2a2a;
    color: var(--text-light);
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 8px;
    margin-left: 6px;
    cursor: pointer;
}

/* 相容舊的單 div .pagination（後台用） */
.pagination-legacy {
    text-align: center;
    margin: 12px 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ── 更多按鈕 ── */
.more-btn-box { text-align: center; margin: 20px 0; }
.more-btn {
    padding: 12px 40px;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 25px;
    letter-spacing: 2px;
    transition: 0.3s;
}
.more-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: var(--glow);
}

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.main-container {
    max-width: 1000px;
    margin: 30px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #2e2e2e;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.main-container h1 {
    border-left: 6px solid var(--accent);
    padding-left: 15px;
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #333;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    gap: 10px;
}

.content-text {
    font-size: 1rem;
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 1px solid #333;
    white-space: pre-line;
    word-wrap: break-word;
    color: #ccc;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.photo-item {
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #333;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.photo-item:hover {
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.photo-item img {
    width: 100%; height: 180px;
    object-fit: cover; display: block;
    filter: brightness(0.88);
    transition: filter 0.25s, transform 0.25s;
}

.photo-item:hover img { filter: brightness(1); transform: scale(1.03); }

/* ── Lightbox ── */
#lightbox {
    display: none; position: fixed; z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    align-items: center; justify-content: center;
    cursor: zoom-out; overflow: hidden;
}
#lightbox img {
    max-width: 90%; max-height: 90%;
    box-shadow: 0 0 40px rgba(255,106,0,0.4);
    border: 2px solid var(--accent);
    border-radius: 4px;
    cursor: grab;
    transition: transform 0.1s ease-out;
    transform-origin: center;
}
.close-btn {
    position: absolute; top: 20px; right: 30px;
    color: #fff; font-size: 50px; font-weight: bold;
    cursor: pointer; text-decoration: none; z-index: 10000;
    transition: color 0.2s;
}
.close-btn:hover { color: var(--accent); }
.zoom-tips {
    position: absolute; bottom: 20px;
    color: rgba(255,255,255,0.5); font-size: 13px;
    pointer-events: none;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-container {
    max-width: 1100px;
    margin: 30px auto;
    display: flex;
    gap: 30px;
    padding: 0 5%;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1; min-width: 260px;
    background: var(--card-bg);
    padding: 35px;
    border-radius: 8px;
    border: 1px solid #2e2e2e;
}

.contact-info h2 {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.info-item { margin-bottom: 22px; }
.info-item label {
    display: block;
    font-weight: 700;
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.info-item p { color: var(--text-light); font-size: 1.05rem; }

.contact-essay {
    flex: 1.5; min-width: 280px;
    padding: 35px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #2e2e2e;
    color: #ccc;
    line-height: 1.9;
}

/* ============================================================
   GUESTBOOK / FORM PAGE
   ============================================================ */
.form-container {
    max-width: 820px;
    margin: 30px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #2e2e2e;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.form-container h2 {
    border-left: 5px solid var(--accent);
    padding-left: 15px;
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.full-width { grid-column: 1 / 3; }
@media (max-width: 600px) { .full-width { grid-column: 1; } }

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    background: #1a1a1a;
    color: var(--text-light);
    border: 1px solid #444;
    border-radius: 4px;
    padding: 11px 14px;
    font-size: 0.95rem;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: var(--glow);
}

select option { background: #1a1a1a; }
textarea { height: 150px; resize: vertical; }

.btn-submit {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000;
    border: none;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    border-radius: 4px;
    letter-spacing: 2px;
    width: 100%;
    transition: box-shadow 0.2s, transform 0.1s;
}
.btn-submit:hover {
    box-shadow: 0 0 20px rgba(255,106,0,0.7);
    transform: translateY(-1px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #0d0d0d;
    border-top: 3px solid var(--accent);
    color: #666;
    text-align: center;
    padding: 25px 20px;
    margin-top: 50px;
    font-size: 0.88rem;
}

.footer a { color: #555; }
.footer a:hover { color: var(--accent); }

/* ============================================================
   ADMIN SIDEBAR (inc_sidebar.asp)
   ============================================================ */
#sidebar_fixed {
    position: fixed; left: 0; top: 0; width: 240px; height: 100vh;
    background: #111; color: #fff;
    padding: 20px; box-sizing: border-box;
    z-index: 9999; overflow-y: auto;
    border-right: 2px solid var(--accent);
}

#sidebar_fixed h2 {
    font-size: 1rem; letter-spacing: 2px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 15px; margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#sidebar_fixed ul { list-style: none; padding: 0; margin: 0; }
#sidebar_fixed li { margin-bottom: 4px; }
#sidebar_fixed a {
    color: #999; text-decoration: none;
    display: block; padding: 11px 14px;
    border-radius: 4px; font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
#sidebar_fixed a:hover,
#sidebar_fixed a.active {
    background: #1e1e1e;
    color: var(--accent);
    border-left: 3px solid var(--accent);
}
#sidebar_fixed .logout { color: #e74c3c !important; border-top: 1px solid #222; margin-top: 20px; }

.admin_container {
    margin-left: 240px;
    padding: 30px;
    box-sizing: border-box;
    min-width: 800px;
    background: #141414;
    min-height: 100vh;
    color: var(--text-light);
}

.admin_container h2 { color: var(--accent); }
.admin_container hr { border-color: #2a2a2a; margin: 15px 0; }

/* Admin table forms */
.admin_container table td { color: #bbb; font-size: 0.92rem; padding: 10px 8px; }
.admin_container input[type="text"],
.admin_container input[type="email"],
.admin_container input[type="tel"],
.admin_container textarea,
.admin_container select {
    background: #1e1e1e; color: #eee;
    border: 1px solid #333; border-radius: 4px;
    padding: 9px; width: 100%;
    transition: border 0.2s;
}
.admin_container input:focus,
.admin_container textarea:focus {
    border-color: var(--accent);
    outline: none;
}
.admin_container button[type="submit"] {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000; border: none;
    padding: 12px 50px;
    font-weight: 900; font-size: 1rem;
    cursor: pointer; border-radius: 4px;
    transition: box-shadow 0.2s;
}
.admin_container button[type="submit"]:hover {
    box-shadow: var(--glow);
}

/* Admin list tables */
.admin-table {
    width: 100%; border-collapse: collapse;
    background: #1a1a1a; border: 1px solid #2a2a2a;
    border-radius: 6px; overflow: hidden;
}
.admin-table th {
    background: #0d0d0d; color: var(--accent);
    padding: 12px; font-size: 0.88rem;
    text-transform: uppercase; letter-spacing: 1px;
}
.admin-table td {
    padding: 12px; border-bottom: 1px solid #222;
    color: #ccc; font-size: 0.9rem;
}
.admin-table tr:hover td { background: #1e1e1e; }
.admin-table a { color: var(--accent); }

/* 後台通用深色表格（含 border=1 舊式寫法覆蓋） */
.admin_container table {
    width: 100%; border-collapse: collapse;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}
.admin_container table th {
    background: #0d0d0d !important;
    color: var(--accent) !important;
    padding: 12px;
    font-size: 0.88rem;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--accent);
    border-color: #2a2a2a;
}
.admin_container table td {
    padding: 12px 10px;
    border-bottom: 1px solid #222;
    color: #ccc;
    font-size: 0.9rem;
    border-color: #2a2a2a;
    background: transparent;
}
.admin_container table tr:hover td {
    background: #1e1e1e;
}
.admin_container table a {
    color: var(--accent);
}

/* 後台分頁（深色主題） */
.admin_container .pagination,
.admin_container .pagination-legacy {
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.admin_container .pagination a,
.admin_container .pagination-legacy a {
    padding: 4px 10px;
    border: 1px solid #333;
    background: #1e1e1e;
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 2px;
    border-radius: 3px;
    display: inline-block;
    transition: 0.2s;
}
.admin_container .pagination a:hover,
.admin_container .pagination-legacy a:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.admin_container .pagination b,
.admin_container .pagination-legacy b {
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000;
    border: 1px solid var(--accent);
    margin: 0 2px;
    border-radius: 3px;
    font-weight: 900;
}

/* 分類管理輸入框限制寬度 */
.category-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #1e1e1e;
    padding: 16px 20px;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
    margin-bottom: 20px;
}
.category-form label {
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
    margin: 0;
}
.category-form input[type="text"] {
    width: 220px !important;
    flex: none;
}

/* ============================================================
   RESPONSIVE - 手機版實際瀏覽優化
   ============================================================ */
@media (max-width: 768px) {
    .header {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px 4%;
        gap: 6px;
    }
    .header-brand-row { gap: 8px; }
    .header-logo-icon { width: 32px; height: 32px; }
    .header-logo-icon svg { width: 18px; height: 18px; }
    .header h1 { font-size: 1.2rem; letter-spacing: 1px; }
    .header-contact { justify-content: center; }
    .contact-container { flex-direction: column; }
    #sidebar_fixed { width: 100%; height: auto; position: relative; }
    .admin_container { margin-left: 0; min-width: unset; }

    /* 分頁手機版整齊排列 */
    .pagination {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin: 10px 3%;
    }
    .pagination-pages { width: 100%; text-align: center; }

    /* nav 手機版換行對齊 */
    .nav { justify-content: flex-start; padding: 0 2%; }
    .nav a { padding: 10px 12px; font-size: 0.85rem; }

    /* search bar 手機版換行 */
    .search-bar form { flex-wrap: wrap !important; justify-content: flex-start !important; }
    .search-bar input { min-width: 140px !important; }
}

/* ============================================================
   VIEW MODE TOGGLE (手機版 / 電腦版 切換) - 電腦專用
   ============================================================ */

/* 切換按鈕 */
.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,106,0,0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}
.view-toggle-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: var(--glow);
}
.view-toggle-btn .toggle-icon { font-size: 1rem; }

/* 真實手機隱藏切換按鈕 */
@media (max-width: 799px) {
    .view-toggle-btn { display: none; }
}

/* header-brand-row 同行排列 */
.header-brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

/* header logo 圖示方塊 */
.header-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6a00, #ffaa00);
    border-radius: 8px;
    box-shadow: 0 0 16px rgba(255,106,0,0.55);
    flex-shrink: 0;
}
.header-logo-icon svg {
    width: 24px;
    height: 24px;
    fill: #111;
}

/* ── 電腦版模擬手機框（mobile-view class 由 JS 控制）── */
.mobile-frame-wrap { display: contents; }
.mobile-frame { display: contents; }
.mobile-frame-notch { display: none; }

body.mobile-view {
    background: #0a0a0a !important;
    overflow-x: hidden;
}
body.mobile-view .mobile-frame-wrap {
    display: flex !important;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 24px 0 48px;
}
body.mobile-view .mobile-frame {
    display: block !important;
    width: 390px !important;
    min-height: 100vh;
    background: #141414;
    box-shadow: 0 0 0 8px #1a1a1a, 0 0 0 11px #555, 0 24px 64px rgba(0,0,0,0.85);
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
body.mobile-view .mobile-frame-notch {
    display: flex !important;
    height: 30px;
    background: #0d0d0d;
    align-items: center;
    justify-content: center;
}
body.mobile-view .mobile-frame-notch::after {
    content: '';
    width: 80px; height: 10px;
    background: #333;
    border-radius: 10px;
}

/* 手機框內排版 */
body.mobile-view .mobile-frame .header {
    flex-direction: row !important;
    flex-wrap: wrap;
    padding: 10px 14px !important;
    gap: 6px;
}
body.mobile-view .mobile-frame .header h1 { font-size: 1.1rem; letter-spacing: 1px; }
body.mobile-view .mobile-frame .header-logo-icon { width: 30px; height: 30px; }
body.mobile-view .mobile-frame .header-logo-icon svg { width: 16px; height: 16px; }
body.mobile-view .mobile-frame .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0 6px;
    position: relative !important;
}
body.mobile-view .mobile-frame .nav a { padding: 8px 10px; font-size: 0.8rem; }
body.mobile-view .mobile-frame .search-bar { padding: 10px 10px; }
body.mobile-view .mobile-frame .search-bar form { flex-wrap: wrap !important; }
body.mobile-view .mobile-frame .search-bar input { min-width: 120px !important; }
body.mobile-view .mobile-frame .container {
    width: 96% !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin: 12px auto !important;
}
body.mobile-view .mobile-frame .card img { height: 110px; }
body.mobile-view .mobile-frame .card-header h3 { font-size: 0.82rem; }
body.mobile-view .mobile-frame .card-info { font-size: 0.75rem; }
body.mobile-view .mobile-frame .pagination {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 8px 3%;
    font-size: 0.78rem;
}
body.mobile-view .mobile-frame .pagination-pages { width: 100%; text-align: center; }
body.mobile-view .mobile-frame .main-container { padding: 18px 14px; margin: 14px 10px; }
body.mobile-view .mobile-frame .info-grid { grid-template-columns: 1fr; }
body.mobile-view .mobile-frame .contact-container { flex-direction: column; padding: 0 10px; }
body.mobile-view .mobile-frame .form-container { padding: 18px 12px; margin: 14px 8px; }
body.mobile-view .mobile-frame .form-grid { grid-template-columns: 1fr; }
body.mobile-view .mobile-frame .full-width { grid-column: 1; }
body.mobile-view .mobile-frame .photo-grid { grid-template-columns: repeat(2, 1fr); }
body.mobile-view .mobile-frame .announcement { font-size: 0.8rem; padding: 8px 12px; }
body.mobile-view .mobile-frame .footer { font-size: 0.78rem; padding: 16px; margin-top: 20px; }

