/* Shared responsive public site header and home layout. */
.site-header {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 18px;
    padding: 14px 24px 10px;
    border-bottom: 3px solid #d8e0e3;
}
.site-logo { flex: 0 0 150px; text-align: center; }
.site-logo img { max-width: 100%; max-height: 145px; }
.site-branding { flex: 1; min-width: 0; }
.site-banner { display: block; width: 100%; height: auto; max-height: 145px; object-fit: contain; object-position: left center; border-radius: 4px; }
.site-branding .nav { margin: 10px 0 0; display: flex; flex-wrap: wrap; }
.site-branding .nav > li > a { padding: 9px 13px; }
.home-content { max-width: 1200px; margin: 0 auto 30px; }
.home-content > div { padding-left: 10px; padding-right: 10px; }
.home-content .panel { border: 0; border-radius: 8px; box-shadow: 0 2px 12px rgba(30,55,65,.12); overflow: hidden; }
.home-content .panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.home-content .media { padding: 16px 6px; border-bottom: 1px solid #e8edef; }
.home-content .media:last-child { border-bottom: 0; }
.home-content .media-left { display: block; float: left; margin: 0 18px 12px 0; }
.home-content .media-object { width: 250px; max-width: 36vw; height: auto; max-height: 320px; object-fit: contain; border-radius: 4px; cursor: zoom-in; }
.home-content .media-body { display: block; width: auto; overflow: visible; }
.home-content .media-body p { line-height: 1.75; }
.home-content .separator { clear: both; }
.post-detail-dialog .ui-dialog-titlebar-close { width: 30px !important; height: 30px !important; padding: 2px !important; }
.post-detail-dialog .ui-dialog-titlebar-close .ui-button-text { display: none !important; }
.post-detail-dialog .ui-dialog-content { box-sizing: border-box; }
.article-detail { line-height: 1.75; }
.article-detail .title { display: block; }
.article-detail pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: #f7f9fa; border: 1px solid #e5eaec; padding: 16px; }
@media (max-width: 767px) {
    .site-header { display: block; padding: 10px 12px; }
    .site-logo { display: block; margin: 0 auto 10px; }
    .site-logo img { max-height: 80px; }
    .site-banner { max-height: 90px; }
    .site-branding .nav { gap: 2px; }
    .site-branding .nav > li > a { padding: 8px; }
    .home-content { padding: 0 8px; }
    .home-content .media-object { max-width: 38vw; width: 150px; }
}

/* Editorial layouts shared by home and reading club pages. */
body { color: #24343a; background: #f6f8f7 !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif; }
.site-header { max-width: 1280px; border: 0; padding-top: 20px; }
.site-branding .nav { border-bottom: 1px solid #e0e8e5; }
.site-branding .nav > li > a { color: #435a60; border-radius: 0; font-weight: 600; }
.site-branding .nav > li > a:hover, .site-branding .nav > li > a:focus { color: #176c5c; background: transparent; }
.home-content, .reading-page { max-width: 1050px; margin: 24px auto 72px; padding: 0 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 26px 0; border-bottom: 1px solid #dce5e1; }
.section-heading h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: .03em; color: #163d36; }
.section-heading p:not(.eyebrow) { margin: 10px 0 0; color: #6d7f7a; }
.eyebrow { margin: 0 0 9px; color: #64867b; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.news-search { display: flex; border-bottom: 1px solid #9aada6; }
.news-search input { width: 210px; border: 0; outline: 0; padding: 10px 4px; background: transparent; }
.news-search button, .text-action { border: 0; background: transparent; color: #176c5c; font-weight: 700; padding: 10px 12px; }
.news-search button:hover, .text-action:hover { color: #0d483d; }
.news-feed, .reading-feed { max-width: 850px; }
.news-entry { padding: 30px 0; border-bottom: 1px solid #dce5e1; }
.home-content .media, .reading-page .media { padding: 0; border: 0; }
.home-content .media-heading, .reading-page .media-heading { margin-bottom: 15px; color: #83938e; }
.home-content .media-heading .label, .reading-page .media-heading .label { color: #176c5c; background: transparent; padding: 0; font-weight: 700; }
.home-content .media-object, .reading-page .media-object { width: 270px; max-width: 34vw; max-height: 260px; border-radius: 2px; }
.home-content .media-body h4, .reading-page .media-body h4 { margin-top: 0; color: #203e38; font-size: 20px; line-height: 1.5; }
.home-content .media-body p, .reading-page .media-body p { color: #52645e; line-height: 1.85; }
.home-content .btn-link { padding: 0 4px; color: #176c5c; font-weight: 700; }
.home-content .media-body > p:last-child { margin-top: 18px; font-size: 13px; color: #82918c; }
.text-action { margin-top: 22px; padding-left: 0; }
.reading-heading { margin-bottom: 36px; }
.reading-feed h2 { margin: 0; padding: 0 0 8px; color: #6a8078; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.empty-state { padding: 45px 0; color: #768780; }
.hidden-detail { display: none; }
.post-modal .modal-dialog { width: min(860px, calc(100% - 28px)); margin: 5vh auto; }
.post-modal .modal-content { border: 0; border-radius: 8px; box-shadow: 0 24px 80px rgba(17,45,38,.25); overflow: hidden; }
.post-modal .modal-header { position: relative; padding: 28px 36px 18px; border: 0; background: #f2f6f3; }
.post-modal .modal-title { color: #163d36; font-size: 25px; }
.post-modal .modal-close { position: absolute; top: 18px; right: 22px; border: 0; background: none; color: #52645e; font-size: 30px; line-height: 1; }
.post-modal .modal-body { max-height: 68vh; overflow-y: auto; padding: 28px 36px; line-height: 1.85; }
.post-modal .modal-footer { border: 0; padding: 0 36px 26px; }
.post-modal .modal-done { border: 1px solid #176c5c; border-radius: 4px; background: #176c5c; color: white; padding: 9px 20px; }
.post-modal #post_type_nm { color: #64867b; font-size: 14px; }
.post-modal #content, .post-modal #content_e { max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; background: transparent; border: 0; padding: 0; }
.post-modal #btnDownload { border: 0; border-radius: 4px; padding: 10px 15px; background: #eaf2ee; color: #176c5c; }
@media (max-width: 767px) {
 .home-content, .reading-page { padding: 0 18px; margin-top: 8px; }
 .section-heading { display: block; }
 .news-search { margin-top: 22px; }
 .news-search input { flex: 1; width: auto; }
 .home-content .media-object, .reading-page .media-object { max-width: 40vw; width: 150px; max-height: 190px; }
 .home-content .media-left, .reading-page .media-left { margin-right: 12px; }
 .news-entry { padding: 22px 0; }
 .post-modal .modal-header, .post-modal .modal-body { padding-left: 22px; padding-right: 22px; }
}

/* Shared site shell and listing page layout. */
.site-header { width: 100%; max-width: 1240px; box-sizing: border-box; }
.site-logo { flex: 0 0 150px; }
.site-logo img { width: auto; height: auto; max-width: 150px; max-height: 110px; object-fit: contain; }
.site-banner { max-height: 110px; background-color: transparent; }
.site-branding .nav { justify-content: flex-start; }
body > .container { width: 100%; max-width: 1240px; }
.home-layout { max-width: 1240px; margin: 20px auto 72px; padding: 0 26px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 52px; }
.home-content { width: auto; max-width: none; margin: 0; padding: 0; }
.related-sites { padding: 30px 0; align-self: start; }
.related-sites h2 { margin: 0 0 18px; color: #163d36; font-size: 19px; }
.related-sites a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #dce5e1; color: #52645e; text-decoration: none; line-height: 1.5; }
.related-sites a:hover { color: #176c5c; }
.query-toolbar, .book-toolbar { box-sizing: border-box; width: 100%; max-width: 1050px; margin: 18px auto 0; padding: 20px 26px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; border: 0; border-bottom: 1px solid #dce5e1; background: transparent; box-shadow: none; }
.query-toolbar label, .book-toolbar label { color: #61746d; font-weight: 600; }
.query-toolbar input, .book-toolbar input { min-height: 42px; box-sizing: border-box; padding: 9px 12px; border: 1px solid #d5dfda; border-radius: 4px; background: #fff; font: inherit; }
.query-toolbar button, .book-toolbar button { min-height: 40px; border: 0; border-radius: 4px; padding: 9px 15px; background: #176c5c; color: #fff; font: inherit; }
.query-toolbar #btnHome, .book-toolbar #btnHome { background: transparent; color: #50665e; }
.post-list-panel, .book-list-panel { box-sizing: border-box; width: 100%; max-width: 1050px; margin: 0 auto 60px !important; padding: 30px 26px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.post-list-panel h2, .book-list-panel h2 { margin: 0 0 10px; color: #163d36; font-size: 28px; }
.book-list-panel ul.pubList { width: 100%; max-width: none; margin: 0; padding: 0; }
.book-list-panel ul.pubList li { padding: 17px 0; margin: 0; border-bottom: 1px solid #dce5e1; line-height: 1.8; color: #52645e; }
.book-list-panel .em1, .book-list-panel .em2 { color: #658078 !important; }
.book-list-panel .em3 { color: #243f38; }
.post-list-panel ul.NewsList { max-width: none; padding: 0; }
.post-list-panel ul.NewsList li { border-bottom: 1px solid #dce5e1; }
.post-list-panel ul.NewsList .category { color: #64867b; }
.post-list-panel ul.NewsList .link { color: #176c5c; cursor: pointer; font-weight: 700; }
.book-toolbar .plain-button { background: transparent; color: #50665e; }
.site-header { max-width: 1600px; padding-left: 32px; padding-right: 32px; gap: 28px; }
.site-logo { flex-basis: 160px; }
.site-logo img { max-width: 160px; max-height: 145px; }
.site-banner { max-height: 160px; }
.home-content .media-left { margin-right: 18px; }

.post-list-panel ul.NewsList img { width: 250px; max-width: 36vw; max-height: 320px; height: auto; object-fit: contain; margin-right: 0; }
.ui-ezpagination { position: static; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: auto; min-height: 44px; margin: 16px auto 30px; color: #74847e; font-family: inherit; font-size: 13px; line-height: 1.4; letter-spacing: 0; }
.ui-ezpagination-back, .ui-ezpagination-list, .ui-ezpagination-forward, .ui-ezpagination-info { position: static; top: auto; left: auto; right: auto; float: none; }
.ui-ezpagination-back, .ui-ezpagination-forward { display: flex; align-items: center; gap: 4px; }
.ui-ezpagination-list { max-width: min(60vw, 460px); overflow-x: auto; }
.ui-ezpagination ul { display: flex; gap: 4px; padding: 0; margin: 0; }
.ui-ezpagination ul li { float: none; padding: 0; margin: 0; }
.ui-ezpagination a, .ui-ezpagination span.ui-ezpagination-previous, .ui-ezpagination span.ui-ezpagination-next, .ui-ezpagination-current { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; min-width: 36px; height: 36px !important; min-height: 36px; box-sizing: border-box; line-height: 1 !important; margin: 0 !important; padding: 0 !important; border: 1px solid #d8e3de !important; border-radius: 5px; background: #fff !important; color: #50665e !important; font: inherit; text-decoration: none; }
.ui-ezpagination a:hover, .ui-ezpagination a.ui-ezpagination-current { border-color: #176c5c !important; background: #176c5c !important; color: #fff !important; }
.ui-ezpagination .ui-ezpagination-previous, .ui-ezpagination .ui-ezpagination-next { cursor: pointer; }
.ui-ezpagination .ui-ezpagination-info { margin-left: 12px; color: #74847e; white-space: nowrap; }
.site-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 28px 0; }
.site-pagination .page-control, .site-pagination .page-number { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 36px; min-width: 36px; height: 36px; line-height: 1; padding: 0; border: 1px solid #d8e3de; border-radius: 5px; background: #fff; color: #50665e; text-decoration: none; }
.site-pagination .page-control.disabled { color: #b7c2bd; }
.site-pagination .page-number.active, .site-pagination .page-number:hover, .site-pagination .page-control:hover { border-color: #176c5c; background: #176c5c; color: #fff; }
.site-pagination .page-summary { margin-left: 10px; color: #74847e; font-size: 13px; }
@media (max-width: 767px) {
 .site-header { padding: 10px 12px; }
 .site-logo { width: auto; }
 .site-logo img { max-height: 75px; }
 .site-banner { max-height: 80px; }
 .home-layout { display: flex; flex-direction: column-reverse; gap: 20px; padding: 0 18px; }
 .related-sites { padding: 12px 0 0; }
 .related-sites a { display: inline-flex; margin-right: 16px; border: 0; }
 .query-toolbar, .book-toolbar { margin-top: 10px; padding: 14px 18px; }
 .post-list-panel, .book-list-panel { margin: 0 auto 40px !important; padding: 20px 18px; }
 .site-header { padding-left: 12px; padding-right: 12px; gap: 12px; }
 .site-logo { flex-basis: 90px; }
 .site-logo img { max-width: 90px; }
 .site-banner { max-height: 90px; }
 .post-list-panel ul.NewsList img { max-width: 42vw; max-height: 210px; }
 .ui-ezpagination { flex-wrap: wrap; }
}

/* Let article copy wrap naturally beside its image on both public lists. */
.reading-page .media { display: block; }
.reading-page .media-left { display: block; float: left; margin: 2px 24px 14px 0; }
.reading-page .media-body { display: block; width: auto; overflow: visible; }
.reading-page .media-object { width: 250px; max-width: 36vw; max-height: 320px; height: auto; object-fit: contain; }
.post-list-panel ul.NewsList li { overflow: auto; }
.post-list-panel ul.NewsList img { display: block; float: left; width: 260px; max-width: 34%; max-height: 240px; height: auto; object-fit: contain; margin: 3px 24px 14px 0; border-radius: 3px; }
.post-list-panel ul.NewsList .footer { clear: both; padding-top: 12px; margin-top: 14px; }
@media (max-width: 767px) {
    .reading-page .media-left { margin-right: 14px; }
    .reading-page .media-object { width: 170px; max-width: 38vw; max-height: 190px; }
    .post-list-panel ul.NewsList img { width: 150px; max-width: 38vw; max-height: 180px; margin-right: 14px; }
}
.reading-list { list-style: none; margin: 0; padding: 0; }
.reading-list .news-entry { list-style: none; }
.reading-search-clear { color: #61746d !important; }
.reading-feed .news-contact { clear: both; padding-top: 10px; color: #82918c; font-size: 13px; }
.reading-feed .news-contact > * { margin-right: 12px; }
