/*
Theme Name: Newkarma Lite
Theme URI: https://example.com/newkarma-lite
Author: Antigravity
Author URI: https://example.com
Description: A modern news/magazine starter theme inspired by Newkarma.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newkarma-lite
*/

:root {
    --primary-color: #e31e24;
    /* Newkarma Red */
    --secondary-color: #1a1a1a;
    --text-color: #333;
    --light-grey: #f4f4f4;
    --border-color: #eee;
    --dark-grey: #444;
    --serif-font: 'Playfair Display', serif;
    --bg-color: #fff;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --secondary-color: #f4f4f4;
    --light-grey: #1e1e1e;
    --border-color: #333;
    --dark-grey: #aaa;
}

body.dark-mode header {
    background-color: #1a1a1a;
}

body.dark-mode .nav-container {
    border-top: 1px solid #444;
}

body.dark-mode .ticker-wrapper {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
}

body.dark-mode .news-title a {
    color: #fff;
}

body.dark-mode .news-excerpt {
    color: #bbb !important;
}

body.dark-mode .site-title {
    color: #fff;
}

body.dark-mode .sidebar-title h3 {
    background: var(--primary-color);
}

body.dark-mode footer {
    background: #000;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Header & Navigation */
.top-bar {
    background: #000;
    color: #fff;
    font-size: 11px;
    padding: 10px 0;
    text-transform: uppercase;
}

header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 4px solid var(--primary-color);
}

.site-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--secondary-color);
    text-decoration: none;
    letter-spacing: -2px;
    display: inline-block;
}

.site-title span {
    color: var(--primary-color);
}

.nav-container {
    background: var(--secondary-color);
    margin-top: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    padding: 15px 25px;
    display: block;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    transition: background 0.3s;
}

.nav-menu li a:hover {
    background: var(--primary-color);
}

/* Featured Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin: 30px 0;
}

.featured-main {
    position: relative;
    background: #000;
    height: 450px;
    border-radius: 4px;
    overflow: hidden;
}

.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}

.cat-label {
    background: var(--primary-color);
    color: #fff;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.featured-title {
    font-size: 2.8rem;
    margin: 0;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -1px;
}

/* Breaking News Ticker */
.ticker-wrapper {
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    overflow: hidden;
}

.ticker-container {
    display: flex;
    align-items: center;
}

.ticker-label {
    background: var(--primary-color);
    color: #fff;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-right: 20px;
    white-space: nowrap;
}

.ticker-content {
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    font-size: 13px;
    font-weight: 600;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Article Content - Serif */
.entry-content {
    font-family: var(--serif-font);
    font-size: 1.2rem;
    line-height: 1.8;
}

.entry-title {
    font-weight: 900;
    letter-spacing: -1px;
    text-align: center;
}

/* Centered Article Layout */
.single-post-centered {
    max-width: 800px !important;
    margin: 40px auto;
    display: block !important;
}

.single-post-centered .entry-header {
    text-align: center;
    margin-bottom: 40px;
}

.single-post-centered .news-meta {
    justify-content: center;
    display: flex;
    gap: 10px;
}

/* News Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin: 40px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.news-thumb {
    background: #eee;
    aspect-ratio: 16/9;
    margin-bottom: 10px;
    border-radius: 4px;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 10px 0;
}

.news-title a {
    text-decoration: none;
    color: var(--secondary-color);
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-meta {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

/* Sidebar */
.sidebar-title {
    border-bottom: 2px solid var(--secondary-color);
    margin-bottom: 20px;
    position: relative;
}

.sidebar-title h3 {
    background: var(--secondary-color);
    color: #fff;
    display: inline-block;
    padding: 5px 15px;
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
}

.trending-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.trending-num {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.3;
}

/* Footer */
footer {
    background: #111;
    color: #999;
    padding: 50px 0 20px;
    margin-top: 50px;
}

/* Theme Switch UI */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #fff;
    outline: none;
}

.theme-switch:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.theme-switch svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.sun-icon {
    display: none !important;
}

.moon-icon {
    display: block !important;
}

body.dark-mode .sun-icon {
    display: block !important;
}

body.dark-mode .moon-icon {
    display: none !important;
}

body.dark-mode .theme-switch:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Shopee Affiliate Banner Styling */
.shopee-affiliate-banner {
    background: linear-gradient(135deg, #ee4d2d 0%, #ff7337 100%);
    color: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(238, 77, 45, 0.3);
    transition: transform 0.3s ease;
}

.shopee-affiliate-banner:hover {
    transform: translateY(-5px);
}

.shopee-btn {
    display: inline-block;
    background: #fff;
    color: #ee4d2d;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 800;
    font-size: 12px;
    transition: all 0.3s ease;
}

.shopee-btn:hover {
    background: #f4f4f4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}