/*
Theme Name: طرهان وب - قالب خبری
Theme URI: https://tarhanweb.ir
Author: طرهان وب
Author URI: https://tarhanweb.ir
Description: قالب خبری حرفه‌ای و رسمی ایرانی با طراحی مدرن و واکنش‌گرا
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: tarhanweb
Domain Path: /languages
Tags: news, rtl, responsive, customizer, slider, widgets
*/

/* ====== CSS Variables ====== */
:root {
    --primary-color: #d32f2f;
    --secondary-color: #1976d2;
    --accent-color: #388e3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --card-bg: #fff;
    --header-bg: #1a237e;
    --footer-bg: #263238;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --font-main: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    direction: rtl;
    text-align: right;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
}

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

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

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

ul, ol {
    list-style: none;
}

/* ====== Typography ====== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* ====== Container ====== */
.tarhanweb-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.tarhanweb-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.tarhanweb-col,
.tw-col {
    padding: 0 10px;
    min-width: 0;
    overflow-wrap: break-word;
}

iframe {
    max-width: 100%;
}

.col-3 { width: 25%; }
.col-4 { width: 33.333%; }
.col-6 { width: 50%; }
.col-8 { width: 66.667%; }
.col-9 { width: 75%; }
.col-12 { width: 100%; }

/* ====== Buttons ====== */
.tw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.tw-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.tw-btn-primary:hover {
    background: #b71c1c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.tw-btn-success {
    background: var(--success-color);
    color: #fff;
}

.tw-btn-success:hover {
    background: #388e3c;
    color: #fff;
}

.tw-btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.tw-btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ====== Header ====== */
.tw-header {
    background: var(--header-bg);
    position: relative;
    z-index: 1000;
}

.tw-top-bar {
    background: rgba(0,0,0,0.2);
    padding: 8px 0;
    font-size: 13px;
    color: #fff;
}

.tw-top-bar .tarhanweb-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tw-top-bar-left,
.tw-top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tw-top-bar a {
    color: #fff;
    opacity: 0.9;
}

.tw-top-bar a:hover {
    opacity: 1;
    color: #ffd700;
}

.tw-main-header {
    padding: 15px 0;
}

.tw-main-header .tarhanweb-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.tw-logo img {
    max-height: 70px;
    width: auto;
    transition: var(--transition);
}

.tw-logo-text h1 {
    color: #fff;
    font-size: 28px;
    margin: 0;
    font-weight: 800;
}

.tw-logo-text p {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin: 0;
}

/* ====== Breaking News Ticker ====== */
.tw-breaking-news {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 0;
    position: relative;
    overflow: hidden;
}

.tw-breaking-news .tarhanweb-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tw-breaking-label {
    background: #fff;
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tw-breaking-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 30px;
}

.tw-breaking-items {
    position: absolute;
    width: 100%;
    transition: transform 0.5s ease;
}

.tw-breaking-item {
    height: 30px;
    display: flex;
    align-items: center;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tw-breaking-item a {
    color: #fff;
}

.tw-breaking-item a:hover {
    text-decoration: underline;
}

/* ====== Navigation ====== */
.tw-nav {
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.1);
}

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

.tw-menu > li {
    position: relative;
}

.tw-menu > li > a {
    display: block;
    padding: 14px 18px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    position: relative;
}

.tw-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 18px;
    left: 18px;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.tw-menu > li > a:hover::after,
.tw-menu > li.current-menu-item > a::after {
    transform: scaleX(1);
}

.tw-menu > li > a:hover {
    color: #ffd700;
}

/* Sub Menu */
.tw-menu .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.tw-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tw-menu .sub-menu li a {
    display: block;
    padding: 12px 18px;
    color: var(--text-color);
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

.tw-menu .sub-menu li:last-child a {
    border-bottom: none;
}

.tw-menu .sub-menu li a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    padding-right: 22px;
}

/* ====== Mobile Menu ====== */
.tw-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.tw-mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.tw-mobile-menu.active {
    right: 0;
}

.tw-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.tw-mobile-overlay.active {
    display: block;
}

.tw-mobile-close {
    background: none;
    border: none;
    font-size: 24px;
    padding: 15px;
    cursor: pointer;
    color: var(--text-color);
    display: block;
    margin-left: auto;
}

.tw-mobile-menu ul li a {
    display: block;
    padding: 14px 20px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.tw-mobile-menu ul li a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* ====== Slider Section ====== */
.tw-slider-section {
    padding: 25px 0;
}

.tw-slider-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.tw-main-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.tw-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.tw-slide.active {
    opacity: 1;
}

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

.tw-slide-content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}

.tw-slide-category {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.tw-slide-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.5;
}

.tw-slide-date {
    font-size: 13px;
    opacity: 0.8;
}

.tw-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.tw-slider-nav:hover {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tw-slider-prev { right: 15px; }
.tw-slider-next { left: 15px; }

.tw-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.tw-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.tw-slider-dot.active {
    background: #fff;
}

/* ====== Sidebar Widgets ====== */
.tw-widget {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    overflow: hidden;
    padding: 20px;
}

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

.tw-widget-header::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 25px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--primary-color);
}

.tw-widget-header i {
    font-size: 18px;
}

.tw-widget-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.tw-widget-body {
    padding: 0;
}

/* News List */
.tw-news-list-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.tw-news-list-item:hover {
    padding-right: 5px;
}

.tw-news-list-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.tw-news-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.tw-news-list-item:hover .tw-news-list-thumb img {
    transform: scale(1.1);
}

.tw-news-list-content {
    flex: 1;
    min-width: 0;
}

.tw-news-list-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tw-news-list-meta {
    font-size: 12px;
    color: var(--text-light);
}

/* Numbered List */
.tw-numbered-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.tw-numbered-item:last-child {
    border-bottom: none;
}

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

.tw-numbered-item:nth-child(1) .tw-number { background: #d32f2f; }
.tw-numbered-item:nth-child(2) .tw-number { background: #e64a19; }
.tw-numbered-item:nth-child(3) .tw-number { background: #f57c00; }
.tw-numbered-item:nth-child(4) .tw-number { background: #ffa000; }
.tw-numbered-item:nth-child(5) .tw-number { background: #689f38; }

/* Image Round */
.tw-img-round-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.tw-img-round {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--primary-color);
}

.tw-img-round img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Social Widget */
.tw-social-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tw-social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.tw-social-link:hover {
    transform: translateY(-3px);
    color: #fff;
}

.tw-social-link i {
    font-size: 24px;
    margin-bottom: 5px;
}

.tw-social-link.telegram { background: #0088cc; }
.tw-social-link.instagram { background: #e4405f; }
.tw-social-link.twitter { background: #1da1f2; }
.tw-social-link.whatsapp { background: #25d366; }
.tw-social-link.eitaa { background: #ff5722; }
.tw-social-link.rubika { background: #2196f3; }
.tw-social-link.bale { background: #4caf50; }
.tw-social-link.soroush { background: #9c27b0; }

/* Poll Widget */
.tw-poll-option {
    display: block;
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tw-poll-option:hover {
    border-color: var(--primary-color);
    background: rgba(211, 47, 47, 0.05);
}

.tw-poll-option input {
    margin-left: 8px;
}

.tw-poll-bar {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: rgba(211, 47, 47, 0.1);
    transition: width 0.5s ease;
    z-index: 0;
}

.tw-poll-option-text {
    position: relative;
    z-index: 1;
}

/* Weather Widget */
.tw-weather {
    text-align: center;
    padding: 20px;
}

.tw-weather-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.tw-weather-temp {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
}

.tw-weather-city {
    font-size: 16px;
    color: var(--text-light);
    margin-top: 5px;
}

.tw-weather-desc {
    font-size: 14px;
    color: var(--text-light);
}

/* Prayer Times */
.tw-prayer-times {
    padding: 0;
}

.tw-prayer-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.tw-prayer-item:last-child {
    border-bottom: none;
}

.tw-prayer-name {
    font-weight: 600;
    color: var(--text-color);
}

.tw-prayer-time {
    font-weight: 700;
    color: var(--primary-color);
    direction: ltr;
}

/* Important News */
.tw-important-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    position: relative;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tw-important-item.green {
    background: rgba(76, 175, 80, 0.1);
    border-right: 4px solid #4caf50;
    color: #2e7d32;
}

.tw-important-item.red {
    background: rgba(244, 67, 54, 0.1);
    border-right: 4px solid #f44336;
    color: #c62828;
}

.tw-important-item i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Image Slider Widget */
.tw-img-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.tw-img-slide {
    display: none;
}

.tw-img-slide.active {
    display: block;
}

.tw-img-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* Newspaper Slider */
.tw-paper-slider {
    text-align: center;
    padding: 20px;
}

.tw-paper-slide {
    display: none;
}

.tw-paper-slide.active {
    display: block;
}

.tw-paper-slide img {
    max-height: 250px;
    margin: 0 auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tw-paper-title {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-light);
}

/* Author Posts */
.tw-author-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.tw-author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.tw-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tw-author-info {
    flex: 1;
}

.tw-author-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
}

.tw-author-post-title {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ====== Ads Section ====== */
.tw-ads-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 25px;
}

.tw-ads-item {
    margin-bottom: 15px;
    text-align: center;
}

.tw-ads-item:last-child {
    margin-bottom: 0;
}

.tw-ads-item img {
    border-radius: var(--border-radius);
    width: 100%;
}

.tw-ads-label {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 5px;
    display: block;
}

/* ====== Latest News List (Gallery-style images) ====== */
.tw-latest-news-list {
    border-radius: var(--border-radius);
}

.tw-latest-news-row {
    display: block;
    padding: 0 0 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tw-latest-news-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.tw-latest-news-thumb {
    display: block;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 12px;
    background: #eee;
}

.tw-latest-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.tw-latest-news-thumb:hover img {
    transform: scale(1.05);
}

.tw-latest-news-content {
    width: 100%;
}

.tw-latest-news-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 8px;
    color: var(--text-color);
    transition: var(--transition);
}

.tw-latest-news-row a:hover .tw-latest-news-title {
    color: var(--primary-color);
}

.tw-latest-news-excerpt {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tw-latest-news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tw-latest-news-meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.tw-latest-news-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ====== Photo & Video Section ====== */
.tw-media-section {
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 30px 0;
    position: relative;
    overflow: hidden;
}

.tw-media-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    background-size: 100px;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tw-media-section .tarhanweb-container {
    position: relative;
    z-index: 1;
}

.tw-section-title {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
}

.tw-section-title h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
}

.tw-section-title p {
    opacity: 0.9;
    font-size: 16px;
}

.tw-media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tw-media-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
    cursor: pointer;
}

.tw-media-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.tw-media-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.tw-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 30%, rgba(0,0,0,0.8));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    color: #fff;
}

.tw-media-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
}

.tw-media-title {
    font-size: 14px;
    font-weight: 700;
    z-index: 1;
}

/* ====== Single Post ====== */
.tw-single-post {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.tw-post-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tw-post-meta-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tw-post-category {
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.tw-post-code {
    background: var(--bg-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    direction: ltr;
}

.tw-post-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-color);
}

.tw-post-lead {
    font-size: 16px;
    color: var(--text-light);
    font-style: italic;
    padding: 15px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border-right: 4px solid var(--primary-color);
    margin-bottom: 20px;
}

.tw-post-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.tw-post-details {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-light);
}

.tw-post-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tw-post-detail i {
    color: var(--primary-color);
}

.tw-post-image {
    margin-bottom: 25px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.tw-post-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
}

.tw-post-image-caption {
    padding: 10px 15px;
    background: var(--bg-color);
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

.tw-post-content {
    font-size: 16px;
    line-height: 2;
    color: var(--text-color);
}

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

/* Post Actions */
.tw-post-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    margin: 25px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.tw-post-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: #fff;
}

.tw-post-action:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tw-post-action i {
    font-size: 16px;
}

/* Social Share */
.tw-social-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.tw-social-share-label {
    font-weight: 700;
    font-size: 14px;
}

.tw-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: var(--transition);
}

.tw-share-btn:hover {
    transform: translateY(-3px);
    color: #fff;
}

.tw-share-btn.eitaa { background: #ff5722; }
.tw-share-btn.rubika { background: #2196f3; }
.tw-share-btn.bale { background: #4caf50; }
.tw-share-btn.soroush { background: #9c27b0; }
.tw-share-btn.telegram { background: #0088cc; }
.tw-share-btn.whatsapp { background: #25d366; }

/* Reporter Card */
.tw-reporter-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #fff9c4 0%, #fffde7 100%);
    border-radius: var(--border-radius);
    margin-top: 30px;
    border: 2px dashed #fbc02d;
    position: relative;
}

.tw-reporter-card::before {
    content: '\f0e6';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -15px;
    right: 20px;
    background: #fbc02d;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.tw-reporter-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fbc02d;
    flex-shrink: 0;
}

.tw-reporter-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tw-reporter-info h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.tw-reporter-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* Related Posts */
.tw-related-posts {
    margin-top: 40px;
}

.tw-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.tw-related-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.tw-related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.tw-related-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.tw-related-content {
    padding: 15px;
}

.tw-related-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====== Comments ====== */
.tw-comments-section {
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 30px;
    border: 2px dashed #fbc02d;
}

.tw-comments-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f57f17;
}

.tw-comment-form {
    margin-bottom: 30px;
}

.tw-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.tw-form-group {
    margin-bottom: 15px;
}

.tw-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.tw-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: var(--font-main);
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
}

.tw-form-control:focus {
    outline: none;
    border-color: #fbc02d;
    box-shadow: 0 0 0 4px rgba(251, 192, 45, 0.2);
}

textarea.tw-form-control {
    min-height: 120px;
    resize: vertical;
}

.tw-comment-submit {
    background: var(--success-color);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: var(--border-radius);
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.tw-comment-submit:hover {
    background: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.tw-comment-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tw-comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.tw-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tw-comment-body {
    flex: 1;
}

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

.tw-comment-author {
    font-weight: 700;
    font-size: 15px;
}

.tw-comment-date {
    font-size: 12px;
    color: var(--text-light);
}

.tw-comment-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-color);
}

/* ====== Footer ====== */
.tw-footer {
    background: var(--footer-bg);
    color: #fff;
    padding-top: 50px;
}

.tw-footer-widgets {
    padding-bottom: 40px;
}

.tw-footer-widgets .tarhanweb-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.tw-footer-widget {
    margin-bottom: 30px;
}

.tw-footer-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.tw-footer-widget ul li {
    margin-bottom: 10px;
}

.tw-footer-widget ul li a {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.tw-footer-widget ul li a::before {
    content: '\f104';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: var(--primary-color);
}

.tw-footer-widget ul li a:hover {
    color: #fff;
    padding-right: 5px;
}

.tw-footer-about-text {
    font-size: 14px;
    line-height: 2;
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
}

.tw-footer-logo {
    max-height: 60px;
    margin-bottom: 15px;
}

.tw-footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 20px 0;
    text-align: center;
}

.tw-footer-bottom .tarhanweb-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tw-copyright {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.tw-copyright a {
    color: var(--primary-color);
}

.tw-footer-social {
    display: flex;
    gap: 10px;
}

.tw-footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}

.tw-footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ====== Back to Top ====== */
.tw-back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tw-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.tw-back-to-top:hover {
    background: #b71c1c;
    transform: translateY(-3px);
}

/* ====== Pagination ====== */
.tw-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
}

.tw-pagination a,
.tw-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.tw-pagination a {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: var(--box-shadow);
}

.tw-pagination a:hover {
    background: var(--primary-color);
    color: #fff;
}

.tw-pagination span.current {
    background: var(--primary-color);
    color: #fff;
}

/* ====== Breadcrumb ====== */
.tw-breadcrumb {
    background: var(--card-bg);
    padding: 15px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.tw-breadcrumb .tarhanweb-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-light);
}

.tw-breadcrumb a {
    color: var(--text-color);
    font-weight: 600;
}

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

.tw-breadcrumb-separator {
    color: var(--text-light);
}

/* ====== Notification ====== */
.tw-notification {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: #fff;
    font-weight: 600;
    z-index: 10000;
    transform: translateX(-120%);
    transition: transform 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tw-notification.show {
    transform: translateX(0);
}

.tw-notification.success { background: var(--success-color); }
.tw-notification.error { background: var(--danger-color); }
.tw-notification.info { background: var(--info-color); }

/* ====== Loading ====== */
.tw-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====== Zoom Modal ====== */
.tw-zoom-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.tw-zoom-modal.active {
    display: flex;
}

.tw-zoom-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.tw-zoom-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* ====== Print Styles ====== */
@media print {
    .tw-header,
    .tw-footer,
    .tw-sidebar,
    .tw-post-actions,
    .tw-comments-section,
    .tw-related-posts,
    .tw-breaking-news,
    .tw-back-to-top,
    .tw-mobile-toggle {
        display: none !important;
    }
    
    .tw-single-post {
        box-shadow: none;
        padding: 0;
    }
    
    body {
        background: #fff;
    }
}

/* ====== Responsive ====== */
@media (max-width: 1200px) {
    .col-lg-3 { width: 50%; }
    .col-lg-4 { width: 100%; }
    .col-lg-6 { width: 100%; }
    .col-lg-8 { width: 100%; }
    .col-lg-9 { width: 100%; }
    
    .tw-footer-widgets .tarhanweb-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tw-media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .tw-main-header .tarhanweb-container {
        flex-wrap: wrap;
    }
    
    .tw-menu {
        display: none;
    }
    
    .tw-mobile-toggle {
        display: block;
    }
    
    .tw-main-slider {
        height: 300px;
    }
    
    .tw-slide-title {
        font-size: 18px;
    }
    
    .tw-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .col-md-3 { width: 100%; }
    .col-md-4 { width: 100%; }
    .col-md-6 { width: 100%; }
    .col-md-8 { width: 100%; }
    .col-md-9 { width: 100%; }
    .col-md-12 { width: 100%; }
    
    .tw-main-slider {
        height: 250px;
    }
    
    .tw-slide-content {
        padding: 20px;
    }
    
    .tw-slide-title {
        font-size: 16px;
    }
    
    .tw-footer-widgets .tarhanweb-row {
        grid-template-columns: 1fr;
    }
    
    .tw-media-grid {
        grid-template-columns: 1fr;
    }
    
    .tw-related-grid {
        grid-template-columns: 1fr;
    }
    
    .tw-post-title {
        font-size: 20px;
    }
    
    .tw-form-row {
        grid-template-columns: 1fr;
    }
    
    .tw-footer-bottom .tarhanweb-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .tw-social-links {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .tw-post-actions {
        justify-content: center;
    }
    
    .tw-post-meta-top {
        gap: 10px;
    }
    
    .tw-breaking-news .tarhanweb-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .tw-breaking-content {
        flex: none;
        width: 100%;
        height: 30px;
    }
    
    .tw-top-bar .tarhanweb-container {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tw-logo-text h1 {
        font-size: 20px;
    }
    
    .tw-slide-title {
        font-size: 14px;
    }
    
    .tw-main-slider {
        height: 200px;
    }
    
    .tw-social-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tw-latest-news-title {
        font-size: 14px;
    }
}

/* ====== Custom Scrollbar ====== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b71c1c;
}

/* ====== Accessibility ====== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ====== Admin Bar Fix ====== */
.admin-bar .tw-header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .tw-header {
        top: 46px;
    }
}

/* ====== RTL Specific ====== */
body {
    direction: rtl;
    unicode-bidi: embed;
}

.tw-menu .sub-menu {
    right: 0;
    left: auto;
}

.tw-news-list-item:hover {
    padding-right: 5px;
    padding-left: 0;
}

.tw-footer-widget ul li a:hover {
    padding-right: 5px;
    padding-left: 0;
}

/* Font Awesome RTL fixes */
.fa, .fas, .far, .fal, .fab {
    display: inline-block;
    vertical-align: middle;
}
