/* style.css - EATING-OUT 官方網站全站樣式 */

:root {
    --primary-yellow: #FFD700;
    --hover-yellow: #E6C200;
    --bg-black: #121212;
    --bg-dark-gray: #1C1C1C;
    --bg-dark: #121212;
    --bg-card: #252525;
    --text-white: #FFFFFF;
    --text-gray: #B0B0B0;
    --border-color: #333;
}

/* --- 全局設定 --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Noto Sans TC', sans-serif; }
body { background-color: var(--bg-black); color: var(--text-white); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; }
.section-padding { padding: 80px 0; }

/* 標題與按鈕 */
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 15px; color: var(--text-white); font-weight: 900; display: inline-block; position: relative; padding-bottom: 15px; }
.section-header h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: var(--primary-yellow); }
.section-header p { color: var(--text-gray); max-width: 700px; margin: 0 auto; font-size: 1.1rem; }

.btn { display: inline-block; padding: 10px 25px; border-radius: 4px; font-weight: 700; cursor: pointer; border: none; font-size: 1rem; text-align: center; }
.btn-primary { background: var(--primary-yellow); color: #000; }
.btn-primary:hover { background: var(--hover-yellow); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3); }
.btn-outline-white { border: 2px solid #fff; color: #fff; background: transparent; }
.btn-outline-white:hover { background: #fff; color: #000; }

/* --- 導航欄 (Navbar) --- */
header { background-color: rgba(18, 18, 18, 0.95); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; padding: 15px 0; backdrop-filter: blur(10px); }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.brand-logo { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 900; color: #fff; letter-spacing: 1px; }
.brand-logo img { height: 40px; width: auto; }

.nav-menu { display: flex; gap: 25px; align-items: center; }
.nav-menu a { font-size: 0.95rem; font-weight: 500; color: #ddd; position: relative; display: flex; align-items: center; gap: 5px; }
.nav-menu a:hover, .nav-menu a.active { color: var(--primary-yellow); }
.nav-menu .nav-btn { color: #000 !important; }

/* --- 多層下拉選單 (Dropdown) --- */
.dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background-color: rgba(18, 18, 18, 0.98); backdrop-filter: blur(10px);
    min-width: 240px; border-radius: 8px; padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid #333; z-index: 1001;
}

/* 滑鼠移入主選單時，顯示第一層 */
.dropdown:hover .dropdown-menu { display: block; animation: fadeInUp 0.3s ease; }
.dropdown-menu a { padding: 12px 20px; color: #ccc; white-space:nowrap; display:flex; justify-content: space-between; align-items: center; transition: 0.3s; }
.dropdown-menu a:hover { color: var(--primary-yellow); background: rgba(255,255,255,0.05); }
.toggle-icon, .arrow-right { font-size: 0.7rem; transition: 0.3s; }
.dropdown:hover .toggle-icon { transform: rotate(180deg); }

/* --- 第二層下拉 (Submenu) --- */
.dropdown-submenu { position: relative; }

/* 第二層選單樣式 */
.submenu {display: none; position: absolute; top: 0; left: 100%; margin-left: 5px; background-color: rgba(18, 18, 18, 0.98); backdrop-filter: blur(10px);min-width: 200px; border-radius: 8px; padding: 10px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid #333; }
.dropdown-submenu:hover > .submenu { display: block; animation: fadeInLeft 0.3s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translate(0, 10px); } to { opacity: 1; transform: translate(0, 0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translate(-10px, 0); } to { opacity: 1; transform: translate(0, 0); } }




/* --- 通用卡片樣式 (白底黑字) --- */
.feature-card, .cust-feat-card, .news-card, .service-item { 
    background: #FFFFFF; padding: 40px 30px; border-radius: 12px; text-align: center; 
    border: 2px solid transparent; box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    transition: all 0.3s ease; position: relative; overflow: hidden;
}
.feature-card:hover, .cust-feat-card:hover, .news-card:hover, .service-item:hover { 
    transform: translateY(-10px); box-shadow: 0 20px 40px rgba(255, 215, 0, 0.15); 
    border-bottom: 5px solid var(--primary-yellow); background: #ffffff;
}
.icon-box { font-size: 3rem; color: var(--primary-yellow); margin-bottom: 20px; }
.feature-card h3, .cust-feat-card h3, .service-content h3, .news-card h3 { margin-bottom: 15px; font-size: 1.4rem; color: #121212; font-weight: 800; }
.feature-card p, .cust-feat-card p, .service-content p, .news-card p { color: #555; font-size: 1rem; line-height: 1.6; }

/* --- 關於與歷程區塊 --- */
.about-section { background-color: var(--bg-black); }
.about-intro { margin-bottom: 40px; line-height: 1.8; font-size: 1.1rem; color: #ccc; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

/* ★★★ 品牌歷程 Timeline ★★★ */
.timeline-section { background-color: var(--bg-dark-gray); }
.timeline-scroll-box { max-height: 800px; overflow-y: auto; padding: 20px 10px; position: relative; scrollbar-width: thin; scrollbar-color: var(--primary-yellow) #333; }
.timeline-scroll-box::-webkit-scrollbar { width: 8px; }
.timeline-scroll-box::-webkit-scrollbar-track { background: #333; border-radius: 4px; }
.timeline-scroll-box::-webkit-scrollbar-thumb { background-color: var(--primary-yellow); border-radius: 4px; border: 2px solid #333; }
.timeline-scroll-box::-webkit-scrollbar-thumb:hover { background-color: #fff; }

.timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 30px 0; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #333; transform: translateX(-50%); }

.timeline-item { margin-bottom: 50px; position: relative; width: 50%; opacity: 0; transform: translateY(50px); transition: 0.6s ease-out; }
.timeline-item.show { opacity: 1; transform: translateY(0); }
.timeline-item:first-child { opacity: 1; transform: translateY(0); }

.timeline-item:nth-child(odd) { left: 0; padding-right: 45px; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; padding-left: 45px; text-align: left; }

.timeline-item::after { content: ''; position: absolute; top: 20px; width: 16px; height: 16px; background: var(--primary-yellow); border-radius: 50%; border: 3px solid var(--bg-dark-gray); z-index: 2; }
.timeline-item:nth-child(odd)::after { right: -10px; }
.timeline-item:nth-child(even)::after { left: -10px; }

/* 年份浮水印 */
.timeline-year { font-size: 3rem; font-weight: 1000; color: rgba(255, 215, 0, 0.4); position: absolute; top: -40px; line-height: 1; z-index: 1; pointer-events: none; }
.timeline-item:nth-child(odd) .timeline-year { right: 30px; }
.timeline-item:nth-child(even) .timeline-year { left: 30px; }

/* 內容框 (維持深色) */
.timeline-content { position: relative; z-index: 2; background: var(--bg-black); padding: 25px; border-radius: 8px; border: 1px solid #333; transition: 0.3s; }
.timeline-content:hover { border-color: var(--primary-yellow); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.timeline-content h3 { color: var(--primary-yellow); margin-bottom: 10px; font-size: 1.2rem; }
.timeline-content p { color: #aaa; font-size: 0.9rem; }
.timeline-item:nth-child(odd) .timeline-content { text-align: right; }
.timeline-item:nth-child(even) .timeline-content { text-align: left; }

/* --- 最新公告 --- */
.news-section { background-color: var(--bg-black); }
.news-scroll-track { display: flex; gap: 30px; overflow-x: auto; padding: 20px 10px 40px; scroll-snap-type: x mandatory; }
.news-card { flex: 0 0 410px; scroll-snap-align: start; background: #2a2a2a; border-left: none; text-align: left; display: flex; flex-direction: column; justify-content: space-between; min-height: 280px; }
.news-card:hover { background: #2a2a2a; border-color: var(--primary-yellow); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.news-date { color: var(--primary-yellow); font-weight: 700; margin-bottom: 15px; display: block; }
.news-card h3 { color: #fff; font-size: 1.3rem; margin-bottom: 15px; }
.news-card p { color: #aaa; }
.read-more { color: var(--primary-yellow); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }

/* --- 餐廳服務項目 --- */
.service-item { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; padding: 30px 20px; border-bottom: none; }
.service-content ul li { color: #555; }

/* --- Footer --- */
footer { background-color: #000; padding: 80px 0 30px; border-top: 1px solid #222; margin-top: auto; }
.footer-layout { display: grid; grid-template-columns: 1.5fr 1.2fr 1fr; gap: 60px; margin-bottom: 20px; }

.footer-info { display: flex; flex-direction: column; gap: 15px; }
.footer-logo { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.footer-logo img { height: 35px; }
.footer-logo span { font-size: 1.5rem; font-weight: 900; color: #fff; letter-spacing: 1px; }
.company-name { font-size: 1.1rem; color: #888; font-weight: 500; margin-bottom: 10px; }
.info-list li { display: flex; align-items: center; gap: 10px; color: #888; margin-bottom: 12px; font-size: 0.95rem; }
.info-list i { color: var(--primary-yellow); width: 20px; text-align: center; }

.footer-sitemap h3, .footer-social h3 { color: var(--primary-yellow); font-size: 1.2rem; font-weight: 700; margin-bottom: 25px; letter-spacing: 1px; }

/* 網站地圖雙欄結構 (Grid) */
.sitemap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 雙欄 */
    gap: 10px 20px;
}
.sitemap-grid ul { margin: 0; padding: 0; }
.footer-sitemap a, .footer-social a { 
    color: #888; 
    font-size: 1rem; 
    transition: 0.3s; 
    text-decoration: none; 
    display: block; 
    margin-bottom: 12px;
}
.footer-sitemap a:hover, .footer-social a:hover { color: #fff;}

/* --- Footer 社群圖示 --- */
.social-icons-group { display: flex; gap: 15px; margin-top: 25px; padding: 0;}

/* 圓形按鈕容器 */
.social-btn { 
    width: 40px !important; 
    height: 40px !important; 
    background: #333; 
    color: #fff !important; 
    border-radius: 50%; 
    
    /* ★★★ 關鍵置中語法 (加上 !important 覆蓋所有干擾) ★★★ */
    display: flex !important; 
    align-items: center !important;     /* 垂直置中 */
    justify-content: center !important; /* 水平置中 */
    
    /* 清除可能繼承的干擾樣式 */
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    border: none !important;
    text-decoration: none !important;
    transition: all 0.3s ease; 
}

/* 按鈕 Hover 效果 */
.social-btn:hover { 
    background: var(--primary-yellow) !important; color: #000 !important; transform: translateY(-3px); }

/* 圖示本體微調 */
.social-btn i {
    font-size: 18px !important;     
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.copyright { text-align: center; border-top: 1px solid #222; padding-top: 30px; color: #555; font-size: 0.85rem; }

/* --- 手機版選單 RWD --- */

/* 漢堡按鈕  */
.mobile-toggle { display: none; font-size: 1.8rem; color: #fff; cursor: pointer; padding: 10px; position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 1100; }
.mobile-toggle i { transition: 0.4s; }
.mobile-toggle.active i { transform: rotate(90deg) scale(1.1); color: var(--primary-yellow); }

@media (max-width: 900px) {
    .nav-menu { 
        display: none; position: absolute; top: 100%; left: 0; width: 100%; 
        background: rgba(18, 18, 18, 0.98); backdrop-filter: blur(10px); 
        flex-direction: column; align-items: flex-start; padding: 20px 0; 
        border-bottom: 1px solid #333; z-index: 1000; height: auto; max-height: 80vh; overflow-y: auto;
    }
    .nav-menu.active { display: flex; }
    .nav-menu > li { width: 100%; border-bottom: 1px solid #333; }
    .nav-menu > li:last-child { border-bottom: none; }
    .nav-menu a { width: 100%; padding: 15px 25px; font-size: 1.1rem; display: flex; justify-content: space-between; }
    
    .mobile-toggle { display: block; }

    /* 下拉選單 */
    .dropdown-menu, .dropdown-submenu .submenu { 
        position: static; display: none; background: #121212; box-shadow: none; border: none; padding: 0; transform: none; min-width: auto; border-top: 1px solid #222;
    }
    .dropdown-menu.show-mobile, .submenu.show-mobile { display: block; animation: fadeIn 0.3s; }
    .dropdown-menu a { padding-left: 40px; color: #aaa; font-size: 1rem; }
    .dropdown-submenu .submenu a { padding-left: 60px; color: #888; }
    .toggle-icon.rotate { transform: rotate(180deg); }

    /* 內容區塊 */
    .footer-layout { grid-template-columns: 1fr; gap: 40px; }
    .hero-base h1 { font-size: 2.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    
    /* Timeline RWD */
    .timeline::before { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; text-align: left; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; text-align: left; padding-left: 50px; }
    .timeline-item:nth-child(odd) .timeline-content, .timeline-item:nth-child(even) .timeline-content { text-align: left; }
    .timeline-item::after { left: 12px !important; }
    .timeline-year { left: 50px !important; top: -25px; font-size: 2rem; }
}