/* ====================== 全域 RWD 基礎 ====================== */
* {
    /*
    float: none !important;
	*/
	box-sizing: border-box;
	font-family: 微軟正黑體;
}

img {
    /*max-width: 100%;*/
    height: auto;
    display: flex;
}
/*全部改為flex*/
.block_left {
    display: flex;
}
/* 主容器 */
#body_wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
    min-height: 100vh;
}


/* ====================== Header ====================== */
#header {
    width: 100%;
	display:flex;
	flex-direction: column;
	min-height:110px;
}

#upper {
	width:100%;
	min-height:58px;
	margin-top:18px;
    display: flex;
	flex-direction: column;
    align-items: left;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;	
	/*
	flex-wrap: wrap;	
    
	*/
	
}

#upper img.logo {          /* 請在 HTML 的 logo img 加上 class="logo" 或直接用選擇器 */
    width: 160px;          /* 桌面版大小 */
    /*flex-shrink: 0;*/
}

#menu_block {	
	display:flex;
	margin-left:20px;
	height:42px;
}

#menu_block .menu_item {
	display:flex;
	align-items: center;
	font-family:'微軟正黑體';font-size:16px;
    padding: 0px 4px;
    text-decoration: none;
    white-space: nowrap;
}

/*首頁選單區*/
.menu_item{
	display:flex;
	align-items: center;
	font-family:'微軟正黑體';font-size:16px;
	width:auto;height:36px;cursor:pointer;
	background-image:none;color:#35468B;margin-top:14px;padding:0px 4px; font-weight:bold;
}
.menu_item span{
	margin:0px;
}

.menu_item:hover{
	background-color:#35468B;
	color:#FFF;
}
.mmenu_item{
	
	height:20px;margin:3px 4px 0px 2px;color:#FFF;font-size:12px;
	cursor:pointer;
	background-color:none;
}
.mmenu_item:hover{
	background-color:#E9696A;
}
.smenu_item{
	width:120px;font-size:12px;cursor:pointer;
}
.smenu_item span{
	padding-left:12px;background-image:url(../../p/img/slist_item_bg.gif);
	background-repeat:no-repeat;
	background-position:0px 2px;
}

.learnp{
	color:#CAA525;
}

/* mmenu - 登入後選單*/
.mmenu_block{
	font-size:12px;
	height:20px;
	margin:3px 4px 0px 2px;
	color:#FFF;
	display:flex;
	justify-content: flex-start;
}

#main_menu{
	display:flex;
	width:100%;height:26px; background-color:#333;margin-top:4px;
}


/* sbanner - 背景圖 Banner */
#sbanner {
	
    position: relative;
    width: 100%;
    min-height: 503px;           /* 取代原本固定 503px */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
	background-image:url(../images/sbanner.jpg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

/* 取消原本絕對定位，改用 flex 堆疊 */
#search, #login_box {
	/*search =>left:104px;top:130px;width:350px;height:32px;*/
    position: absolute;
    width: 100%;
    max-width: 420px;
    margin: 15px auto;
}

/*login_box修改*/
/* 外框 */

#search{
	left:3%;
	top:18%;
    display: flex;
	justify-content: flex-start;
    box-sizing: border-box;	
}

#search_text{
	display: flex;justify-content: flex-start;
	width:120px;height:30px;border:1px solid #06F;margin-left:4px;
}

#search_it{
	display: flex;justify-content: flex-start;
	width:38px;height:32px;margin-left:4px;cursor:pointer;
}

#login_box {
    
	left:15%;
	bottom:-1%;
	width: 38%;
    max-width: 354px;
	min-height:166px;
    margin: 40px auto;
    padding: 16px;

    background-color: rgba(152,168,200,0.7);
    border-radius: 12px;

    display: flex;
	flex-direction: column;
    box-sizing: border-box;
}

.login_upper{
	width:100%;
	display:flex;
	flex-direction: row;
	justify-content: flex-start;
	gap:48px;
}
/* 標題 */
.login_header {
	width:19%;
	min-width:86px;
    background-color: #6b82b5;
    color: #fff;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 12px;
	display:flex;
	justify-content: flex-start;
}
/* 登入按鈕 */
.login_actions {
	width:17%;min-width: 60px;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.login_actions img {
    width:5%;
	min-width: 56px;
    height: 30px;
    cursor: pointer;
}

/* 表單 */
#login_form{
	display:flex;
	flex-direction: column;
}

#form_list {
    list-style: none;
    padding: 0;
    margin: 0;
	width:100%;height:44px;

    display: flex;
	justify-content: flex-start;
    flex-direction: column;
    gap: 10px;
}

#form_list input{
	width:50%;
	min-width:162px;
	height:18px;
	border:1px solid #244588;
	margin-left:4px;
}

/* 每列 */
.form_row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* label */
.form_row label {
    color: #fff;
    font-size: 14px;
}

/* input */
.form_row input {
    width: 100%;
    height: 34px;
    border: 1px solid #244588;
    border-radius: 4px;
    padding: 4px 8px;
    box-sizing: border-box;
}

/* 連結 */
.form_links {
    font-size: 14px;
	list-style-type: none;
}

.form_links a {
    color: #036;
    text-decoration: none;
}

.form_links .register {
    color: orange;
}

/* 訊息 */
.form_msg {
    color: #036;
    font-size: 14px;
	list-style-type: none;
}

/* 📱 平板以上（回復橫向排列） */
@media (min-width: 480px) {

    .form_row {
        flex-direction: row;
        align-items: center;
    }

    .form_row label {
        width: 120px;
        flex-shrink: 0;
    }
}


/* ====================== 新聞區塊 ====================== */
#news_body {
    width: 100%;
	min-height:485px;
	margin-top:10px;background-color:#25468B;
    background-color: #25468B;
}

#news_body img {               /* news_banner.jpg */
	display:block;
	margin-top:4px;
	max-width: 100%;
    height: auto;
}

/*首頁最新消息*/
ul.news_list{
	display:flex;
	flex-direction: column;
	align-items: left;	
	list-style:none;
	margin:20px 0px 20px 0px;
	padding:0px;
	width:100%;
	min-height:350px;	
}

.news_list li {
	width:94%;
	display:flex;
	align-items: flex-start;
	justify-content:flex-start;
	flex-direction: row;
	color:white;
    padding: 15px;
    /*border-bottom: 1px solid rgba(255,255,255,0.2);*/
}
.news_list li img{
	display:flex;
}

.news_list li div{
	display:flex;
	flex-direction: column;
	width:84%;	
	margin-left:36px;
}
.news_content{
	display:block;width:100%;
	color:#FFF;
	font-weight:100;
	margin-left:13px;margin-top:4px;
	background-image:none;
	background-color:#25468B;	
}

.news_content img { 
    max-width: 100% !important;
    height: auto !important;
}

/* ====================== 觸控按鈕區 ====================== */
#link_button {
    display: flex;
    flex-wrap: wrap;          /* 可換行（關鍵） */
    gap: 20px;
    margin-top: 10px;
}

/*每個卡片*/
.touch_box {
    display: flex;
    width: 100%;
    min-height: 200px;
}

/*左側直排標題（直式文字）*/
.touch_box span {
    writing-mode: vertical-rl;
    text-orientation: upright;

    background: #25468B;
    color: #fff;

    padding: 12px 6px;
    font-size: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}
/*右側圖片區*/
.touch_right {
    flex: 1;
    background-size: cover;
    background-position: center;

    position: relative;
    min-height: 324px;
}
/*按鈕定位（取代舊的 relative hack）*/
.touch_right img {
    width: 97px;
    height: 30px;

    position: absolute;
    right: 10px;
    bottom: 10px;

    cursor: pointer;
}
/*
RWD 斷點（關鍵）
桌機：三欄
*/
@media (min-width: 900px) {
    .touch_box {
        width: calc(33.333% - 14px);
    }
}
/*
平板：兩欄*/
@media (min-width: 600px) and (max-width: 899px) {
    .touch_box {
        width: calc(50% - 10px);
    }
}

/*
手機：單欄（預設）
已經是 width:100%
*/

/* ====================== Footer ====================== */
.footer {
    width: 100%;
    background-color: #25468B;
    color: #fff;
    padding: 20px 15px;
    text-align: left;
}

.footer p {
    max-width: 1000px;
    margin: 0 auto;
}

/* ====================== Media Queries (斷點) ====================== */

/* 平板與小桌面 */
@media (max-width: 1024px) {
    #upper img.logo {
        width: 140px;
    }
    
    #menu_block {
        gap: 8px;
    }
    
    #sbanner {
        min-height: 350px;
    }
}

/* 手機尺寸（大部分手機） */
@media (max-width: 768px) {
    #upper {
        flex-direction: column;
        text-align: center;
    }
    
    #menu_block {
        justify-content: center;
    }
    
    #sbanner {
        min-height: 280px;
        padding: 15px;
    }
    
    #search, #login_box {
        max-width: 100%;
    }
    
    /* 登入框內部調整 */
    #login_box ul {
        padding: 0;
    }
    
    .touch_box {
        flex: 1 1 100%;        /* 手機上強制單欄 */
    }
    
    .news_list li div {
        font-size: 16px;
    }
}

/* 極小螢幕（小於 480px） */
@media (max-width: 480px) {
    #body_wrapper {
        padding: 0 10px;
    }
    
    #menu_block .menu_item {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    #sbanner {
        min-height: 220px;
    }
}

