/* ==========================================================================
   1. 全域變數與基本設定
   ========================================================================== */
:root {
       --primary-blue: #183697;
    --secondary-blue: #063bbe;
    --accent-yellow: #FAEE2B;
    --bright-yellow: #ffeb3b;
    --text-dark: #111111;
    --text-muted: #333333;
    --bg-light: #f9fafe;
    --white: #ffffff;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
}
.text_w{color:#ffffff; font-size: 1.1rem; line-height: 1.3; text-align: center;}
p{ color:#f111; font-size: 1.1rem; line-height: 1.3;}
html {
    scroll-behavior: smooth;
}
.mt{ display: block!important;margin: 0 auto!important;}
body {
   font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);

    background-image: url("img/BG.jpg");
    background-repeat: repeat-y;      /* 垂直重複 */
    background-position: top center;  /* 從上方置中開始 */
    background-size: 100% auto;       /* 寬度滿版，高度依比例 */

    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 60px;
}
h2{ font-size: 2.5rem!important; line-height: 1.3;  color:#FAEE2B!important;}
img {
    max-width: 100%;
    height: auto;
    display: block;
 
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.section {
    padding: 80px 0 30px;
    position: relative;
}

/* ==========================================================================
   2. 導覽列與選單 (Navbar & Mobile Menu)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--primary-blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 1000;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-logo {
    display: flex;
    align-items: center; /* 垂直居中 */
}

/* 點擊連結與圖片設定 */
.nav-logo a {
    display: inline-block;
    line-height: 0; /* 避免圖片下方出現多餘空白 */
}

/* Logo 圖片 RWD 縮放 */
.nav-logo img {
    max-width: 100%;    /* 不會超出父容器 */
    height: auto;       /* 自動維持原比例 */
    width: 90px;        /* 預設寬度設定（可依需求微調） */
    transition: width 0.3s ease; /* 平滑縮放動畫效果 */
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent-yellow);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* 選單開關三條線轉叉叉動畫 */
.menu-toggle.open .bar:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-toggle.open .bar:nth-child(2) { opacity: 0; }
.menu-toggle.open .bar:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ==========================================================================
   3. 裝飾性圖片與飄浮動畫 (Decor Images)
   ========================================================================== */
.decor-img {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    object-fit: contain;
}

/* 左側煙火/裝飾 */
.firework-left {
    top: 20px;
    left: 2%;
    width: 300px;
    height: 300px;
}

/* 右側煙火/裝飾 */
.firework-right {
    top: 20px;
    right: 2%;
    width: 300px;
    height: 300px;
}

/* 右下條紋裝飾 */
.stripe-decor {
    bottom: -10px;
    right: 3%;
    width: 25px;
    height: 250px;
}

/* 飄浮 Keyframes 動畫 (上下輕微上下晃動) */
@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes floatAnimationSlow {
    0% { transform: translateY(0px); }
    50% { transform: translateY(18px); }
    100% { transform: translateY(0px); }
}

.float-anim {
    animation: floatAnimation 4.5s ease-in-out infinite;
}

.float-anim-slow {
    animation: floatAnimationSlow 6.5s ease-in-out infinite;
}

/* ==========================================================================
   4. 標題與 Hero 主視覺區塊
   ========================================================================== */
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-blue);
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.pb-20{padding-bottom: 20px!important;}
.section-sub-heading {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-blue);
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: #111111;
    margin: 20px 0 10px 0;
}

.accent-text {
    color:#FAEE2B;
    font-size: 3rem;
    font-weight: 700;
}

.highlight-yellow {
    color: var(--accent-yellow);
    font-size: 1.4em;
    font-weight: 900;
}

.hero-section {
    background-image: url('img/hero.jpg'); 
    background-size: cover;  
    background-position: center;  
    background-repeat: no-repeat; 
    color: var(--white);
    padding: 30px 0 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.brand-logo {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.brand-logo img {
    max-width: 100%;    /* 限制圖片最大寬度不超過父容器 */
    height: auto;       /* 自動維持原比例，避免變形 */
    width: 700px;       /* 設定電腦版 Logo 尺寸（可依需求微調） */
}

.main-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.sub-banner-badge {
    display: inline-block;
    border: 2px solid var(--accent-yellow);
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.2);
}

.price-box {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    display: inline-flex;
    align-items: baseline;
    padding: 10px 35px;
    border-radius: 40px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.price-label {
    font-size: 1.1rem;
    font-weight: 700;
    margin-right: 10px;
}

.price-box .currency { font-size: 1.5rem; font-weight: 900; }
.price-box .amount { font-size: 3rem; font-weight: 900; line-height: 1; }

/* ==========================================================================
   5. 通用網格與卡片
   ========================================================================== */
.grid { display: grid; gap: 25px; padding: 20px;}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

:root {
    --white: #ffffff;
    --border-radius: 12px;
    --shadow: 0 10px 20px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --primary-yellow: #FFD700; /* 強調黃色 */
}

.card {
    text-align: center;
    transition: all 0.3s ease;
}

/* 外層圖片容器 */
.card-img-wrap {
    position: relative;
    border-radius: 30px;          /* 圓角統一設定在容器上 */
    background-color: #ffffff;    /* 白底 */
    border: 2px solid #FAEE2B;    /* 黃色邊框 */
    overflow: hidden;             /* 裁切超出範圍的內容 */
    
    /* 設定黃色陰影 */
    box-shadow: 5px 5px 0px #FAEE2B; 
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-img-wrap img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    background-color: #ffffff; 
}

/* 落在後方的黃色色塊效果 */
.card-img-wrap::after {
    content: '';
    position: absolute;
    /* 讓色塊從右下角凸出來 */
    top: 0px;
    left: 0px;
    right: -15px;
    bottom: -15px;
    background-color: #FAEE2B; /* 黃色背景 */
    border-radius: 30px;
    z-index: -1;               /* 放在圖片後方 */
    transition: all 0.3s ease;
}

/* 卡片標題 */
.card-title {
    margin-top: 25px;
    font-size: 1.5rem;
    font-weight: 700;
      color:#ffffff;
    letter-spacing: 1px;
}

/* ======= Hover 懸停效果 ======= */

/* 懸停時，圖片容器向上滑動 */
.card:hover .card-img-wrap {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0px #FAEE2B;
}

/* 懸停時，黃色陰影稍微微調增加層次感 */
.card:hover .card-img-wrap::after {
    transform: translate(5px, 5px);
}

/* ==========================================================================
   6. 精選好書區塊 (六欄式排版，每排 6 本書)
   ========================================================================== */
.book-section-wrapper {
    position: relative;
    border-radius: 30px;
    background-color: #ffffff;
    border: 2px solid #FAEE2B;
    overflow: hidden;
    box-shadow: 5px 5px 0px #FAEE2B;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 使用偽元素製作背景底色層 */
.book-section-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* 高度設定為整體高度的一部分，露出下方的黃色 */
    height: 85%;
    
    background: var(--white);
    border-radius: var(--border-radius);
    z-index: -1;                /* 放在內容下方、容器背景上方 */
}

/* 確保內部內容在視覺上位於上方 */
.book-section-wrapper * {
    position: relative;
    z-index: 2;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    align-items: center;
}

.book-item {
    background: transparent;
    padding: 0;
    box-shadow: none;
    text-align: center;
    transition: var(--transition);
}

.book-item:hover {
    transform: translateY(-6px) scale(1.05);
}

.book-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    padding: 30px 5px;
}

/* ========================================================================== */
/* 科技特色 */
/* ========================================================================== */

.text_y{
    color:#FAEE2B;
    font-size:1.8rem;
    font-weight:700;
    line-height:1.3;
    margin-bottom:18px;
}

.text_white{
    color:#fff;
    font-size:1.15rem;
    line-height:1.5;
}

/* 卡片 */
.pt-50{ padding-top: 50px;}
.tech-card{
    position: relative;
    overflow: visible;
    border-radius: 20px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    transition: .35s;
    isolation: isolate;
}

/* 流動框線 */
.tech-card::after{
    content:"";
    position:absolute;
    inset:-2px;
    border-radius:22px;
    z-index:-1;

    background:conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 260deg,
        #FAEE2B 285deg,
        #FFF98A 305deg,
        #FAEE2B 325deg,
        transparent 360deg
    );

    animation:borderRotate 3s linear infinite;
}

/* 中間挖空，只留下邊框 */
.tech-card::after{
    filter:
        drop-shadow(0 0 3px rgba(250,238,43,.6))
        drop-shadow(0 0 10px rgba(250,238,43,.35));
}
/* 旋轉動畫 */

.tech-card:hover{
    transform:translateY(-8px);
}

/* 背景圖片 */

.yellow-circle-icon{
    position:absolute;
    inset:0;
    z-index:0;
    border-radius:20px;
    overflow:hidden;
}

.circle-icon-img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

/* 漸層遮罩 */

.tech-card::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:1;
    border-radius:20px;

    background:linear-gradient(
        to top,
        rgba(0,0,0,.95) 0%,
        rgba(0,0,0,.75) 38%,
        rgba(0,0,0,.25) 68%,
        rgba(0,0,0,0) 100%
    );
}

/* 黃色ICON */

.card-icon{
    position:absolute;
    top:-45px;
    left:50%;
    transform:translateX(-50%);
    width:80px;
    height:80px;
    background:#FAEE2B;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:3;

    box-shadow:
        0 15px 35px rgba(250,238,43,.35),
        inset 0 2px 6px rgba(255,255,255,.45);
}

.card-icon img{
    width:64px;
    height:64px;
    object-fit:contain;
}

/* 文字 */

.tech-card-body{
    position:relative;
    z-index:2;
    padding:0 15px 20px;
}
/* ==========================================================================
   8. 推薦見證輪播區塊 (輪播圖 + 文字說明組合)
   ========================================================================== */
.carousel-wrapper {
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px 30px 0;
    box-shadow: var(--shadow);
    /* 如果希望卡片內容滿版，建議不用 flex 擠壓 track */
    display: block; 
}
.carousel-track-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-content {
  display: flex;
    align-items: center;
    gap: 35px;
    padding: 10px; /* 原有的 padding */
    /* ★ 改為下方設定，或是額外加上左右 padding */
    padding-left: 80px;
    padding-right: 80px;
}

.carousel-img { flex-shrink: 0; width: 200px; }

.carousel-text h3 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
     text-align: left;
}

.carousel-text .subtitle {
    font-weight: 700;
    color: var(--secondary-blue);
    margin-bottom: 15px;
     text-align: left;
}

.carousel-text .desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
}

.carousel-btn {
    position: absolute;      /* ★ 改為絕對定位，讓它浮起來 */
    top: 50%;               /* 垂直居中 */
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;

}

/* ★ 左按鈕：距離左邊內縮 20px */
.prev-btn {
    left: 20px;
}

/* ★ 右按鈕：距離右邊內縮 20px */
.next-btn {
    right: 20px;
}

.btn-arrow-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.carousel-btn:hover {
   
   
}

.carousel-btn:hover .btn-arrow-img {
    filter: brightness(2);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color:#fff;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dots .dot.active {
    background-color:#FAEE2B;
    width: 28px;
    border-radius: 10px;
}

/* ==========================================================================
   9. 點選查看詳情 (圓形 Icon + 連結)
   ========================================================================== */
.detail-link-container {
    text-align: center;
    margin-top: 10px;
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.detail-link:hover {
    color: var(--primary-blue);
}

/* ==========================================================================
   10. 方案價格與獎品卡片區塊
   ========================================================================== */
.plan-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
}

.yellow-badge {
    position: absolute;
    top: 0px;
    right: 0;
    background: var(--accent-yellow);
    color: var(--primary-blue);
    font-weight: 900;
    padding: 5px 15px;
    border-radius: 0 12px 0 20px;
    font-size: 1.5rem;
}

.plan-img-wrap { margin: 20px 0; }
.plan-img-wrap img {
    width: 80%;
    height: auto;     /* 自動維持原比例 */
    display: block;   /* 轉為區塊元素以便水平居中 */
    margin: 0 auto;   /* 上下 0，左右自動，置中 */
}

.plan-title { font-size: 1.25rem; color: var(--primary-blue); margin-bottom: 10px; }
.plan-price, .price { font-size: 1.1rem; font-weight: normal; margin-bottom: 20px; color: #111111; }
.plan-price span, .price span { color: #d32f2f; font-size: 2rem; font-weight: 900; }

.btn-buy {
     padding: 10px 24px;
    background: linear-gradient(180deg, #FFF85A 0%, #FAEE2B 55%, #E8D300 100%);
    border: 1px solid #FFD500;
    border-radius: 10px;
    color: #183697;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    margin-top: 5px;

    /* 立體效果 */
    box-shadow:
        0 4px 0 #C9B100,
        0 6px 12px rgba(0,0,0,.25),
        inset 0 3px 5px rgba(255,255,255,.7),
        inset 0 -3px 6px rgba(0,0,0,.12);

    transition: all .25s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

/* Hover */
.btn-buy:hover{
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow:
        0 4px 0 #C9B100,
        0 6px 12px rgba(0,0,0,.3),
        inset 0 3px 5px rgba(255,255,255,.8),
        inset 0 -3px 6px rgba(0,0,0,.12);
}

/* 點擊 */
.btn-buy:active{
    text-decoration: none;
    transform: translateY(5px);
    box-shadow:
        0 3px 0 #C9B100,
        0 6px 12px rgba(0,0,0,.2),
        inset 0 3px 5px rgba(255,255,255,.5);
}

.gift{font-size: 1.5rem;
    color: var(--primary-blue);
    margin: 15px 0 10px;
    min-height: 48px;
    line-height: 1.3;
    font-weight: bold;}

.btn-buy:hover {
    background: var(--bright-yellow);
    transform: scale(1.02);
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card h4 {
      font-size: 1.5rem;
    color: var(--primary-blue);
    margin: 15px 0 10px;
    min-height: 48px;
    line-height: 1.3;
}

.prize-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}
.prize-card p{
  font-size: 1.2rem;
    line-height: 1.3;
    color:#111111;
    text-align: center;
    padding:0;
    letter-spacing: -1px;
}

.prize-name { font-weight: 700; color: var(--primary-blue); margin-top: 15px; }
.prize-value { color: #666666; font-weight: 700; font-size: 1rem;    font-weight: normal;
    }

.prize-value_red { color: #666666; font-weight: 700; font-size: 1rem;    font-weight: normal; padding-bottom: 20px;
   }
.prize-count { color: var(--text-muted); font-size: 0.85rem; }

.footer {
    background: var(--primary-blue);
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    font-size: 0.85rem;
    line-height: 1.8;
    text-align: center;
}

/* 漸顯滑入動畫效果 */
.fade-in-up {
    opacity: 1;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);

}

/* ==========================================================================
   11. RWD 響應式排版 (平板與手機切換)
   ========================================================================== */
@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
    .book-grid { grid-template-columns: repeat(3, 1fr); gap: 20px 15px; }
}

@media (max-width: 768px) {
    /* 手機版 Menu 按鈕顯示 */
    .menu-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--primary-blue);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        gap: 30px;
        transition: left 0.4s ease-in-out;
    }

    .nav-menu.active { left: 0; }
    .nav-link { font-size: 1.2rem; }

    /* Hero 與通用網格調整 */
    .main-title { font-size: 2.5rem; }
    .sub-banner-badge { font-size: 1rem; padding: 8px 15px; }
    .price-box .amount { font-size: 2.2rem; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }

    /* 輪播區塊手機版 */
    .carousel-wrapper { padding: 20px 10px; }
    .carousel-content { flex-direction: column; text-align: center; }
    .carousel-img { width: 180px; }
    .carousel-btn { display: none; }

    /* 手機版兩側裝飾圖縮小 */
    .firework-left, .firework-right { width: 60px; height: 60px; }
    .stripe-decor { width: 40px; height: 80px; }
}

@media (max-width: 480px) {
    .book-section-wrapper { padding: 20px 15px; }
    .book-grid { grid-template-columns: repeat(2, 1fr); gap: 15px 10px; }
    .grid-4 { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
}

/* POPUP 彈窗基本按鈕 */
.btn-primary {
    padding: 3px 20px;
    border: 2px solid #FAEE2B;
    font-size: 1rem;
    border-radius: 100px;
    font-weight: normal;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 0 0 15px 0;
    /* 使用 Flexbox 讓圖示與文字垂直且水平居中 */
    display: inline-flex;
    align-items: center;     /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    color:#FAEE2B;
    background-color: transparent;
}
/* POPUP 彈窗基本按鈕 */
.btn-primary2 {
    padding: 3px 20px;
    border: 2px solid #183698;
    font-size: 1rem;
    border-radius: 100px;
    font-weight: normal;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 0 auto 20px;
    /* 使用 Flexbox 讓圖示與文字垂直且水平居中 */
    display: flex;
    align-items: center;     /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    color:#183698;
    background-color: transparent;
}


/* 按鈕內 Icon 設定 */
.book-icon {
    width: 40px;       /* 圖示寬度 (可依需求調整) */
    height: auto;      /* 維持比例 */
    margin-right: 5px; /* 圖示與右側文字的間距 */
}

.btn-primary:hover {
    transform: scale(1.05);
}

/* ==========================================
   1. 彈窗背景遮罩與淡入效果
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px; /* 留出外邊距，防止手機螢幕邊角被切到 */
    box-sizing: border-box;

    /* 預設隱藏 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 顯示彈窗時套用的 active class */
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   2. 彈窗主體內容 (支援內部滾動)
   ========================================== */
.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;      /* 彈窗最大寬度 */
    max-height: 85vh;      /* 最大高度為螢幕高度的 85% */
    background-color: #fff; /* 白底 */
    border-radius: 12px;   /* 圓角設定 */
    padding: 30px 20px;    /* 內部留白 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    
    /* 內容過長時自動出現垂直滾動條 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* 讓 iOS 滑動更平滑 */

    /* 開啟時的放大動畫設定 */
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

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

/* 美化內部滾動條 (選填) */
.modal-content::-webkit-scrollbar {
    width: 6px; background-color: #FFD400;
     border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
   

}

/* 右上角關閉按鈕 */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    color: #000;
}

.modal-title {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}
.modal-title2 {
    text-align: center;
    margin-bottom: 25px;
    color: #183697;
    font-size: 2rem;
    font-weight: bold;
}
/* ==========================================
   3. 彈窗內網格 RWD 排版 (CSS Grid)
   ========================================== */
.modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 預設電腦版 3 欄 */
    gap: 20px; /* 項目之間的間距 */
}
.modal-grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 預設電腦版 3 欄 */
    gap: 20px; /* 項目之間的間距 */
}
/* 個別卡片樣式 */
.grid-item {
    text-align: center;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #FAEE2B;
    border-radius: 15px;
    margin: 10px 0;
}

.item-img-wrap {
    width: 100%;
    display: flex;
    justify-content: center; /* 讓圖片水平居中 */
    align-items: center;
    margin-bottom: 12px;
}

.item-img-wrap img {
    width: 80%;       /* 寬度佔容器的 80% */
    max-width: 100%;  /* 不超出容器 */
    height: auto;     /* 維持圖片原比例，避免變形 */
    display: block;
    object-fit: contain;
}

.item-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #222;
}

.item-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    text-align: left; /* 內文較多時靠左對齊較易閱讀 */
    width: 100%;
    text-align: left;
}

/* RWD 響應式：螢幕小於 768px 時改為 2 欄 */
@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手機尺寸：自動變成單欄 (直向排列) */
@media (max-width: 480px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
    .item-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #222;
    text-align: center;
    line-height: 1.3;
}
    .modal-content {
        padding: 25px 15px;
    }
    .item-desc {
        text-align: left; /* 手機單欄時，內文改為居中較美觀 */
    }
    .modal-grid2 {
     grid-template-columns: 1fr;
}
}


/* ==========================
   Notice
========================== */

.notice-section{
    background:#0a226e;
    padding:30px 20px;
}

.notice-wrap{
    max-width:1100px;
    margin:0 auto;
}

.notice-title{
    font-size:20px;
    font-weight:700;
    color:#ffffff;
    text-align:center;
    margin-bottom:20px;
    position:relative;
}

.notice-title::after{
    content:"";
    display:block;
    width:70px;
    height:4px;
    background:#ffffff;
    margin:16px auto 0;
    border-radius:50px;
}

.notice-list{
    color:#ffffff;
    font-size:12px;
    line-height:2;
    padding-left:24px;
}

.notice-list>li{
    margin-bottom:20px;
}

.notice-list ul{
    margin-top:10px;
    padding-left:20px;
    list-style:disc;
}

.notice-list ul li{
    margin-bottom:10px;
    line-height: 15px;
}

.notice-list strong{
    color:#222;
    font-weight:600;
}

.notice-list a{
    color:#005bac;
    text-decoration:none;
}

.notice-list a:hover{ text-decoration:none;
}

@media (max-width:768px){
    h2{ font-size: 1.8rem!important; line-height: 1.3;  color:#FAEE2B!important;}

    .notice-section{
        padding:50px 18px;
    }

    .notice-title{
        font-size:20px;
        margin-bottom:30px;
    }

    .notice-list{
        font-size:12px;
        line-height:1.9;
    }
.carousel-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    padding-left: 10px;
    padding-right: 10px;
}
}


/* 桌機版 */
.desktop-only {
    display: block;
}

/* 手機版 */
.mobile-only {
    display: none;
}

/* 768px 以下 */
@media screen and (max-width: 768px) {

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

}
/* 早鳥倒數 */
.early-sale{

    text-align:center;
    color:#fff;

    padding:25px 15px;

}

.title{

    font-size:34px;
    font-weight:700;
    margin-bottom:18px;

}

.coupon-row{

    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;

    gap:12px;

    font-size:22px;

}

.coupon{

    display:inline-flex;
    justify-content:center;
    align-items:center;

    min-width:170px;
    height:56px;

    padding:0 24px;

    border:2px dashed rgba(255,255,255,.95);
    border-radius:999px;

    background:rgba(255,255,255,.08);

    color:#FAEE2B;
    font-size:30px;
    font-weight:800;
    letter-spacing:3px;

    box-shadow:
        0 0 0 4px rgba(255,255,255,.12),
        inset 0 0 15px rgba(255,255,255,.08);

}

.period{

    margin-top:18px;

    font-size:18px;
    opacity:.9;

}

/*==========================
 Flip Clock
==========================*/

.flip-clock{

    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;

    margin-top:22px;

}

.flip{

    width:75px;
    height:75px;
 
    border-radius:12px;

    border:2px solid rgba(255,255,255,.6);

    background:rgba(255,255,255,.12);

    overflow:hidden;

}

.flip span{

    width:100%;
    height:100%;

    display:flex;
    justify-content:center;
    align-items:center;
    color:#fff;

    font-size:40px;
    font-weight:800;

    font-variant-numeric:tabular-nums;

}

.flip small{

    position:relative;
    top:-18px;

    display:block;

    color:rgba(255,255,255,.75);

    font-size:11px;
    letter-spacing:2px;

}

.colon{

    font-size:30px;
    font-weight:bold;

}

/* 翻牌動畫 */

.flip.animate span{

    animation:flip .5s ease;

}

@keyframes flip{

0%{
transform:rotateX(0deg);
}

50%{
transform:rotateX(-90deg);
}

100%{
transform:rotateX(0deg);
}

}

/*==========================
 手機
==========================*/

@media(max-width:768px){

.title{

    font-size:24px;

}

.coupon-row{

    font-size:16px;
    gap:8px;

}

.coupon{

    min-width:130px;
    height:46px;

    font-size:22px;

}

.period{

    font-size:14px;

}

.flip{

    width:75px;
    height:75px;

}

.flip span{

    font-size:24px;

}

.flip small{

    font-size:10px;
    top:-14px;

}

.colon{

    font-size:25px;

}

}
