/* Bootstrap 5 Custom Styles for Today Red Chips Theme */
/* Theme Colors: Golden Yellow (#FFD700, #FFA500) and Red (#0047AB, #003380) */

/* CSS Variables for Theme Colors - 保留Bootstrap Icons字体设置 */
:root {
    --bs-primary: #0047AB;
    --bs-primary-rgb: 0, 71, 171;
    --bs-secondary: #FFA500;
    --bs-secondary-rgb: 255, 165, 0;
    --bs-danger: #0047AB;
    --bs-danger-rgb: 0, 71, 171;
    --bs-warning: #FFD700;
    --bs-warning-rgb: 255, 215, 0;
    --bs-success: #003380;
    --bs-success-rgb: 0, 51, 128;
    --bs-info: #FF8C00;
    --bs-info-rgb: 255, 140, 0;
    --bs-light: #e8f0f8;
    --bs-dark: #002255;
}

/* 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: #0047AB !important;
}

.bg-secondary {
    background-color: #FFA500 !important;
}

.bg-warning {
    background-color: #FFD700 !important;
}

.bg-danger {
    background-color: #0047AB !important;
}

.bg-success {
    background-color: #003380 !important;
}

.bg-info {
    background-color: #FF8C00 !important;
}

.bg-light {
    background-color: #e8f0f8 !important;
}

.bg-dark {
    background-color: #002255 !important;
}

/* Text Colors */
.text-primary {
    color: #0047AB !important;
}

.text-secondary {
    color: #FFA500 !important;
}

.text-warning {
    color: #FFD700 !important;
}

.text-danger {
    color: #0047AB !important;
}

.text-success {
    color: #003380 !important;
}

.text-info {
    color: #FF8C00 !important;
}

.text-dark {
    color: #002255 !important;
}

/* Border Colors */
.border-primary {
    border-color: #0047AB !important;
}

.border-warning {
    border-color: #FFD700 !important;
}

/* Hover Effects */
.hover-primary:hover {
    color: #0047AB !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, 71, 171, 0.1);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 71, 171, 0.15) !important;
}

.news-card .card-title a {
    transition: color 0.2s ease;
}

.news-card:hover .card-title a {
    color: #0047AB !important;
}

/* Article Item Styles */
.article-item {
    transition: background-color 0.2s ease;
}

.article-item:hover {
    background-color: #e8f0f8;
}

/* Article Content Styles */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #002255;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #0047AB;
}

.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 #FFD700;
}

.article-content blockquote {
    border-left: 4px solid #0047AB;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #002255;
    font-style: italic;
    background-color: #e8f0f8;
    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: #0047AB;
}

.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid #FFD700;
}

.article-content th {
    background-color: #0047AB;
    color: white;
    font-weight: 600;
}

.article-content td {
    background-color: #e8f0f8;
}

/* Navbar Customization */
.navbar-brand {
    font-size: 1.25rem;
}

.navbar-dark {
    background: linear-gradient(135deg, #0047AB 0%, #003380 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(255, 215, 0, 0.2);
    color: #FFD700 !important;
}

/* 导航图标样式 */
.navbar .nav-link i {
    font-size: 1.1rem;
    color: #fff !important;
}

.navbar .nav-link:hover i,
.navbar .nav-link.active i {
    color: #FFD700 !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, 71, 171, 0.15);
    border-top: 3px solid #FFD700;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: #002255;
}

.dropdown-item:hover {
    background-color: #e8f0f8;
    color: #0047AB;
}

.dropdown-item i {
    color: #0047AB;
}

/* Card Enhancements */
.card {
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 71, 171, 0.1);
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 71, 171, 0.1);
}

/* Badge Styles */
.badge {
    font-weight: 500;
}

.badge.bg-primary {
    background-color: #0047AB !important;
}

.badge.bg-warning {
    background-color: #FFD700 !important;
    color: #002255 !important;
}

.badge.bg-danger {
    background-color: #0047AB !important;
}

.badge.bg-success {
    background-color: #003380 !important;
}

.badge.bg-info {
    background-color: #FF8C00 !important;
}

/* List Group Styles */
.list-group-item-action {
    transition: all 0.2s ease;
    color: #002255;
}

.list-group-item-action:hover {
    padding-left: 0.5rem;
    background-color: #e8f0f8;
    color: #0047AB;
}

.list-group-item-action.active {
    background: linear-gradient(135deg, #0047AB 0%, #003380 100%);
    border-color: #0047AB;
}

/* Button Styles */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
}

.btn-sm {
    border-radius: 0.375rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0047AB 0%, #003380 100%);
    border-color: #0047AB;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #003380 0%, #002255 100%);
    border-color: #003380;
}

.btn-warning {
    background-color: #FFD700;
    border-color: #FFD700;
    color: #002255;
}

.btn-warning:hover {
    background-color: #FFA500;
    border-color: #FFA500;
    color: #002255;
}

.btn-outline-primary {
    color: #0047AB;
    border-color: #0047AB;
}

.btn-outline-primary:hover {
    background-color: #0047AB;
    border-color: #0047AB;
    color: white;
}

.btn-outline-danger {
    color: #0047AB;
    border-color: #0047AB;
}

.btn-outline-danger:hover {
    background-color: #0047AB;
    border-color: #0047AB;
    color: white;
}

.btn-outline-warning {
    color: #FFD700;
    border-color: #FFD700;
}

.btn-outline-warning:hover {
    background-color: #FFD700;
    border-color: #FFD700;
    color: #002255;
}

.btn-outline-success {
    color: #003380;
    border-color: #003380;
}

.btn-outline-success:hover {
    background-color: #003380;
    border-color: #003380;
    color: white;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #002255 0%, #0047AB 100%) !important;
}

footer .list-unstyled a {
    transition: color 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
}

footer .list-unstyled a:hover {
    color: #FFD700 !important;
}

footer h5,
footer h6 {
    color: #FFD700;
}

/* Breadcrumb Styles */
.breadcrumb-item a {
    color: #0047AB;
}

.breadcrumb-item a:hover {
    color: #003380;
}

.breadcrumb-item.active {
    color: #002255;
}

/* Form Styles */
.form-control:focus {
    border-color: #0047AB;
    box-shadow: 0 0 0 0.25rem rgba(0, 71, 171, 0.25);
}

.form-check-input:checked {
    background-color: #0047AB;
    border-color: #0047AB;
}

/* Pagination Styles */
.page-link {
    color: #0047AB;
}

.page-link:hover {
    background-color: #e8f0f8;
    border-color: #0047AB;
    color: #0047AB;
}

.page-item.active .page-link {
    background-color: #0047AB;
    border-color: #0047AB;
}

/* Alert Styles */
.alert-primary {
    background-color: rgba(0, 71, 171, 0.1);
    border-color: #0047AB;
    color: #002255;
}

.alert-warning {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
    color: #002255;
}

/* Hero Section Gradient */
.bg-gradient-primary {
    background: linear-gradient(135deg, #0047AB 0%, #003380 50%, #002255 100%) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #e8f0f8;
}

::-webkit-scrollbar-thumb {
    background: #0047AB;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #003380;
}

/* Selection Color */
::selection {
    background-color: #0047AB;
    color: white;
}

::-moz-selection {
    background-color: #0047AB;
    color: white;
}
