/*
Theme Name: NWNews24 Premium
Theme URI: https://nwnews24.com
Author: NWNews24 Team
Author URI: https://nwnews24.com
Description: A premium, fast, and mobile-responsive news theme designed specifically for nwnews24.com. Features include dark mode, schema-ready structure, and Google Core Web Vitals optimization.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Text Domain: nwnews24
*/

/* ==========================================================================
   1. CSS VARIABLES (Design System)
   ========================================================================== */
:root {
    /* Brand Colors */
    --brand-primary: #f97316; /* Premium Orange */
    --brand-hover: #ea580c;
    
    /* Light Mode Colors */
    --bg-body: #f3f4f6;
    --bg-content: #ffffff;
    --text-main: #111827;
    --text-muted: #4b5563;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    
    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   2. DARK MODE VARIABLES (Auto-applies when body has .dark-mode)
   ========================================================================== */
body.dark-mode {
    --bg-body: #0f172a;
    --bg-content: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-light: #64748b;
    --border-color: #334155;
}

/* ==========================================================================
   3. RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* ==========================================================================
   4. LAYOUT & GRID SYSTEM
   ========================================================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.main-content-area {
    display: grid;
    grid-template-columns: 1fr 300px; /* Main content + Sidebar */
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

/* ==========================================================================
   5. COMPONENTS: NEWS CARDS & LISTS
   ========================================================================== */
.news-card {
    background: var(--bg-content);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.news-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.news-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-category {
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
}

.news-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.news-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   6. SINGLE POST (Article Page)
   ========================================================================== */
.single-post-wrapper {
    background: var(--bg-content);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.article-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    color: var(--text-main);
}

.article-content a {
    color: var(--brand-primary);
    text-decoration: underline;
}

/* ==========================================================================
   7. SIDEBAR & WIDGETS
   ========================================================================== */
.sidebar-widget {
    background: var(--bg-content);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.1rem;
    border-left: 4px solid var(--brand-primary);
    padding-left: 10px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.widget-list li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   8. RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
/* Tablet */
@media (max-width: 992px) {
    .main-content-area {
        grid-template-columns: 1fr; /* Stack sidebar below content */
    }
}

/* Mobile */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    
    .single-post-wrapper {
        padding: 15px;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
}