/* Bootstrap 5 Custom Styles for CorgiAI Financial Theme */
/* Theme Colors: Deep Blue (#1a365d, #2c5282) and Gold (#d69e2e, #ecc94b) */

/* CSS Variables for Theme Colors - 保留Bootstrap Icons字体设置 */
:root {
    --bs-primary: #1a365d;
    --bs-primary-rgb: 26, 54, 93;
    --bs-secondary: #d69e2e;
    --bs-secondary-rgb: 214, 158, 46;
    --bs-danger: #c53030;
    --bs-danger-rgb: 197, 48, 48;
    --bs-warning: #d69e2e;
    --bs-warning-rgb: 214, 158, 46;
    --bs-success: #2f855a;
    --bs-success-rgb: 47, 133, 90;
    --bs-info: #2b6cb0;
    --bs-info-rgb: 43, 108, 176;
    --bs-light: #f7fafc;
    --bs-dark: #1a365d;
}

/* Bootstrap Icons 字体修复 */
.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
    display: inline-block;
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -0.125em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base Styles */
body {
    font-family: 'Noto Sans SC', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f7fafc;
}

.main-content {
    flex: 1;
}

/* Typography */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Theme Background Colors */
.bg-primary {
    background-color: #1a365d !important;
}

.bg-secondary {
    background-color: #d69e2e !important;
}

.bg-warning {
    background-color: #ecc94b !important;
}

.bg-danger {
    background-color: #c53030 !important;
}

.bg-success {
    background-color: #2f855a !important;
}

.bg-info {
    background-color: #2b6cb0 !important;
}

.bg-light {
    background-color: #f7fafc !important;
}

.bg-dark {
    background-color: #1a365d !important;
}

/* Text Colors */
.text-primary {
    color: #1a365d !important;
}

.text-secondary {
    color: #d69e2e !important;
}

.text-warning {
    color: #ecc94b !important;
}

.text-danger {
    color: #c53030 !important;
}

.text-success {
    color: #2f855a !important;
}

.text-info {
    color: #2b6cb0 !important;
}

.text-dark {
    color: #1a365d !important;
}

/* Border Colors */
.border-primary {
    border-color: #1a365d !important;
}

.border-warning {
    border-color: #d69e2e !important;
}

/* Hover Effects */
.hover-primary:hover {
    color: #1a365d !important;
}

.hover-white:hover {
    color: #fff !important;
}

/* News Card Styles */
.news-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(26, 54, 93, 0.1);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(26, 54, 93, 0.15) !important;
}

.news-card .card-title a {
    transition: color 0.2s ease;
}

.news-card:hover .card-title a {
    color: #1a365d !important;
}

/* Article Item Styles */
.article-item {
    transition: background-color 0.2s ease;
}

.article-item:hover {
    background-color: #ebf8ff;
}

/* Article Content Styles */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1a365d;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    border: 2px solid #d69e2e;
}

.article-content blockquote {
    border-left: 4px solid #1a365d;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #2d3748;
    font-style: italic;
    background-color: #ebf8ff;
    padding: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content li::marker {
    color: #1a365d;
}

.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid #d69e2e;
}

.article-content th {
    background-color: #1a365d;
    color: white;
    font-weight: 600;
}

.article-content td {
    background-color: #f7fafc;
}

/* Navbar Customization */
.navbar-brand {
    font-size: 1.25rem;
}

.navbar-dark {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%) !important;
}

.navbar .nav-link {
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background-color: rgba(214, 158, 46, 0.2);
    color: #ecc94b !important;
}

/* 导航图标样式 */
.navbar .nav-link i {
    font-size: 1.1rem;
    color: #fff !important;
}

.navbar .nav-link:hover i,
.navbar .nav-link.active i {
    color: #ecc94b !important;
}

/* 响应式导航调整 */
@media (max-width: 1199.98px) {
    .navbar .nav-link {
        padding: 0.5rem 0.5rem !important;
    }
    
    .navbar .nav-link i {
        font-size: 1.2rem;
    }
}

@media (max-width: 991.98px) {
    .navbar .nav-link {
        padding: 0.75rem 1rem !important;
    }
}

/* Button Styles */
.btn-primary {
    background-color: #1a365d;
    border-color: #1a365d;
}

.btn-primary:hover {
    background-color: #2c5282;
    border-color: #2c5282;
}

.btn-secondary {
    background-color: #d69e2e;
    border-color: #d69e2e;
    color: #1a365d;
}

.btn-secondary:hover {
    background-color: #ecc94b;
    border-color: #ecc94b;
    color: #1a365d;
}

.btn-outline-primary {
    color: #1a365d;
    border-color: #1a365d;
}

.btn-outline-primary:hover {
    background-color: #1a365d;
    border-color: #1a365d;
    color: #fff;
}

/* Badge Styles */
.badge.bg-primary {
    background-color: #1a365d !important;
}

.badge.bg-secondary {
    background-color: #d69e2e !important;
    color: #1a365d;
}

/* Card Styles */
.card {
    border: 1px solid rgba(26, 54, 93, 0.1);
}

.card-header {
    background-color: rgba(26, 54, 93, 0.03);
    border-bottom: 1px solid rgba(26, 54, 93, 0.1);
}

/* Link Styles */
a {
    color: #1a365d;
}

a:hover {
    color: #2c5282;
}

/* Dropdown Styles */
.dropdown-menu {
    border: 1px solid rgba(26, 54, 93, 0.1);
    box-shadow: 0 0.5rem 1rem rgba(26, 54, 93, 0.15);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(26, 54, 93, 0.05);
    color: #1a365d;
}

.dropdown-item.active {
    background-color: #1a365d;
    color: #fff;
}

/* Form Styles */
.form-control:focus {
    border-color: #d69e2e;
    box-shadow: 0 0 0 0.2rem rgba(214, 158, 46, 0.25);
}

/* Pagination Styles */
.page-link {
    color: #1a365d;
}

.page-link:hover {
    background-color: #ebf8ff;
    border-color: #1a365d;
    color: #1a365d;
}

.page-item.active .page-link {
    background-color: #1a365d;
    border-color: #1a365d;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: #fff;
}

.footer a {
    color: #ecc94b;
}

.footer a:hover {
    color: #d69e2e;
}
