/* =========================================
   共用樣式表 (style.css)
   適用於本專案所有頁面
   包含 Banner 4K 響應式修正
   ========================================= */

/* --- 基礎 Body --- */
body {
    font-family: Arial, "文泉驛正黑", "WenQuanYi Zen Hei", "儷黑 Pro", "LiHei Pro", "微軟正黑體", "Microsoft JhengHei", sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* --- Top Bar --- */
.top-bar {
    background: linear-gradient(90deg, #FF5F6D, #FFC371);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* --- Navbar --- */
.navbar {
    background: linear-gradient(90deg, #141E30, #243B55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
}

.navbar-brand, .nav-link {
    color: white !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Hero Banner (完整顯示版) ---
   移除固定高度，讓圖片以 width:100% height:auto 自然等比例顯示。
   圖片在任何解析度（1920x1200 或 3840x2160）都不會被裁切。
   Banner 高度由圖片本身的長寬比自動決定。
*/
.hero-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
    position: relative;
    margin-bottom: 0;
    line-height: 0; /* 避免 img 下方產生多餘空隙 */
}

.banner-content {
    position: relative;
    display: block;
}

.banner-content img {
    width: 100%;       /* 圖片寬度填滿容器 */
    height: auto;      /* 高度自動等比例縮放，完全不裁切 */
    display: block;    /* 移除行內圖片底部空隙 */
    transition: transform 10s ease;
}

.banner-content:hover img {
    transform: scale(1.05);
}

/* --- Deadline Bar --- */
.deadline-bar {
    background: linear-gradient(90deg, #141E30, #243B55);
    color: white;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.deadline-bar i {
    color: #FF5F6D;
    font-size: 18px;
}

/* --- Menu Cards --- */
.menu-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    margin-bottom: 30px;
    background-color: white;
    height: 100%;
    border: none;
    position: relative;
    z-index: 1;
}

/* 各色卡片背景 */
.menu-card-1 { background: linear-gradient(135deg, rgba(255, 153, 102, 0.15), rgba(255, 94, 98, 0.15)); }
.menu-card-2 { background: linear-gradient(135deg, rgba(54, 209, 220, 0.15), rgba(91, 134, 229, 0.15)); }
.menu-card-3 { background: linear-gradient(135deg, rgba(138, 35, 135, 0.15), rgba(233, 64, 87, 0.15)); }
.menu-card-4 { background: linear-gradient(135deg, rgba(17, 153, 142, 0.15), rgba(56, 239, 125, 0.15)); }
.menu-card-5 { background: linear-gradient(135deg, rgba(252, 70, 107, 0.15), rgba(63, 94, 251, 0.15)); }
.menu-card-6 { background: linear-gradient(135deg, rgba(196, 113, 237, 0.15), rgba(246, 79, 89, 0.15)); }
.menu-card-7 { background: linear-gradient(135deg, rgba(15, 32, 39, 0.15), rgba(44, 83, 100, 0.15)); }
.menu-card-8 { background: linear-gradient(135deg, rgba(106, 48, 147, 0.15), rgba(160, 68, 255, 0.15)); }
.menu-card-9 { background: linear-gradient(135deg, rgba(34, 34, 34, 0.15), rgba(85, 85, 85, 0.15)); }

/* Hover 前置遮罩 */
.menu-card:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    transition: all 0.4s ease;
    z-index: -1;
    border-radius: 20px;
}

.menu-card-1:before { background: linear-gradient(135deg, #FF9966, #FF5E62); }
.menu-card-2:before { background: linear-gradient(135deg, #36D1DC, #5B86E5); }
.menu-card-3:before { background: linear-gradient(135deg, #8A2387, #E94057); }
.menu-card-4:before { background: linear-gradient(135deg, #11998e, #38ef7d); }
.menu-card-5:before { background: linear-gradient(135deg, #FC466B, #3F5EFB); }
.menu-card-6:before { background: linear-gradient(135deg, #c471ed, #f64f59); }
.menu-card-7:before { background: linear-gradient(135deg, #0F2027, #2C5364); }
.menu-card-8:before { background: linear-gradient(135deg, #6a3093, #a044ff); }
.menu-card-9:before { background: linear-gradient(135deg, #232526, #414345); }

/* Hover 效果 */
.menu-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.menu-card:hover:before { height: 100%; }
.menu-card:hover .card-body { color: white; }
.menu-card:hover h5,
.menu-card:hover p,
.menu-card:hover .menu-icon i { color: white; }

/* Menu Icon 圓形圖示 */
.menu-icon {
    width: 80px;
    height: 80px;
    background-color: #f8f8f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.menu-card:hover .menu-icon {
    background-color: white;
    transform: rotateY(180deg);
}

.menu-icon i {
    font-size: 30px;
    color: #FF5E62;
    transition: all 0.3s ease;
}

.menu-card h5 {
    color: #333;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.menu-card p {
    color: #666;
    font-size: 15px;
    transition: all 0.3s ease;
}

.card-body {
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

/* --- Footer --- */
footer {
    background: linear-gradient(90deg, #141E30, #243B55);
    color: white;
    padding: 40px 0 20px;
    font-size: 15px;
    margin-top: 50px;
    position: relative;
}

footer:before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, transparent 50%, #141E30 50%);
}

/* --- Nav Link 樣式 --- */
.active-nav {
    background: linear-gradient(90deg, #FF5F6D, #FFC371);
    color: white !important;
    border-radius: 30px;
    padding: 8px 20px !important;
    box-shadow: 0 4px 10px rgba(255, 95, 109, 0.3);
    transition: all 0.3s ease;
}

.nav-link {
    font-weight: 500;
    padding: 8px 16px !important;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.nav-link:hover:not(.active-nav) {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* --- Section Title --- */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-weight: 700;
    color: #333;
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
}

.section-title h2:after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, #FF5F6D, #FFC371);
    bottom: 0;
    left: 25%;
    border-radius: 10px;
}

/* --- 響應式 (RWD) --- */
/* 手機螢幕：clamp 已自動處理 Banner 最小高度 300px */
@media (max-width: 768px) {
    .menu-card {
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }
}

/* --- 動畫效果 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
