/* ==========================================================================
   ✦ LUXURY DESIGN TOKENS & VARIABLES
   ========================================================================== */
:root {
    /* 大面積主背景：溫潤米白（不刺眼、帶有傳統紙張質感） */
    --site-bg: #F7F5F0;
    /* 內容卡片背景：純白（讓文字與圖片亮出來） */
    --card-bg: #FFFFFF;
    /* 經絡聯動或特殊區塊：淡淡的草本艾綠（完美襯托 12 經絡時鐘） */
    --section-light-bg: #EEF2F0;

    --primary-deep: #163a30; /* Premium Imperial Jade Green */
    --primary-light: #1e4d40;
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #aa7c11 100%); /* Radiant Matte Gold */
    --gold-solid: #b89047;
    --bg-silk: #f7f4eb; /* Soft Off-White Silk Base */
    --bg-pure: #ffffff;
    --text-dark: #222c29;
    --text-muted: #5a6b66;
    --font-serif: 'Noto Serif TC', serif;
    --font-sans: 'Noto Sans TC', sans-serif;
    --shadow-premium: 0 10px 30px rgba(22, 58, 48, 0.06);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   ✦ GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-silk);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    padding-bottom: 65px;

    background-color: var(--site-bg);
    color: #2F2B28; /* 深茶褐字體，比純黑 [#000] 更柔和、更有質感 */
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-silk);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-deep);
    border-radius: 4px;
}

.container {
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 100px 0;
}

/* ==========================================================================
   ✦ SECTION HEADER UI
   ========================================================================== */
.section-title-block {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--primary-deep);
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.section-title::before, .section-title::after {
    content: '';
    color: var(--gold-solid);
    font-size: 1.2rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.section-title::before { left: -35px; }
.section-title::after { right: -35px; }

.section-subtitle {
    font-size: 0.95rem;
    color: var(--gold-solid);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 5px;
    font-weight: 700;
}

/* ==========================================================================
   ✦ HEADER & NAVIGATION SYSTEM
   ========================================================================== */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(184, 144, 71, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 15px 4%;
}

.nav-business-hours {
    display: none !important;
}

/* ==========================================================================
   ✦ NEW LOGO IMAGE OPTIMIZATION (新圖檔標誌優化)
   ========================================================================== */
.logo-area img {
    height: 65px;
    width: auto;
    display: block;
    transition: var(--transition-smooth);
}

.logo-area:hover img {
    transform: scale(1.02);
}

.logo-badge {
    background: var(--primary-deep);
    color: var(--bg-silk);
    border: 2px solid var(--gold-solid);
    padding: 4px 8px;
    font-family: var(--font-serif);
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 4px;
    letter-spacing: 1px;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-deep);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
    margin-left: auto;
    margin-right: 35px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1.05rem;
    transition: var(--transition-smooth);
    position: relative;
    padding: 5px 0;
    white-space: nowrap !important;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--gold-solid);
}

.btn-nav-book {
    background: var(--gold-gradient);
    color: #fff !important;
    padding: 10px 25px !important;
    border-radius: 50px;
    font-weight: bold !important;
    box-shadow: 0 4px 15px rgba(170, 124, 17, 0.2);
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

.btn-nav-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(170, 124, 17, 0.35);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-deep);
}

/* ==========================================================================
   ✦ HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(22, 58, 48, 0.95) 30%, rgba(22, 58, 48, 0.6) 100%),
    url('https://images.unsplash.com/photo-1540555700478-4be289fbecef?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
    color: #fff;
    padding: 100px 0 160px 0;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-silk);
    clip-path: polygon(0 100%, 100% 100%, 100% 0); /* 🌟 桌機端與全域維持平緩斜線 */
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5%;
    gap: 50px;
}

.hero-content {
    flex: 1.2;
}

/* 🎯 修正 title_desc 左右衝出邊界的問題 */
.hero-content p[data-i18n="title_desc"] {
    white-space: pre-line !important;

    /* 🌟 關鍵修正：加上左右各 20px（或 5-6%）的內距，強制文字往內縮 */
    padding-left: 22px !important;
    padding-right: 22px !important;

    /* 🌟 讓中文左右完美對齊，兩側線條才會俐落 */
    text-align: justify;

    /* 調整文字大小與行高，讓閱讀體驗更舒服 */

    line-height: 1.7;
    letter-spacing: 0.5px;

    /* 控制與下方「預約調理」按鈕的距離 */
    margin-top: 15px;
    margin-bottom: 25px;

    /* 確保 padding 不會額外撐大盒子本身 */
    box-sizing: border-box;
}

.hero .hero-main-title {
    font-family: var(--font-serif);
    font-size: 3.8rem;
    line-height: 1.05 !important;
    margin-bottom: 25px;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero .title-top {
    display: inline-block;
    margin-bottom: 5px;
    padding-bottom: 12px !important;
}

.hero .title-bottom {
    color: var(--gold-solid);
    background: linear-gradient(to right, #ffe699, #cc9933);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-left: 1.0em;
    padding-bottom: 12px !important;
}

.hero h1 span {
    color: var(--gold-solid);
    background: linear-gradient(to right, #ffe699, #cc9933);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    border-left: 3px solid var(--gold-solid);
    padding-left: 15px;
}

.hero-media {
    flex: 0.8;
    position: relative;
    display: flex;
    justify-content: center;
}

.qi-character-bg {
    position: absolute;
    font-family: var(--font-serif);
    font-size: 15rem;
    color: rgba(184, 144, 71, 0.15);
    font-weight: 900;
    top: -80px;
    right: 20px;
    pointer-events: none;
    user-select: none;
}

.hero-img-wrapper {
    border: 4px solid var(--gold-solid);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    width: 300px;
    height: 450px;
    transition: var(--transition-smooth);
}

.hero-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.btn-cta {
    background: var(--gold-gradient);
    color: #fff;
    padding: 14px 40px;
    text-decoration: none;
    font-size: 1.4rem;
    border-radius: 50px;
    font-weight: bold;
    transition: var(--transition-smooth);
    display: inline-block;
    box-shadow: 0 4px 15px rgba(170, 124, 17, 0.3);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(170, 124, 17, 0.5);
}

/* ==========================================================================
   ✦ SERVICES GRID STYLES
   ========================================================================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
}

.card {
    background-color: var(--bg-pure);
    border-radius: 16px 16px 4px 4px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    border: 1px solid rgba(22, 58, 48, 0.05);
    display: flex;
    flex-direction: column;
}

.card-image-box {
    height: 360px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    transition: var(--transition-smooth);
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(22, 58, 48, 0.9);
    color: var(--bg-silk);
    border: 1px solid var(--gold-solid);
    padding: 3px 12px;
    font-size: 0.8rem;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h3 {
    font-family: var(--font-serif);
    color: var(--primary-deep);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.card .meta {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-solid);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card .meta span {
    font-size: 0.85rem;
    background: rgba(184, 144, 71, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: normal;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(22, 58, 48, 0.12);
    border-color: var(--gold-solid);
}

.card:hover .card-image-box img {
    transform: scale(1.08);
}

/* ==========================================================================
   ✦ COURSES SECTION
   ========================================================================== */
.course-group-wrapper {
    margin-bottom: 40px;
}

.course-caption-tag {
    background-color: #1a2220;
    color: #ffffff;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 5px solid var(--gold-solid);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.course-caption-tag h3 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    color: #f7f4eb;
}

.course-caption-tag p {
    font-size: 0.95rem;
    color: #a4b4af;
    line-height: 1.5;
}

.premium-course-card {
    background: #111614;
    border: 1px solid rgba(184, 144, 71, 0.3);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(17, 22, 20, 0.3);
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
}

.premium-course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--gold-gradient);
}

.premium-course-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-solid);
    box-shadow: 0 30px 70px rgba(22, 58, 48, 0.4);
}

.premium-card-header {
    padding: 35px 40px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-card-header span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.physical-badge span { background: rgba(184, 144, 71, 0.15); color: #d4af37; border: 1px solid rgba(184, 144, 71, 0.3); }
.online-badge span { background: rgba(30, 77, 64, 0.4); color: #4ade80; border: 1px solid rgba(30, 77, 64, 0.6); }

.premium-card-header h4 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: #ffffff;
    letter-spacing: 1px;
}

.luxury-course-list {
    list-style: none;
    padding: 20px 40px;
}

.luxury-course-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
    position: relative;
}

.luxury-course-list li:last-child {
    border-bottom: none;
}

.course-text {
    flex: 1;
    order: 1;
}

.course-header-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.course-text h5 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    color: #f7f4eb;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
}

.course-type-badge {
    font-size: 0.75rem;
    background: rgba(184, 144, 71, 0.2);
    color: #ffe699;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid rgba(184, 144, 71, 0.3);
    white-space: nowrap;
}

.course-duration-tag {
    font-size: 0.85rem;
    color: #b89047;
    margin-bottom: 6px;
    font-weight: 500;
}

.course-desc-text {
    font-size: 0.95rem;
    color: #92a39e;
    line-height: 1.6;
}

.course-btn-signup {
    display: inline-block;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff !important;
    background: var(--gold-gradient);
    padding: 10px 22px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(170, 124, 17, 0.25);
    transition: var(--transition-smooth);
    order: 2;
}

.course-btn-signup:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(170, 124, 17, 0.45);
    border-color: #ffe699;
}

.luxury-course-list li:hover {
    transform: translateX(10px);
}

.luxury-course-list li:hover .course-text h5 {
    color: #d4af37;
}

/* ==========================================================================
   ✦ PRICING ARCHITECTURE (DESKTOP MODE)
   ========================================================================== */
.table-wrapper {
    background-color: var(--bg-pure);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    border: 1px solid rgba(184, 144, 71, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: var(--primary-deep);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 22px;
    text-align: left;
    letter-spacing: 1px;
}

td {
    padding: 20px 24px;
    border-bottom: 1px solid #f0eae1;
    font-size: 1.05rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(247, 244, 235, 0.6);
}

/* ==========================================================================
   ✦ HOURS & MAP LOCATION PANELS
   ========================================================================== */
.hours-card {
    display: flex;
    background-color: var(--bg-pure);
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    border: 1px solid rgba(22, 58, 48, 0.05);
}

.hours-info-pane {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(rgba(255,255,255,0.95), rgba(255,255,255,0.95)),
    url('https://www.transparenttextures.com/patterns/aged-paper.png');
}

.hours-timeline {
    list-style: none;
}

.hours-timeline li {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0eae1;
    font-size: 1.1rem;
}

.hours-timeline li .day {
    font-weight: 700;
    color: var(--primary-deep);
}

.hours-timeline li .time {
    color: var(--text-dark);
}

.hours-map-pane {
    flex: 1.2;
    min-height: 400px;
    position: relative;
}

/* ==========================================================================
   ✦ PREMIUM BOOKING FORM STYLES
   ========================================================================== */
.booking-glass {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--bg-pure);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(22, 58, 48, 0.08);
    border: 2px solid var(--gold-solid);
    position: relative;
}

.booking-glass::before {
    content: '';
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 1px solid rgba(184, 144, 71, 0.3);
    border-radius: 16px;
    pointer-events: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-field {
    margin-bottom: 25px;
}

.form-row .form-field {
    margin-bottom: 0;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-deep);
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d4ceb8;
    background-color: var(--bg-silk);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-dark);
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-deep);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(22, 58, 48, 0.08);
}

.btn-booking-submit {
    width: 100%;
    background: var(--gold-gradient);
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 1.15rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(170, 124, 17, 0.25);
    transition: var(--transition-smooth);
    letter-spacing: 2px;
}

.btn-booking-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(170, 124, 17, 0.4);
}

/* ==========================================================================
   ✦ GLOBAL ACTION FIXED DOCK BAR (桌機與手機共用底部功能列 - 四鈕黃金比例完美置中版)
   ========================================================================== */
.mobile-action-dock {
    position: fixed;
    bottom: 0;

    /* 🎯 預設（手機版）：寬度 100% 滿版 */
    left: 0;
    right: 0;
    width: 100% !important;
    margin: 0 auto !important;
    border-radius: 0 !important; /* 手機版貼邊，不需要圓角 */

    height: 70px;
    background-color: #0c100e !important; /* 沉穩極深墨綠黑 */
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3); /* 🌟 減弱陰影，讓邊界更柔和不刺眼 */
    z-index: 999;

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.4s;

    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
}

/* 🖥️ 當螢幕寬度大於 992px 時（桌機版微調） */
@media (min-width: 992px) {
    .mobile-action-dock {
        /* 🎯 關鍵修改：限制最大寬度，與 index.php 內的頁面 section 區塊對齊 */
        width: 92% !important; /* 給予兩側一定的設計感留白 */
        max-width: 1440px !important; /* 🌟 請確保此寬度與你網站其他 .container 的 max-width 一致 */

        /* 🎯 優雅細節：桌機版加上上方左右圓角，呈現精品懸浮面版質感 */
        border-top-left-radius: 12px !important;
        border-top-right-radius: 12px !important;

        padding: 0 24px !important; /* 桌機版內邊距稍微加寬，留白更優雅 */
    }
}

.mobile-action-dock.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* 💡 左側：今天營業時間 */
.mobile-action-dock .dock-hours {
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    height: 100% !important;
    background-color: transparent !important;
    border-right: none !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* 標籤字體：微調柔和白 */
.mobile-action-dock .dock-hours-label {
    font-size: 0.72rem !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    opacity: 0.6 !important; /* 🌟 調降透明度，讓白字不刺眼、更內斂 */
    margin-bottom: 2px !important;
}

/* 時間字體：高雅古董金（降低亮度） */
.mobile-action-dock .dock-hours-time {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #dfba80 !important; /* 🌟 關鍵：改成溫潤的古董金，保留清晰度但完全不發亮 */
    letter-spacing: 0.5px !important;
    text-shadow: none !important; /* 🌟 拔除字體陰影，讓線條更乾淨、平面化 */
}

/* 🌟 右側：四個精緻霧面圓形圖標按鈕群 (FB, 表單, 電話, LINE) */
.mobile-action-dock .dock-fb,
.mobile-action-dock .dock-form,
.mobile-action-dock .dock-call,
.mobile-action-dock .dock-line {
    flex: none !important;
    width: 42px !important;  /* 🎯 縮减至 42px，確保 4 顆按鈕在手機版能完美並排不擁擠 */
    height: 42px !important;
    border-radius: 50% !important;

    /* 🎯 核心修正：利用 flex 強制內容物在圓圈中做到完美的水平與垂直居中 */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    text-decoration: none !important;
    margin-left: 10px !important; /* 🎯 縮減按鈕間距，防止小螢幕 iPhone 排版溢出 */
    transition: transform 0.1s ease !important;
    box-sizing: border-box !important;
}

/* 點擊時的彈性縮放回饋（微調至 0.94，點擊反饋更扎實） */
.mobile-action-dock .dock-fb:active,
.mobile-action-dock .dock-form:active,
.mobile-action-dock .dock-call:active,
.mobile-action-dock .dock-line:active {
    transform: scale(0.94) !important;
}

/* 🎯 控制新內嵌的 SVG 官方圖標大小（適用於表單單與 LINE） */
.mobile-action-dock .dock-form svg,
.mobile-action-dock .dock-line svg {
    width: 20px !important;   /* 在 42px 的圓圈內呈現最佳黃金比例 */
    height: 20px !important;
    fill: #ffffff !important; /* 保持乾淨的純白 */
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 🌐 1. FB 圖標：沉穩典雅藍底 + 內嵌柔和白官方 Logo */
.mobile-action-dock .dock-fb {
    background: linear-gradient(135deg, #1e5ba6 0%, #134482 100%) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

/* 🎯 終極修正：直接使用 CSS 渲染對稱 FB 標誌，並上色為你要的霧面「柔和白 (Soft White)」 */
.mobile-action-dock .dock-fb::after {
    content: "" !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    background-color: #f5f5f5 !important; /* 🌟 完美的霧面柔和白，低調優雅不刺眼 */

    /* 使用遮罩載入 1:1 完美比例的官方 Facebook 向量路徑 */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h137.2V327.7h-63v-72.1h63v-55c0-62.2 38-96.4 93.6-96.4 26.7 0 54.7 4.8 54.7 4.8v60h-30.8c-30.8 0-40.4 19.1-40.4 38.7v47.9h67.7l-10.8 72.1h-56.9V480H400c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h137.2V327.7h-63v-72.1h63v-55c0-62.2 38-96.4 93.6-96.4 26.7 0 54.7 4.8 54.7 4.8v60h-30.8c-30.8 0-40.4 19.1-40.4 38.7v47.9h67.7l-10.8 72.1h-56.9V480H400c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

/* 📝 2. 表單按鈕：溫潤低調的精品古董金漸層 */
.mobile-action-dock .dock-form {
    background: linear-gradient(135deg, #dfba80 0%, #bd965c 100%) !important;
    box-shadow: 0 2px 8px rgba(189,150,92,0.3) !important;
}

/* 📞 3. 電話圖標：高質感霧面亮灰 */
.mobile-action-dock .dock-call {
    background: #E6DDD5 !important; /* 你的專屬霧面雅致灰 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}
.mobile-action-dock .dock-call span {
    font-size: 1.15rem !important; /* 平衡 SVG 的重量感 */
    color: #ffffff !important;
    line-height: 1 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* 💬 4. LINE 圖標：莫蘭迪系質感綠 */
.mobile-action-dock .dock-line {
    background: linear-gradient(135deg, #2cb855 0%, #158f3b 100%) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

/* 移除所有可能干擾內嵌字體的舊設定 */
.mobile-action-dock a span {
    color: inherit !important;
}

/* ==========================================================================
   ✦ RESPONSIVE MEDIA QUERIES (TABLET & LAYOUT REVERSALS)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container { flex-direction: column-reverse; text-align: center; padding-top: 40px; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { margin: 0 auto 30px; border-left: none; padding-left: 0; }
    .qi-character-bg { font-size: 10rem; top: -40px; }
    .hours-card { flex-direction: column; }
    .hours-map-pane { min-height: 300px; }
}

/* ==========================================================================
   ✦ MOBILE SMARTPHONE CORE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 768px) {
    .container { padding: 60px 0; }

    /* 🌟 核心修正：滿足「不要太陡峭」但「拉開按鈕與底部斜線間距」的需求
       我們拉高 padding-bottom 至 160px，把整條斜線往下沉，同時維持平緩的 clip-path 比例 */
    .hero {
        padding: 30px 0 160px 0 !important; /* 🌟 大幅增加底部留白，完美騰出空間 */
    }
    .hero::after {
        height: 80px !important; /* 🌟 保持原本高度，維持不突兀的優雅平緩視覺 */
        clip-path: polygon(0 100%, 100% 100%, 100% 0) !important; /* 🌟 恢復原本平緩斜率 */
    }

    /* 手機端寬度調校與 Logo 防撞 */
    .logo-area img {
        height: 40px !important;
    }
    .nav-container {
        padding: 10px 4% !important;
    }

    /* 標題行高與間距優化 */
    .hero .hero-main-title {
        font-size: 2.6rem !important;
        line-height: 1.1 !important;
        margin-bottom: 15px;
    }
    .hero .title-bottom {
        margin-left: 0;
    }

    /* 導覽列漢堡選單 */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-pure);
        padding: 30px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.08);
        gap: 20px;
        border-bottom: 2px solid var(--gold-solid);
        margin-right: 0;
    }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }

    .nav-links li {
        width: 100%;
        text-align: center;
    }
    .nav-links li a {
        white-space: nowrap !important;
        display: inline-block;
        width: 100%;
    }

    /* 表單扁平化 */
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-row .form-field:first-child { margin-bottom: 25px; }

    /* 服務項目卡片突變 */
    table, thead, tbody, th, td, tr { display: block; }
    th { display: none; }
    .table-wrapper { background: transparent; border: none; box-shadow: none; overflow: visible; }
    #api-table-rows tr {
        background: #ffffff;
        margin-bottom: 20px;
        padding: 22px 24px;
        border-radius: 16px;
        border: 1px solid rgba(184, 144, 71, 0.25);
        box-shadow: 0 8px 25px rgba(22, 58, 48, 0.04);
        position: relative;
        overflow: hidden;
        transition: var(--transition-smooth);
    }
    #api-table-rows tr::before {
        content: '';
        position: absolute;
        top: 0; left: 0; bottom: 0;
        width: 5px;
        background: var(--primary-deep);
    }
    #api-table-rows tr:hover {
        transform: translateY(-3px);
        border-color: var(--gold-solid);
        box-shadow: 0 12px 30px rgba(184, 144, 71, 0.15);
    }
    #api-table-rows td { padding: 0; border: none; background: none !important; }
    .td-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--primary-deep) !important; margin-bottom: 12px; padding-right: 75px !important; line-height: 1.4; }
    .td-category { position: absolute; top: 22px; right: 24px; }
    .td-category span { font-size: 0.75rem !important; background: rgba(184, 144, 71, 0.1) !important; color: var(--gold-solid) !important; padding: 4px 10px !important; border-radius: 6px !important; border: 1px solid rgba(184, 144, 71, 0.2) !important; letter-spacing: 0.5px; }
    .td-duration { display: inline-block; font-size: 0.95rem; color: var(--text-muted); margin-top: 5px; }
    .td-duration::after { content: ' ｜ '; color: #d4ceb8; margin: 0 8px; }
    .td-price { display: inline-block; font-size: 1.3rem; font-weight: 700; background: var(--gold-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

    /* 課程卡片 RWD 突變 */
    .premium-course-card { margin: 0 5px; }
    .premium-card-header { padding: 25px 20px 15px; }
    .luxury-course-list { padding: 10px 20px; }
    .luxury-course-list li { flex-direction: column; align-items: flex-start; gap: 12px; padding: 25px 0; position: relative; }
    .course-header-meta { flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 105px; }
    .course-btn-signup { position: absolute; top: 25px; right: 0; font-size: 0.85rem; padding: 6px 14px; border-radius: 30px; box-shadow: 0 4px 10px rgba(170, 124, 17, 0.2); }
    .course-btn-signup:hover { transform: none; }

    /* 手機端底部功能列微調字型大小 */
    .mobile-action-dock .dock-hours { padding: 0 5px; }
    .mobile-action-dock .dock-hours-label { font-size: 0.72rem !important; }
    .mobile-action-dock .dock-hours-time { font-size: 0.88rem !important; letter-spacing: -0.2px; }
    .mobile-action-dock a { font-size: 0.95rem !important; }
}

/* ==========================================================================
   ✦ 手機端首屏排版優化與長方形圖片契合
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container { flex-direction: column-reverse; text-align: center; gap: 30px !important; }
    .hero-media { width: 100%; display: flex; justify-content: center; align-items: center; }
    .hero-img-wrapper { width: 300px !important; height: 450px !important; margin: 0 auto; }
}

@media (max-width: 576px) {
    .hero-container { gap: 20px !important; }
    .hero-img-wrapper { width: 260px !important; height: 390px !important; }
    .hero h1 { font-size: 2.2rem !important; margin-bottom: 15px; }
    .hero p { font-size: 1.05rem !important; margin-bottom: 25px; }
}

/* ==========================================================================
   ✦ LUXURY SCROLL TO TOP BUTTON (桌機高浮動防遮擋優化版)
   ========================================================================== */
.go-top-btn {
    position: fixed;
    bottom: 95px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: var(--gold-gradient);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(170, 124, 17, 0.45);
    z-index: 1001;

    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.go-top-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(170, 124, 17, 0.65);
    color: var(--primary-deep);
}

.go-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

@media (max-width: 768px) {
    .go-top-btn {
        bottom: 85px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   ✦ YOUTUBE SHORTS RESPONSIVE GRID (精準單排 4 欄優化)
   ========================================================================== */
.youtube-random-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 🌟 桌機大螢幕：精準 4 欄並排（剛好一排） */
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 影片卡片精緻化邊框與圓角 */
.video-card {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(22, 58, 48, 0.15);
    border: 1px solid rgba(184, 144, 71, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold-solid);
    box-shadow: 0 15px 35px rgba(184, 144, 71, 0.3);
}

/* 強制約束 YouTube iframe 為直式 9:16 的極致滿板比例 */
.video-responsive-wrapper {
    position: relative;
    width: 100%;
    padding-top: 177.77%; /* 9:16 完美比例 */
}

.video-responsive-wrapper iframe,
.video-responsive-wrapper div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* ==========================================================================
   ✦ 響應式斷點微調 (RWD) - 手機版：直向 4行1欄 / 橫向 2行2欄 自動切換
   ========================================================================== */

/* 📱 1. 手機直向模式 (Mobile Portrait) - 4 行 1 欄 */
@media (max-width: 768px) and (orientation: portrait) {
    .youtube-random-grid {
        grid-template-columns: repeat(1, 1fr) !important; /* 直向強制 1 欄縱向排列 */
        gap: 20px !important;
        padding: 0 35px; /* 增加左右留白，防止影片拉得太大 */
    }

    .video-responsive-wrapper {
        padding-top: 133.33% !important; /* 適合直向的 3:4 比例，貼合不切字 */
        height: auto !important;
    }
}

/* 🔄 2. 手機橫向模式 (Mobile Landscape) - 2 欄 × 2 列（自動重新排列） */
@media (max-width: 950px) and (orientation: landscape) {
    .youtube-random-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 🔥 橫向瞬間切換為 2 欄 */
        gap: 12px !important; /* 橫向時緊湊一點，更省空間 */
        padding: 0 20px;
    }

    .video-responsive-wrapper {
        /* 🔥 因為橫向螢幕高度非常矮，我們必須大幅壓低影片高度比例（改為 95% ~ 100% 幾近正方形），
           這樣 2 欄 × 2 列才能完美 Fit 在橫向的螢幕範圍內，不會爆開！ */
        padding-top: 100% !important;
        height: auto !important;
    }

    .video-responsive-wrapper iframe,
    .video-responsive-wrapper div {
        object-fit: contain !important; /* 確保影片即使變矮也能完整看見 */
    }
}

/* 🌟 3. 極小螢幕手機 (480px 以下) 直向微調 */
@media (max-width: 480px) and (orientation: portrait) {
    .youtube-random-grid {
        padding: 0 25px;
    }
    .video-responsive-wrapper {
        padding-top: 130% !important;
    }
}



/* ==========================================================================
   ✦ REAL-TIME MERIDIAN CLOCK COMPONENT
   ========================================================================== */
.meridian-clock-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.2fr; /* 桌機 1列3欄 */
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

/* 左欄面板 */
.clock-status-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.current-time-box, .current-shichen-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(184, 144, 71, 0.2);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
}
.time-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gold-solid, #b89047);
    margin-bottom: 8px;
    letter-spacing: 2px;
}
#live-digital-time {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    font-family: monospace;
}
#live-shichen-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffe699;
}

/* 中欄圓盤視覺 */
.clock-visual-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}
.meridian-circle-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, #1a2722 0%, #0a0f0d 100%);
    border: 4px solid rgba(184, 144, 71, 0.1);
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
}
.circle-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: #111614;
    border: 2px solid #b89047;
    border-radius: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(184, 144, 71, 0.3);
}
#core-organ {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}
#core-time-range {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* 12 時辰定位圓環 */
.ring-node {
    position: absolute;
    width: 54px;
    height: 54px;
    line-height: 52px;
    text-align: center;
    border-radius: 50%;
    background: rgba(22, 58, 48, 0.4);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    font-weight: bold;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

/* 🔥 命中目前時間時的 Striking 亮眼金光特效 */
.ring-node.active-now {
    background: #b89047;
    color: #111614;
    border-color: #ffe699;
    box-shadow: 0 0 25px #b89047, 0 0 10px #ffe699;
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 4;
}

/* 右欄面板 */
.info-card-highlight {
    background: rgba(184, 144, 71, 0.05);
    border: 2px solid #b89047;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.badge-active-now {
    display: inline-block;
    background: #c53030;
    color: #fff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    animation: pulse-red 2s infinite;
}
#info-meridian-title {
    font-size: 2rem;
    color: #ffe699;
    margin-bottom: 10px;
}
.meridian-effect-tag {
    display: inline-block;
    color: #4da6ff;
    border: 1px solid rgba(77, 166, 255, 0.4);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    background: rgba(77, 166, 255, 0.05);
}
.meridian-desc {
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    line-height: 1.7;
}

@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.03); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* 行動端 RWD 智慧切換 */
@media (max-width: 992px) {
    .meridian-clock-grid {
        grid-template-columns: 1fr; /* 🌟 轉為 1 列 1 欄垂直排列 */
        gap: 30px;
    }
    .meridian-circle-wrapper {
        margin: 20px auto;
    }
}

/* 讓周圍 12 個時辰圓點變成可點擊的按鈕 */
.ring-node {
    position: absolute;
    width: 54px;
    height: 54px;
    line-height: 52px;
    text-align: center;
    border-radius: 50%;
    background: rgba(22, 58, 48, 0.6);
    border: 1px solid rgba(184, 144, 71, 0.3);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: bold;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    cursor: pointer; /* 🌟 游標變成手指 */
    user-select: none;
}

/* 時辰按鈕滑鼠懸停 */
.ring-node:hover {
    background: rgba(184, 144, 71, 0.2);
    color: #ffe699;
    border-color: #ffe699;
    transform: translate(-50%, -50%) scale(1.1);
}

/* 點擊中高亮 */
.ring-node.active-now {
    background: #b89047;
    color: #111614;
    border-color: #ffe699;
    box-shadow: 0 0 25px #b89047, 0 0 10px #ffe699;
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 4;
}

/* 🌟 中央返回按鈕優化 */
.circle-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: #111614;
    border: 2px solid #b89047;
    border-radius: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(184, 144, 71, 0.3);
    cursor: pointer; /* 🌟 游標變成手指 */
    transition: all 0.3s ease;
}

/* 中央按鈕懸停效果 */
.circle-core:hover {
    background: #16241f;
    border-color: #ffe699;
    box-shadow: inset 0 0 30px rgba(184, 144, 71, 0.5), 0 0 15px rgba(184, 144, 71, 0.3);
}

.back-hint {
    font-size: 0.7rem;
    color: #b89047;
    margin-top: 5px;
    opacity: 0; /* 預設隱藏，滑鼠移入時才浮現，保持畫面乾淨 */
    transition: opacity 0.3s ease;
    letter-spacing: 1px;
}

.circle-core:hover .back-hint {
    opacity: 1;
    color: #ffe699;
}

/* 手動瀏覽模式下的標籤提示顏色（變成金色代表目前是手動檢視） */
.badge-active-now.manual-inspect {
    background: #b89047;
    color: #111614;
    animation: none;
}

/* 太陽與月亮圖示的精緻特效 */
#clock-sky-icon {
    font-size: 1.6rem;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

/* 當是太陽（白天）時的金色光暈 */
#clock-sky-icon .sun-svg {
    fill: #ffcc00;
    filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.8));
    //animation: rotate-sun 20s linear infinite; /* 太陽還會微微自轉 */
}

/* 當是月亮（黑夜）時的銀白冷光 */
#clock-sky-icon .moon-svg {
    fill: #e2e8f0;
    filter: drop-shadow(0 0 6px rgba(226, 232, 240, 0.8));
}

@keyframes rotate-sun {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 微調原本的中央按鈕，給圖示留下一點頂部空間 */
.circle-core {
    padding-top: 8px;
}

/* 經絡對照大區塊 */
.meridian-schematic-section {
    width: 100%;
    max-width: 850px;
    margin: 35px auto 0 auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 區塊大標題 */
.meridian-schematic-section .section-title {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 1px;
}

/* RWD 自適應網格：在寬螢幕下四欄並排，手機自動換行 */
.schematic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

/* 獨立圖卡 */
.schematic-card {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.schematic-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 204, 0, 0.4);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.08);
}

/* 陰陽標籤分類 */
.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}
.card-badge.yin { background: rgba(100, 180, 255, 0.2); color: #64b4ff; }
.card-badge.yang { background: rgba(255, 204, 0, 0.2); color: #ffcc00; }

.schematic-card h4 {
    font-size: 1.05rem;
    color: #ffffff;
    margin: 0 0 12px 0;
    text-align: left;
}

/* 包含的經絡標籤群 */
.meridian-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.meridian-tags span {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 3px 8px;
    border-radius: 20px;
}

/* 走向流程圖符號樣式 */
.route-map {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.route-map .loc {
    font-size: 0.85rem;
    color: #ffcc00;
    font-weight: 500;
}

.route-map .arrow {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

/* 走向詳細說明描述 */
.route-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
    text-align: justify;
}

.route-notice {
    font-size: 0.78rem;
    color: #ffcc00;
    margin: 0;
    padding-top: 1.0rem;
    line-height: 1.5;
    text-align: justify;
}

/* 1. 基礎設定（手機與電腦通用，或作為預設手機端） */
.meridian-schematic-section {
    width: calc(100% - 32px); /* 手機端預設留出左右間距 */
    margin: 20px auto;
    box-sizing: border-box;
}

.schematic-grid {
    display: grid; /* 👈 確保預設啟動 Grid 布局 */
    grid-template-columns: repeat(1, 1fr); /* 預設手機端 1 欄 */
    gap: 16px;
    width: 100%;
}

/* ⚠️ 重要：請確保你的基礎 .schematic-card 樣式裡有加上 transition 如下： */
.schematic-card {
    /* ... 你原本的 background, border 等設定 ... */
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease; /* 👈 讓高亮和懸停時的變化絲滑無比 */
}


/* 💻 2. 桌面端寬度與排版（螢幕 768px 以上） */
@media (min-width: 768px) {
    .meridian-schematic-section {
        width: 100%;
        max-width: 1440px; /* 與上方時鐘大容器等寬 */
        margin: 35px auto 0 auto; /* 頂部留空，左右置中 */
    }

    .schematic-grid {
        grid-template-columns: repeat(4, 1fr); /* 嚴格保持 1 排 4 欄 */
        gap: 20px;
    }
}


/* 🌟 3. 動態高亮卡片的樣式 */
.schematic-card.active-highlight {
    transform: translateY(-8px); /* 微微向上浮起更多，增加明顯度 */
    border-color: #ffcc00 !important; /* 強制變成金色邊框 */
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.25) !important; /* 加上精緻的金色霓虹光暈 */
    background: rgba(255, 204, 0, 0.05) !important; /* 背景微微調亮 */
}

/* ==========================================================================
   🎯 當前實際時間屬於 子丑寅酉戌亥 時，該外圍小圓圈獨享的外雙環鏤空特效
   ========================================================================== */
.ring-node.conditional-highlight-active {
    border: 2px solid #FFF2CC !important;       /* 內圈亮金邊 */
    outline: 2px solid var(--gold-solid) !important; /* 金色外環線 */
    outline-offset: 4px !important;            /* 外環與內圈的完美鏤空防擠壓間隙 */
    box-shadow:
            0 0 20px rgba(212, 175, 55, 0.6),
            inset 0 0 10px rgba(212, 175, 55, 0.3) !important;
    z-index: 30 !important; /* 提升層級，確保高亮不被遮擋 */
    animation: meridianDoubleRingPulse 2.5s infinite ease-in-out !important;
}

@keyframes meridianDoubleRingPulse {
    0% {
        outline-color: var(--gold-solid);
        outline-offset: 4px !important;
        transform: translate(-50%, -50%) scale(1.0) !important;
    }
    50% {
        outline-color: #FFECA8;
        outline-offset: 6px !important; /* 呼吸時外環微微擴張，極具動態生命力 */
        transform: translate(-50%, -50%) scale(1.06) !important;
    }
    100% {
        outline-color: var(--gold-solid);
        outline-offset: 4px !important;
        transform: translate(-50%, -50%) scale(1.0) !important;
    }
}

.ring-node.active-now.conditional-highlight-active {
    border: 2px solid #FFF2CC !important;
    outline: 2px solid var(--gold-solid) !important; /* 金色外環線 */
    outline-offset: 4px !important;            /* 外環與內圈的間隙 */
    box-shadow:
            0 0 20px rgba(212, 175, 55, 0.6),
            inset 0 0 10px rgba(212, 175, 55, 0.3) !important;
    z-index: 30 !important;
    animation: meridianDoubleRingPulse 2.5s infinite ease-in-out !important;
}

/* 🔄 當時間到了（Time up），只剩下普通 .active-now 時的普通樣式（Normal） */
.ring-node.active-now {
    border: 2px solid var(--gold-solid) !important; /* 普通單層邊框，沒有外面那圈大 outline 鏤空環 */
    outline: none !important;                      /* 強制關閉外環線 */
    outline-offset: 0px !important;
    box-shadow: none !important;                    /* 拔掉強烈發光 */
    animation: none !important;                     /* 停止呼吸動畫 */
}

/* 💻 電腦版大螢幕時：把時長欄位後面的手機版價格隱藏起來 */
@media (min-width: 768px) {
    .td-duration .d-md-none {
        display: none !important;
    }
}

/* 📱 手機版小螢幕時：確保原本的表格價格欄位乖乖聽話 */
@media (max-width: 767px) {
    .td-price {
        display: none !important;
    }
}

/* 📱 底部列基礎容器 (維持你原本最愛的黑底) */
.mobile-action-dock {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0c100e !important; /* 極致深墨黑底 */
    padding: 10px 16px;
    height: 70px;
    box-sizing: border-box;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.6);
}

/* ==========================================================================
   ✦ BUSINESS HOURS MODAL WINDOW (非營業時間提示彈窗)
   ========================================================================== */
.time-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 柔和背影遮罩 */
    z-index: 10000; /* 確保在最上層 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 當 Modal 被啟動時的 class */
.time-modal-overlay.is-active {
    opacity: 1 !important;
    visibility: visible !important;
}

.time-modal-content {
    background-color: #f4ede2 !important; /* 搭配你最愛的電話按鈕柔霧象牙白，極具質感 */
    width: 85%;
    max-width: 340px;
    padding: 30px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.time-modal-overlay.is-active .time-modal-content {
    transform: scale(1);
}

.time-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.time-modal-content h3 {
    margin: 0 0 10px 0;
    color: #163a30; /* 品牌深墨綠 */
    font-size: 1.2rem;
    font-weight: 700;
}

.time-modal-content p {
    margin: 0 0 14px 0;
    color: #555555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.time-modal-content .highlight-text {
    background-color: rgba(22, 58, 48, 0.05);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px dashed rgba(184, 144, 71, 0.4);
}

.time-modal-btn {
    background-color: #163a30 !important; /* 墨綠色高級按鈕 */
    color: #f4ede2 !important;
    border: none;
    padding: 10px 30px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(22, 58, 48, 0.2);
    width: 100%;
}
.time-modal-btn:active {
    transform: scale(0.97);
}


/*123123**************************************************************************/
/* 語系外層容器 */
.nav-lang-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0 10px 0; /* 給予上下呼吸空間 */
    width: 100%;
}

/* 🎯 強化後的顯眼深色外框 */
.lang-row-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 85%; /* 限制寬度，集中視覺 */
    max-width: 280px;
    background: #111614; /* 強烈對比的深黑綠底色 */
    padding: 6px 12px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 地球圖標 */
.lang-globe {
    font-size: 16px;
    color: #ffe699; /* 地球直接用金色，更搶眼 */
    margin-right: 4px;
}

/* 語系按鈕基本樣式 */
.lang-link {
    background: none;
    border: none;
    color: #999999; /* 未選中時是清楚的灰色 */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.lang-link:hover {
    color: #fff;
}

/* 🎯 點擊選中後的高亮樣式：金色文字、帶有高質感的微發光金色背景框 */
.lang-link.active {
    color: #111614 !important; /* 文字改為深色，防隱形 */
    background-color: #ffe699 !important; /* 顯眼的金色背景框 */
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 230, 153, 0.4);
}

/* 💻 電腦版微調 (維持原本置右橫排造型) */
@media (min-width: 769px) {
    .nav-lang-item {
        padding: 0;
        margin-left: 15px;
        width: auto;
    }
    .lang-row-container {
        width: auto;
        max-width: none;
        background: rgba(255, 255, 255, 0.05);
    }
}


/*THREAD**************************************************/
/* 🎯 1. 微調容器，確保加了第 5 個按鈕後依然等距完美平分空間 */
.mobile-action-dock {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
}

/* 防止所有捷徑按鈕在小螢幕手機上被推擠壓扁 */
.mobile-action-dock > a {
    flex-shrink: 0;
}

/* 🎯 2. Threads 的樣式與背景圖標 */
/* 🎯 最終比例校正：放大圓圈、並把左右間距拉開 */
.mobile-action-dock .dock-threads-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* 🌟 1. 放大圓圈體積：從 36px 提升到 38px，與 FB 圓圈完美等高 */
    width: 40px;
    height: 40px;

    /* 2. 圓圈本體保持精緻白細線 */
    border: 1px solid #ffffff !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;

    /* 3. 調整內文字體，維持優雅比例 */
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Noto Sans TC', sans-serif;
    text-decoration: none;
    letter-spacing: 0.5px;

    /* 🌟 4. 關鍵修正：加上左右外距，把左邊的 FB 和右邊的信封溫柔地推開 */
    margin: 0 6px !important;

    /* 5. 確保點擊時在同一個中心點縮放 */
    box-sizing: border-box;
    transition: all 0.15s ease;
}

/* 🖱️ 點擊反饋 */
.mobile-action-dock .dock-threads-text:active {
    transform: scale(0.9);
    opacity: 0.7;
}

/* ==========================================================================
   ✦ WEATHER WELLNESS MODULE STYLES
   ========================================================================== */
.hours-card {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: #fff;
    border: 1px solid rgba(184, 144, 71, 0.15);
    border-radius: 16px;
    padding: 30px;
}

@media (min-width: 992px) {
    .hours-card {
        flex-direction: row; /* Forces left info pane and right map pane side-by-side */
        align-items: stretch;
    }
    .hours-info-pane, .hours-map-pane {
        flex: 1;
        width: 50%;
    }
    .hours-map-pane {
        border-radius: 12px;
        overflow: hidden;
    }
}

.weather-wellness-wrapper {
    background: rgba(22, 58, 48, 0.02);
    border: 1px solid rgba(184, 144, 71, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-top: 15px;
}
.weather-header {
    border-bottom: 1px dashed rgba(184, 144, 71, 0.2);
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.weather-body {
    display: flex;
    align-items: center;
    gap: 40px;
}
.weather-temp-block {
    font-size: 2.6rem;
    font-weight: 700;
    color: #163a30;
}
.weather-temp-block .unit {
    font-size: 1.3rem;
    color: #b89047;
    vertical-align: super;
}
.weather-meta-block {
    display: flex;
    gap: 30px;
}
.meta-item {
    display: flex;
    flex-direction: column;
}
.meta-lbl {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 4px;
}
.meta-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

/* ==========================================================================
   ✦ MOBILE MOBILE WEATHER OPTIMIZATION (Fixes text overflow/clipping)
   ========================================================================== */
@media (max-width: 767px) {
    /* 1. Ensure the parent wrapper sits neatly within its padding bounds */
    .weather-wellness-wrapper {
        padding: 16px;
        margin-top: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    /* 2. Change the layout alignment from horizontal row to vertical stacked column */
    .weather-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        width: 100%;
    }

    /* 3. Center the temperature display prominently on top */
    .weather-temp-block {
        font-size: 2.8rem;
        margin-bottom: 5px;
        width: 100%;
        display: block;
        text-align: center;
    }

    /* 4. Split the metadata into a perfectly spaced 2-column grid row below the temp */
    .weather-meta-block {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        width: 100%;
        border-top: 1px dashed rgba(184, 144, 71, 0.15);
        padding-top: 16px;
    }

    /* 5. Clean up item alignment within the grid cells */
    .meta-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .meta-lbl {
        font-size: 0.8rem;
        margin-bottom: 4px;
        white-space: nowrap; /* Prevents titles from breaking into awkward second lines */
    }

    .meta-val {
        font-size: 1.05rem;
        line-height: 1.3;
        word-break: break-all; /* Gracefully handles long text strings like '多雲有雷陣雨' */
    }
}


/* ==========================================================================
   ✦ TIMELINE MOBILE ANTI-WRAP OPTIMIZATION
   ========================================================================== */
@media (max-width: 767px) {
    /* 1. Reduce the main card container padding to give the text inner running space */
    .hours-card {
        padding: 20px 16px;
    }

    /* 2. Break timeline item elements into a top-and-bottom stacked layout */
    .hours-timeline li {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 0;
        border-bottom: 1px solid rgba(184, 144, 71, 0.1);
    }

    /* 3. Allow text blocks to stretch wide without limits */
    .hours-timeline .day,
    .hours-timeline .time {
        display: block;
        width: 100%;
        white-space: nowrap; /* Forces text to stay on one elegant row */
        text-align: left;
    }

    /* 4. Fine-tune font sizes to fit perfectly within standard phone widths */
    .hours-timeline .day {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--primary-deep, #163a30);
    }

    .hours-timeline .time {
        font-size: 1rem;
        color: var(--gold-solid, #b89047);
    }
}

/* ==========================================================================
   ✦ YouTube Short Aspect Ratio 9:16
   ========================================================================== */
/* Container holding your video collection cards */
#youtube-video-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Individual Card Item */
.video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 🌟 The magic trick: Set the aspect ratio padding to 9:16 vertical (177.78%) */
.video-responsive-wrapper {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* Formula: (16 / 9) * 100% = 177.777... */
    height: 0;
    background-color: #000;
}

/* Let the iframe stretch seamlessly inside the vertical box padding bounds */
.video-responsive-wrapper iframe,
.video-responsive-wrapper div[id^="yt-player-"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* ==========================================================================
   ✦ FOOTER SECTION (Styled like Booking Section with Gray Text)
   ========================================================================== */
.footer-wrapper,
.site-footer {
    background-color: var(--bg-pure); /* Matches the pure white/neutral card background used in the booking section */
    border-top: 1px solid rgba(184, 144, 71, 0.2); /* Elegant subtle gold border */
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted); /* Uses your defined soft gray/muted text token (#5a6b66) */
    font-size: 0.95rem;
    box-shadow: 0 -10px 30px rgba(22, 58, 48, 0.04); /* Soft premium top shadow */
}

.site-footer p {
    margin: 8px 0;
    color: var(--text-muted); /* Ensures all paragraph text stays in gray */
}

.site-footer .footer-note {
    font-size: 0.85rem;
    color: var(--gold-solid); /* Accent gold color for notes/links */
    opacity: 0.9;
}

/* 🌟 實體班上課地點與聯絡電話列 RWD 微調 */
@media (max-width: 768px) {
    .course-location-contact-bar {
        padding: 12px 20px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
}

/* 🌟 Google Maps 圖示互動效果 */
.map-link img.map-icon {
    transition: transform 0.2s ease, filter 0.2s ease;
    vertical-align: middle;
}

.map-link:hover img.map-icon {
    transform: scale(1.1);
    filter: brightness(1.15);
}
