:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --dark-color: #1a1a1a;
    --light-bg: #f8f9fa;
    --text-color: #333;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --font-family: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --dark-color: #f8fafc;
    --light-bg: #1e293b;
    --card-bg: #1e293b;
    --border-color: #334155;
    --secondary-color: #94a3b8;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.ls-2 {
    letter-spacing: 2px;
}

/* Navbar */
.navbar {
    padding: 0.5rem 0;
}

.nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.5rem 1rem !important;
}

/* News Cards */
.news-card {
    border: none;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card .card-img-top {
    border-radius: 8px;
    height: 250px;
    object-fit: cover;
}

.news-card .card-body {
    padding: 1.5rem 0;
}

.news-card .card-title {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.news-card .card-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.news-card .card-title a:hover {
    color: var(--primary-color);
}

.news-card .category-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 10px;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Sidebar */
.sidebar-title {
    font-weight: 700;
    text-transform: uppercase;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.sidebar-post {
    display: flex;
    margin-bottom: 1.25rem;
    align-items: center;
}

.sidebar-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.sidebar-post h6 {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.sidebar-post h6 a {
    color: var(--dark-color);
    text-decoration: none;
}

.sidebar-post h6 a:hover {
    color: var(--primary-color);
}

/* Footer */
footer h4, footer h5 {
    font-size: 1.2rem;
}

footer hr {
    margin: 2rem 0;
}

/* Ticker */
.ticker {
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}
.ticker marquee {
    font-weight: 500;
}

.ticker-wrap {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
}

.ticker-content {
    position: absolute;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll 35s linear infinite;
    font-size: 0.85rem;
    font-weight: 600;
}

@keyframes ticker-scroll {
    0% { left: 100%; transform: translateX(0); }
    100% { left: 0; transform: translateX(-100%); }
}


/* Dark mode specific fixes */
[data-theme="dark"] .text-dark { color: var(--text-color) !important; }
[data-theme="dark"] .bg-white { background-color: var(--card-bg) !important; }
[data-theme="dark"] .border { border-color: var(--border-color) !important; }
[data-theme="dark"] .alert-info { background-color: #0c4a6e; border-color: #075985; color: #e0f2fe; }
[data-theme="dark"] .card { background-color: var(--card-bg); border-color: var(--border-color); }
[data-theme="dark"] .list-group-item { background-color: var(--card-bg); border-color: var(--border-color); color: var(--text-color); }

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), #60a5fa);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Responsive */
@media (min-width: 992px) {
    .col-lg-30 { width: 30%; flex: 0 0 30%; max-width: 30%; }
    .col-lg-40 { width: 40%; flex: 0 0 40%; max-width: 40%; }
}

@media (max-width: 768px) {
    .news-card .card-title {
        font-size: 1.2rem;
    }
}

/* News Overlay for Featured Items */
.news-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.news-overlay img {
    width: 100%;
    transition: transform 0.3s ease;
}

.news-overlay:hover img {
    transform: scale(1.05);
}

.news-overlay-content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 3rem 1.5rem 1.5rem !important;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent) !important;
    color: white !important;
    z-index: 10 !important;
}

.news-overlay-content .category-badge {
    margin-bottom: 8px !important;
    font-size: 0.75rem !important;
}

.news-overlay-content h3 {
    margin: 0 !important;
    font-weight: 800 !important;
    color: white !important;
}

.news-overlay-content a {
    color: white !important;
    text-decoration: none !important;
}

