/*
Theme Name: سرخ دم نیوز (SorkhDom News)
Theme URI: https://sorkhdom.ir
Author: طراحی اختصاصی پایگاه خبری سرخ دم
Author URI: https://sorkhdom.ir
Description: قالب خبری اختصاصی، مدرن، سریع و کاملاً راست‌به‌چپ (RTL) ویژه پایگاه خبری سرخ دم (پوشش اخبار شهرستان کوهدشت و استان لرستان) با هویت بصری قرمز لاکی و خوانایی بالا.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sorkh-dom-news
Tags: news, magazine, rtl-language-support, clean, minimal, lorestan, kuhdasht
*/

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --primary: #b91c1c;
    --primary-hover: #991b1b;
    --primary-soft: #fef2f2;
    --accent-gold: #b45309;
    --dark: #111827;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

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

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background: var(--dark);
    color: #e5e7eb;
    font-size: 12.5px;
    padding: 8px 0;
    border-bottom: 2px solid var(--primary);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.breaking-ticker {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
}

.breaking-badge {
    background: var(--primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.top-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    color: #d1d5db;
}

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

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 78px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-emblem {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #7f1d1d);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.25);
}

.site-logo-text {
    display: flex;
    flex-direction: column;
}

.site-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--dark);
    line-height: 1.2;
}

.site-logo span {
    color: var(--primary);
}

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

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    font-weight: 600;
    font-size: 14.5px;
}

.main-nav ul li a {
    padding: 6px 2px;
    position: relative;
}

.main-nav ul li.current-menu-item a,
.main-nav ul li.current-cat a {
    color: var(--primary);
    font-weight: 800;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 12px;
}

.search-form input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    width: 185px;
    color: var(--text-main);
}

.search-form button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    margin: 26px 0;
}

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

.hero-main-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 440px;
    background: #1f2937;
    box-shadow: var(--shadow-md);
}

.hero-main-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main-card:hover img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17,24,39,0.96) 0%, rgba(17,24,39,0.45) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    color: #fff;
}

.cat-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    width: fit-content;
}

.hero-main-card h2 {
    font-size: 23px;
    line-height: 1.48;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-main-card h2 a:hover {
    color: #fca5a5;
}

.post-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-overlay .post-meta {
    color: #d1d5db;
}

.hero-side-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-side-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    gap: 14px;
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-side-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #fecaca;
}

.hero-side-thumb {
    width: 115px;
    height: 86px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

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

.hero-side-content h3 {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.52;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Main Content Layout */
.main-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 28px;
    margin-bottom: 50px;
}

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

.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    position: relative;
}

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

/* News Feed Cards */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 18px;
    display: flex;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #fecaca;
}

.news-card-thumb {
    width: 230px;
    height: 155px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

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

.news-card:hover .news-card-thumb img {
    transform: scale(1.04);
}

.news-card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.news-card-cat {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
    display: inline-block;
}

.news-card-title {
    font-size: 17.5px;
    font-weight: 800;
    line-height: 1.52;
    margin-bottom: 8px;
    color: var(--dark);
}

.news-card-excerpt {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.72;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.heritage-widget {
    background: linear-gradient(145deg, #fff, var(--primary-soft));
    border-color: #fecaca;
}

.heritage-widget p {
    font-size: 13.5px;
    color: #374151;
    line-height: 1.8;
}

.popular-list {
    list-style: none;
    counter-reset: pop-counter;
}

.popular-list li {
    counter-increment: pop-counter;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.popular-list li::before {
    content: counter(pop-counter);
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 900;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #fecaca;
}

.popular-list a {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.55;
}

/* Single Post Page */
.single-article {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

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

.single-title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.48;
    color: var(--dark);
    margin: 10px 0 14px;
}

.single-lead {
    background: var(--primary-soft);
    border-right: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 22px;
}

.single-featured-img {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 26px;
}

.single-content {
    font-size: 16px;
    line-height: 1.98;
    color: #1f2937;
}

.single-content p {
    margin-bottom: 18px;
}

.single-content h2, .single-content h3 {
    margin: 26px 0 12px;
    color: var(--dark);
}

/* Next/Prev Post Navigation */
.post-navigation-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.nav-post-item {
    background: var(--bg-body);
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-post-item:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.nav-post-item span {
    display: block;
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 4px;
}

.nav-post-item strong {
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    margin-top: 28px;
    justify-content: center;
}

.pagination .page-numbers {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
}

.pagination .page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: #9ca3af;
    padding: 44px 0 24px;
    margin-top: 60px;
    font-size: 13.5px;
    border-top: 4px solid var(--primary);
}

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

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    margin-top: 28px;
    text-align: center;
    font-size: 12.5px;
}

/* Responsive */
@media (max-width: 960px) {
    .hero-grid, .main-layout, .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-main-card {
        height: 340px;
    }
}

@media (max-width: 640px) {
    .news-card {
        flex-direction: column;
    }
    .news-card-thumb {
        width: 100%;
        height: 190px;
    }
    .main-nav, .top-meta {
        display: none;
    }
    .post-navigation-box {
        grid-template-columns: 1fr;
    }
}
