/**
 * 盛邁亞太金融博客 - 自定義樣? * 配色方案? * - 主色?1a365d (深藍?
 * - 輔色?d69e2e (金色)
 * - 背景?f8f9fa (淺灰)
 * - 文字?2d3748 (深灰)
 */

/* ===== 全局樣式 ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Microsoft JhengHei", "PingFang TC", sans-serif;
    color: #2d3748;
    background-color: #f8f9fa;
    line-height: 1.6;
}

a {
    color: #1a365d;
    transition: color 0.2s ease;
}

a:hover {
    color: #d4af37;
}

/* ===== 導航欄樣?===== */
.navbar {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%) !important;
    box-shadow: 0 2px 10px rgba(26, 54, 93, 0.3);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand span {
    color: #d4af37;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(214, 158, 46, 0.2);
    color: #d4af37 !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(214, 158, 46, 0.1);
    color: #1a365d;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* ===== 卡片樣式 ===== */
.card {
    border-radius: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.card-title a:hover {
    color: #d4af37 !important;
}

/* ===== 按鈕樣式 ===== */
.btn-primary {
    background-color: #1a365d;
    border-color: #1a365d;
}

.btn-primary:hover {
    background-color: #2c5282;
    border-color: #2c5282;
}

.btn-outline-primary {
    color: #1a365d;
    border-color: #1a365d;
}

.btn-outline-primary:hover {
    background-color: #1a365d;
    border-color: #1a365d;
}

/* ===== 徽章樣式 ===== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* ===== 文章內容樣式 ===== */
.article-content h2 {
    color: #1a365d;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(214, 158, 46, 0.3);
}

.article-content h3 {
    color: #2c5282;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content h4 {
    color: #2d3748;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    background-color: rgba(214, 158, 46, 0.1);
    border-left: 4px solid #d4af37;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.article-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
}

.article-content th {
    background-color: #1a365d;
    color: white;
    font-weight: 600;
}

.article-content tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* ===== 分頁樣式 ===== */
.pagination .page-link {
    color: #1a365d;
    border-color: #e2e8f0;
}

.pagination .page-link:hover {
    background-color: rgba(214, 158, 46, 0.1);
    border-color: #d4af37;
    color: #1a365d;
}

.pagination .page-item.active .page-link {
    background-color: #1a365d;
    border-color: #1a365d;
}

/* ===== 麵包屑樣?===== */
.breadcrumb-item a:hover {
    color: #d4af37 !important;
}

/* ===== 列表組樣?===== */
.list-group-item-action:hover {
    background-color: rgba(214, 158, 46, 0.05);
}

/* ===== 頁腳樣式 ===== */
footer {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%) !important;
}

footer a:hover {
    color: #d4af37 !important;
}

footer .bi {
    transition: color 0.2s ease;
}

footer .bi:hover {
    color: #d4af37 !important;
}

/* ===== 響應式調?===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(0, 0, 0, 0.1);
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.95);
    }
}

@media (max-width: 767.98px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
}

/* ===== 滾動條樣?===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1a365d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2c5282;
}

/* ===== 選中文字樣式 ===== */
::selection {
    background-color: rgba(214, 158, 46, 0.3);
    color: #1a365d;
}

/* ===== 表單樣式 ===== */
.form-control:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 0.2rem rgba(214, 158, 46, 0.25);
}

.form-check-input:checked {
    background-color: #1a365d;
    border-color: #1a365d;
}

/* ===== 警告框樣?===== */
.alert {
    border-radius: 0.5rem;
}

/* ===== 模態框樣?===== */
.modal-header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* ===== 工具提示樣式 ===== */
.tooltip-inner {
    background-color: #1a365d;
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: #1a365d;
}

/* ===== 加載動畫 ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
    background-size: 1000px 100%;
}