.single .post-navigation { display: none; }

.archive .page-title {
  display: none;
}
.post .post-thumbnail {
  position: relative;
  z-index: 1;
}





	/* 讓所有文章與頁面的特色圖片滿版顯示 */
.single-post .post-thumbnail img,
.page .post-thumbnail img {
    width: 100vw;              /* 使圖片佔滿整個螢幕寬度 */
    max-width: 100vw;          /* 防止被主容器限制 */
    margin-left: 50%;          /* 把圖片中心對齊螢幕中心 */
    transform: translateX(-50%); /* 往左移動一半寬度達到置中 */
    height: auto;
    object-fit: cover;
}

/* 移除主內容容器左右邊距，讓圖片貼齊螢幕 */
.single-post .post-thumbnail,
.page .post-thumbnail {
    margin-left: calc(-1 * (100vw - 100%) / 2);
    margin-right: calc(-1 * (100vw - 100%) / 2);
    width: 100vw;
	
	
}
/* === 全站隱藏文章的 meta 資訊（作者、日期、分類等）=== */
.entry-meta,
.byline,
.posted-on,
.cat-links,
.tags-links {
    display: none !important;
    visibility: hidden !important;
}

/* Rockfield theme 部分 meta 可能嵌在 footer 區塊，也一起隱藏 */
.entry-footer,
.post-footer-meta {
    display: none !important;
}

/* 防止 meta 造成額外空白 */

/* 分類頁、標籤頁、部落格列表頁的文章間加分隔線 */
.archive article,
.blog article,
.category article {
    border-bottom: 1px solid #ddd; /* 分隔線顏色 */
    padding-bottom: 2rem;          /* 線上方留空間 */
    margin-bottom: 2rem;           /* 線下方留空間 */
}

/* 移除最後一篇的底線 */
.archive article:last-child,
.blog article:last-child,
.category article:last-child {
    border-bottom: none;
}

/* === 三格 Jetpack Layout Grid 背景圖片 === */
.wp-block-jetpack-layout-grid-column .wp-block-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;       /* 可調整比例，例如 1/1、16/9、4/3 */
    min-height: 200px;         /* 最小高度，防止手機過短 */
    overflow: hidden;
}

/* 背景圖片保持比例填滿容器 */
.wp-block-jetpack-layout-grid-column .wp-block-cover__image-background {
    width: 100%;
    height: 100%;
    object-fit: cover;          /* 保持比例且裁切 */
    object-position: center;
    display: block;
}

/* 文字標題浮在圖片上 */
.wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;    /* 垂直置中 */
    align-items: center;        /* 水平置中 */
    text-align: center;
    padding: 0 1rem;
    z-index: 2;
}

/* 標題文字樣式 */
.wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container p {
    color: #fff;
    font-size: clamp(1.2rem, 4vw, 2rem); /* 響應式字體 */
    text-shadow: 0 3px 10px rgba(0,0,0,0.5);
    margin: 0;
}

/* 可選：漸層遮罩提高文字可讀性 */
.wp-block-jetpack-layout-grid-column .wp-block-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4), rgba(0,0,0,0));
    z-index: 1;
}

/* === 響應式調整：平板、手機 === */
@media (max-width: 1024px) {
    .wp-block-jetpack-layout-grid-column .wp-block-cover {
        aspect-ratio: 1 / 1;       /* 平板改為正方形 */
        min-height: 150px;
    }

    .wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container p {
        font-size: clamp(1rem, 3.5vw, 1.5rem);
    }
}

@media (max-width: 768px) {
    .wp-block-jetpack-layout-grid-column .wp-block-cover {
        aspect-ratio: 1 / 1;       /* 手機正方形 */
        min-height: 120px;
    }

    .wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container p {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }
}

.wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;   /* 中間對齊再偏移 */
    align-items: center;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    transform: translateY(-20%);   /* 往上移 15%，負值往上 */
}

/* 分類頁全寬 Feature Image */
.archive .post-thumbnail img,
.category .post-thumbnail img {
    width: 100vw;          /* 滿版寬度 */
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);  /* 消除左右容器 padding/margin */
    display: block;
    object-fit: cover;     /* 保持比例填滿 */
    height: auto;          /* 可選，如果想固定比例可改 height: 300px 等 */
}

/* === 手機版展開選單置中 === */
@media (max-width: 768px) {
    .main-navigation.toggled ul, 
    .main-navigation ul {
        text-align: center;          /* 文字置中 */
    }

    .main-navigation ul li {
        text-align: center;          /* 確保 li 內文字也置中 */
        justify-content: center;     /* 若有 flex 布局 */
    }

    .main-navigation ul li a {
        display: inline-block;       /* 確保 a 置中生效 */
        text-align: center;
        width: auto;                 /* 取消滿寬度限制（若有） */
    }
}

/* === 首頁封面圖全版顯示（桌面 + 手機）=== */
.home .wp-block-cover.alignfull {
    width: 100vw;               /* 實際滿版寬度 */
    max-width: 100vw;
    margin-left: calc(50% - 50vw); /* 取消 WordPress 預設頁邊距 */
    margin-right: calc(50% - 50vw);
}

/* === 手機響應式調整 === */
@media (max-width: 768px) {
    .home .wp-block-cover.alignfull {
        min-height: 100vh;      /* 手機滿高顯示整個螢幕 */
        object-fit: cover;
        background-size: cover; /* 背景自動裁切不變形 */
        background-position: center;
    }

    /* 確保圖片不會被壓縮變形 */
    .home .wp-block-cover__image-background {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }

    /* 若文字位置太低，可稍微往上調整 */
    .home .wp-block-cover__inner-container {
        justify-content: flex-start; /* 改為靠上顯示 */
        padding-top: 30vh;          /* 調整標題距頂距離 */
    }
}

/* === Jetpack Layout Grid 文字覆蓋修正 === */
.wp-block-jetpack-layout-grid-column .wp-block-cover {
    position: relative;
    overflow: hidden;
}

/* 背景圖片保持比例 */
.wp-block-jetpack-layout-grid-column .wp-block-cover__image-background {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* 讓文字浮在上層且可見 */
.wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: flex-end;    /* 改成想要的垂直位置 */
    align-items: center;
    text-align: center;
    padding-bottom: 2%;          /* 控制文字與底部距離，可調整 */
    z-index: 2;                   /* 讓文字浮在背景之上 */
    pointer-events: none;         /* 確保連結仍可點擊（可視情況移除） */
}

/* 內部文字設定 */
.wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container p,
.wp



/* === 修正 Jetpack Layout Grid 內的 Cover 連結被隱藏問題 === */

/* 確保連結在上層可見、可點擊 */
.wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container a {
    position: relative;
    z-index: 3;             /* 高於 ::after 遮罩 */
    color: #fff !important; /* 白字，可改主題顏色 */
    text-decoration: none !important;
    pointer-events: auto !important; /* 確保可以點擊 */
}

/* 保證 hover 可視 */
.wp-block-jetpack-layout-grid-column .wp-block-cover__inner-container a:hover {
    color: #f0f0f0 !important; /* hover 時稍亮 */
    opacity: 0.9;
}

/* 若遮罩蓋到連結，讓遮罩在連結之下 */
.wp-block-jetpack-layout-grid-column .wp-block-cover::after {
    z-index: 1;
}
.wp-block-jetpack-layout-grid-column .wp-block-cover__image-background {
    z-index: 0;
}
.wp-block-jetpack-layout-grid-co


/* 讓 footer widgets 在同一行 */
.site-footer .footer-widgets {
    display: flex;
    flex-wrap: nowrap;           /* 不換行 */
    justify-content: space-between; /* 平均分布 */
    gap: 2rem;                   /* widget 間距，可調整 */
}

/* widget 自動寬度 */
.site-footer .footer-widgets .widget {
    flex: 1 1 0; /* 平均分配寬度 */
    min-width: 150px; /* 避免太窄，可調整 */
}

/* 響應式：手機版改成垂直排列 */
@media (max-width: 768px) {
    .site-footer .footer-widgets {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 單篇文章標題（Post） */
.single-post h1.entry-title {
    font-size: 2rem;   /* 預設可能是 3rem，這裡縮小一些 */
    line-height: 1.3;
}

/* Page 頁面標題（例如 About、Contact 等） */
.page h1.entry-title {
    font-size: 1.8rem;
    line-height: 1.3;
}

/* 可選：在分類頁 / 首頁文章預覽中的標題縮小 */
.archive .entry-title,
.blog .entry-title {
    font-size: 1.5rem;
    line-height: 1.4;
}

/* 手機版再稍微縮小一點 */
@media (max-width: 768px) {
    .single-post h1.entry-title,
    .page h1.entry-title {
        font-size: 1.5rem;
    }

    .archive .entry-title,
    .blog .entry-title {
        font-size: 1.2rem;
    }
}


/* === 手機版展開式選單：增加每個選項之間的間距 === */
@media (max-width: 768px) {
    .main-navigation ul li a,
    .wp-block-navigation__submenu-container li a,
    .wp-block-navigation__container li a {
        padding-top: 0.9em !important;
        padding-bottom: 0.9em !important;
        line-height: 1.6 !important;
        display: block;
    }

    /* 如果想讓項目之間還有額外空白，可加 margin */
    .main-navigation ul li,
    .wp-block-navigation__container li {
        margin-bottom: 0.4em;
    }
}

/* === 手機版選單間距加大 & 底部留黑 === */
@media (max-width: 768px) {
    /* 每個選單項目 */
    .main-menu li a {
        display: block;
        text-align: center;       /* 文字置中 */
        padding: 16px 0;          /* 上下間距加大 */
    }

    /* 最後一個選單項目底部多留空間 */
    .main-menu {
        padding-bottom: 100px;     /* 底部黑底空間 */
        background-color: #000;   /* 黑底 */
    }

    /* 子選單項目間距 */
    .main-menu li li a {
        padding: 12px 0;
    }
}

/* 手機版：文章 & 頁面標題上方空白 */
@media (max-width: 768px) {
    .single-post .entry-title,
    .page .entry-title {
        margin-top: 2rem; /* 增加上方空白，可調整數值 */
    }
}

.home h1 {
    font-weight: normal;
}

html, body {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

