.print-template {
    display: none;
}
.print {
    page-break-after: always;
}
@media print {
    @page {
        margin: 5mm 5mm 5mm 5mm;
        size: A4 portrait;
    }
    html, body {
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12px !important;
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
    }
    /* 雙欄排版：主要內容容器 */
    .row[style*="margin-top: 2px"], .flex-container {
        column-count: 2;
        column-gap: 24px;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    /* 卡片內容在雙欄下自動分欄 */
    .col-md-6, .col-sm-12 {
        width: 100% !important;
        max-width: 100% !important;
        display: inline-block !important;
        float: none !important;
        box-sizing: border-box !important;
        vertical-align: top !important;
        break-inside: avoid-column !important;
        margin-bottom: 15px !important;
    }
    /* 其他欄位單欄顯示 */
    .col-md-4, .col-md-3, .col-md-12, .col-sm-4, .col-xs-6 {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        float: none !important;
        box-sizing: border-box !important;
        margin-bottom: 15px !important;
    }
    /* row 直接 block，避免 flex 或 grid 影響 */
    .row, .container {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 移除不必要的元素 */
    #navtopbanner, #navlogo, #header2, #copyright,
    #map_link, #websubmenu, #d-hlp-header1, #breadcrumb, #search_area,
    .d-help-pagination, .btn, .alert, .navbar, .footer {
        display: none !important;
    }
    /* 移除所有 box-shadow 與背景，避免列印黑塊 */
    *, *:before, *:after {
        box-shadow: none !important;
        background: transparent !important;
    }
    /* 表格、分隔線等列印優化 */
    hr, .my_hr {
        border: 0;
        border-top: 1px solid #aaa !important;
        height: 1px !important;
        margin: 8px 0 !important;
    }
    /* 只對卡片內容避免分割 */
    .col-md-6, .col-sm-12 {
        page-break-inside: avoid !important;
    }
}

.title_banner1 {
    display: inline-block;
    position: relative;
    min-width: 450px;
    height: 40px;
    line-height: 40px;
    padding-left: 20px;
    padding-right: 20px;
    background: #FF9933;
    left: -8px;
    color: #FFF;

    &:before {
        content: "";
        position: absolute;
        height: 0;
        width: 0;
        border-bottom: 8px solid #eb7c0e;
        border-left: 8px solid transparent;
        top: -8px;
        left: 0;
    }

    &:after {
        content: "";
        position: absolute;
        height: 0;
        width: 0;
        border-top: 20px solid transparent;
        border-bottom: 2px solid transparent;
        border-left: 8px solid #fcad5d;
        right: -8px;
    }
}

.title_banner2 {
    display: inline-block;
    position: relative;
    min-width: 450px;
    height: 40px;
    line-height: 40px;
    padding-left: 20px;
    padding-right: 20px;
    background: #5bc0de;
    left: -8px;
    color: #FFF;

    &:before {
        content: "";
        position: absolute;
        height: 0;
        width: 0;
        border-bottom: 8px solid #1a7c99;
        border-left: 8px solid transparent;
        top: -8px;
        left: 0;
    }
    &:after {
        content: "";
        position: absolute;
        height: 0;
        width: 0;
        border-top: 20px solid transparent;
        border-bottom: 2px solid transparent;
        border-left: 8px solid #1a7c99;
        right: -8px;
    }
}

/*GridView Pager Css */
.PagerCss a { WIDTH: 20px; margin:2px; padding: 5px 7px; text-decoration: none; border: 1px solid #999999; border-radius: 4px;}
.PagerCss a:hover { background-color: #c9c9c9; border: 1px solid #999999; }
.PagerCss a:active { WIDTH: 20px; }
.PagerCss a:link { WIDTH: 20px; }
.PagerCss a:visited { WIDTH: 20px; }

.PagerCss span 
{ 
    FONT-WEIGHT: bold;
    background-color: #CCCCCC;
    padding: 5px 7px;
    border: 1px solid #999999; 
}
/*ListView Pager Css */
div.pager {
	margin: 2px;
	text-align: center;
}
/* pager links */
div.pager a {
    color: #333333;
	border: 1px solid #999999;
	padding: 3px 8px;
	display: inline-block;
	text-decoration: none;
}
div.pager a:hover 
{     
    background-color: #c9c9c9; 
    border: 1px solid #999999;
}
/* current page */
div.pager span span {
    FONT-WEIGHT: bold;
	border: 1px solid #999999;
	background-color: #CCCCCC;
	padding: 3px 8px;
	display: inline-block;
}