/* Bootstrap 5 Custom Styles for ASEAN Global Invest Theme */
/* Theme Colors: Blue (#0055A4) and Teal Green (#00A651) */
/* 东盟环球投资网 - 蓝绿配色专业金融风格 */

/* CSS Variables for Theme Colors - 保留Bootstrap Icons字体设置 */
:root {
    --bs-primary: #0055A4;
    --bs-primary-rgb: 0, 85, 164;
    --bs-secondary: #00A651;
    --bs-secondary-rgb: 0, 166, 81;
    --bs-success: #00A651;
    --bs-success-rgb: 0, 166, 81;
    --bs-info: #17a2b8;
    --bs-info-rgb: 23, 162, 184;
    --bs-warning: #f0ad4e;
    --bs-warning-rgb: 240, 173, 78;
    --bs-danger: #dc3545;
    --bs-danger-rgb: 220, 53, 69;
    --bs-light: #f8f9fa;
    --bs-dark: #003366;
}

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

.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: #0055A4 !important;
}

.bg-secondary {
    background-color: #00A651 !important;
}

.bg-success {
    background-color: #00A651 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-warning {
    background-color: #f0ad4e !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.bg-dark {
    background-color: #003366 !important;
}

/* Text Colors */
.text-primary {
    color: #0055A4 !important;
}

.text-secondary {
    color: #00A651 !important;
}

.text-success {
    color: #00A651 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-warning {
    color: #f0ad4e !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-dark {
    color: #003366 !important;
}

/* Border Colors */
.border-primary {
    border-color: #0055A4 !important;
}

.border-secondary {
    border-color: #00A651 !important;
}

.border-success {
    border-color: #00A651 !important;
}

/* Hover Effects */
.hover-primary:hover {
    color: #0055A4 !important;
}

.hover-secondary:hover {
    color: #00A651 !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(0, 85, 164, 0.1);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 85, 164, 0.15) !important;
}

.news-card .card-title a {
    transition: color 0.2s ease;
}

.news-card:hover .card-title a {
    color: #0055A4 !important;
}

/* Article Item Styles */
.article-item {
    transition: background-color 0.2s ease;
}

.article-item:hover {
    background-color: #e8f4f8;
}

/* Article Content Styles */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #0055A4;
}

.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 #00A651;
}

.article-content blockquote {
    border-left: 4px solid #00A651;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #0055A4;
    font-style: italic;
    background-color: #e8f4f8;
    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: #00A651;
}

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

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

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

.article-content td {
    background-color: #e8f4f8;
}

/* Navbar Customization */
.navbar-brand {
    font-size: 1.25rem;
}

.navbar-dark {
    background: linear-gradient(135deg, #0055A4 0%, #003366 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(0, 166, 81, 0.2);
    color: #00A651 !important;
}

/* 导航图标样式 */
.navbar .nav-link i {
    font-size: 1.1rem;
    color: #fff !important;
}

.navbar .nav-link:hover i,
.navbar .nav-link.active i {
    color: #00A651 !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;
        justify-content: flex-start;
    }
    
    .navbar .nav-link span {
        display: inline !important;
        margin-left: 0.5rem !important;
    }
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 85, 164, 0.15);
    border-top: 3px solid #00A651;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: #0055A4;
}

.dropdown-item:hover {
    background-color: #e8f4f8;
    color: #0055A4;
}

.dropdown-item i {
    color: #00A651;
}

/* Card Enhancements */
.card {
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 85, 164, 0.1);
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 85, 164, 0.1);
}

/* Badge Styles */
.badge {
    font-weight: 500;
}

.badge.bg-primary {
    background-color: #0055A4 !important;
}

.badge.bg-secondary {
    background-color: #00A651 !important;
}

.badge.bg-success {
    background-color: #00A651 !important;
}

.badge.bg-warning {
    background-color: #f0ad4e !important;
    color: #003366 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

/* List Group Styles */
.list-group-item-action {
    transition: all 0.2s ease;
    color: #0055A4;
}

.list-group-item-action:hover {
    padding-left: 0.5rem;
    background-color: #e8f4f8;
    color: #0055A4;
}

.list-group-item-action.active {
    background: linear-gradient(135deg, #0055A4 0%, #003366 100%);
    border-color: #0055A4;
}

/* Button Styles */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
}

.btn-sm {
    border-radius: 0.375rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0055A4 0%, #003366 100%);
    border-color: #0055A4;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #003366 0%, #0055A4 100%);
    border-color: #003366;
}

.btn-secondary {
    background-color: #00A651;
    border-color: #00A651;
    color: white;
}

.btn-secondary:hover {
    background-color: #008f45;
    border-color: #008f45;
    color: white;
}

.btn-success {
    background-color: #00A651;
    border-color: #00A651;
}

.btn-success:hover {
    background-color: #008f45;
    border-color: #008f45;
}

.btn-outline-primary {
    color: #0055A4;
    border-color: #0055A4;
}

.btn-outline-primary:hover {
    background-color: #0055A4;
    border-color: #0055A4;
    color: white;
}

.btn-outline-secondary {
    color: #00A651;
    border-color: #00A651;
}

.btn-outline-secondary:hover {
    background-color: #00A651;
    border-color: #00A651;
    color: white;
}

.btn-outline-success {
    color: #00A651;
    border-color: #00A651;
}

.btn-outline-success:hover {
    background-color: #00A651;
    border-color: #00A651;
    color: white;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #003366 0%, #0055A4 100%) !important;
}

footer .list-unstyled a {
    transition: color 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
}

footer .list-unstyled a:hover {
    color: #00A651 !important;
}

footer h5,
footer h6 {
    color: #00A651;
}

/* Breadcrumb Styles */
.breadcrumb-item a {
    color: #0055A4;
}

.breadcrumb-item a:hover {
    color: #00A651;
}

.breadcrumb-item.active {
    color: #003366;
}

/* Form Styles */
.form-control:focus {
    border-color: #0055A4;
    box-shadow: 0 0 0 0.25rem rgba(0, 85, 164, 0.25);
}

.form-check-input:checked {
    background-color: #0055A4;
    border-color: #0055A4;
}

/* Pagination Styles */
.page-link {
    color: #0055A4;
}

.page-link:hover {
    background-color: #e8f4f8;
    border-color: #0055A4;
    color: #0055A4;
}

.page-item.active .page-link {
    background-color: #0055A4;
    border-color: #0055A4;
}

/* Alert Styles */
.alert-primary {
    background-color: rgba(0, 85, 164, 0.1);
    border-color: #0055A4;
    color: #0055A4;
}

.alert-secondary {
    background-color: rgba(0, 166, 81, 0.1);
    border-color: #00A651;
    color: #00A651;
}

.alert-success {
    background-color: rgba(0, 166, 81, 0.1);
    border-color: #00A651;
    color: #00A651;
}

/* Hero Section Gradient */
.bg-gradient-primary {
    background: linear-gradient(135deg, #0055A4 0%, #003366 100%) !important;
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #00A651 0%, #008f45 100%) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #0055A4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00A651;
}

/* Selection Color */
::selection {
    background-color: #0055A4;
    color: white;
}

::-moz-selection {
    background-color: #0055A4;
    color: white;
}

/* Link Styles */
a {
    color: #0055A4;
}

a:hover {
    color: #00A651;
}

/* Progress Bar */
.progress-bar {
    background-color: #00A651;
}

/* Nav Pills */
.nav-pills .nav-link.active {
    background-color: #0055A4;
}

.nav-pills .nav-link:hover:not(.active) {
    color: #00A651;
}

/* Table Styles */
.table-primary {
    --bs-table-bg: rgba(0, 85, 164, 0.1);
    --bs-table-color: #0055A4;
}

.table-success {
    --bs-table-bg: rgba(0, 166, 81, 0.1);
    --bs-table-color: #00A651;
}

/* Modal Styles */
.modal-header {
    background: linear-gradient(135deg, #0055A4 0%, #003366 100%);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Toast Styles */
.toast-header {
    background-color: #0055A4;
    color: white;
}

/* Spinner */
.spinner-border.text-primary {
    color: #0055A4 !important;
}

.spinner-border.text-success {
    color: #00A651 !important;
}
