/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* 首頁最新消息調整元件 */

/* --- 1. 基礎容器設定：電腦版強制單行 --- */
.home-news-style .stk-block-posts__item article {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 15px !important;
    overflow: hidden !important;
    padding: 12px 0 !important;
    line-height: 1 !important;
}

/* --- 2. 日期標籤樣式 --- */
.home-news-style .stk-block-posts__meta {
    flex-shrink: 0 !important;
    font-size: 1.1rem !important;
    color: #fff !important;
    background-color: #fa0 !important;
    padding: 0 16px !important;         /* 移除上下 padding，改由內部的 time 控制 */
    border-radius: 50px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin: 0 !important;               /* 清除 margin 防止垂直偏移 */
	/*margin-bottom: 15px !important;*/
}

.home-news-style .stk-block-posts__meta time {
    margin: 0 !important;
    padding: 8px 0 !important;          /* 使用 padding 撐開高度，確保文字垂直居中 */
    line-height: 1 !important;
    display: inline-block !important;
}

/* --- 3. 標題樣式 --- */
.home-news-style .stk-block-posts__title {
    display: inline !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    flex: 1 !important;                 /* 讓標題佔滿剩餘空間 */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;     /* 電腦版維持單行 */
}

.home-news-style .stk-block-posts__title a {
    text-decoration: none !important;
    color: inherit !important;
}

/* 隱藏不需要的摘要 */
.home-news-style .stk-block-posts__excerpt {
    display: none !important;
}

/* --- 5. 手機版 RWD：修正折行問題 --- */
@media (max-width: 767px) {
    .home-news-style .stk-block-posts__item article {
        flex-wrap: wrap !important;     /* 允許換行 */
        /*align-items: flex-start !important;*/ /* 手機版改為靠上對齊，因為標題可能多行 */
    }


	
    .home-news-style .stk-block-posts__title {
        white-space: normal !important;  /* 關鍵：手機版允許折行 */
        /*flex: 0 0 100% !important; */  /* 讓標題換到下一行*/
        margin-top: 10px !important;    /* 增加標題與日期之間的間距 */
        line-height: 1.4 !important;    /* 增加折行後的行間距 */
		overflow: hidden;!important;
    }
}
