@charset "utf-8";

/* ============================================
   pedia.css - 科普小知識 頁面樣式
   ============================================ */
figure{
    text-align:center;
}
.txtCont strong {
    color: #017871
}

.tiptxt {
    margin-top: 3rem;
}
/* ---------- 兩欄版面 ---------- */
.Pedia_Main .PediaLayout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1rem;
}

/* ---------- 左側選單 ---------- */
.Pedia_Main .PediaSideMenu {
    flex: 0 0 300px;
    border: 1px solid #b2e4e1;
    border-top: 3px solid #02A199;
    background: #f7fdfb;
}

.Pedia_Main .PediaSideMenu .MenuTitle {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1A706B;
    padding: 0.8rem 1rem;
    background: #e0f7f5;
    border-bottom: 1px solid #b2e4e1;
    margin: 0;
}

.Pedia_Main .PediaSideMenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.Pedia_Main .PediaSideMenu li {
    border-bottom: 1px solid #d4f0ee;
    display: block;
    width: auto;
    margin: 0;
    background: transparent;
    font-size: inherit;
}

.Pedia_Main .PediaSideMenu li::before {
    display: none;
}

.Pedia_Main .PediaSideMenu li a {
    display: block;
    padding: 0.7rem 1rem 0.7rem 1.25rem;
    color: #2c3e50;
    font-size: 1.2rem;
    line-height: 1.5rem;
    border-left: 4px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    text-decoration: none;
}

.Pedia_Main .PediaSideMenu li a:hover {
    background: #e0f7f5;
    color: #02A199;
    border-left-color: #3abdb7;
    text-decoration: none;
}

/* 非 active tab 的 focus 樣式（深色外框保持 3:1 以上對比） */
    .Pedia_Main .PediaSideMenu li a:focus-visible, .Pedia_Main .PediaSideMenu li a:focus {
        outline: 2px dotted #6DC9A7;
        outline-offset: 3px;
        background: #e0f7f5;
        color: #017871;
        border-left-color: #02A199;
        text-decoration: none;
    }

/* active tab 的 focus 樣式（白色外框確保深綠底色上的對比） */
    .Pedia_Main .PediaSideMenu li.pedia-active a:focus-visible {
        outline: 2px dotted #6DC9A7;
        outline-offset: 3px;
    }



.Pedia_Main .PediaSideMenu li.pedia-active a {
    background: #02A199;
    color: #fff;
    border-left-color: #017871;
    font-weight: 700;
    text-decoration: none;
}

.Pedia_Main .PediaSideMenu li.pedia-active a:hover {
    background: #017871;
    color: #fff;
}

/* ---------- 右側內容區 ---------- */
.Pedia_Main .PediaContent {
    flex: 1;
    min-width: 0;
}

/* Tab 面板 */
.PediaPane {
    display: none;
}

.PediaPane.pedia-active {
    display: block;
}

/* 覆寫 global.css 中 main h3 的置中對齊 */
.Pedia_Main .PediaContent h3 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 1rem;
}

.Pedia_Main .PediaContent h3 + article,
.Pedia_Main .PediaContent h3 + .txtCont {
    margin-top: 0;
}

/* ---------- 懸浮微粒橫幅 ---------- */
.Pedia_PmBanner {
    background: linear-gradient(135deg, #02A199 0%, #017871 100%);
    color: #fff;
    padding: 1.5rem 2rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.Pedia_PmBanner h4 {
    color: #fff;
    font-size: 1.375rem;
    margin: 0 0 0.75rem 0;
    text-indent: 0;
}

.Pedia_PmBanner h4::before {
    display: none;
}

.Pedia_PmBanner p {
    color: rgba(255,255,255,0.9);
    margin: 0;
    line-height: 1.7;
    font-size: 1rem;
}

/* ---------- 危害卡片格 ---------- */
.Pedia_DangerGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.Pedia_DangerCard {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 5px solid #e53e3e;
    padding: 1rem 1.25rem;
    border-radius: 4px;
}

.Pedia_DangerCard h5 {
    color: #c53030;
    font-size: 1.05rem;
    margin: 0 0 0.5rem 0;
    font-weight:bold;
}

.Pedia_DangerCard p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* ---------- 資料來源連結 ---------- */
.Pedia_SourceLink {
    text-align: right;
    margin-top: 1.25rem;
}

    .Pedia_SourceLink a, .Pedia_SourceLink p {
        font-size: 1rem;
        line-height: 1.4rem;
        color: #555;
    }

        .Pedia_SourceLink a:hover {
            text-decoration: underline;
        }
        .Pedia_SourceLink a:focus {
            outline: 2px dotted #6DC9A7;
            outline-offset: 3px;
        }

.tiptxtSvg{
    font-size:1rem;
    margin-top:1rem;
    color:#000;
}
/* ---------- 提示框 ---------- */
.Pedia_Callout {
    background: #f7fdfb;
    border-left: 4px solid #02A199;
    padding: 1rem 1.25rem;
    border-radius: 0 4px 4px 0;
    margin: 1.5rem 0;
}

/* ---------- PM2.5 環形圖 ---------- */
.Pedia_ChartContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem auto;
    width: 100%;
    max-width: 640px;
}

.Pedia_ChartContainer svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.pie-slice {
    transition: all 0.3s ease;
    cursor: pointer;
    transform-origin: 300px 200px;
}

.pie-slice:hover,
.pie-slice:focus,
.pie-slice:focus-visible,
.pie-slice.active {
    outline: none;
    transform: scale(1.05);
    filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.15));
}

/* 詳細資訊面板 */
.Pedia_SourceDetail {
    width: 100%;
    border-radius: 4px;
    padding: 1rem 1.25rem;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 1rem;
    transition: all 0.3s ease;
    display:none;
}

.Pedia_SourceDetail.default-state {
    text-align: center;
    color: #546e7a;
}

    .Pedia_SourceDetail.local-theme {
        background: rgba(2,161,153,0.04);
        border: 1px solid rgba(2,161,153,0.2);
        border-left: 6px solid #02a199;
        display: block;
    }

.Pedia_SourceDetail.local-theme .detail-title {
    color: #017871;
}

    .Pedia_SourceDetail.imported-theme {
        background: rgba(246,173,85,0.04);
        border: 1px solid rgba(246,173,85,0.2);
        border-left: 6px solid #f6ad55;
        display: block;
    }

.Pedia_SourceDetail.imported-theme .detail-title {
    color: #c06c00;
}

.Pedia_SourceDetail .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.Pedia_SourceDetail .detail-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.Pedia_SourceDetail .detail-type-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
}

.Pedia_SourceDetail .detail-type-badge.local {
    background: rgba(2,161,153,0.1);
    color: #017871;
}

.Pedia_SourceDetail .detail-type-badge.imported {
    background: rgba(246,173,85,0.1);
    color: #c06c00;
}

.Pedia_SourceDetail .detail-desc {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.pedia-chemical-tag {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin: 0 3px 3px 0;
    border: 1px solid #cbd5e0;
    background: #edf2f7;
    color: #4a5568;
}

/* ---------- 六大來源科學解析卡片 ---------- */
.Pedia_ResearchCards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1rem;
}

.Pedia_ResearchCard {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1.25rem;
    transition: transform 0.25s;
}

.Pedia_ResearchCard:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.Pedia_ResearchCard h4 {
    color: #017871;
    border-left: 4px solid #02A199;
    padding-left: 8px;
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    text-indent: 0;
}

.Pedia_ResearchCard h4::before {
    display: none;
}

.Pedia_ResearchCard p {
    font-size:1rem;
    line-height: 1.55;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.Pedia_ResearchCard p:last-child {
    margin-bottom: 0;
    color: #546e7a;
}

/* ---------- 台北101 高空觀測 ---------- */
.Pedia_SunlightLayout {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    margin-bottom:1.5rem;
}

.Pedia_TowerViz {
    flex: 0 0 180px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fafbfc;
    border-radius: 4px;
    border: 1px solid #edf2f7;
    padding: 1rem;
    min-height: 290px;
    overflow: hidden;
}

.Pedia_TowerViz img {
    height: 100%;
    max-height: 380px;
    object-fit: contain;
}

.pedia-tower-pointer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e53e3e;
    border: 2px solid white;
    box-shadow: 0 0 0 4px rgba(229,62,62,0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pedia-tower-pointer[data-height="40"] {
    background: #dd6b20;
    box-shadow: 0 0 0 4px rgba(221,107,32,0.25);
}

.pedia-tower-pointer.active-highlight {
    transform: translateX(-50%) scale(1.35);
    box-shadow: 0 0 0 6px rgba(229,62,62,0.4);
}

.pedia-tower-pointer[data-height="40"].active-highlight {
    box-shadow: 0 0 0 6px rgba(221,107,32,0.4);
}

.Pedia_HeightCards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 240px;
}

.Pedia_HeightCard {
    border: 1px solid #edf2f7;
    border-left: 6px solid #e53e3e;
    border-radius: 4px;
    padding: 1rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.Pedia_HeightCard[data-height="40"] {
    border-left-color: #dd6b20;
}

.Pedia_HeightCard.active-highlight {
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    transform: translateY(-2px);
    background: #fafbfc;
}

.Pedia_HeightCard .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.Pedia_HeightCard .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #017871;
    margin: 0;
}

.Pedia_HeightCard .card-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
    white-space: nowrap;
}

.Pedia_HeightCard[data-height="40"] .card-badge {
    background: #fffaf0;
    color: #dd6b20;
    border-color: #fbd38d;
}

.Pedia_HeightCard p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    color: #2c3e50;
}

/* ---------- 白天 / 夜晚卡片 ---------- */
.Pedia_DayNightGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.Pedia_DayCard {
    background: linear-gradient(135deg, #fffaf0 0%, #ffedd5 100%);
    border: 1px solid #fbd38d;
    border-top: 5px solid #dd6b20;
    border-radius: 4px;
    padding: 1.25rem;
}

.Pedia_DayCard h4,
.Pedia_NightCard h4 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    text-indent: 0;
    font-weight:bold;
}

.Pedia_DayCard h4 {
    color: #dd6b20;
}

.Pedia_DayCard h4::before,
.Pedia_NightCard h4::before {
    display: none;
}

.Pedia_DayCard p,
.Pedia_NightCard p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #2c3e50;
}

.Pedia_NightCard {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-top: 5px solid #4f46e5;
    border-radius: 4px;
    padding: 1.25rem;
}

.Pedia_NightCard h4 {
    color: #4f46e5;
}

/* ---------- 文章內圖片 ---------- */
.Pedia_Main .PediaContent figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.Pedia_ArticleFigure {
    text-align: center;
    margin-top: 1.5rem;
}

/* ---------- 環形圖 SVG 標籤群組 ---------- */
.pedia-chart-labels {
    font-size: 1rem;
    font-weight: 700;
    font-family: sans-serif;
    cursor: default;
}

.pedia-chart-labels text {
    transition: opacity 0.3s ease;
}

/* ---------- 環形圖詳細面板：預設圖示 ---------- */
.pedia-detail-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 0.4rem;
}

/* ---------- 台北101 觀測指示點（各高度位置） ---------- */
.pedia-tower-pointer[data-height="390"] { top: 19%; }
.pedia-tower-pointer[data-height="220"] { top: 49%; }
.pedia-tower-pointer[data-height="40"]  { top: 81%; }

/* ---------- 高度卡片附註小字 ---------- */
.pedia-height-note {
    color: #546e7a;
    font-weight: 700;
}

/* ---------- 響應式 ---------- */
@media only screen and (max-width: 61em) {
    .Pedia_DangerGrid,
    .Pedia_DayNightGrid {
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width: 47.9735em) {
    .Pedia_Main .PediaLayout {
        flex-direction: column;
    }

    .Pedia_Main .PediaSideMenu {
        flex: none;
        width: 100%;
    }

    .Pedia_SunlightLayout {
        flex-direction: column;
    }

    .Pedia_TowerViz {
        flex: none;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .Pedia_ResearchCards {
        grid-template-columns: 1fr;
    }
}

#tab_1 img{
    width:50%;
}
