/**
 * Education3 — Color Scheme Option 3 Implementation
 * ==================================================
 * 方案 3 配色系統重構：
 * - 主色 (Medical Deep Navy): #0F2C4C
 * - 亮橘 (Bright Orange): #F26419
 * - 光學青綠 (Optical Turquoise): #6BB31E
 * - 中性背景色 (Neutral Light Gray): #F0F4F8
 * - 頁尾 (Deep Navy Blue): #0A1C30
 */

/* ──────────────────────────────────────────
   1. 色彩變數定義
   ────────────────────────────────────────── */
:root {
    --medical-deep-navy: #0F2C4C;
    --bright-orange: #F26419;
    --optical-turquoise: #6BB31E;
    --neutral-light-gray: #F0F4F8;
    --deep-navy-blue: #0A1C30;

    --blue_900: #0F2C4C;
    --blue_800: #133A63;
    --blue_700: #1B4E82;
    --blue_600: #2664A3;
    --blue_500: #3B7DC4;
    --blue_400: #5D99DC;
    --blue_300: #88B7EA;
    --blue_200: #BDD8F5;
    --blue_100: #E6F0FA;

    --bg-main: var(--medical-deep-navy);
    --bg-main-solid: #0F2C4C;
}

/* ──────────────────────────────────────────
   2. 頁面底色：明亮中性灰藍 (#F0F4F8)
   ────────────────────────────────────────── */
body {
    background-color: var(--neutral-light-gray) !important;
    background-image: none !important;
    color: #1E293B;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ──────────────────────────────────────────
   3. Header 頂部導覽列：醫療深藍 (#0F2C4C)
   ────────────────────────────────────────── */
header,
#Head,
.header {
    background-color: var(--medical-deep-navy) !important;
    box-shadow: 0 4px 16px rgba(15, 44, 76, 0.12);
}

.header a,
.navBox a {
    color: #ffffff !important;
}

.header a:hover,
.navBox a:hover {
    color: #FFEDD5 !important;
}

/* Header 次選單 */
.header-secondary-menu {
    background-color: #0B223C !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-secondary-menu::before,
.navBox ul li ul::before {
    border-color: transparent transparent #0B223C transparent !important;
}

.header-secondary-menu a {
    color: #E2E8F0 !important;
}

.header-secondary-menu a:hover {
    background-color: var(--medical-deep-navy) !important;
    color: #ffffff !important;
}

/* ──────────────────────────────────────────
   4. 卡片區塊：最新消息 & 學術課程 (白底清爽卡片)
   ────────────────────────────────────────── */
.IndexNewsBox {
    height: 100%;
    padding: 0;
    background: #ffffff !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 44, 76, 0.05) !important;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.IndexNewsBox:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 44, 76, 0.1) !important;
}

/* 卡片標頭裝飾 */
.IndexNewsBox> :first-child {
    padding: 1.25rem 1.5rem;
    background: #F8FAFC !important;
    border-bottom: 1px solid #E2E8F0 !important;
    position: relative;
}

.IndexNewsBox> :first-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--bright-orange);
    border-radius: 0 0 4px 0;
}

.IndexNewsBox h2,
.IndexNewsBox h2.h1,
.IndexNewsBox .h1 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 0 !important;
    color: var(--medical-deep-navy) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    filter: none !important;
}

.IndexNewsBox h2 img {
    width: 22px;
    height: 22px;
}

.IndexNewsBox>ul {
    padding: 0.5rem 0.75rem 1rem;
}

/* ──────────────────────────────────────────
   5. 列表項目：清爽條目
   ────────────────────────────────────────── */
.IndexNewsItem {
    display: block;
    color: #334155 !important;
    background: #ffffff !important;
    border: 1px solid #F1F5F9 !important;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    text-decoration: none;
    margin: 0.4rem 0.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.IndexNewsItem:hover {
    background: #F8FAFC !important;
    border-color: #CBD5E1 !important;
    color: var(--medical-deep-navy) !important;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(15, 44, 76, 0.06);
}

/* 日期行 */
.IndexNewsItem .fz_12 {
    color: #64748B !important;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
}

.IndexNewsItem .Content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B !important;
    max-width: 72%;
    line-height: 1.4;
    letter-spacing: 0.01em;
    margin-right: 0.75rem;
}

.IndexNewsItem:hover .Content h4 {
    color: var(--medical-deep-navy) !important;
}

/* More 按鈕 */
.IndexNewsItem .textBtn_73 {
    color: #64748B !important;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.IndexNewsItem:hover .textBtn_73 {
    color: var(--bright-orange) !important;
}

.IndexNewsItem:hover .textBtn_73 img {
    transform: translateX(4px);
}

/* ──────────────────────────────────────────
   6. 光學青綠標籤 (Optical Turquoise Tag)
   ────────────────────────────────────────── */
.LabelMembersOnly {
    text-decoration: none;
    font-size: 11px;
    border: 1px solid rgba(107, 179, 30, 0.4) !important;
    color: var(--optical-turquoise) !important;
    background: rgba(107, 179, 30, 0.08) !important;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.LabelMembersOnly:hover {
    border-color: var(--optical-turquoise) !important;
    color: #ffffff !important;
    background: var(--optical-turquoise) !important;
}

/* ──────────────────────────────────────────
   7. 亮橘 CTA 按鈕 (Bright Orange Button)
   ────────────────────────────────────────── */
.Btn_BlueSolid {
    display: inline-block;
    vertical-align: middle;
    text-decoration: none;
    padding: 0.55rem 1.4rem;
    color: #ffffff !important;
    background: linear-gradient(135deg, #F26419 0%, #EA580C 100%) !important;
    border: 1px solid transparent;
    border-radius: 50px;
    white-space: nowrap;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(242, 100, 25, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.Btn_BlueSolid:hover {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 14px;
    background: linear-gradient(135deg, #FF7A33 0%, #F26419 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(242, 100, 25, 0.45);
}


/* 通用灰框按鈕 (淺色背景頁面) */
.Btn_GrayFrame {
    display: inline-block;
    vertical-align: middle;
    background-color: #ffffff !important;
    border: 1px solid #CBD5E1 !important;
    color: #334155 !important;
    border-radius: 50px;
    padding: 0.55rem 1.4rem;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}

.Btn_GrayFrame:hover {
    background-color: #F8FAFC !important;
    border-color: var(--medical-deep-navy) !important;
    color: var(--medical-deep-navy) !important;
}

/* Header 導覽列中的會員註冊按鈕 (深藍背景上的透明外框按鈕，大小與字體與會員登入完全一致) */
header .Btn_GrayFrame,
.header .Btn_GrayFrame {
    display: inline-block;
    text-decoration: none;
    padding: 0.55rem 1.4rem;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header .Btn_GrayFrame:hover,
.header .Btn_GrayFrame:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* ──────────────────────────────────────────
   8. 行事曆樣式強化 (Calendar Restyle)
   ────────────────────────────────────────── */
.CalendarBox {
    background: #ffffff !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 44, 76, 0.05) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.CalendarTitle {
    background: var(--bright-orange) !important;
    color: #ffffff !important;
    padding: 1rem 1.5rem;
}

.CalendarTitle h3 {
    color: #ffffff !important;
    font-weight: 700;
    margin: 0;
}

.CalendarTitle a {
    display: inline-block !important;
    color: #0F2C4C !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    padding: 0.3rem 0.75rem !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    margin-left: 4px !important;
    margin-right: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease !important;
}

.CalendarTitle a:hover {
    background-color: #FFF7ED !important;
    color: #F26419 !important;
    border-color: #ffffff !important;
    transform: translateY(-1px);
}

.el-calendar_body {
    background: #ffffff !important;
    padding: 1rem;
}

.el-calendar-table td.is-today {
    color: var(--bright-orange) !important;
    font-weight: bold;
}

.el-calendar-table td.is-selected {
    background-color: rgba(242, 100, 25, 0.1) !important;
    color: var(--bright-orange) !important;
}

/* ──────────────────────────────────────────
   9. 下方區塊背景
   ────────────────────────────────────────── */
.IndexBelowBg {
    background: none !important;
    padding-bottom: 6rem;
    position: relative;
}

/* ──────────────────────────────────────────
   10. 回到頂部按鈕
   ────────────────────────────────────────── */
.ScorollTop button {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--medical-deep-navy);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(15, 44, 76, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ScorollTop button:hover {
    background: var(--bright-orange);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(242, 100, 25, 0.4);
}

.ScorollTop button img {
    width: 20px;
    height: 20px;
    filter: brightness(10);
}

/* ──────────────────────────────────────────
   11. 頁尾 Footer：深藍 (#0A1C30)
   ────────────────────────────────────────── */
.footer,
#footer {
    color: #94A3B8 !important;
    background-color: var(--deep-navy-blue) !important;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer a {
    color: #CBD5E1 !important;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer a:hover {
    color: var(--bright-orange) !important;
}

.footer .CompanyInformation li {
    color: #94A3B8 !important;
    font-size: 13px;
}

/* ──────────────────────────────────────────
   12. SpacePush 間距
   ────────────────────────────────────────── */
.SpacePush {
    padding-top: 3.5rem;
    position: relative;
    z-index: 1;
}

/* ──────────────────────────────────────────
   13. 響應式調整
   ────────────────────────────────────────── */
@media (max-width: 991.98px) {

    /* 手機版展開主選單背景與 Header 顏色一致 */
    .navBox,
    .navBox.active {
        background-color: var(--medical-deep-navy) !important;
    }

    /* 手機版次選單背景與 Header 顏色一致 */
    .navBox ul li ul,
    .header-secondary-menu {
        background-color: var(--medical-deep-navy) !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* 手機版隱藏小三角形 */
    .navBox ul li ul::before,
    .header-secondary-menu::before {
        display: none !important;
        content: none !important;
    }

    /* 行事曆手機版左右滑動支援 */
    .CalendarBox {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .CalendarContant {
        min-width: 750px !important;
    }

    .IndexBelowBg {
        padding-bottom: 5rem;
    }

    .IndexNewsBox {
        border-radius: 14px;
    }

    .IndexNewsItem {
        padding: 0.7rem 0.85rem;
    }

    .SpacePush {
        padding-top: 2rem;
    }
}

/* ──────────────────────────────────────────
   登入按鈕樣式修正 (.Btn_Login)
   ────────────────────────────────────────── */
.Btn_Login {
    background-color: #F26419 !important;
    color: #ffffff !important;
    transition: background-color 0.2s ease-in-out;
}

.Btn_Login:hover {
    background-color: #ea580c !important;
    color: #ffffff !important;
}

/* ──────────────────────────────────────────
   各地驗光所列表樣式與 LatestNews 統一 (.OptometryClinicsItem)
   ────────────────────────────────────────── */
.OptometryClinicsItem {
    display: block !important;
    color: #334155 !important;
    background: #ffffff !important;
    border: 1px solid #F1F5F9 !important;
    border-radius: 12px !important;
    padding: 0.85rem 1.25rem !important;
    text-decoration: none !important;
    margin: 0.4rem 0.25rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: none !important;
}

.OptometryClinicsItem:hover {
    background: #F8FAFC !important;
    border-color: #CBD5E1 !important;
    color: var(--medical-deep-navy) !important;
    transform: translateX(4px) !important;
    box-shadow: 0 4px 16px rgba(15, 44, 76, 0.06) !important;
}

.OptometryClinicsItem .Content h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1E293B !important;
    max-width: 100% !important;
    line-height: 1.4 !important;
    letter-spacing: 0.01em !important;
    margin-bottom: 0.25rem !important;
}

.OptometryClinicsItem:hover .Content h4 {
    color: var(--medical-deep-navy) !important;
}

.OptometryClinicsItem .textBtn_73 {
    color: #64748B !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.OptometryClinicsItem:hover .textBtn_73 {
    color: var(--bright-orange) !important;
}

.OptometryClinicsItem:hover .textBtn_73 img {
    transform: translateX(4px) !important;
    transition: transform 0.3s ease !important;
}