/**
 * 電話查詢平台 - 全站樣式表
 * 色彩主題：黃色淺色系、專業簡潔
 */

/* ==================== 色彩變數定義 ==================== */
:root {
    /* 主色系 - 黃色系 */
    --primary-yellow: #FFC400;      /* 主品牌黃（經典黃頁） */
    --primary-light: #FFF8DC;       /* 淺米色 - 背景（減少使用） */
    --primary-amber: #FFC400;       /* 與主黃收斂為同一支 */
    --primary-cream: #FFFAF0;       /* 奶油色 - 卡片背景（減少使用） */

    /* 輔助色系 */
    --secondary-gold: #E6A700;      /* 深金 - 按鈕/hover 深階 */
    --secondary-beige: #F5E6D3;     /* 米色 - 邊框 */
    --secondary-wheat: #F5DEB3;     /* 小麥色 - 懸停 */
    
    /* 語意色彩 */
    --success-green: #16A34A;       /* 成功 / 已驗證 */
    --danger-red: #FF6B6B;          /* 危險/詐騙 */
    --warning-orange: #FF9800;      /* 警告/行銷 */
    --info-blue: #5DADE2;           /* 資訊 */
    
    /* 文字色彩 */
    --text-primary: #333333;        /* 主要文字 */
    --text-secondary: #666666;      /* 次要文字 */
    --text-muted: #666666;          /* 淡化文字 */
    --text-white: #FFFFFF;          /* 白色文字 */
    --ink: #1A1A1A;                 /* 黃底高對比文字/招牌塊 */

    /* 其他 */
    --border-color: #E8DCC0;        /* 邊框顏色 */
    --shadow-color: rgba(0,0,0,0.08); /* 陰影顏色 */
    --overlay-color: rgba(255,196,0,0.1); /* 覆蓋層（#FFC400） */
}

/* ==================== 全域樣式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', sans-serif;
    background: linear-gradient(135deg, #FFFAF0 0%, #FFF8DC 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== 導航欄樣式 ==================== */
.navbar-custom {
    background: var(--primary-yellow);
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow-color);
    border: none;
}

.navbar-custom .navbar-brand {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.navbar-custom .navbar-brand i {
    margin-right: 0.5rem;
    color: var(--text-primary);
}

.navbar-custom .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ==================== Hero Section ==================== */
.hero-section {
    background: var(--primary-yellow);
    padding: 48px 0;
    position: relative;
}

.hero-section h1 {
    color: var(--ink);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-section p {
    color: var(--ink);
    font-size: 1.2rem;
    opacity: 0.85;
}

/* ==================== 搜尋框樣式 ==================== */
.search-box {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.search-box .form-control {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 3px solid var(--secondary-beige);
    border-radius: 50px;
    background: white;
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: all 0.3s ease;
}

.search-box .form-control:focus {
    outline: none;
    border-color: var(--secondary-gold);
    box-shadow: 0 5px 30px rgba(255,193,7,0.2);
}

.search-box .btn-search {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--primary-amber) 0%, var(--secondary-gold) 100%);
    border: none;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-box .btn-search:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 5px 20px rgba(255,193,7,0.4);
}

/* ==================== 卡片樣式 ==================== */
.card-custom {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255,193,7,0.15);
}

.card-custom .card-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-wheat) 100%);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 15px 15px 0 0;
    margin: -1.5rem -1.5rem 1.5rem;
}

.card-custom .card-header h3,
.card-custom .card-header h4,
.card-custom .card-header h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

/* ==================== 按鈕樣式 ==================== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-amber) 0%, var(--secondary-gold) 100%);
    border: none;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255,193,7,0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,193,7,0.4);
    background: linear-gradient(135deg, var(--secondary-gold) 0%, var(--primary-amber) 100%);
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--primary-amber);
    color: var(--primary-amber);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: var(--primary-amber);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,193,7,0.3);
}

/* ==================== 統計卡片 ==================== */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-yellow), var(--secondary-gold));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255,193,7,0.15);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-amber);
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* ==================== 標籤樣式 ==================== */
.badge-custom {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-warning-custom {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-wheat));
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.badge-danger-custom {
    background: linear-gradient(135deg, #FFE5E5, #FFCCCC);
    color: var(--danger-red);
    border: 1px solid #FFCCCC;
}

.badge-success-custom {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: var(--success-green);
    border: 1px solid #C8E6C9;
}

/* ==================== 表單樣式 ==================== */
.form-control-custom {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--primary-amber);
    box-shadow: 0 0 0 0.2rem rgba(255,193,7,0.25);
}

.form-label-custom {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ==================== 列表樣式 ==================== */
.list-item-custom {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.list-item-custom:hover {
    background: var(--primary-cream);
    border-color: var(--primary-amber);
    transform: translateX(5px);
}

/* ==================== Footer ==================== */
.footer-custom {
    background: linear-gradient(135deg, var(--text-primary) 0%, #4A4A4A 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-custom a {
    color: var(--primary-yellow);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-custom a:hover {
    color: var(--primary-amber);
}

/* ==================== 響應式設計 ==================== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .search-box .btn-search {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 1rem;
        border-radius: 10px;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ==================== 捲軸樣式 ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-amber);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gold);
}

/* ===== Phase 2 黃頁工具樣式 ===== */
.yp-hero {
    background: var(--primary-yellow);
    color: var(--ink);
    padding: 2.4rem 0;
    text-align: center;
}
.yp-hero h1 { color: var(--ink); font-weight: 800; letter-spacing: -0.5px; }
.yp-hero .yp-sub { color: var(--ink); opacity: .8; margin-bottom: 1.2rem; }
.yp-search {
    display: flex; max-width: 480px; margin: 0 auto;
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.yp-search input { border: 0; flex: 1; padding: .8rem 1rem; font-size: 1rem; }
.yp-search input:focus { outline: none; }
.yp-search button {
    background: var(--ink); color: var(--primary-yellow);
    border: 0; padding: 0 1.4rem; font-weight: 700; cursor: pointer;
}
.yp-tile {
    display: block; border: 1px solid #eee; border-radius: 10px;
    padding: 1.1rem .6rem; text-align: center; color: var(--text-primary);
    text-decoration: none; transition: border-color .15s, box-shadow .15s; height: 100%;
}
.yp-tile:hover { border-color: var(--primary-yellow); box-shadow: 0 4px 12px rgba(0,0,0,.08); color: var(--text-primary); }
.yp-tile .yp-emoji { font-size: 1.6rem; display: block; margin-bottom: .3rem; }
.yp-tile .yp-count { font-size: .75rem; color: var(--text-muted); }
.yp-tile.yp-tile-all { background: #FFFBEA; border-color: var(--primary-yellow); }
.yp-chip {
    display: inline-block; border: 1px solid #ddd; border-radius: 20px;
    padding: .35rem .9rem; margin: 0 .3rem .5rem 0; font-size: .85rem;
    color: var(--text-primary); text-decoration: none; background: #fff;
}
.yp-chip:hover { border-color: var(--primary-yellow); color: var(--text-primary); }
.yp-chip b { color: #A16207; }
.yp-brandblock { background: var(--ink); color: var(--primary-yellow); font-weight: 800; padding: .25rem .5rem; border-radius: 5px; }
.yp-megamenu { min-width: 560px; padding: .5rem; }
.yp-megamenu .yp-col-title { font-size: .72rem; color: #666; font-weight: 700; padding: .4rem .8rem; }
@media (max-width: 767px) { .yp-megamenu { min-width: auto; } }