@charset "UTF-8";
/* ==========================================================================
   運豐行工程 WordPress 整合補強樣式
   處理：登入後頂部 Admin Bar 位移、案例分類連結樣式一致、Gutenberg 區塊對齊、標準分頁與空白頁樣式
   ========================================================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* WordPress 登入時上方固定工具列 (#wpadminbar) 與固定頁首、手機抽屜安全讓位 */
body.admin-bar {
    position: static !important;
}

body.admin-bar #header {
    top: 32px;
}

body.admin-bar .mobile-drawer {
    top: 32px;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
    #wpadminbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
    body.admin-bar #header {
        top: 46px;
    }
    body.admin-bar .mobile-drawer {
        top: 46px;
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
}

/* 確保 cases.html / archive.php 使用 <a> 標籤作分類篩選鈕時與 button 樣式 100% 一致 */
.cases-toolbar a.wp-filter-btn {
    text-decoration: none;
}

/* WordPress paginate_links() 產出的 span.page-numbers.dots 外觀對齊 */
.page-numbers.dots {
    background: transparent;
    color: var(--text-sub);
    clip-path: none;
    min-width: 30px;
}

.page-numbers.dots::before {
    display: none;
}

/* Gutenberg 編輯器常用對齊與內嵌影片 RWD 支援 */
.entry-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.entry-content .alignleft {
    float: left;
    margin: 0.35rem 1.5rem 1rem 0;
    max-width: 48%;
}

.entry-content .alignright {
    float: right;
    margin: 0.35rem 0 1rem 1.5rem;
    max-width: 48%;
}

.entry-content .alignwide {
    width: 100%;
    max-width: 100%;
}

.entry-content .wp-block-embed__wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
}

.entry-content .wp-block-embed__wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.entry-content iframe {
    max-width: 100%;
}

/* 傳統編輯器／Gutenberg YouTube 點擊載入響應式外框（一般 16:9 與 Shorts 9:16） */
.entry-content .yf-yt-embed {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: #1A1F1E;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.entry-content .yf-yt-embed.is-shorts {
    max-width: 380px;
    aspect-ratio: 9 / 16;
    margin: 1.5rem auto;
}

.entry-content .yf-yt-trigger {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.entry-content .yf-yt-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.entry-content .yf-yt-trigger:hover .yf-yt-poster {
    transform: scale(1.03);
    filter: brightness(0.92);
}

.entry-content .yf-yt-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.38));
}

.entry-content .yf-yt-play-bg {
    fill: rgba(24, 28, 27, 0.86);
    transition: fill 0.25s ease;
}

.entry-content .yf-yt-trigger:hover .yf-yt-play,
.entry-content .yf-yt-trigger:focus-visible .yf-yt-play {
    transform: translate(-50%, -50%) scale(1.08);
}

.entry-content .yf-yt-trigger:hover .yf-yt-play-bg,
.entry-content .yf-yt-trigger:focus-visible .yf-yt-play-bg {
    fill: var(--brand-orange);
}

.entry-content .yf-yt-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.entry-content::after {
    content: '';
    display: table;
    clear: both;
}

/* 一般頁面 (.yf-standard-page) 與 404 版面 */
.yf-standard-page-section {
    padding-bottom: 5.5rem;
}

.yf-standard-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #F7F8F7 100%);
    border-radius: 30px;
    padding: clamp(1.8rem, 3.5vw, 3rem) clamp(1.4rem, 4.4vw, 3.6rem);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.055);
}

.yf-404-box {
    text-align: center;
    padding: 3.5rem 1.5rem;
}

.yf-404-code {
    font-family: var(--font-display);
    font-size: clamp(4.2rem, 9vw, 6.8rem);
    font-weight: 800;
    line-height: 1;
    color: var(--brand-orange);
    margin-bottom: 0.75rem;
}

.yf-404-box h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 0.65rem;
}

.yf-404-box p {
    color: var(--text-sub);
    max-width: 560px;
    margin: 0 auto;
}

.yf-404-actions {
    margin-top: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.78rem 1.65rem;
    border-radius: 8px;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: var(--motion-base);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.18);
}

.btn-secondary:hover {
    background: var(--gray-btn);
    color: #FFFFFF;
    border-color: var(--gray-btn);
    transform: translateY(-2px);
}

@media only screen and (max-width: 767px) {
    .entry-content .alignleft,
    .entry-content .alignright {
        float: none;
        margin: 1.25rem auto;
        max-width: 100%;
    }
}
