/*
Theme Name: Card Style Blog Child Theme
Description: 專屬靜態首頁分隔的最新文章子主題。全新中性專業 card_style 商務格式，純淨無後台、無切換模式。
Template: astra
Version: 1.0.0
*/
/* SC Analysis 與文章列表共用：主容器寬度及雙欄比例。 */
.sc-main-layout {
    width: 92% !important;
    max-width: 1960px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.sc-business-grid {
    display: grid !important;
    grid-template-columns: 64% 34% !important;
    gap: 2% !important;
    align-items: start !important;
}

/* 防止網格子欄位因長文字或圖片而撐破欄寬。 */
.sc-content,
.sc-sidebar-column,
.card-style-left-column {
    min-width: 0 !important;
}

/* 主選單不顯示清單符號，並移除主題加上的偽元素裝飾點。 */
.main-header-menu,
.main-header-menu li,
#primary-menu,
#primary-menu li {
    list-style: none !important;
}

.main-header-menu li::before,
#primary-menu li::before {
    content: none !important;
    display: none !important;
}

/* 全站共用頁首版型；空間不足時導覽選單移到標誌下方。 */
#masthead .kpmg-custom-header-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 4% !important;
    box-sizing: border-box !important;
}

#masthead .site-header-primary-section-left {
    display: flex !important;
    flex: 0 1 auto !important;
    align-items: center !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

#masthead .card-style-menu-toggle {
    display: none !important;
}

#masthead .custom-logo-link img {
    display: block;
    width: auto;
    max-width: 140px;
    max-height: 140px;
}

#masthead .main-header-bar-navigation {
    display: flex !important;
    flex: 0 1 auto !important;
    align-items: center !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin-left: auto !important;
    padding: 0 !important;
}

#masthead #primary-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

#masthead #primary-menu > li {
    flex: 0 0 auto !important;
    background: transparent !important;
}

#masthead #primary-menu > li > a {
    display: block !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    color: #ffffff !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: normal !important;
}

/* 首頁內容外層滿版；內部 Elementor 內容仍可維持自己的版心寬度。 */
body.home .site-content .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 首頁 Logo 與選單共用 92% 寬度版心，對齊下方文章列表。 */
body.home .kpmg-custom-header-container,
body.blog .kpmg-custom-header-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 4% !important;
    padding-right: 4% !important;
}

/* 首頁最後一個選單項目的文字右緣對齊文章列表右緣。 */
body.home #primary-menu > li:last-child > a,
body.blog #primary-menu > li:last-child > a {
    margin-right: 0 !important;
    padding-right: 0 !important;
}

/* 側欄橫幅使用背景圖填滿固定高度區域。 */
.sc-sidebar-banner-show {
    background-image: url("https://sclaa.com.tw/wp-content/uploads/2026/10/blog.png");
    background-size: cover;
    background-position: center 78%;
    background-repeat: no-repeat;
    width: 100%;
    height: 180px;
}

.sc-sidebar-banner-show img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 搜尋與分類頁的文章區域使用接近全寬的容器。 */
body.search .site-content .ast-container {
    max-width: 98% !important;
    width: 98% !important;
}

/* 分類頁取消 Astra 外層容器的額外縮窄，交由 92% 的主版心控制留白。 */
body.category .site-content .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 分類頁 Logo 與選單使用和 .sc-main-layout 相同的版心寬度。 */
body.category .kpmg-custom-header-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 4% !important;
    padding-right: 4% !important;
    box-sizing: border-box !important;
}

/* 分類頁最後一個選單項目貼齊主版心右側。 */
body.category #primary-menu > li:last-child > a {
    margin-right: 0 !important;
    padding-right: 0 !important;
}

/* 分類描述由 WordPress 自動包成段落，移除預設外距以對齊文章卡片。 */
body.category .card-style-blog-header p {
    margin: 0 !important;
}

/* 單篇文章主欄及文章本文採用置中的 1200px 版心。 */
.single-post #primary,
.single-post .content-area,
.single-post article,
.single-post .site-main {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
}

/* 單篇文章頁首與本文使用相同的 1200px 版心及 48px 內縮。 */
body.single-post .kpmg-custom-header-container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 48px !important;
    padding-right: 48px !important;
}

/* 分類作者、標題及內文統一版心；外層標題與內文保留一致左右留白。 */

.single-post .entry-header,
.single-post .entry-title,
.single-post .entry-content,
.single-post .entry-meta {
    max-width: 1200px !important;
    box-sizing: border-box !important;
}

.single-post .entry-header,
.single-post .entry-content {
    margin-left: 48px !important;
    margin-right: 48px !important;
    padding-left: 48px !important;
    padding-right: 48px !important;
}

.single-post .entry-title,
.single-post .entry-meta {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 分類與作者資訊使用深藍粗體；文章連結維持相同識別色。 */
.single-post .entry-meta,
.single-post .entry-meta a,
.single-post .entry-content a {
    color: #003366 !important;
    font-weight: 700 !important;
}

.single-post .entry-content a {
    text-decoration: none !important;
}

/* 文章標題左對齊，並使用深藍粗體。 */
.single-post .entry-title {
    color: #003366 !important;
    font-weight: 700 !important;
    text-align: left !important;
}

/* 單篇文章的導覽置中並對齊本文；移除主題加入的分隔線與陰影。 */
.single-post .post-navigation {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 48px !important;
    padding-right: 48px !important;
    box-sizing: border-box;
}

.post-navigation,
.nav-links,
.ast-post-nav,
.ast-single-post-navigation {
    border: none !important;
    box-shadow: none !important;
}

/* 上一篇／下一篇連結使用深藍粗體。 */
.single-post .nav-previous a,
.single-post .nav-next a,
.single-post .ast-post-nav a {
    color: #003366 !important;
    font-weight: 700 !important;
}

/* 單篇文章頁的主選單連結維持白字。 */
body.single-post .main-header-menu a {
    color: #ffffff !important;
}

body.page-id-129 .elementor-element-1f20a36 .card-style-service-mobile-break {
    display: none !important;
}

@media (max-width: 921px) {
    /* 手機／平板頁首回到文件流，避免絕對定位覆蓋首頁標題。 */
    #masthead {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 100% !important;
        z-index: 10 !important;
    }

    #masthead .kpmg-custom-header-container {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 0;
        padding: 12px 4% !important;
    }

    #masthead .site-header-primary-section-left {
        margin-right: auto !important;
    }

    #masthead .card-style-menu-toggle {
        display: inline-flex !important;
        flex: 0 0 44px !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.7) !important;
        border-radius: 4px !important;
        background: transparent !important;
        cursor: pointer !important;
    }

    #masthead .card-style-menu-toggle span {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        border-radius: 2px !important;
        background: #ffffff !important;
    }

    #masthead .main-header-bar-navigation {
        display: none !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 12px 0 0 !important;
        padding: 8px !important;
        background: #ffffff !important;
        border-radius: 4px !important;
    }

    #masthead .main-header-bar-navigation.is-open {
        display: block !important;
    }

    #masthead #primary-menu {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        width: 100% !important;
        background: #ffffff !important;
    }

    #masthead #primary-menu > li {
        width: 100% !important;
    }

    #masthead #primary-menu > li > a,
    body.single-post #masthead .main-header-menu a {
        display: block !important;
        width: 100% !important;
        padding: 12px 14px !important;
        color: #003366 !important;
        text-align: left !important;
        border-radius: 3px !important;
    }

    #masthead #primary-menu > li > a:hover,
    #masthead #primary-menu > li > a:focus {
        background: #e6eef7 !important;
    }

    /* 平板改為單欄，側欄內容接在文章卡片下方。 */
    body .sc-main-layout .sc-business-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 28px !important;
    }

    body .sc-main-layout .sc-sidebar-column {
        width: 100% !important;
    }

    body.single-post #content.site-content,
    body.single-post #content.site-content .ast-container,
    body.single-post #content.site-content .ast-plain-container,
    body.single-post #content.site-content #primary,
    body.single-post #content.site-content .content-area,
    body.single-post #content.site-content .site-main,
    body.single-post #content.site-content article,
    body.single-post #content.site-content .entry-header,
    body.single-post #content.site-content .entry-content,
    body.single-post #content.site-content .post-thumbnail {
        width: 100% !important;
        max-width: 100% !important;
    }

    body.single-post #content.site-content,
    body.single-post #content.site-content .ast-container,
    body.single-post #content.site-content .ast-plain-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    body.single-post #content.site-content .entry-header,
    body.single-post #content.site-content .entry-content,
    body.single-post .post-navigation {
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

@media (max-width: 600px) {
    body.home .elementor-element-816bc2e > .e-con-inner {
        padding-top: 36px !important;
    }

    #masthead .custom-logo-link img {
        max-width: 96px;
        max-height: 96px;
    }

    body .sc-main-layout {
        width: 94% !important;
    }

    body .sc-main-layout .card-style-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    body .sc-main-layout .card-style-blog-header {
        padding-top: 28px !important;
    }

    body.single-post #content.site-content .entry-header,
    body.single-post #content.site-content .entry-content,
    body.single-post .post-navigation {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.single-post #content.site-content .post-thumbnail img {
        display: block;
        width: 100%;
        height: auto;
    }

    /* 服務項目手機版每項先顯示整列圖片，再顯示整列說明。 */
    body.page-id-129 .elementor-element-7750483 > .e-con-inner,
    body.page-id-129 .elementor-element-6cddb1b > .e-con-inner,
    body.page-id-129 .elementor-element-2c7d7bb > .e-con-inner,
    body.page-id-129 .elementor-element-1f0a38c > .e-con-inner,
    body.page-id-129 .elementor-element-ed55da9 > .e-con-inner,
    body.page-id-129 .elementor-element-5fea6b6 > .e-con-inner {
        flex-direction: column !important;
        gap: 16px !important;
    }

    body.page-id-129 .elementor-element-7750483 > .e-con-inner > *,
    body.page-id-129 .elementor-element-6cddb1b > .e-con-inner > *,
    body.page-id-129 .elementor-element-2c7d7bb > .e-con-inner > *,
    body.page-id-129 .elementor-element-1f0a38c > .e-con-inner > *,
    body.page-id-129 .elementor-element-ed55da9 > .e-con-inner > *,
    body.page-id-129 .elementor-element-5fea6b6 > .e-con-inner > * {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.page-id-129 .elementor-element-7f84341,
    body.page-id-129 .elementor-element-c14b337,
    body.page-id-129 .elementor-element-c14320e {
        order: -1 !important;
    }

    body.page-id-129 .elementor-element-7750483 img,
    body.page-id-129 .elementor-element-6cddb1b img,
    body.page-id-129 .elementor-element-2c7d7bb img,
    body.page-id-129 .elementor-element-1f0a38c img,
    body.page-id-129 .elementor-element-ed55da9 img,
    body.page-id-129 .elementor-element-5fea6b6 img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body.page-id-129 .elementor-129 .elementor-widget-text-editor {
        text-align: left !important;
    }

    body.page-id-129 .elementor-129 .elementor-widget-heading,
    body.page-id-129 .elementor-129 .elementor-widget-heading .elementor-heading-title {
        text-align: center !important;
    }

    body.page-id-129 .elementor-element-1f20a36 .card-style-service-mobile-break {
        display: inline !important;
    }

    /* 關於我們各段在手機版依序呈現圖片列及完整文字列。 */
    body.page-id-128 .elementor-element-d6ed0c3 > .e-con-inner,
    body.page-id-128 .elementor-element-8ee5ef8 > .e-con-inner {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 16px !important;
    }

    body.page-id-128 .elementor-element-d6ed0c3 > .e-con-inner > *,
    body.page-id-128 .elementor-element-8ee5ef8 > .e-con-inner > * {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.page-id-128 .elementor-element-a706181 {
        order: -1 !important;
    }

    body.page-id-128 .elementor-element-d6ed0c3 img,
    body.page-id-128 .elementor-element-8ee5ef8 img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }

    body.page-id-128 .elementor-element-fb2b2f9 .elementor-heading-title,
    body.page-id-128 .elementor-element-7a0c2bf .elementor-heading-title {
        font-family: "Open Sans", sans-serif !important;
        font-size: 20px !important;
        font-weight: 700 !important;
        line-height: 1.85714 !important;
        white-space: normal !important;
    }

    /* 將分開的證照圖片與說明攤平，依圖片、說明交錯排列。 */
    body.page-id-128 .elementor-element-69ed561,
    body.page-id-128 .elementor-element-d73db7c,
    body.page-id-128 .elementor-element-2989530,
    body.page-id-128 .elementor-element-57cdc92,
    body.page-id-128 .elementor-element-d242a44,
    body.page-id-128 .elementor-element-ad65c1c,
    body.page-id-128 .elementor-element-f947096,
    body.page-id-128 .elementor-element-bd44c7e {
        display: contents !important;
    }

    body.page-id-128 .elementor-element-69ed561 > .e-con-inner,
    body.page-id-128 .elementor-element-d73db7c > .e-con-inner,
    body.page-id-128 .elementor-element-2989530 > .e-con-inner,
    body.page-id-128 .elementor-element-57cdc92 > .e-con-inner,
    body.page-id-128 .elementor-element-d242a44 > .e-con-inner,
    body.page-id-128 .elementor-element-ad65c1c > .e-con-inner,
    body.page-id-128 .elementor-element-f947096 > .e-con-inner,
    body.page-id-128 .elementor-element-bd44c7e > .e-con-inner,
    body.page-id-128 .elementor-element-a4d7ff4,
    body.page-id-128 .elementor-element-d3fc079,
    body.page-id-128 .elementor-element-bc8a88e,
    body.page-id-128 .elementor-element-d7ecea1,
    body.page-id-128 .elementor-element-a238caa,
    body.page-id-128 .elementor-element-0e00da1,
    body.page-id-128 .elementor-element-2246f1b,
    body.page-id-128 .elementor-element-3e2c102 {
        display: contents !important;
    }

    body.page-id-128 .elementor-128 {
        display: flex !important;
        flex-direction: column !important;
    }

    body.page-id-128 .elementor-128 > .elementor-element-34df2f2 {
        order: 100 !important;
    }

    body.page-id-128 .elementor-128 > .elementor-element-69ed561,
    body.page-id-128 .elementor-128 > .elementor-element-d73db7c,
    body.page-id-128 .elementor-128 > .elementor-element-2989530,
    body.page-id-128 .elementor-128 > .elementor-element-57cdc92,
    body.page-id-128 .elementor-128 > .elementor-element-d242a44,
    body.page-id-128 .elementor-128 > .elementor-element-ad65c1c,
    body.page-id-128 .elementor-128 > .elementor-element-f947096,
    body.page-id-128 .elementor-128 > .elementor-element-bd44c7e {
        width: 100% !important;
        max-width: 100% !important;
    }

    body.page-id-128 .elementor-element-de4567e { order: 1 !important; }
    body.page-id-128 .elementor-element-9c81ec1 { order: 2 !important; }
    body.page-id-128 .elementor-element-91399af { order: 3 !important; }
    body.page-id-128 .elementor-element-bc43a87 { order: 4 !important; }
    body.page-id-128 .elementor-element-bcf0667 { order: 5 !important; }
    body.page-id-128 .elementor-element-10c6926 { order: 6 !important; }
    body.page-id-128 .elementor-element-1756c25 { order: 7 !important; }
    body.page-id-128 .elementor-element-a9205f8 { order: 8 !important; }
    body.page-id-128 .elementor-element-c98fe36 { order: 9 !important; }
    body.page-id-128 .elementor-element-d4ebbf3 { order: 10 !important; }
    body.page-id-128 .elementor-element-1316294 { order: 11 !important; }
    body.page-id-128 .elementor-element-f2dbcf9 { order: 12 !important; }
    body.page-id-128 .elementor-element-f00482c { order: 13 !important; }
    body.page-id-128 .elementor-element-40417c7 { order: 14 !important; }
    body.page-id-128 .elementor-element-98826a3 { order: 15 !important; }
    body.page-id-128 .elementor-element-28e4700 { order: 16 !important; }
    body.page-id-128 .elementor-element-097fec5 { order: 17 !important; }
    body.page-id-128 .elementor-element-1c41ad4 { order: 18 !important; }
    body.page-id-128 .elementor-element-805da33 { order: 19 !important; }
    body.page-id-128 .elementor-element-89e07a6 { order: 20 !important; }

    body.page-id-128 .elementor-element-de4567e,
    body.page-id-128 .elementor-element-9c81ec1,
    body.page-id-128 .elementor-element-91399af,
    body.page-id-128 .elementor-element-bc43a87,
    body.page-id-128 .elementor-element-bcf0667,
    body.page-id-128 .elementor-element-10c6926,
    body.page-id-128 .elementor-element-1756c25,
    body.page-id-128 .elementor-element-a9205f8,
    body.page-id-128 .elementor-element-c98fe36,
    body.page-id-128 .elementor-element-d4ebbf3,
    body.page-id-128 .elementor-element-1316294,
    body.page-id-128 .elementor-element-f2dbcf9,
    body.page-id-128 .elementor-element-f00482c,
    body.page-id-128 .elementor-element-40417c7,
    body.page-id-128 .elementor-element-98826a3,
    body.page-id-128 .elementor-element-28e4700,
    body.page-id-128 .elementor-element-097fec5,
    body.page-id-128 .elementor-element-1c41ad4,
    body.page-id-128 .elementor-element-805da33,
    body.page-id-128 .elementor-element-89e07a6 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 8px !important;
    }

    body.page-id-128 .elementor-element-69ed561 img,
    body.page-id-128 .elementor-element-2989530 img,
    body.page-id-128 .elementor-element-d242a44 img,
    body.page-id-128 .elementor-element-f947096 img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }

    /* 聯絡資訊的圖示與標題、內容在手機版保持同列。 */
    body.page-id-16 .elementor-element-1e7287e .elementor-icon-box-wrapper,
    body.page-id-16 .elementor-element-a135317 .elementor-icon-box-wrapper,
    body.page-id-16 .elementor-element-0c9a886 .elementor-icon-box-wrapper {
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    body.page-id-16 .elementor-element-1e7287e .elementor-icon-box-icon,
    body.page-id-16 .elementor-element-a135317 .elementor-icon-box-icon,
    body.page-id-16 .elementor-element-0c9a886 .elementor-icon-box-icon {
        flex: 0 0 44px !important;
        width: 44px !important;
        max-width: 44px !important;
    }

    body.page-id-16 .elementor-element-1e7287e .elementor-icon-box-content,
    body.page-id-16 .elementor-element-a135317 .elementor-icon-box-content,
    body.page-id-16 .elementor-element-0c9a886 .elementor-icon-box-content {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
}