/* 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;
}

/* ============================================
   新加坡金融网站专业风格 - SGX Financial Style
   ============================================ */

/* Market Ticker Bar - 市场滚动条 */
.market-ticker {
    background: linear-gradient(90deg, #1a365d 0%, #2c5282 100%);
    color: #fff;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    overflow: hidden;
}

.market-ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 2rem;
    white-space: nowrap;
}

.market-ticker-symbol {
    font-weight: 600;
    margin-right: 0.5rem;
}

.market-ticker-price {
    font-weight: 700;
    margin-right: 0.5rem;
}

.market-ticker-change {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.market-ticker-change.up {
    background-color: #2f855a;
    color: #fff;
}

.market-ticker-change.down {
    background-color: #c53030;
    color: #fff;
}

/* Stock Card - 股票卡片 */
.stock-card {
    background: #fff;
    border: 1px solid rgba(26, 54, 93, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.stock-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(26, 54, 93, 0.15);
    transform: translateY(-2px);
}

.stock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stock-symbol {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1a365d;
}

.stock-name {
    font-size: 0.75rem;
    color: #718096;
}

.stock-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
}

.stock-change {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.stock-change.up {
    background-color: rgba(47, 133, 90, 0.1);
    color: #2f855a;
}

.stock-change.down {
    background-color: rgba(197, 48, 48, 0.1);
    color: #c53030;
}

/* Index Card - 指数卡片 */
.index-card {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.index-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(214, 158, 46, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.index-name {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.index-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.index-change {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Market Summary - 市场摘要 */
.market-summary {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(26, 54, 93, 0.05);
}

.market-summary-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.market-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(26, 54, 93, 0.05);
}

.market-summary-item:last-child {
    border-bottom: none;
}

.market-summary-label {
    color: #4a5568;
    font-size: 0.875rem;
}

.market-summary-value {
    font-weight: 600;
    color: #1a365d;
}

/* News List - 新闻列表 */
.news-list-item {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(26, 54, 93, 0.05);
    transition: background-color 0.2s ease;
}

.news-list-item:hover {
    background-color: rgba(26, 54, 93, 0.02);
}

.news-list-time {
    min-width: 60px;
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
}

.news-list-content {
    flex: 1;
}

.news-list-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.news-list-title:hover {
    color: #1a365d;
}

.news-list-category {
    font-size: 0.75rem;
    color: #d69e2e;
    font-weight: 500;
}

/* Section Header - 区块标题 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(26, 54, 93, 0.1);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.section-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a365d;
}

.section-subtitle {
    font-size: 0.875rem;
    color: #718096;
}

/* Quick Links Grid - 快速链接网格 */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-link-card {
    background: #fff;
    border: 1px solid rgba(26, 54, 93, 0.1);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.quick-link-card:hover {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(26, 54, 93, 0.2);
}

.quick-link-icon {
    width: 48px;
    height: 48px;
    background: rgba(26, 54, 93, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    color: #1a365d;
    transition: all 0.3s ease;
}

.quick-link-card:hover .quick-link-icon {
    background: rgba(214, 158, 46, 0.3);
    color: #fff;
}

.quick-link-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quick-link-desc {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stock-card {
        padding: 0.75rem;
    }
    
    .stock-price {
        font-size: 1.25rem;
    }
    
    .index-value {
        font-size: 1.5rem;
    }
    
    .section-text {
        font-size: 1.125rem;
    }
}

.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;
}
