/* 詳細算命項目專用大按鈕 */
.btn-master-item-detail {
    background: linear-gradient(135deg, #a00000 0%, #7b0000 100%); /* 比上方按鈕更深邃的紅 */
    color: #ffd700 !important; /* 直接用金字，更有權威感 */
    border: 2px solid #ffd700;
    border-radius: 50px; /* 膠囊型，導向感更強 */
    font-size: 1.4rem;
    font-weight: bold;
    display: inline-block;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(160, 0, 0, 0.4);
    text-decoration: none !important;
    letter-spacing: 1px;
}

.btn-master-item-detail:hover {
    background: #ffd700; /* 懸停時反轉：變金底紅字 */
    color: #a00000 !important;
    transform: scale(1.05); /* 微微放大 */
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-master-item-detail i {
    transition: transform 0.3s;
}

.btn-master-item-detail:hover i {
    transform: rotate(15deg); /* 圖示微微傾斜，增加動感 */
}


/* 費用說明主容器 */
.price-info-card {
    background-color: #fffdf9; /* 宣紙白 */
    border: 2px solid #8d6e63; /* 古典棕邊框 */
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
}

/* 標題裝飾 */
.price-info-card h3 {
    color: #a00000; /* 深紅色 */
    border-bottom: 2px solid #a00000;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 25px;
}

/* 清單項目調整 */
.price-list p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
}

/* 項目符號小裝飾 */
.price-list p::before {
    content: "◈";
    position: absolute;
    left: 0;
    color: #a00000;
}

/* 貨幣對照區塊 - 專家級卡片設計 */
.currency-table-box {
    background: linear-gradient(135deg, #8e0000 0%, #640000 100%);
    color: #ffd700;
    padding: 20px;
    border-radius: 6px;
    margin-top: 30px;
    border: 1px solid #ffd700;
    text-align: center;
}

.currency-table-box h4 {
    margin: 0;
    letter-spacing: 1px;
    font-weight: bold;
}

/* 針對行動版的幣值縮放 */
@media (max-width: 768px) {
    .currency-table-box h4 {
        font-size: 1rem;
        line-height: 1.5;
    }
}


/* 知識分享圖文卡片 */
.knowledge-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 25px;
    display: block;
    text-decoration: none !important;
}

.knowledge-card:hover {
    border-color: #520472; /* 老師愛用的紫色 */
    box-shadow: 0 10px 20px rgba(82, 4, 114, 0.1);
    transform: translateY(-5px);
}

.knowledge-card .img-box {
    overflow: hidden;
    position: relative;
    height: 180px; /* 固定高度讓排版整齊 */
}

.knowledge-card .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 確保圖不變形 */
    transition: transform 0.5s ease;
}

.knowledge-card:hover .img-box img {
    transform: scale(1.1);
}

.knowledge-card .info-box {
    padding: 15px;
    text-align: center;
}

.knowledge-card .info-box h3 {
    color: #520472; /* 紫色標題 */
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.knowledge-card .info-box p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
}


/* 專家級：免費諮詢醒目區塊 */
.free-consult-box {
    background: linear-gradient(135deg, #520472 0%, #310246 100%); /* 老師專屬神祕紫 */
    border: 2px solid #ffd700; /* 金邊框 */
    border-radius: 15px;
    padding: 40px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    overflow: hidden;
    color: #fff;
    margin: 40px 0;
}

/* 裝飾背景圖騰 (微弱的太極或雲紋) */
.free-consult-box::after {
    content: "☯";
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 180px;
    color: rgba(255, 255, 255, 0.05);
    transform: rotate(-15deg);
}

.free-consult-title {
    background: #ffd700;
    color: #520472;
    display: inline-block;
    padding: 5px 25px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 1.4rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.free-consult-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #f0f0f0;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.free-consult-footer {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #ffd700;
    padding: 15px 20px;
    font-size: 1.1rem;
    color: #ffd700;
}


/* 紫微斗數專有    名詞：大師書卷樣式 */
.master-term-box {
    background: #ffffff;
    border: 1px solid #e2d7c1;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

/* 標題區：深紫漸層 + 金色底線 */
.master-term-header {
    background: linear-gradient(135deg, #520472 0%, #3b0352 100%);
    color: #ffd700; /* 金色標題字 */
    padding: 18px 25px;
    border-bottom: 4px solid #d4af37;
}

.master-term-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 2px;
}

/* 內容區 */
.master-term-body {
    padding: 30px;
    background-image: radial-gradient(#fffdf9 0%, #ffffff 100%); /* 極淡的宣紙色漸層 */
}

/* 連結項目樣式 */
.term-item-link {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px dashed #eee;
    transition: all 0.3s ease;
}

/* 序號小金圈 */
.term-item-link .num-badge {
    background: #f4f1ea;
    color: #a68a64;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #d4c2a3;
}

.term-item-link:hover {
    background: #fff5f5;
    padding-left: 20px;
    color: #a00000 !important;
}

.term-item-link:hover .num-badge {
    background: #a00000;
    color: #fff;
    border-color: #a00000;
}
/* 統一 Section 外殼 */
.master-section {
    padding: 80px 0;
    background-color: #fdfaf2; /* 淡淡的宣紙暖色，不刺眼 */
    clear: both;
}

/* 統一 Section 標題樣式 */
.master-section .section-header h2 {
    color: #520472; /* 大師紫 */
    font-size: 2.2rem;
    font-weight: 800;
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* 標題下方的裝飾金線 */
.master-section .section-header h2::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 3px;
    background: #d4af37; /* 古典金 */
    bottom: 0;
    left: calc(50% - 30px);
}

/* 統一內容卡片外殼 */
.master-info-card {
    background: #ffffff;
    border: 1px solid #e2d7c1;
    border-top: 5px solid #520472; /* 頂部統一紫色重音 */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 30px;
    height: 100%;
    transition: all 0.3s ease;
}

.master-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(82, 4, 114, 0.1);
}

/* 卡片內的小標題 */
.master-info-card h3 {
    color: #a00000; /* 標題用深紅，專業感十足 */
    font-size: 1.3rem;
    font-weight: 700;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}


/* 十二宮位 保持 4x4 比例的 CSS */
    .zwds-grid {
        background: #fff;
        border: 1px solid #dee2e6;
        max-width: 800px;
        margin: 0 auto;
    }

    .zwds-row {
        display: flex;
        flex-wrap: nowrap; 
    }

    .zwds-cell {
        flex: 0 0 25%; 
        height: 100px;
        border: 1px solid #dee2e6;
        transition: all 0.3s ease;
    }

    .zwds-center-box {
        flex: 0 0 50%; 
        height: 100px; 
    }

    .zwds-cell a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        color: #333;
        font-weight: bold;
        font-size: 1.2rem;
        text-decoration: none;
    }

    /* 顏色還原與 SEO 優化 */
    .cell-yellow { background-color: #FFF7DD; }
    .cell-blue   { background-color: #E9F3FE; }
    .cell-gray   { background-color: #F2EBE1; }

    /* 互動效果 */
    .zwds-cell:hover {
        background-color: #FFCC00 !important;
        z-index: 2;
        box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    }
    .zwds-cell:hover a {
        color: #000;
    }

    /* RWD 適應 */
    @media (max-width: 576px) {
        .zwds-cell { height: 75px; }
        .zwds-center-box { height: 75px; }
        .zwds-cell a { font-size: 1rem; }
        .zwds-center-box img { max-width: 90px !important; }
        .zwds-center-box small { font-size: 10px; }
    }

    /* 星曜1. 基礎文字與通用標籤 */
    .text-purple { color: #520472; }
    .border-left-purple { border-left: 4px solid #520472; }
    .border-left-red    { border-left: 4px solid #cc0000; }
    .border-left-green  { border-left: 4px solid #28a745; }
    .border-left-orange { border-left: 4px solid #fd7e14; }
    .border-left-dark   { border-left: 4px solid #333; }
    .border-left-info   { border-left: 4px solid #17a2b8; }

    /* 2. 星曜按鈕基礎樣式 (.s-btn) */
    .star-btn-group .s-btn {
        display: inline-block;
        margin: 4px;
        padding: 6px 14px; /* 統一間距 */
        border: 1px solid #dee2e6;
        border-radius: 4px;
        color: #444;
        font-size: 0.95rem;
        font-weight: 500;
        background: #fff;
        text-decoration: none !important;
        transition: all 0.3s ease; /* 統一平滑時間 */
    }

    /* 按鈕懸停效果 */
    .star-btn-group .s-btn:hover {
        background: #520472;
        color: #fff !important;
        border-color: #520472;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    /* 3. 星曜分類邊框顏色 (相容舊版與核心星系) */
    /* 使用 !important 確保強制執行顏色分類 */
    .bbg-purple, .bbg-1 { border-left: 4px solid #520472 !important; }
    .bbg-red,    .bbg-4 { border-left: 4px solid #cc0000 !important; }
    .bbg-green          { border-left: 4px solid #28a745 !important; }
    .bbg-orange         { border-left: 4px solid #fd7e14 !important; }
    .bbg-blue,   .bbg-2 { border-left: 4px solid #0066CC !important; }
    .bbg-pink,   .bbg-3 { border-left: 4px solid #CC3366 !important; }


    /* 統一卡片樣式 (若 fortune_master.css 已有則免貼) */
.master-info-card {
    background: #fff;
    border: 1px solid #eee;
    border-top: 5px solid #520472;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 25px;
    height: 100%;
}
.master-info-card h3 {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 15px;
}
.term-unified-link {
    color: #444 !important;
    text-decoration: none !important;
    font-size: 1.05rem;
    transition: 0.3s;
}
.term-unified-link:hover {
    color: #a00000 !important;
    padding-left: 5px;
}
.term-unified-link .num {
    color: #c62828;
    font-weight: bold;
    margin-right: 5px;
}

/* 一、文獻導讀卡片 (紫色尊榮版) */
.classics-card {
    background-color: #ffffff !important; 
    border: 1px solid #e2d7c1 !important; /* 典雅古銅金細邊 */
    border-top: 5px solid #520472 !important; /* ✅ 改為大師紫 */
    border-radius: 12px;
    padding: 30px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.classics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(82, 4, 114, 0.12); /* 懸停時帶點紫光 */
    border-color: #520472 !important;
}

/* 二、內部連結與序號樣式 */
.classic-unified-link {
    color: #444 !important;
    text-decoration: none !important;
    font-size: 1.15rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 12px 5px;
    border-bottom: 1px dashed #f0f0f0;
}

/* 序號：紫底金字 (顯現尊貴質感) */
.classic-unified-link .num {
    color: #ffd700 !important; /* 金色字 */
    background: #520472 !important; /* ✅ 改為大師紫背景 */
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #ffd700; /* 金色圓圈 */
}

.classic-unified-link:hover {
    color: #520472 !important; /* ✅ 滑過文字變紫色 */
    background-color: #fcfaff; /* 極淡的紫底 */
    padding-left: 15px;
}



/* 紫微範例頁面 專用樣式 */
.ex-content-wrapper {
    color: #333;
    line-height: 1.9;
    font-size: 17px;
}

.ex-section-header {
    font-size: 26px;
    font-weight: 800;
    color: #FF0000;
    margin: 0;
    letter-spacing: 2px;
    border-bottom: 2px solid #FF0000;
    padding-bottom: 5px;
    display: inline-block;
}

.ex-header-bar {
    width: 8px;
    height: 32px;
    background: #FF0000;
    margin-right: 12px;
    border-radius: 2px;
}

.ex-question-box {
    border: 1px solid #e2d7c1;
    border-radius: 12px;
    background: #fffdf5;
}

.ex-question-title {
    background: #fcfde2;
    border-bottom: 1px solid #e6e589;
    padding: 1rem;
    font-size: 18px;
    font-weight: 700;
    color: #856404;
    letter-spacing: 1px;
}

.ex-question-body {
    padding: 1.5rem;
    line-height: 1.9;
    color: #444;
    font-size: 1.1rem;
    text-align: justify;
}

.ex-img-container {
    display: inline-block;
    padding: 0.5rem;
    background: #fff;
    border-radius: 8px;
}

.ex-img-caption {
    letter-spacing: 1px;
    display: inline-block;
}

.ex-text-block {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    text-align: justify;
}

.ex-border-bottom {
    border-bottom: 1px solid #f2f2f2;
}

/* 易經占卜區塊 */
.ex-yi-jing-box {
    background-color: #fff9f9;
    border: 1px solid #ffcccc;
    border-radius: 12px;
    padding: 2rem;
}

.ex-yi-jing-header {
    color: #ff0000;
    font-weight: 700;
    font-size: 22px;
}

.ex-yi-jing-intro {
    background: #fff;
    border-left: 5px solid #ff0000;
    line-height: 1.8;
}

.ex-table-accent {
    background-color: #FFFF99;
    font-weight: 700;
    border-color: #e2d7c1;
}

.ex-yi-jing-summary {
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed #ffcccc;
}

/* 底部服務區塊 */
.ex-footer-service {
    color: #900;
    background: #fffcfc;
    border: 1px solid #ffebeb;
}

    .example-card {
        border: 1px solid #eee;
        border-radius: 10px;
        transition: all 0.3s ease;
    }
    .example-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    }
    .badge {
        font-weight: 600;
        letter-spacing: 1px;
    }

    /* 楊老師算命特點 專用樣式 */
    .feature-section {
        padding: 60px 0;
        background-color: #fff;
    }

    .feature-item {
        padding: 30px;
        margin-bottom: 30px;
        border: 1px solid #eee;
        border-radius: 15px;
        transition: all 0.3s ease;
        height: 100%;
        background: #fff;
    }

    .feature-item:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(82, 4, 114, 0.1) !important;
        border-color: #520472;
    }

    .feature-icon-circle {
        width: 50px;
        height: 50px;
        background: #cc0000;
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 20px;
        box-shadow: 0 4px 10px rgba(82, 4, 114, 0.3);
    }

    .feature-title {
        font-size: 20px;
        font-weight: 700;
        color: #520472;
        margin-bottom: 15px;
        border-left: 4px solid #FF0000;
        padding-left: 12px;
    }

    .feature-text {
        font-size: 16px;
        color: #555;
        line-height: 1.8;
        text-align: justify;
    }


    /* 著作區塊專用樣式 */
    .book-card {
        background: #fff;
        border: 1px solid #eee;
        border-radius: 15px;
        transition: all 0.4s ease;
        overflow: hidden;
    }

    .book-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(82, 4, 114, 0.1) !important;
    }

    .book-img-box {
        padding: 20px;
        background: #fdfcfb;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .book-img-box img {
        max-width: 100%;
        height: auto;
        box-shadow: 5px 10px 20px rgba(0,0,0,0.2); /* 營造書本立體感 */
    }

    .book-info-box {
        padding: 30px;
    }

    .book-tag {
        background: #FF0000;
        color: #fff;
        padding: 4px 12px;
        border-radius: 50px;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 15px;
        display: inline-block;
    }

    .book-title-highlight {
        color: #520472;
        font-weight: 800;
        margin-bottom: 20px;
        border-left: 5px solid #FF0000;
        padding-left: 15px;
    }

    .book-detail-list p {
        margin-bottom: 8px;
        font-size: 0.95rem;
        color: #666;
        border-bottom: 1px dashed #eee;
        padding-bottom: 5px;
    }

    .btn-buy {
        background: #FF0000;
        color: #fff !important;
        border-radius: 50px;
        padding: 10px 30px;
        font-weight: 600;
        transition: 0.3s;
    }

    .btn-buy:hover {
        background: #cc0000;
        transform: scale(1.05);
    }