/* style.css */
:root {
    --primary: #6b8ead; --primary-dark: #52728f; --primary-light: #ebf1f6;  
    --accent: #e5a97c; --accent-light: #f6d6b8; --accent-dark: #d08c5c;
    --text-main: #4a5568; --text-muted: #829ab1; --bg-main: #fafcff; --bg-light: #ffffff;       
    --danger: #e08787; --warning: #e2b96b; --success: #78b595;        
    --shadow-md: 0 4px 10px rgba(107, 142, 173, 0.08);
    --shadow-lg: 0 10px 20px rgba(107, 142, 173, 0.12);
    --shadow-xl: 0 20px 40px rgba(107, 142, 173, 0.15);
    --radius-md: 16px; --radius-lg: 24px; --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { font-family: 'Noto Sans TC', sans-serif; color: var(--text-main); background-color: var(--bg-main); margin: 0; line-height: 1.7; overflow-x: hidden; }

/* 進場動畫 */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-left { opacity: 0; transform: translateX(-50px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-right { opacity: 0; transform: translateX(50px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-down { opacity: 0; transform: translateY(-30px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-scale { opacity: 0; transform: scale(0.95); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal.active, .reveal-left.active, .reveal-right.active, .reveal-down.active, .reveal-scale.active { opacity: 1; transform: translate(0) scale(1); }
.d-1 { transition-delay: 0.15s; } .d-2 { transition-delay: 0.3s; } .d-3 { transition-delay: 0.45s; }

/* Navbar */
.hero-bg-decoration { position: absolute; top: 0; left: 0; width: 100%; height: 480px; background: linear-gradient(135deg, #7aa1c2 0%, var(--primary) 100%); z-index: -1; clip-path: polygon(0 0, 100% 0, 100% 75%, 0 100%); }
.navbar { position: absolute; top: 0; width: 100%; background: transparent; z-index: 1000; padding-top: 10px; }
.nav-container { max-width: 1200px; margin: auto; padding: 15px 24px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 22px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px;}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { text-decoration: none; color: rgba(255,255,255,0.9); font-weight: 500; font-size: 15px; transition: var(--transition); }
.nav-links a:hover { color: var(--accent-light); }
.nav-links .btn-nav { background: rgba(255,255,255,0.15); border: 1px solid #fff; padding: 8px 20px; border-radius: 30px; }
.nav-links .btn-nav:hover { background: #fff; color: var(--primary); }

/* Dropdown */
.dropdown { position: relative; display: inline-block; padding: 10px 0; }
.dropdown .dropbtn { cursor: pointer; }
.dropdown-content { display: none; position: absolute; background-color: var(--bg-light); min-width: 180px; box-shadow: var(--shadow-lg); border-radius: var(--radius-md); padding: 8px 0; z-index: 1001; top: 100%; left: 50%; transform: translateX(-50%); border: 1px solid var(--primary-light); }
.dropdown:hover .dropdown-content { display: block; animation: fadeUp 0.3s ease; }
.dropdown-content a { color: var(--text-main) !important; padding: 12px 20px; display: block; font-size: 14px; text-align: center; border-bottom: 1px solid var(--primary-light); font-weight: 500; }
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: var(--bg-main); color: var(--primary) !important; }
@keyframes fadeUp { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 共用排版 */
.section-container { max-width: 1100px; margin: auto; padding: 0 24px; }
.text-center { text-align: center; } .text-left { text-align: left; } .text-white { color: white !important; } .text-muted { color: var(--text-muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }

/* 按鈕 */
.btn-pill { display: inline-flex; align-items: center; justify-content: center; background-color: var(--primary); color: white; padding: 12px 28px; border-radius: 50px; font-size: 16px; font-weight: 700; text-decoration: none; border: none; cursor: pointer; transition: var(--transition); box-shadow: 0 4px 10px rgba(107, 142, 173, 0.2); }
.btn-pill:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(107, 142, 173, 0.3); }
.btn-pill.large { padding: 16px 36px; font-size: 18px; } .btn-pill.small { padding: 8px 20px; font-size: 14px; }
.btn-pill .icon-circle { background-color: var(--accent); color: white; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; margin-left: 12px; } .btn-pill.large .icon-circle { width: 32px; height: 32px; font-size: 14px; }

/* Hero Section */
.hero-modern { padding: 90px 24px 40px; position: relative; }
.hero-container { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 40px; background: var(--bg-light); padding: 40px 50px; border-radius: 30px; box-shadow: var(--shadow-xl); }
.hero-content-left { flex: 1; max-width: 450px; }
.hero-title { font-size: 46px; color: var(--primary); line-height: 1.2; font-weight: 800; margin-bottom: 16px; }
.hero-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.8; }
.hero-actions { display: flex; flex-direction: column; gap: 14px; max-width: 280px; }
.hero-image-right { flex: 1; }
.main-hero-img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); object-fit: cover; box-shadow: var(--shadow-md); }

/* 子目錄模組卡片樣式 */
.content-section-block { padding: 60px 0; border-bottom: 1px solid var(--primary-light); }
.content-section-block.alt-bg { background-color: var(--bg-light); }
.section-title { font-size: 28px; color: var(--primary-dark); text-align: center; margin-bottom: 40px; font-weight: 800; }

.info-card {
    background: #ffffff; padding: 24px; border-radius: 20px; height: 100%; box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: var(--transition); border: 1px solid rgba(107, 142, 173, 0.1); 
    display: flex; flex-direction: column; cursor: pointer; 
}
.info-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(107, 142, 173, 0.12); border-color: var(--primary-light); }

.card-img { width: 100%; height: 160px; object-fit: contain; background-color: transparent; border-radius: 8px; margin-bottom: 16px; }
.info-card .card-icon { font-size: 32px; margin-bottom: 15px; }
.info-card h4 { color: var(--primary-dark); font-size: 18px; margin-bottom: 10px; font-weight: 700; line-height: 1.4; }
.card-desc { color: var(--text-muted); font-size: 14px; margin: 0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 卡片底部與分享按鈕樣式 */
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; border-top: 1px dashed var(--primary-light); }
.card-footer .read-more-link { color: var(--accent-dark); font-weight: bold; font-size: 14px; margin: 0; padding: 0; }

.share-actions { display: flex; gap: 8px; align-items: center; }
.share-btn { padding: 0; background: transparent; border: none; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; }
.share-btn:hover { transform: translateY(-2px); opacity: 0.8; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.share-icon-img { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }

.info-card.highlight-card { background: linear-gradient(135deg, var(--primary-light), var(--bg-light)); border-color: var(--accent-light); }

/* Modal 樣式 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(74, 85, 104, 0.7); z-index: 2000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px); opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content { background: var(--bg-light); width: 90%; max-width: 800px; max-height: 85vh; border-radius: var(--radius-lg); padding: 40px; position: relative; overflow-y: auto; box-shadow: var(--shadow-xl); transform: translateY(20px); transition: all 0.3s ease; }
.modal-overlay.show .modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 20px; right: 25px; font-size: 30px; cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.close-modal:hover { color: var(--danger); }
.modal-badge { display: inline-block; background: var(--primary-light); color: var(--primary); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; margin-bottom: 15px; }
.modal-header h2 { color: var(--primary-dark); font-size: 28px; line-height: 1.3; margin-bottom: 10px; }
.modal-hero-img { width: 100%; max-height: 350px; object-fit: contain; background-color: #fff; border-radius: var(--radius-md); margin-bottom: 25px; }
.modal-body-text { font-size: 16px; line-height: 1.8; color: var(--text-main); margin-bottom: 30px; }
.modal-body-text p { margin-bottom: 15px; }
.modal-body-text img { max-width: 100%; height: auto; border-radius: 8px; }
.modal-reference-box { background: var(--bg-main); padding: 15px 20px; border-left: 4px solid var(--accent); border-radius: var(--radius-md); font-size: 14px; color: var(--text-muted); word-break: break-all; }
.hidden { display: none !important; }

/* ==================================================
   🌟 News & Video Section 特效 (縮減過大的上下間距) 
   ================================================== */
.news-video-section { 
    padding: 20px 0 40px; /* 大幅縮小頂部間距 */
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="%23ffffff" d="M0,50 C30,20 70,80 100,50 L100,100 L0,100 Z"/></svg>') no-repeat bottom center; 
    background-size: cover; 
}
.media-card { background: transparent; display: flex; flex-direction: column; height: 100%; }

/* 調整 Header 內的間距，讓排版更緊湊 */
.media-header { text-align: center; margin-bottom: 10px; cursor: pointer; transition: transform 0.2s; position: relative; }
.media-header:hover { transform: translateY(-3px); }
.media-header h3 { font-size: 22px; color: var(--primary); font-weight: 800; line-height: 1.2; margin: 4px 0; /* 消除 h3 預設的龐大上下邊距 */ } 
.media-header small { font-size: 15px; color: var(--text-muted); font-weight: 500; }

.view-all-badge { display: inline-block; font-size: 12px; color: var(--accent-dark); background: var(--accent-light); padding: 4px 12px; border-radius: 12px; font-weight: bold; margin-top: 4px; margin-bottom: 10px; transition: var(--transition); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.media-header:hover .view-all-badge { background: var(--accent); color: white; }

.media-content { background: var(--bg-light); padding: 20px 20px 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; flex-grow: 1; border: 1px solid var(--primary-light); box-sizing: border-box; }

.media-img-placeholder { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; margin-bottom: 15px; position: relative; overflow: hidden; flex-shrink: 0; }
.news-bg img { object-fit: cover !important; background-color: #fff; }
.news-bg { background: linear-gradient(135deg, #d1d9e6, #a8b8d0); } .video-bg { background: linear-gradient(135deg, #b0a4d9, #9182c4); }
.media-title { font-size: 17px; color: var(--text-main); margin-bottom: 8px; font-weight: 700; flex-shrink: 0; line-height: 1.4; }
.media-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }

.list-item-card { display: flex; gap: 15px; padding: 15px; border: 1px solid var(--primary-light); border-radius: 12px; cursor: pointer; align-items: center; transition: all 0.2s; background: #fff; }
.list-item-card:hover { border-color: var(--primary); transform: translateX(5px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

/* Screener Banner */
.screener-banner { background: linear-gradient(90deg, #f0c39f, #e5a97c); padding: 70px 24px; text-align: center; color: white; position: relative; clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%); margin: 30px 0 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; }
.screener-banner h2 { font-size: 30px; font-weight: 800; margin-bottom: 5px; color: #fff; } .screener-banner h3 { font-size: 22px; margin-bottom: 15px; } .screener-banner .reviewer { font-size: 14px; opacity: 0.9; background: rgba(255,255,255,0.2); padding: 4px 14px; border-radius: 20px; display: inline-block; }

/* Assessment Area */
.assessment-section { padding: 30px 0 70px; }
.assessment-intro-text { font-size: 18px; color: var(--text-main); font-weight: 700; margin-bottom: 30px; line-height: 1.8; }
.assessment-container { background: var(--bg-light); max-width: 700px; margin: auto; border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-xl); min-height: 400px; border: 1px solid var(--primary-light); }
.screen { display: none; opacity: 0; transition: var(--transition); } .screen.active { display: block; opacity: 1; }
.disclaimer-box { margin-top: 40px; padding: 20px; background: var(--bg-main); border-radius: var(--radius-md); border-left: 4px solid var(--accent); }
.styled-list { padding-left: 20px; margin-top: 8px; } .styled-list li { margin-bottom: 6px; color: var(--text-muted); }

/* 快篩進度條與按鈕 */
.progress-wrapper { margin-bottom: 30px; }
.progress-bar-container { width: 100%; height: 8px; background: var(--primary-light); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.5s ease-out; }
.counter { display: block; text-align: right; font-size: 14px; color: var(--text-muted); }
.question-text { font-size: 20px !important; color: var(--primary-dark) !important; margin-bottom: 24px !important; font-weight: 700; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option-btn { background: var(--bg-light); border: 2px solid var(--primary-light); padding: 16px 20px; border-radius: var(--radius-md); cursor: pointer; text-align: left; font-size: 16px; font-weight: 500; transition: var(--transition); color: var(--text-main); }
.option-btn:hover { border-color: var(--primary); background: var(--bg-main); padding-left: 25px; }

.loading-state { text-align: center; margin-top: 20px; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--primary-light); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.result-box { background: var(--bg-main); padding: 24px; border-radius: var(--radius-md); margin: 24px 0; border-left: 4px solid var(--text-muted); }
.screen-icon { font-size: 48px; text-align: center; margin-bottom: 20px; }

/* SDM 醫病共享決策 */
.sdm-section { background: var(--primary); padding: 70px 0; clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%); margin-top: -30px; }
.sdm-subtitle { color: var(--accent-light); font-size: 18px; font-weight: bold; margin-bottom: 40px; }
.sdm-card { background: var(--bg-light); padding: 35px 25px 25px; border-radius: var(--radius-lg); position: relative; text-align: left; box-shadow: 0 8px 20px rgba(0,0,0,0.1); margin-top: 20px; border: 1px solid var(--primary-light); }
.step-badge { position: absolute; top: -16px; left: 25px; background: var(--primary-dark); color: white; padding: 6px 18px; border-radius: 20px; font-weight: 800; font-size: 13px; border: 2px solid white; box-shadow: var(--shadow-md); }
.sdm-card h3 { color: var(--primary); font-size: 18px; margin-bottom: 10px; }
.sdm-card p { color: var(--text-muted); font-size: 14px; }

/* 懸浮選單 & Footer */
.floating-sidebar { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 1000; }
.sidebar-btn { background-color: var(--accent); color: white; text-decoration: none; width: 60px; height: 60px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; box-shadow: var(--shadow-md); transition: var(--transition); }
.sidebar-btn:hover { background-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.line-icon-img { width: 24px; height: 24px; margin-bottom: 2px; object-fit: contain; }
.sidebar-btn .icon { font-size: 20px; margin-bottom: 2px; }
.footer { background: var(--text-main); color: rgba(255,255,255,0.8); padding: 25px 24px; text-align: center; font-size: 13px; }

@media (max-width: 992px) {
    .hero-container { flex-direction: column; padding: 30px; margin-top: 40px; }
    .hero-content-left { max-width: 100%; text-align: center; }
    .hero-actions { margin: 0 auto; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .screener-banner { clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%); padding: 50px 20px; margin: 0 0 40px; }
    .floating-sidebar { right: 10px; top: auto; bottom: 20px; transform: none; flex-direction: row; }
    .sidebar-btn { width: 50px; height: 50px; font-size: 10px; border-radius: 12px; }
    .nav-links { display: none; }
}