/*
Theme Name: Dost News Pro
Theme URI: https://dostnews.com
Author: Dost Media Group
Author URI: https://dostnews.com
Description: Modern, High-Performance, AI & GEO-Optimized Urdu News & Media WordPress Theme with Full RTL, AdSense Integration, and Instant Web Vitals.
Version: 2.5.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dost-news-pro
Domain Path: /languages
Tags: news, blog, urdu, rtl-support, grid-layout, custom-colors, custom-menu, featured-images, theme-options, translation-ready
*/

:root {
    --primary-color: #c8102e;
    --primary-dark: #9b0b21;
    --secondary-color: #1a1a1a;
    --accent-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-text: #f1f5f9;
    --dark-border: #334155;
    --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', 'Segoe UI', Tahoma, sans-serif;
    --font-heading: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', sans-serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.25s ease-in-out;
}

[data-theme="dark"] {
    --bg-color: var(--dark-bg);
    --card-bg: var(--dark-card);
    --text-color: var(--dark-text);
    --text-muted: #94a3b8;
    --border-color: var(--dark-border);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-urdu);
    font-size: 17px;
    line-height: 2.2;
    background-color: var(--bg-color);
    color: var(--text-color);
    direction: rtl;
    text-align: right;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

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

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

ul, ol {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Topbar */
.topbar {
    background-color: #111827;
    color: #9ca3af;
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #1f2937;
}

.topbar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-date {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-social a {
    color: #9ca3af;
}

.topbar-social a:hover {
    color: #ffffff;
}

/* Header */
.site-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main {
    padding: 16px 0;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.4;
}

.site-tagline {
    font-size: 13px;
    color: var(--text-muted);
}

.header-ad {
    max-width: 728px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Navigation */
.main-nav {
    background-color: var(--secondary-color);
    color: #ffffff;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu > li > a {
    display: block;
    padding: 12px 18px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom-color: var(--primary-color);
    color: #ffffff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn, .search-toggle-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover, .search-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Breaking News Ticker */
.breaking-ticker {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.ticker-label {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: bold;
    padding: 4px 14px;
    border-radius: var(--radius);
    font-size: 15px;
    white-space: nowrap;
    margin-left: 12px;
}

.ticker-content {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-items {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

.ticker-item {
    margin-left: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--text-color);
}

.ticker-item:hover {
    color: var(--primary-color);
}

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

/* Main Layout Grid */
.site-content {
    padding: 24px 0;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Section (Grid: 1 Lead + 4 Sub) */
.hero-news-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.lead-story {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 420px;
    box-shadow: var(--shadow-md);
}

.lead-story img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.lead-story:hover img {
    transform: scale(1.03);
}

.story-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    padding: 24px;
    color: #ffffff;
}

.story-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.lead-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.8;
    color: #ffffff;
    margin-bottom: 8px;
}

.lead-title a {
    color: #ffffff;
}

.lead-title a:hover {
    color: #fca5a5;
}

.story-meta {
    font-size: 13px;
    color: #cbd5e1;
    display: flex;
    gap: 12px;
}

.sub-stories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sub-story-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 200px;
    box-shadow: var(--shadow-sm);
}

.sub-story-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.sub-story-card:hover img {
    transform: scale(1.05);
}

.sub-story-card .story-overlay {
    padding: 12px;
}

.sub-story-card .story-title {
    font-size: 16px;
    line-height: 1.7;
    color: #ffffff;
}

@media (max-width: 768px) {
    .hero-news-grid {
        grid-template-columns: 1fr;
    }
    .sub-stories-grid {
        grid-template-columns: 1fr;
    }
    .lead-story {
        min-height: 300px;
    }
}

/* Category Block Section */
.category-block {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 18px;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 80px;
    height: 2px;
    background-color: var(--primary-color);
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all-link {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.post-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.8;
    margin-bottom: 8px;
    flex-grow: 1;
}

.post-card-title a {
    color: var(--text-color);
}

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

.post-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 8px;
}

/* Sidebar & Widgets */
.sidebar-widget {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.trending-list li {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border-color);
}

.trending-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trending-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
    min-width: 28px;
}

.trending-title {
    font-size: 15px;
    line-height: 1.7;
    font-weight: 600;
}

/* Single Article Layout */
.single-article {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.article-header {
    margin-bottom: 20px;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.breadcrumbs a {
    color: var(--text-muted);
}

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

.article-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.9;
    color: var(--text-color);
    margin-bottom: 14px;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.article-meta-info {
    display: flex;
    gap: 16px;
    align-items: center;
}

.share-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
}

.share-wa { background-color: #25D366; }
.share-fb { background-color: #1877F2; }
.share-tw { background-color: #000000; }
.share-copy { background-color: var(--text-muted); cursor: pointer; border: none; }

.article-featured-image {
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-content {
    font-size: 20px;
    line-height: 2.3;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2, .article-content h3 {
    font-weight: 700;
    margin: 28px 0 14px;
    line-height: 1.8;
    color: var(--primary-color);
}

.article-content blockquote {
    border-right: 4px solid var(--primary-color);
    padding: 12px 20px;
    background: rgba(200, 16, 46, 0.04);
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

/* Author Box */
.author-box {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 30px;
    border: 1px solid var(--border-color);
}

.author-avatar img {
    border-radius: 50%;
    width: 70px;
    height: 70px;
}

.author-info h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.author-info p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Related Posts */
.related-posts-section {
    margin-top: 32px;
}

/* Footer */
.site-footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 48px 0 20px;
    margin-top: 40px;
    border-top: 4px solid var(--primary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 32px;
    margin-bottom: 36px;
}

.footer-widget h3 {
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 4px;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 15px;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .article-title {
        font-size: 24px;
    }
    .article-content {
        font-size: 18px;
    }
}
