/*
Theme Name: WeNews Urdu Theme
Theme URI: https://addsmint.com
Author: AddsMint.com
Author URI: https://addsmint.com
Description: Complete RTL Urdu WordPress theme with customizable options, inspired by modern news portals. Features sticky menu, full-width layouts, Urdu translations, customizable section colors, advanced homepage slider with popular news sidebar, polished post navigation, and individual posts per section controls.
Version: 3.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wenews-urdu
Tags: rtl-language-support, news, blog, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===================================
   CSS Variables & Theme Customization
   =================================== */
:root {
    /* Primary Colors */
    --primary-color: #c41e3a;
    --secondary-color: #0066cc;
    --accent-color: #ffd700;
    
    /* Background Colors */
    --body-bg: #f5f5f5;
    --content-bg: #ffffff;
    --header-bg: #c41e3a;
    --footer-bg: #1a1a1a;
    
    /* Text Colors */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --text-white: #ffffff;
    
    /* Border & Shadow */
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Typography */
    --font-primary: 'Nafees Regular', serif;
    --font-secondary: 'Jameel Noori Nastaleeq', serif;
    --font-size-base: 16px;
    --font-size-large: 20px;
    --font-size-small: 14px;
    --line-height-base: 1.8;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    
    /* Layout */
    --container-width: 1200px;
    --sidebar-width: 320px;
    --border-radius: 4px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--body-bg);
    direction: rtl;
    text-align: right;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   Layout Structure
   =================================== */
.site-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.site-header {
    background-color: var(--header-bg);
    color: var(--text-white);
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Bar */
.top-bar {
    background-color: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-links a {
    color: var(--text-white);
    font-size: 1rem;
    transition: opacity var(--transition-fast);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.2);
}

.top-bar-date,
.top-bar-weather {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-white);
    font-size: 0.9rem;
    padding: 5px 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.top-bar-date i,
.top-bar-weather i {
    font-size: 1rem;
}

.top-bar-search {
    max-width: 250px;
}

.top-bar-search .search-form {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.top-bar-search .search-field {
    background: transparent;
    border: none;
    padding: 6px 12px;
    color: var(--text-white);
    font-size: 0.9rem;
    width: 100%;
}

.top-bar-search .search-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.top-bar-search .search-submit {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-white);
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.top-bar-search .search-submit:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-white);
    font-size: 0.9rem;
    padding: 5px 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Header Main */
.header-main {
    padding: var(--spacing-sm) 0;
    background-color: var(--header-bg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
}

.site-logo a {
    color: var(--text-white);
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

.header-search {
    flex: 1;
    max-width: 350px;
}

.header-search .search-form {
    display: flex;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    overflow: hidden;
}

.header-search .search-field {
    flex: 1;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    background: transparent;
}

.header-search .search-submit {
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    color: var(--primary-color);
    transition: background-color var(--transition-fast);
}

.header-search .search-submit:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

/* Navigation */
.main-navigation {
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 999;
    transition: all 0.3s ease;
}

/* Sticky Menu - Only Navigation, Not Header */
.main-navigation.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Sticky Spacer - Prevents content jump */
.sticky-spacer {
    height: 0;
    transition: height 0.3s ease;
}

body.menu-sticky .sticky-spacer {
    height: 50px;
}

/* Full Width Layout - No Box */
.site-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 20px;
}

@media (min-width: 1400px) {
    .site-container {
        max-width: 1920px;
        margin: 0 auto;
        padding: 0 40px;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-white);
    font-size: 1rem;
    transition: background-color var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--header-bg);
    min-width: 200px;
    box-shadow: var(--shadow-medium);
    list-style: none;
}

.nav-menu li:hover > .sub-menu {
    display: block;
}

.nav-menu .sub-menu a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-xs);
}

/* ===================================
   Homepage Sections
   =================================== */

/* Hero/Featured Section */
.hero-section {
    background-color: var(--content-bg);
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-lg);
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-md);
}

.featured-post {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.featured-post img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.featured-post-content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: var(--spacing-lg);
    color: var(--text-white);
}

.featured-post-title {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-xs);
}

.featured-post-meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

/* Secondary Posts */
.secondary-posts {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.secondary-post {
    background-color: var(--content-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.secondary-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.secondary-post img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.secondary-post-content {
    padding: var(--spacing-sm);
}

.secondary-post-title {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

/* Breaking News Ticker */
.breaking-news {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: var(--spacing-sm) 0;
    overflow: hidden;
    position: relative;
}

.breaking-news-container {
    display: flex;
    align-items: center;
}

.breaking-label {
    background-color: rgba(0, 0, 0, 0.3);
    padding: var(--spacing-xs) var(--spacing-md);
    font-weight: 700;
    white-space: nowrap;
    margin-left: var(--spacing-sm);
}

.breaking-content {
    flex: 1;
    overflow: hidden;
}

.breaking-ticker {
    display: flex;
    animation: ticker 30s linear infinite;
}

.breaking-item {
    white-space: nowrap;
    padding: 0 var(--spacing-lg);
    border-left: 2px solid rgba(255, 255, 255, 0.3);
}

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

/* Category Section */
.category-section {
    background-color: var(--content-bg);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    width: 100%;
    display: block;
}

.section-header {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.3rem;
    margin: 0;
}

.view-all {
    color: var(--text-white);
    font-size: 0.9rem;
    transition: opacity var(--transition-fast);
}

.view-all:hover {
    opacity: 0.8;
}

.section-content {
    padding: var(--spacing-md);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* Layout Variations */
/* 2 Column Grid */
.section-layout-grid-2 .posts-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 Column Grid (Default) */
.section-layout-grid-3 .posts-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* 4 Column Grid */
.section-layout-grid-4 .posts-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* List View */
.section-layout-list .posts-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

.section-layout-list .post-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--spacing-md);
}

.section-layout-list .post-thumbnail {
    height: 180px;
}

.section-layout-list .post-thumbnail img {
    height: 100%;
}

/* Featured Layout (1 Large + Grid) */
.section-layout-featured .posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.section-layout-featured .post-card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-md);
}

.section-layout-featured .post-card:first-child .post-thumbnail {
    height: 400px;
}

.section-layout-featured .post-card:first-child .post-thumbnail img {
    height: 100%;
}

.section-layout-featured .post-card:first-child .post-title {
    font-size: 1.8rem;
}

/* Masonry Style */
.section-layout-masonry .posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    grid-auto-rows: 50px;
}

.section-layout-masonry .post-card {
    grid-row: span 6;
}

.section-layout-masonry .post-card:nth-child(3n+1) {
    grid-row: span 7;
}

.section-layout-masonry .post-card:nth-child(3n+2) {
    grid-row: span 8;
}

.section-layout-masonry .post-thumbnail {
    height: 100%;
    min-height: 200px;
}

.section-layout-masonry .post-thumbnail img {
    height: 100%;
    min-height: 200px;
}

.post-card {
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.post-content {
    padding: var(--spacing-sm);
}

.post-title {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    padding-top: var(--spacing-xs);
    border-top: 1px solid var(--border-color);
}

/* Sidebar */
.sidebar {
    background-color: var(--content-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.widget {
    margin-bottom: var(--spacing-lg);
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 3px solid var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-color);
}

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

/* Popular Posts Widget */
.popular-posts-list {
    list-style: none;
}

.popular-post-item {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.popular-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
}

.popular-post-title {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.popular-post-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===================================
   Content Area
   =================================== */
.content-area {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.main-content {
    background-color: var(--content-bg);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

/* Single Post */
.single-post-header {
    margin-bottom: var(--spacing-lg);
}

.single-post-title {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.single-post-featured {
    margin-bottom: var(--spacing-lg);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.single-post-content {
    font-size: 1.1rem;
    line-height: 1.9;
}

.single-post-content p {
    margin-bottom: var(--spacing-md);
}

.single-post-content img {
    margin: var(--spacing-lg) 0;
    border-radius: var(--border-radius);
}

/* Comments */
.comments-area {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--border-color);
}

.comments-title {
    margin-bottom: var(--spacing-lg);
}

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

.comment {
    background-color: var(--body-bg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: var(--border-radius);
}

.comment-author {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

/* ===================================
   Footer
   =================================== */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--text-white);
    margin-top: var(--spacing-xl);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget h3 {
    color: var(--text-white);
    margin-bottom: var(--spacing-sm);
}

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

.footer-widget li {
    margin-bottom: var(--spacing-xs);
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.footer-widget a:hover {
    color: var(--text-white);
}

.footer-bottom {
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-credit {
    margin-top: var(--spacing-xs);
}

.footer-credit a {
    color: var(--primary-color);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    /* Layout adjustments for tablet */
    .section-layout-grid-3 .posts-grid,
    .section-layout-grid-4 .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-layout-featured .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-layout-masonry .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        order: 1;
    }
    
    .site-branding {
        order: 2;
        flex: 1;
        text-align: center;
    }
    
    .header-search {
        order: 3;
        max-width: 200px;
    }
    
    .header-search .search-field {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .header-search .search-submit {
        padding: 8px 12px;
    }
    
    .site-logo {
        font-size: 1.3rem;
    }
    
    .site-logo img {
        max-height: 40px;
    }
    
    .header-main {
        padding: 10px 0;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-menu .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
    }
    
    .nav-menu li.menu-item-has-children.active > .sub-menu {
        display: block;
    }
    
    /* Top Bar Mobile */
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .top-bar-left,
    .top-bar-right {
        width: 100%;
        justify-content: center;
    }
    
    .top-bar-date,
    .top-bar-weather {
        font-size: 0.85rem;
        padding: 4px 10px;
    }
    
    .social-links a {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    /* All layouts become single column on mobile */
    .section-layout-grid-2 .posts-grid,
    .section-layout-grid-3 .posts-grid,
    .section-layout-grid-4 .posts-grid,
    .section-layout-featured .posts-grid,
    .section-layout-masonry .posts-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    
    .section-layout-featured .post-card:first-child {
        grid-template-columns: 1fr;
    }
    
    .section-layout-list .post-card {
        grid-template-columns: 1fr;
    }
    
    .section-layout-masonry .post-card,
    .section-layout-masonry .post-card:nth-child(3n+1),
    .section-layout-masonry .post-card:nth-child(3n+2) {
        grid-row: auto;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.4rem; }
    
    .single-post-title {
        font-size: 1.6rem;
    }
    
    .breaking-news-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .breaking-label {
        text-align: center;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 14px;
        --spacing-sm: 12px;
        --spacing-md: 20px;
        --spacing-lg: 28px;
    }
    
    .site-container {
        padding: 0 var(--spacing-xs);
    }
    
    .featured-post img {
        height: 250px;
    }
    
    .breaking-label {
        font-size: 0.9rem;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.hidden { display: none; }
.show { display: block; }

/* RTL Specific Adjustments */
[dir="rtl"] .nav-menu .sub-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .breaking-item {
    border-left: none;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}


/* Ad Containers and No Sidebar Layout - Version 2.0 */
.content-area.no-sidebar {
    grid-template-columns: 1fr !important;
    max-width: 1200px;
    margin: 0 auto;
}

.ad-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-container.header-ad {
    margin-top: 0;
}

.footer-ad-area {
    background-color: #f5f5f5;
    padding: 20px 0;
    margin-top: 30px;
}

.widget_ad {
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px dashed #ddd;
    margin-bottom: 20px;
}

.ad-widget {
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SEO Meta Box Styles */
#wenews_seo_meta_box textarea,
#wenews_seo_meta_box input {
    direction: rtl;
    font-family: 'Nafees Regular', serif;
}

/* Improved Mobile Responsive - Version 2.0 */
@media (max-width: 768px) {
    .content-area,
    .content-area.no-sidebar {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .ad-container {
        min-height: 80px;
        padding: 10px;
    }
}

/* ========================================
   Version 3.0 - Hero Slider & Popular News
   ======================================== */

/* Hero Section V3 with Slider */
.hero-section-v3 {
    margin-bottom: 30px;
}

.hero-container-v3 {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

/* Hero Slider */
.hero-slider-v3 {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide .hero-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
}

.hero-text-content {
    position: absolute;
    bottom: 40px;
    right: 40px;
    left: 40px;
    z-index: 10;
}

.hero-category-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 10px;
}

.hero-slide-title {
    margin: 0 0 10px 0;
}

.hero-slide-title a {
    color: #fff;
    font-size: 32px;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    text-decoration: none;
    display: block;
}

.hero-slide-title a:hover {
    color: var(--accent-color);
}

.hero-slide-meta {
    display: flex;
    gap: 20px;
    color: #fff;
    font-size: 14px;
}

.hero-slide-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Slider Controls */
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-control:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    right: 20px;
}

.slider-next {
    left: 20px;
}

.slider-control i {
    font-size: 20px;
    color: var(--primary-color);
}

/* Slider Dots */
.slider-dots-v3 {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active,
.slider-dot:hover {
    background: #fff;
    transform: scale(1.2);
}

/* Popular News Sidebar V3 */
.popular-news-sidebar-v3 {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.popular-header {
    background: var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popular-header i {
    font-size: 20px;
    color: var(--accent-color);
}

.popular-header h3 {
    margin: 0;
    font-size: 20px;
}

.popular-posts-list {
    padding: 10px;
}

.popular-news-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.popular-news-item:last-child {
    border-bottom: none;
}

.popular-number {
    background: var(--primary-color);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.popular-item-content {
    flex: 1;
    display: flex;
    gap: 10px;
}

.popular-thumb {
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 5px;
    flex-shrink: 0;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-text {
    flex: 1;
}

.popular-text h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    line-height: 1.4;
}

.popular-text h4 a {
    color: #333;
    text-decoration: none;
}

.popular-text h4 a:hover {
    color: var(--primary-color);
}

.popular-meta-info {
    font-size: 13px;
    color: #999;
}

.popular-meta-info i {
    color: var(--primary-color);
}

/* Mobile Responsive for Hero V3 */
@media (max-width: 1024px) {
    .hero-container-v3 {
        grid-template-columns: 1fr;
    }
    
    .slider-wrapper {
        height: 400px;
    }
    
    .hero-slide-title a {
        font-size: 26px;
    }
    
    .hero-text-content {
        bottom: 30px;
        right: 30px;
        left: 30px;
    }
}

@media (max-width: 768px) {
    .slider-wrapper {
        height: 350px;
    }
    
    .hero-slide-title a {
        font-size: 22px;
    }
    
    .hero-text-content {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
    
    .slider-control {
        width: 40px;
        height: 40px;
    }
    
    .slider-control i {
        font-size: 16px;
    }
    
    .popular-news-sidebar-v3 {
        margin-top: 20px;
    }
}

/* ========================================
   Version 3.1 - Header Hide on Scroll
   ======================================== */

/* Hide header on scroll, show only menu */
.site-header {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-header.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Menu sticky styles enhanced */
.main-navigation.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
    z-index: 9999;
}


/* ========================================
   Version 3.1 - Post Navigation Cards & Comment Form Design
   ======================================== */

/* Post Navigation - Card Style with Thumbnails */
.post-navigation-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.nav-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.nav-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.nav-card-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.nav-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-thumb img {
    transform: scale(1.05);
}

.nav-card-content {
    padding: 20px;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.nav-label i {
    font-size: 12px;
}

.nav-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.nav-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #999;
}

.nav-date i {
    color: var(--primary-color);
}

/* Single card when only prev or next */
.post-navigation-cards:has(.nav-card:only-child) {
    grid-template-columns: 1fr;
}

.post-navigation-cards:has(.nav-card:only-child) .nav-card {
    max-width: 600px;
    margin: 0 auto;
}

/* Mobile Navigation Cards */
@media (max-width: 768px) {
    .post-navigation-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-card-thumb {
        height: 180px;
    }
    
    .nav-card-content {
        padding: 15px;
    }
    
    .nav-title {
        font-size: 16px;
    }
}

/* ========================================
   Improved Comment Form Design
   ======================================== */

.comments-area {
    margin-top: 50px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comment-reply-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    color: var(--heading-color);
}

.comment-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.3s ease;
    direction: rtl;
    font-family: 'Nafees Regular', serif;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form .required {
    color: var(--primary-color);
    font-weight: 700;
}

.comment-form .submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nafees Regular', serif;
}

.comment-form .submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.comment {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-right: 4px solid var(--primary-color);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-metadata {
    font-size: 13px;
    color: #999;
}

.comment-content {
    margin-top: 15px;
    line-height: 1.8;
    direction: rtl;
}

.comment-reply {
    margin-top: 15px;
}

.comment-reply a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

/* Comments Title */
.comments-title {
    font-size: 22px;
    margin-bottom: 25px;
    color: var(--heading-color);
}

/* No Comments Message */
.no-comments {
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    color: #999;
    font-size: 16px;
}

