/*
Theme Name: Hello Biz Child
Template: hello-biz
*/

/* --------------------------------
全站防止左右滑動、自適應圖片/區塊
-------------------------------- */
html, body {
    overflow-x: hidden;
    width: 100%;
}

img, iframe, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container, .site, .main, .content, #menu-123 {
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box;
}

p, span, li, a {
    word-wrap: break-word;
    word-break: break-word;
}

table, .wide-block {
    max-width: 100%;
    overflow-x: auto;
}

/* ----------------------------
手機選單
---------------------------- */
@media (max-width: 767px) {
    #menu-123 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    #menu-123 > li {
        flex: 0 1 auto;
        margin: 5px;
    }

    #menu-123 li.menu-item-has-children > ul.sub-menu {
        display: none;
    }

    #menu-123 li.menu-item-has-children.open > ul.sub-menu {
        display: block;
    }

    #menu-123 li.menu-item-has-children > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #menu-123 li.menu-item-has-children > a::after {
        content: '▼';
        margin-left: 5px;
        font-size: 0.7em;
    }
}

/* ----------------------------
固定 Line / Telegram 按鈕
---------------------------- */
.fixed-line-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 9999;
}

.fixed-line-btn svg {
    width: 100%;
    height: 100%;
}

.fixed-line-btn .line-text {
    display: none;
}

.fixed-line-btn .tooltip-text {
    display: none;
    position: absolute;
    right: 70px;
    background: #00b900;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

.fixed-line-btn:hover .tooltip-text {
    display: block;
}

/* ----------------------------
手機版商品列表調整 (max-width: 767px)
---------------------------- */
@media (max-width: 767px) {
    /* 商品列表容器 */
    ul.products {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between; /* 左右間距平均 */
        margin: 0 -5px; /* 修正間距 */
    }

    /* 每個商品項目 */
    ul.products li.product {
        flex: 0 0 48%; /* 每行 2 個商品，可改成 100% 單列或 32% 三列 */
        margin: 5px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    }

    /* 商品圖片統一高度 */
    ul.products li.product img {
        width: 100%;
        height: 200px; /* 固定高度，可根據需求調整 */
        object-fit: cover; /* 裁切圖片填滿容器 */
        display: block;
        border-radius: 5px; /* 可選，增加美觀 */
    }

    /* 商品標題置中 */
    ul.products li.product .woocommerce-loop-product__title {
        text-align: center;
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.2;
    }

    /* 商品價格置中 */
    ul.products li.product .price {
        text-align: center;
        margin-top: 4px;
        font-size: 13px;
        color: #333;
    }
}


header, .main-menu {
    position: relative;  /* 若沒設定 */
    z-index: 1000;       /* 必須大於 daily-signin-card */
}

header .submenu {
    position: absolute;
    z-index: 1010;
}

/* ===========================
   HERO 區塊（首頁）
   #hero-signin
   =========================== */

#hero-signin {
    width: 100%;
    padding: 10px 10px; /* ↓ 減少上下空白 */
    background: #f5f6f7;
    border-radius: 20px;
    box-sizing: border-box;
    text-align: center;
    margin: 0px auto; /* ↓ 原本 40px 改 20px */
}

#hero-signin .hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

/* 主標語 */
#hero-signin .hero-title {
    font-size: 30px; /* 稍微縮小 */
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 15px; /* ↓ 與副標距離縮短 */
    color: #111;
}

/* 副標語 */
#hero-signin .hero-subtitle {
    font-size: 17px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px; /* ↓ 與 CTA 距離縮短 */
}
/* ======= 手機板 (強制一行 + 指定字體大小) ======= */
@media (max-width: 768px) {
  #hero-signin .hero-title {
      font-size: 26px;     /* 手機主標題字體 ← 可調整 */
      white-space: nowrap;
  }

  #hero-signin .hero-subtitle {
      font-size: 15px;     /* 手機副標題字體 ← 可調整 */
      white-space: nowrap;
  }
}



/* === 三卡片風格 === */
.rewards-cards {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  margin-top: 20px;
}

.reward-card {
  flex: 1 1 0;
  max-width: 33%;
  background: #fff;
  padding: 20px 10px;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
  box-sizing: border-box;
  transition: transform .25s ease;
}

.reward-card:hover {
  transform: translateY(-4px);
}

.reward-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.reward-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* 色系統一 */
.reward-points { border-top: 4px solid #f59e0b; } /* 黃 */
.reward-wallet { border-top: 4px solid #10b981; } /* 綠 */
.reward-coins  { border-top: 4px solid #f97316; } /* 橘 */

.reward-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 18px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.reward-points .reward-btn { background: #f59e0b; }
.reward-wallet .reward-btn { background: #10b981; }
.reward-coins  .reward-btn { background: #f97316; }

/* 手機版：維持三卡並排 */
@media (max-width: 768px) {
  .reward-card {
    padding: 15px 5px;
  }
  .reward-icon { font-size: 30px; }
  .reward-title { font-size: 16px; }
  .reward-btn { padding: 5px 10px; font-size: 14px; }
}

/* --- 全局文章列表卡片 --- */
/* --- 全局文章列表卡片 --- */
.page-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.page-content .post {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative; /* for clickable overlay */
}

.page-content .post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.page-content .post .entry-date,
.page-content .post .posted-on {
    display: block;
    font-size: 0.85rem;
    color: #888;
    padding: 0 20px 8px 20px;
}

.page-content .post .entry-title a {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    padding: 0 20px 8px 20px;
    line-height: 1.4;
    transition: color 0.3s;
}

.page-content .post .entry-title a:hover {
    color: #0670ff;
}

.page-content .post p {
    flex: 1;
    padding: 0 20px 16px 20px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 隱藏分享按鈕 */
.page-content .post .addtoany_share_save_container {
    display: none !important;
}

/* 整個卡片可點擊 */
.page-content .post a.card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-indent: -9999px;
}

.page-content .post > * {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .page-content {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    .page-content .post .entry-title a {
        font-size: 1.1rem;
    }
    .page-content .post p {
        font-size: 0.9rem;
    }
}



/* --- 九陽神功標題卡片 --- */
.page-header .entry-title {
    display: inline-block;                       /* 文字寬度自適應卡片 */
    background: linear-gradient(135deg, #FFD700, #FFA500); /* 漸層金橘色背景 */
    color: #111;                                 /* 文字顏色 */
    font-size: 40px;                           /* 標題大小 */
    font-weight: 800;                            /* 粗體 */
    text-align: center;                          /* 文字置中 */
    padding: 10px 12px;                          /* 卡片內距 */
    border-radius: 16px;                         /* 卡片圓角 */
    margin: 10px auto;                           /* 上下距 + 水平置中 */
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);    /* 投影 */
    transition: transform 0.3s, box-shadow 0.3s; /* 懸浮動畫 */
}

/* 懸浮效果 */
.page-header .entry-title:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* 手機端響應 */
@media (max-width: 768px) {
    .page-header .entry-title {
        font-size: 1.8rem;
        padding: 14px 24px;
        max-width: 90%;
    }
}


/* ===============================
   Gutenberg Article Module System
   =============================== */

/* 文章主容器 */
.article-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px;
    line-height: 1.85;
    font-size: 16px;
}

/* Hero 區 */
.article-hero {
    background: #f5f6f7;
    padding: 56px 32px;
    border-radius: 24px;
    margin-bottom: 56px;
    text-align: center;
}

.article-hero h1 {
    font-size: 40px;
    margin-bottom: 16px;
}

.article-hero p {
    font-size: 18px;
    color: #555;
    margin-bottom: 12px;
}

.article-hero strong {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: #111;
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
}

/* 結論 / 一般卡片 */
.article-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.article-card h2 {
    margin-top: 0;
}

/* 強調卡 */
.article-card.highlight {
    border-left: 6px solid #ff6b00;
}

/* 三重原因卡 */
.article-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 56px 0;
}

.article-grid-3 .article-card {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .article-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 警告區 */
.article-warning {
    background: #fff3f0;
    border-left: 6px solid #ff4d2d;
    padding: 36px;
    border-radius: 20px;
    margin: 56px 0;
}

.article-warning h3 {
    margin-top: 0;
}

/* A / B 對比 */
.article-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin: 56px 0;
}

@media (max-width: 768px) {
    .article-compare {
        grid-template-columns: 1fr;
    }
}

/* 產品卡 */
.article-product {
    border: 2px solid #eee;
}

/* 品牌立場宣言 */
.article-manifesto {
    background: #111;
    color: #fff;
    padding: 56px 36px;
    border-radius: 28px;
    margin: 72px 0;
}

.article-manifesto p {
    font-size: 18px;
}

/* CTA */
.article-cta {
    background: linear-gradient(135deg, #ff6b00, #ff3d00);
    color: #fff;
    padding: 56px 36px;
    border-radius: 32px;
    text-align: center;
    margin-top: 72px;
}

.article-cta a {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 28px;
    background: #fff;
    color: #111;
    border-radius: 999px;
    font-weight: bold;
    text-decoration: none;
}

:root {
    --accent: #ff6b00;
    --warning: #ff4d2d;
    --soft-bg: #f7f8fa;
    --soft-border: #eaecef;
}

/* Hero 微漸層 */
.article-hero {
    background: linear-gradient(180deg, #ffffff, var(--soft-bg));
}

/* 結論卡更明確 */
.article-card.highlight {
    border-left-color: var(--accent);
    background: linear-gradient(90deg, #fff, #fff7f0);
}

/* 三卡 hover（桌機） */
@media (hover: hover) {
    .article-grid-3 .article-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 40px rgba(0,0,0,0.08);
    }
}

/* 警告區更有情緒 */
.article-warning {
    background: linear-gradient(90deg, #fff1ee, #fff);
    border-left-color: var(--warning);
}

/* A/B 標題點綴 */
.article-compare h3::before {
    content: "▍";
    color: var(--accent);
    margin-right: 6px;
}

/* CTA 降低促銷感 */
.article-cta {
    background: linear-gradient(135deg, #111, #222);
}

.article-cta a {
    background: var(--accent);
    color: #fff;
}

/* =====================================
   單篇文章：強制解除行內 Grid / Flex
   ===================================== */

/* 文章內容主體 */
body.single-post .entry-content,
body.single-post .wp-block-post-content,
body.single-post .wp-site-blocks {
    display: block !important;
}

/* 所有 Gutenberg 區塊一律直向 */
body.single-post .entry-content > *,
body.single-post .wp-block {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 直接覆蓋 element.style 的 grid */
body.single-post [style*="display:grid"],
body.single-post [style*="display: grid"] {
    display: block !important;
    grid-template-columns: none !important;
}

/* 防止 columns 被自動拆欄 */
body.single-post .wp-block-columns {
    flex-direction: column !important;
}
/* =====================================
   🔥 關鍵修正：單篇文章禁止使用 page-content Grid
   ===================================== */

body.single-post .page-content {
    display: block !important;
}

/* =========================
   首頁｜文章入口卡片（完整版）
   ========================= */

/* 外層區塊背景 + 上下留白 */
.home-article-entry {
    margin: 0px 0;
    padding: 20px 10px;
    background: #f5f6f7; /* 淺灰背景區塊，讓卡片浮起來 */
}

/* 內層卡片 */
.home-article-entry .home-article-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 28px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.05); /* 保證可見框線 */
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* 卡片 hover 效果 */
.home-article-entry .home-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* 上方標籤 */
.home-article-card .home-article-tag {
    display: inline-block;
    font-size: 30px;
    letter-spacing: 0.12em;
    color: #ff6b00;
    margin-bottom: 12px;
    font-weight: 600;
}

/* 標題 */
.home-article-card .entry-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #111;
    line-height: 1.3;
}

/* 說明文字 */
.home-article-card .entry-desc {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 26px;
}

/* CTA 按鈕 */
.home-article-card .entry-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

/* 按鈕 hover */
.home-article-card .entry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    background: #333;
}

/* 手機響應 */
@media (max-width: 768px) {
    .home-article-entry {
        padding: 30px 10px;
    }

    .home-article-card {
        padding: 28px 20px;
    }

    .home-article-card .entry-title {
        font-size: 22px;
    }

    .home-article-card .entry-desc {
        font-size: 15px;
    }

    .home-article-card .entry-btn {
        font-size: 13px;
        padding: 10px 24px;
    }
}




.page-content .post {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 0px;
    margin-bottom: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transition: transform .25s ease, box-shadow .25s ease;
    cursor: pointer;
    overflow: hidden; /* 避免 ::after 影響外觀 */
}

.page-content .post:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

/* 覆蓋整個文章卡片，但不改尺寸 */
.page-content .post::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1; /* 在背景層，不蓋住標題連結或按鈕 */
}

/* 保留標題連結與按鈕可點 */
.page-content .post h2.entry-title a,
.page-content .post a {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

