/* =========================================
    Base Reset
========================================= */
* { margin: 0; padding: 0; }
*:focus { outline: none; }

body { overflow-x: hidden; overflow-y: overlay; margin: 0; min-height: 100vh; background: var(--black); font-family: "Noto Sans TC", sans-serif; color: var(--text-main); }
body::-webkit-scrollbar { width: 13px; }
body::-webkit-scrollbar-track { background: none; }
body::-webkit-scrollbar-thumb { border-radius: 8px; border: 4px solid transparent; background-clip: content-box; background-color: var(--brand-gold); }
body::-webkit-scrollbar-thumb:hover { background-color: var(--brand-gold); }

ul, ol { list-style: none; }

fieldset { border: 0; }
input, button, select, textarea { padding: 5px 15px; width: calc(100% - 32px); background: rgba(var(--gray-rgb), .2); border: 0; border-radius: 0; box-shadow: none; outline: none; font-size: 16px; color: var(--black); -webkit-appearance: none; -moz-appearance: none; appearance: none; }
select { padding: 10px 15px; width: 100%; }
input#Checknum { margin-right: 15px; width: 70px; max-width: calc(100% - 97px); }

img { max-width: 100%; }

a, a:link, a:visited, a:hover { text-decoration: none; white-space: pre-wrap; }

.txt_clamp { overflow: hidden; height: 1.5em; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.d_inblock.txt_clamp { display: -webkit-inline-box; }

[class^="fancybox-"] , [class^="fancybox-"] * , .slick-track , .fa , .fas , .fa:before , .fas:before , .fa:after , .fas:after , .trans_none_box { -webkit-transition: none; -moz-transition: none; transition: none; }
.fancybox-infobar__body span { font-size: inherit; color: currentcolor; vertical-align: initial; }

.container { margin: auto; max-width: 1280px; width: 90%; }

.btn { margin-top: 15px; padding: 10px 22px; background: var(--brand-gold); border-radius: 4px; display: inline-block; font-weight: bold; color: #000; }

.visually-hidden { position: absolute; overflow: hidden; margin: -1px; padding: 0; width: 1px; height: 1px; border: 0; clip: rect(0, 0, 0, 0); }

/* =========================================
    HEADER
========================================= */
.header { position: sticky; padding: 12px 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); border-bottom: var(--border-gold); top: 0; z-index: 1000; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }

.logo img { width: 120px; }

.nav-header ul { padding: 0; display: flex; }
.nav-header ul li a { padding: 10px 18px; display: block; font-size: 16px; color: var(--text-main); transition: 0.3s; }
.nav-header ul li a:hover { color: var(--text-link); text-shadow: 0 0 8px var(--text-link-hover-shadow); }

.menu-toggle { position: relative; width: 32px; height: 26px; display: none; cursor: pointer; }
.menu-toggle span { position: absolute; width: 100%; height: 3px; background: var(--brand-gold); border-radius: 2px; left: 0; transition: 0.35s ease-in-out; }
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 11px; }
.menu-toggle span:nth-child(3) { top: 22px; }

.menu-toggle.open span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

@media (max-width: 768px) {
	.header { z-index: 2000; }
	.nav-header { position: fixed; padding-top: 20px; width: 100%; height: calc(100vh - 76px); background: rgba(0, 0, 0, 0.93); backdrop-filter: blur(12px); border-top: var(--border-gold); top: 76px; left: 0; z-index: 1500; opacity: 0; transition: opacity .35s ease, transform .35s ease; transform: translateY(-20px); pointer-events: none; }
	.nav-header.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
	.nav-header ul { flex-direction: column; text-align: center; gap: 6px; }
	.nav-header ul li a { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); font-size: 18px; }
	.menu-toggle { display: block; z-index: 2500; }
	.logo { position: relative; z-index: 2500; }
}

/* =========================================
    BANNER
========================================= */
.banner img { width: 100%; height: auto; display: block; }
.banner a { white-space: normal; }

/* =========================================
    CARD (全站通用樣式)
========================================= */
.card { padding: 15px; background: var(--card-bg); backdrop-filter: blur(6px); border: var(--border-gold); border-radius: 10px; transition: 0.3s; }
.card:hover { border-color: var(--brand-gold); box-shadow: 0 0 15px var(--gold-shadow); transform: translateY(-6px); }
.card img { margin-bottom: 12px; width: 100%; border-radius: 8px; }

/* =========================================
    FOOTER
========================================= */
.footer { padding: 40px 0; background: var(--dark); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
.footer h4 { margin-bottom: 12px; color: var(--text-title); }
.footer ul { display: flex; flex-direction: column; gap: 6px; }
.footer ul li a { color: var(--text-secondary); }
.footer ul li a:hover { color: var(--text-link); }

.footer-logo { margin-bottom: 10px; }
.footer-logo img { width: 100px; }

.footer-about { max-width: 90%; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.footer-article { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.footer-article img { width: 55px; height: 55px; border: 1px solid rgba(var(--brand-gold-rgb), 0.35); border-radius: 6px; object-fit: cover; }
.footer-article a { font-size: 14px; color: var(--text-link); }
.footer-article a:hover { text-shadow: 0 0 6px var(--text-link-hover-shadow); }
.footer-article .date { margin-top: 3px; display: block; color: var(--text-muted); font-size: 12px; }

.copyright { text-align: center; color: var(--text-muted); }

@media (max-width: 1024px) {
	.footer { padding-bottom: 120px; }
}
@media (min-width: 769px) {
	.copyright { grid-column: span 3; }
}
@media (max-width: 768px) {
	.footer-grid { grid-template-columns: 1fr; }
	.footer-about { max-width: 100%; }
	.footer ul { flex-wrap: wrap; flex-direction: row; }
}

/* =========================================
    GOTOP
========================================= */
#gotop { position: fixed; padding: 0; width: 45px; background: var(--brand-gold); aspect-ratio: 1/1; display: flex; justify-content: center; align-items: center; border-radius: 50%; color: var(--dark); right: 1vw; bottom: 100px; opacity: 0; z-index: 999; }
#gotop[data-type="1"] { opacity: 1; }
#gotop svg { width: 50%; aspect-ratio: 1/1; fill: currentColor; }

/* =========================================
    CTA FOOTER NAV
========================================= */
.cta-footer-nav { position: fixed; padding: 10px 0; width: 100%; background: linear-gradient(135deg, #121C2E 0%, #1F3355 100%); box-shadow: 0 -.3em 1em rgba(0, 0, 0, .32); border-radius: 12px 12px 0 0; display: flex; justify-content: space-around; align-items: stretch; z-index: 999; bottom: 0; left: 0; }
.cta-footer-link { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; flex: 1; gap: 2px; text-align: center; text-decoration: none !important; }
.cta-footer-link img { width: 18%; height: auto; opacity: 0.9; transition: opacity 0.3s; }
.cta-footer-link:hover img { opacity: 1; }
.cta-footer-text { font-size: 16px; color: white; font-weight: 600; z-index: 9999; }
.cta-footer-text-home { font-size: 16px; font-weight: bold; }

.cta-footer-link.footer-home img { overflow: hidden; position: absolute; width: 50%; box-shadow: 0 .8em 1em rgba(0, 0, 0, .32); border-radius: 50%; aspect-ratio: 1/1; bottom: 1vw; opacity: 1; }
.cta-footer-link.footer-home .cta-footer-text { display: none; }

@media (min-width: 1025px) {
	.cta-footer-nav { display: none !important; }
}
@media (max-width: 768px) {
	.cta-footer-link img { width: 24%; }
	.cta-footer-text { font-size: 14px; }
}
@media (max-width: 480px) {
	.cta-footer-link img { width: 35%; }
	.cta-footer-link.footer-home img { width: 85%; }
	.cta-footer-text { font-size: 13px; }
}