/* ==========================================================================

   1. 全站基礎設定

   ========================================================================== */

* {

    box-sizing: border-box;

}



body {

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, "Microsoft JhengHei";

    margin: 0;

    padding: 0;

    background-color: #ffffff; /* 全站網頁背景：純白 */

    color: #333333;            /* 全站預設文字：深灰色 */

    line-height: 1.6;

    overflow-x: hidden;        /* 防止手機版網頁左右溢出 */

}



/* ==========================================================================

   2. 頂部導覽列 (Navbar) - 純白底色、大螢幕置中留白

   ========================================================================== */

.navbar-wrapper {

    background-color: #ffffff; 

    position: sticky;

    top: 0;

    z-index: 1000;

    border-bottom: 1px solid #f1f1f1; /* 舒適的極淡底部分隔線 */

    box-shadow: 0 2px 10px rgba(0,0,0,0.02); 

    width: 100%;

}



.navbar {

    max-width: 1600px;         /* 大螢幕限制寬度，自動留白置中 */

    margin: 0 auto;            

    padding: 0 2rem;

    display: flex;

    justify-content: space-between;

    align-items: center;

    width: 100%;

    height: 60px;              

}



.logo-link {

    display: flex;

    align-items: center;

    height: 100%;

    text-decoration: none;

}



.navbar-logo {

    height: 42px;              

    width: auto;               

    display: block;

    object-fit: contain;

}



.nav-links {

    list-style: none;

    margin: 0;

    padding: 0;

    display: flex;

    height: 100%;

}



.nav-links > li {

    display: flex;

    align-items: center;

}



.nav-links > li > a {

    color: #4a4a4a; 

    text-decoration: none;

    padding: 0 1.2rem;

    line-height: 60px;         

    display: block;

    transition: background-color 0.2s, color 0.2s;

    font-weight: 500;

    height: 100%;

}



/* 滑鼠懸停：觸發優雅的淡粉紅背景反饋 */

.nav-links > li > a:hover {

    background-color: #ffe4e8; 

    color: #ff8497;            

}



.hamburger-toggle {

    display: none;

    flex-direction: column;

    justify-content: space-between;

    width: 26px;

    height: 18px;

    background: transparent;

    border: none;

    cursor: pointer;

    padding: 0;

    z-index: 1001;

}



.hamburger-toggle span {

    width: 100%;

    height: 3px;

    background-color: #4a4a4a;

    border-radius: 2px;

    transition: all 0.3s ease;

}



/* 電腦版下拉選單 - 白底微調 */

.dropdown {

    position: relative;

}



.dropdown-menu {

    display: none; 

    position: absolute;

    top: 100%;                 

    left: 0;

    background-color: #ffffff; 

    min-width: 240px;

    list-style: none;

    padding: 0;

    margin: 0;

    border: 1px solid #f1f1f1;

    box-shadow: 0 4px 12px rgba(0,0,0,0.08);

}



.dropdown-menu li a {

    color: #4a4a4a; 

    text-decoration: none;

    padding: 12px 20px;

    display: block;

    border-bottom: 1px solid #fafafa; 

    transition: background-color 0.2s, color 0.2s;

}



.dropdown-menu li:last-child a {

    border-bottom: none;

}



.dropdown-menu li a:hover {

    background-color: #ffe4e8; 

    color: #ff8497;

}



.dropdown:hover .dropdown-menu {

    display: block;

}



/* ==========================================================================

   3. 首頁內容排版 (Banner & Cards & Welcome Text)

   ========================================================================== */

.hero-banner {

    width: 100%;       

    max-width: 1600px; 

    margin: 0 auto;    

    padding: 0;        

    background: none;  

}



.hero-banner-img {

    width: 100%;

    height: auto;

    display: block;

}



.main-content {

    max-width: 1600px; 

    margin: 0 auto;    

    padding: 2rem 2rem 4rem 2rem; 

    width: 100%;

}



.welcome-section {

    text-align: center;

    margin-bottom: 3.5rem;

    margin-top: 2rem;

}



.welcome-section h2 {

    color: #2c3e50;

    font-size: 2rem;

    margin-bottom: 1.5rem;

}



/* 完美優化：放寬兩邊留白、放大字體，讓電腦版畫面舒展大方 */

.welcome-text {

    max-width: 1200px;         /* 從 900px 放寬至 1200px，縮減兩邊過多的空白 */

    margin: 0 auto;            /* 保持居中對齊 */

    text-align: justify;       /* 保持左右兩端切齊 */

    text-justify: inter-word;  

    color: #4a4a4a;            /* 稍微加深顏色，提升易讀性 */

    font-size: 1.15rem;        /* 放大字體，看起來更大氣 */

    line-height: 1.85;         /* 微調行高，確保放大後閱讀依然舒適 */

    letter-spacing: 0.4px;     /* 微調字距 */

}



.card-container {

    display: flex;

    flex-wrap: wrap; 

    gap: 25px;       

    width: 100%;

}



.card {

    background: #ffffff;

    border-radius: 8px;

    overflow: hidden;

    box-shadow: 0 4px 15px rgba(0,0,0,0.06); 

    display: flex;

    flex-direction: column;

    flex: 1 1 calc(25% - 25px); 

    min-width: 250px; 

    text-decoration: none; 

    color: inherit;        

    transition: transform 0.2s, box-shadow 0.2s, outline 0.1s;

    border: 1px solid #f1f1f1; 

}



/* 滑鼠懸浮特效：亮起精美的粉紅色外框 */

.card:hover {

    transform: translateY(-5px); 

    box-shadow: 0 8px 25px rgba(0,0,0,0.12);

    outline: 3.5px solid #ffb6c1; 

}



.card img {

    width: 100%;       

    height: auto;      

    display: block;

    object-fit: contain; 

}



.card-body {

    padding: 1.5rem;

    display: flex;

    flex-direction: column;

    flex-grow: 1;

}



.card-body h3 {

    margin: 0 0 10px 0;

    font-size: 1.2rem;

    color: #2c3e50;

    text-align: center; 

}



.card-body p {

    margin: 0;

    font-size: 0.95rem;

    color: #777777;

    text-align: center; 

}



/* 頁腳與自製計數器樣式 */

.site-footer {

    width: 100%;

    background-color: #ffffff;

    border-top: 1px solid #f1f1f1; 

    padding: 25px 0;

    margin-top: 2rem;

}



.counter-container {

    max-width: 1600px;

    margin: 0 auto;

    text-align: center;

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, "Microsoft JhengHei";

    font-size: 0.95rem;

    color: #555555;

    font-weight: bold;

}



/* 精美深粉紅計數器數字 */

.counter-number {

    color: #db2777; 

    font-size: 1.1rem;

    margin-left: 3px;

}



/* ==========================================================================

   4. RWD 手機版媒體查詢 (已完美修正：遮罩穿透、白底層級優化)

   ========================================================================== */

@media (max-width: 768px) {

    .navbar {

        flex-direction: row !important; 

        justify-content: space-between !important;

        align-items: center !important;

        padding: 0 1.2rem !important; 

        position: relative;

        height: 50px; 

        background-color: #ffffff !important; /* 強制導覽列本體為不透明實心白底 */

        z-index: 1001;

    }



    .navbar-logo {

        height: 34px;

    }



    .hamburger-toggle {

        display: flex !important;

    }



    /* 漢堡按鈕動畫變為 X */

    .hamburger-toggle.open span:nth-child(1) {

        transform: translateY(7px) rotate(45deg);

    }

    .hamburger-toggle.open span:nth-child(2) {

        opacity: 0;

    }

    .hamburger-toggle.open span:nth-child(3) {

        transform: translateY(-8px) rotate(-45deg);

    }



    /* 終極修復：手機版彈出選單加上實心純白背景、最上層級，阻擋下層文字與圖案穿透 */

    .nav-links {

        display: none; 

        flex-direction: column;

        position: absolute;

        top: 50px; 

        left: 0;

        width: 100%;

        background-color: #ffffff !important; /* 強制不透明實心純白底色 */

        box-shadow: 0 10px 15px rgba(0,0,0,0.08); /* 增強底部陰影，讓選單更具立體感 */

        padding: 0;

        z-index: 9999 !important;               /* 最高層級定位，絕對蓋在所有內容之上 */

        border-top: 1px solid #f1f1f1;

        border-bottom: 1px solid #e5e5e5;

    }



    .nav-links.active {

        display: flex !important;

    }



    .nav-links > li {

        width: 100%;

        text-align: left;

        display: block;

        background-color: #ffffff !important;

    }



    .nav-links > li > a {

        padding: 1rem 1.5rem;

        border-bottom: 1px solid #f9f9f9;

        line-height: normal; 

        height: auto;

        color: #4a4a4a;

    }

    

    /* 手機版選單項目點擊/懸停反饋：淡粉紅 */

    .nav-links > li > a:hover {

        background-color: #ffe4e8 !important;

        color: #ff8497;

    }



    /* 手機版下拉子選單：使用極淡的粉白區隔層次，同樣保持實心不透明 */

    .dropdown-menu {

        position: relative;

        top: 0;

        box-shadow: none;

        width: 100%;

        background-color: #fff9fa !important; /* 實心淡粉白 */

        display: block; 

        border: none;

        z-index: 10000;

    }



    .dropdown-menu li {

        background-color: #fff9fa !important;

    }



    .dropdown-menu li a {

        padding: 12px 2.5rem; 

        border-bottom: 1px solid #fff0f2;

    }

    

    .main-content {

        padding: 1rem 1rem 2rem 1rem;

    }



    /* 手機版文字還原為較貼合螢幕的排版 */

    .welcome-text {

        text-align: left; 

        padding: 0 0.5rem;

        font-size: 0.95rem;

        line-height: 1.7;

    }

    

    .card {

        flex: 1 1 100%;

    }

    

    .site-footer {

        padding: 20px 0;

    }

} 

