/*
Theme Name: کوت نیوز | KootNews
Theme URI: https://kootnews.ir/
Author: مارون استودیو
Author URI: https://marunstudio.ir/
Description: پوسته خبری، تحلیلی و مستقل کوت نیوز؛ ساختار تخت، سبک، بدون سایه و منطبق بر اصول سئو و استانداردهای وب.
Version: 2.3.1
Text Domain: kootnews
Domain Path: /languages
*/

/* ==========================================================================
   ۱. متغیرهای طراحی و ریست پایه (CSS RESET & VARIABLES)
   ========================================================================== */
:root {
  /* پالت رنگی اصلی */
  --primary: #e21010;
  --primary-hover: #be0c0c;
  --primary-dark: #960707;

  /* نوار مشکی ناوبری */
  --nav-black: #000000;
  --nav-hover: #1a1a1a;
  --nav-active: #111111;
  --nav-border: #262626;

  /* پالت فوتر تیره */
  --footer-bg: #111418;
  --footer-sub-bg: #0b0d10;
  --footer-border: #202630;
  --footer-text: #9eacb9;
  --footer-text-light: #e2e8f0;

  /* رنگ‌های کمکی و خنثی */
  --secondary: #008751;
  --secondary-hover: #00663d;
  --bg-page: #ffffff;
  --bg-subtle: #f8f9fa;
  --bg-card: #ffffff;
  --border-light: #eaecef;
  --border-medium: #ced4da;
  --border-dark: #6c757d;
  --text-main: #1a1a1a;
  --text-muted: #4a4a4a;
  --text-soft: #717171;
  --text-inverse: #ffffff;

  --max-width: 1280px;
  --font-family: 'Sahel', 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  box-shadow: none !important;
  text-shadow: none !important;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  background-color: var(--bg-page);
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
  width: 100%;
}

body.drawer-open, 
body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
  cursor: pointer;
}

a:hover {
  color: var(--primary);
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}

figure {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* دسترس‌پذیری وردپرس (Accessibility) */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* ==========================================================================
   ۲. پترن لینک سراسری کارت‌ها (STRETCHED LINK)
   ========================================================================== */
.hero-card,
.horizontal-article,
.flash-item,
.ranked-list-item,
.compact-card {
  position: relative;
  cursor: pointer;
}

.stretched-link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: auto;
}

.card-meta,
.category-tag,
.article-footer a,
.single-tags-area a {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   ۳. سرتیتر بخش‌ها و تب‌ها (SECTION HEADERS & TABS)
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 2px;
}

.section-header .header-dot {
  width: 9px;
  height: 9px;
  background-color: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.section-header .header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  margin: 0;
  letter-spacing: -0.3px;
}

.section-header .header-line {
  flex-grow: 1;
  height: 2px;
  background-color: var(--primary);
}

.section-header.tabs-header {
  gap: 10px;
}

.header-tabs-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.header-tab-btn {
  padding: 1px 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-soft);
  cursor: pointer;
  background: transparent;
  border: none !important;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.header-tab-btn:hover {
  color: var(--primary);
}

.header-tab-btn.active {
  background-color: var(--primary);
  color: var(--text-inverse);
}

/* ==========================================================================
   ۴. نوار راهنما (BREADCRUMBS)
   ========================================================================== */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-soft);
  overflow: hidden;
}

.breadcrumb-nav a {
  color: var(--text-muted);
  font-weight: 600;
}

.breadcrumb-nav a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--border-dark);
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ==========================================================================
   ۵. هدر بالای سایت (TOP BAR & RAHBARI BANNER)
   ========================================================================== */
.top-header {
  background-color: var(--primary);
  border-bottom: 1px solid var(--primary-dark);
  padding: 8px 0;
  color: var(--text-inverse);
}

.top-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.custom-logo-img,
.brand-group img {
  max-height: 120px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.brand-titles h1,
.brand-titles h2 {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-inverse);
  letter-spacing: -0.5px;
}

.brand-titles h2 a,
.brand-titles h1 a {
  color: var(--text-inverse);
}

.brand-titles .brand-edition {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  margin-top: 2px;
}

.header-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.header-rahbari-badge {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.rahbari-banner-img {
  max-height: 100px;
  width: auto;
  object-fit: contain;
  filter: none !important;
  display: block;
}

.persian-date-display {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.persian-date-display svg {
  width: 14px;
  height: 14px;
  color: var(--text-inverse);
}

/* ==========================================================================
   ۶. منوی چسبان مشکی (STICKY NAVIGATION)
   ========================================================================== */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--nav-black);
  border-bottom: 1px solid #141414;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.nav-right-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  cursor: pointer;
  padding: 6px;
}

.hamburger-btn svg {
  width: 22px;
  height: 22px;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

.primary-menu::-webkit-scrollbar {
  display: none;
}

.primary-menu li a {
  display: block;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #d1d5db;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.primary-menu li a:hover,
.primary-menu li.current-menu-item > a {
  color: #ffffff;
  background-color: var(--nav-hover);
  border-bottom-color: var(--primary);
}

.search-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.search-form-desktop {
  display: flex;
  align-items: center;
  border: 1px solid var(--nav-border);
  background-color: #0a0a0a;
}

.search-form-desktop:focus-within {
  border-color: var(--primary);
}

.search-input-desktop {
  padding: 4px 10px;
  font-size: 0.8rem;
  color: #ffffff;
  width: 170px;
  direction: rtl;
  background: transparent;
  border: none;
}

.search-input-desktop::placeholder {
  color: #737373;
}

.search-button-desktop {
  padding: 4px 8px;
  cursor: pointer;
  color: #a3a3a3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-button-desktop:hover {
  color: #ffffff;
  background-color: var(--nav-hover);
}

.search-button-desktop svg {
  width: 15px;
  height: 15px;
}

.mobile-search-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  cursor: pointer;
}

.mobile-search-btn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   ۷. مودال جستجو و دراور موبایل (MODALS & DRAWER)
   ========================================================================== */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 50px 16px 20px;
  backdrop-filter: blur(4px);
}

.search-modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-modal-box {
  width: 100%;
  max-width: 500px;
  background-color: #12151a;
  border: 1px solid #282e38;
  padding: 18px;
}

.search-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #1e232b;
  padding-bottom: 8px;
}

.search-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.search-modal-close-btn {
  color: #a0aec0;
  cursor: pointer;
  padding: 4px;
}

.search-modal-close-btn:hover {
  color: var(--primary);
}

.modal-search-form {
  display: flex;
  gap: 6px;
}

.modal-search-input {
  flex-grow: 1;
  background-color: #0a0c0e;
  border: 1px solid #2d3748;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.modal-search-input:focus {
  border-color: var(--primary);
}

.modal-search-submit {
  background-color: var(--primary);
  color: #ffffff;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.modal-search-submit:hover {
  background-color: var(--primary-hover);
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  bottom: 0;
  width: 290px;
  background-color: #12151a;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
  overflow-y: auto;
}

.mobile-drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: #0a0c0e;
  border-bottom: 1px solid #1e232b;
}

.drawer-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
}

.drawer-close-btn {
  color: #a0aec0;
  cursor: pointer;
  padding: 4px;
}

.drawer-close-btn:hover {
  color: var(--primary);
}

.drawer-menu-list {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
}

.drawer-menu-list li a {
  display: block;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e0;
  border-bottom: 1px solid #1a1f26;
  cursor: pointer;
}

.drawer-menu-list li a:hover,
.drawer-menu-list li.current-menu-item > a {
  background-color: #1c222b;
  color: var(--primary);
}

/* ==========================================================================
   ۸. ساختار شبکه اصلی (GRID 50% | 25% | 25%)
   ========================================================================== */
.main-wrapper {
  padding-top: 24px;
  padding-bottom: 48px;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* ==========================================================================
   ۹. ستون اول: بخش اصلی (PRIMARY COLUMN - 50%)
   ========================================================================== */
.primary-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

/* خبر شاخص بزرگ */
.hero-card {
  display: flex;
  flex-direction: row;
  border: none;
  background: transparent;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.hero-media {
  position: relative;
  width: 48%;
  min-height: 230px;
  flex-shrink: 0;
  background-color: var(--bg-subtle);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pinned-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  z-index: 2;
}

.hero-body {
  padding-right: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.hero-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 6px;
}

.hero-card:hover .hero-title a {
  color: var(--primary);
}

.hero-summary {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: justify;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-soft);
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-meta svg {
  width: 13px;
  height: 13px;
  color: var(--text-soft);
}

/* لیست اخبار افقی میانی */
.secondary-feed {
  display: flex;
  flex-direction: column;
}

.horizontal-article {
  display: flex;
  flex-direction: row;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}

.horizontal-article:first-child {
  padding-top: 2px;
}

.horizontal-article:last-child {
  border-bottom: none;
}

.article-thumb {
  width: 135px;
  height: 90px;
  flex-shrink: 0;
  background-color: var(--bg-subtle);
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  min-width: 0;
}

.article-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 4px;
}

.horizontal-article:hover .article-title a {
  color: var(--primary);
}

.article-excerpt {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--text-soft);
}

.category-tag {
  color: var(--primary);
  font-weight: 700;
}

.archive-button-container {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.archive-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 30px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.archive-btn:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.archive-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   ۱۰. ستون دوم: اخبار فلش، پربازدیدها و اجتماعی (MIDDLE COLUMN - 25%)
   ========================================================================== */
.middle-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.sector-block {
  border: none;
  background: transparent;
  padding: 0;
}

.flash-news-list {
  display: flex;
  flex-direction: column;
}

.flash-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.flash-item:first-child { 
  padding-top: 0; 
}

.flash-item:last-child { 
  border-bottom: none; 
  padding-bottom: 0; 
}

.flash-bullet {
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
  display: inline-block;
  transition: transform 0.15s ease;
}

.flash-headline {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text-main);
  flex-grow: 1;
}

.flash-item:hover .flash-headline { 
  color: var(--primary); 
}

.flash-item:hover .flash-bullet { 
  transform: scale(1.3); 
}

/* تب‌های پربازدیدترین‌ها */
.tab-panel {
  display: none;
  flex-direction: column;
}

.tab-panel.active {
  display: flex;
}

.ranked-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
}

.ranked-list-item:first-child { 
  padding-top: 0; 
}

.ranked-list-item:last-child { 
  border-bottom: none; 
  padding-bottom: 0; 
}

.rank-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #f1f3f5;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ranked-title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-main);
}

.ranked-list-item:hover .ranked-title {
  color: var(--primary);
}

/* اخبار اجتماعی کوچک */
.compact-feed {
  display: flex;
  flex-direction: column;
}

.compact-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
}

.compact-card:first-child { 
  padding-top: 0; 
}

.compact-card:last-child { 
  border-bottom: none; 
  padding-bottom: 0; 
}

.compact-thumb {
  width: 74px;
  height: 58px;
  flex-shrink: 0;
  background-color: var(--bg-subtle);
  overflow: hidden;
}

.compact-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-info {
  flex-grow: 1;
}

.compact-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card:hover .compact-title {
  color: var(--primary);
}

.compact-date {
  font-size: 0.72rem;
  color: var(--text-soft);
  margin-top: 3px;
}

/* ==========================================================================
   ۱۱. ستون سوم: تبلیغات (ADVERTISEMENTS - 25%)
   ========================================================================== */
.sidebar-ads-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.ad-card {
  border: 1px dashed var(--border-medium);
  background-color: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 16px;
  transition: border-color 0.2s ease;
  width: 100%;
}

.ad-card:hover {
  border-color: var(--primary);
}

.ad-card.banner-medium {
  min-height: 250px;
}

.ad-card.banner-skyscraper {
  min-height: 600px;
}

.ad-label-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  color: var(--text-soft);
  border: 1px solid var(--border-medium);
  padding: 1px 6px;
  background: var(--bg-page);
}

.ad-client-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ad-spec-dimensions {
  font-size: 0.75rem;
  color: var(--text-soft);
  direction: ltr;
}

/* ==========================================================================
   ۱۲. صفحه تکی خبر (SINGLE POST VIEW & TYPOGRAPHY)
   ========================================================================== */
.single-article-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.single-pre-title {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
}

.single-main-title {
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.45;
  color: var(--text-main);
  letter-spacing: -0.3px;
  word-break: break-word;
}

.single-meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-soft);
}

.single-meta-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.single-meta-strip svg {
  width: 14px;
  height: 14px;
  color: var(--text-soft);
}

.single-lead-box {
  font-size: 1rem;
  line-height: 1.85;
  font-weight: 600;
  color: #2b303a;
  background-color: #f8fafc;
  border-right: 4px solid var(--primary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  border-left: 1px solid var(--border-light);
  padding: 16px 20px;
  text-align: justify;
  margin: 4px 0 10px 0;
}

.single-lead-box p {
  margin: 0;
}

/* تصویر شاخص تکی (اصلاح شده و بدون سرریز) */
.single-featured-media {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  background-color: var(--bg-subtle);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.single-featured-media img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.media-caption {
  font-size: 0.78rem;
  color: var(--text-soft);
  padding: 8px 12px;
  background-color: #f1f3f5;
  border-top: 1px solid var(--border-light);
  line-height: 1.5;
  text-align: center;
}

/* بدنه محتوای خبر و تایپوگرافی کامل */
.single-content-body {
  font-size: 1rem;
  line-height: 2.1;
  color: #24292e;
  text-align: justify;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.single-content-body p {
  margin: 0 0 12px 0;
}

/* تیترهای درون متن خبر */
.single-content-body h1,
.single-content-body h2,
.single-content-body h3,
.single-content-body h4,
.single-content-body h5,
.single-content-body h6 {
  color: var(--text-main);
  font-weight: 800;
  margin: 22px 0 10px 0;
  line-height: 1.5;
}

.single-content-body h2 {
  font-size: 1.32rem;
  border-right: 4px solid var(--primary);
  padding-right: 10px;
}

.single-content-body h3 {
  font-size: 1.18rem;
  color: #0f172a;
}

.single-content-body h4 {
  font-size: 1.05rem;
}

/* نقل‌قول‌ها (Blockquotes) */
.single-content-body blockquote {
  position: relative;
  margin: 18px 0;
  padding: 18px 24px;
  background-color: #f8fafc;
  border-right: 4px solid var(--secondary);
  border-left: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 1.02rem;
  font-style: normal;
  color: #1e293b;
  line-height: 1.9;
}

.single-content-body blockquote p {
  margin-bottom: 6px;
}

.single-content-body blockquote cite {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 6px;
}

/* لیست‌ها درون متن خبر */
.single-content-body ul,
.single-content-body ol {
  margin: 12px 0;
  padding-right: 24px;
}

.single-content-body ul {
  list-style: disc;
}

.single-content-body ol {
  list-style: persian;
}

.single-content-body li {
  margin-bottom: 8px;
  line-height: 1.9;
  padding-right: 4px;
}

/* استایل جداول (ریسپانسیو و استاندارد) */
.single-content-body table,
.wp-block-table table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.9rem;
  line-height: 1.7;
}

.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 18px 0;
  width: 100%;
}

.single-content-body th,
.single-content-body td,
.wp-block-table th,
.wp-block-table td {
  border: 1px solid var(--border-medium);
  padding: 10px 14px;
  text-align: right;
  vertical-align: middle;
}

.single-content-body th,
.wp-block-table th {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 800;
}

.single-content-body tr:nth-child(even) td,
.wp-block-table tr:nth-child(even) td {
  background-color: #f8fafc;
}

/* تصاویر و رسانه‌های داخل محتوا */
.single-content-body img {
  height: auto;
  max-width: 100%;
  margin: 12px auto;
  display: block;
}

.single-content-body figure {
  margin: 16px 0;
  max-width: 100%;
}

.single-content-body figcaption {
  font-size: 0.78rem;
  color: var(--text-soft);
  text-align: center;
  padding: 6px 0;
}

/* ویدیوها، کدهای امبد و آپارات */
.single-content-body iframe,
.single-content-body embed,
.single-content-body video {
  max-width: 100%;
  margin: 14px 0;
}

.video-container,
.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 16px 0;
  background: #000;
}

.video-container iframe,
.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* کدها و پیش‌نمایش متنی */
.single-content-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px 18px;
  border-radius: 4px;
  overflow-x: auto;
  font-family: Consolas, monospace;
  font-size: 0.88rem;
  direction: ltr;
  text-align: left;
  margin: 14px 0;
}

.single-content-body code {
  background: #f1f5f9;
  color: #b91c1c;
  padding: 2px 6px;
  font-size: 0.85em;
  font-family: Consolas, monospace;
  direction: ltr;
  display: inline-block;
}

.single-content-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* برچسب‌های انتهای خبر */
.single-tags-area {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid var(--border-light);
}

.tag-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-soft);
}

.tag-pill {
  font-size: 0.76rem;
  padding: 3px 10px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  transition: all 0.15s ease;
  cursor: pointer;
}

.tag-pill:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   ۱۳. سیستم نظرات کاربران (COMMENTS SYSTEM)
   ========================================================================== */
.comments-wrapper {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--border-light);
  width: 100%;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.comment-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  border-bottom: 1px dashed var(--border-medium);
  padding-bottom: 6px;
}

.comment-author {
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.comment-author::before {
  content: "";
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
}

.comment-date {
  color: var(--text-soft);
  font-size: 0.74rem;
}

.comment-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.comment-form {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  background-color: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--text-main);
}

.form-control:focus {
  border-color: var(--primary);
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

.submit-comment-btn {
  align-self: flex-start;
  padding: 8px 24px;
  background-color: var(--primary);
  color: var(--text-inverse);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.submit-comment-btn:hover {
  background-color: var(--primary-hover);
}

/* ==========================================================================
   ۱۴. صفحه‌بندی آرشیو (PAGINATION BAR)
   ========================================================================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border-light);
}

.pagination-bar .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  background-color: #ffffff;
  transition: all 0.15s ease;
  cursor: pointer;
}

.pagination-bar .page-numbers:hover,
.pagination-bar .page-numbers.current {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--text-inverse);
}

/* ==========================================================================
   ۱۵. فوتر تیره و کردیت استودیو مارون (FOOTER)
   ========================================================================== */
.site-footer {
  background-color: var(--footer-bg);
  border-top: 3px solid var(--primary);
  color: var(--footer-text);
  padding-top: 40px;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--footer-border);
}

.footer-col-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--footer-text-light);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--footer-border);
}

.footer-col-title::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
}

.footer-about-text {
  font-size: 0.88rem;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
  color: var(--footer-text);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--footer-border);
  background-color: #181c22;
  color: var(--footer-text);
  transition: all 0.15s ease;
  cursor: pointer;
}

.social-icon-btn:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

.social-icon-btn svg {
  width: 16px;
  height: 16px;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-list a {
  font-size: 0.88rem;
  color: var(--footer-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.footer-nav-list a::before {
  content: "▪";
  color: var(--primary);
  font-size: 0.9rem;
}

.footer-nav-list a:hover {
  color: #ffffff;
}

.sub-footer {
  padding: 20px 0;
  background-color: var(--footer-sub-bg);
  font-size: 0.82rem;
}

.sub-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.copyright-statement {
  color: #718096;
}

.footer-dev-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #718096;
}

.marun-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e2e8f0;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.marun-brand-link:hover {
  color: var(--primary);
}

.marun-logo-svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

/* دکمه شناور بازگشت به بالا */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 42px;
  height: 42px;
  background-color: var(--primary);
  color: var(--text-inverse);
  border: 1px solid var(--primary-hover);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background-color 0.15s ease;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background-color: var(--primary-hover);
}

.scroll-top-btn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   ۱۶. برگه‌های ثابت وردپرس (STATIC PAGES: PAGE.PHP)
   ========================================================================== */
.page-article-wrapper {
  background: transparent;
}

.page-content-body {
  font-size: 0.95rem;
  line-height: 1.95;
  color: #2d3748;
}

.page-content-body h2,
.page-content-body h3,
.page-content-body h4 {
  color: var(--text-main);
  font-weight: 800;
  margin-top: 24px;
  margin-bottom: 12px;
}

.page-content-body h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.page-content-body h3 {
  font-size: 1.15rem;
}

.page-content-body h4 {
  font-size: 1rem;
}

.page-content-body ul, 
.page-content-body ol {
  padding-right: 22px;
  margin: 14px 0;
}

.page-content-body ul {
  list-style: disc;
}

.page-content-body ol {
  list-style: decimal;
}

.page-content-body li {
  margin-bottom: 8px;
}

.page-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88rem;
}

.page-content-body th,
.page-content-body td {
  border: 1px solid var(--border-light);
  padding: 10px 14px;
  text-align: right;
}

.page-content-body th {
  background-color: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-main);
}

.page-pagination-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.page-pagination-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.page-number-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 0.85rem;
  border: 1px solid var(--border-medium);
  background-color: var(--bg-page);
  color: var(--text-main);
}

/* ==========================================================================
   ۱۷. صفحه خطای ۴۰۴ (404 ERROR PAGE)
   ========================================================================== */
.error-404-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 16px;
  max-width: 680px;
  margin: 0 auto;
}

.error-code-badge {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
  letter-spacing: -2px;
  margin-bottom: 8px;
}

.error-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.error-description {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.error-search-box {
  width: 100%;
  max-width: 480px;
  margin-bottom: 24px;
}

.error-search-form {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border-medium);
  background-color: #ffffff;
}

.error-search-form:focus-within {
  border-color: var(--primary);
}

.error-search-input {
  flex-grow: 1;
  padding: 10px 14px;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-main);
  outline: none;
}

.error-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  background-color: var(--primary);
  color: var(--text-inverse);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.error-search-btn:hover {
  background-color: var(--primary-hover);
}

.error-search-btn svg {
  width: 16px;
  height: 16px;
}

.error-actions-group {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   ۱۸. کلاس‌های استاندارد هسته وردپرس (WP CORE ALIGNMENTS & CAPTIONS)
   ========================================================================== */
.alignnone {
  margin: 5px 0 20px 0;
  max-width: 100%;
  height: auto;
}

.aligncenter, 
div.aligncenter {
  display: block;
  margin: 14px auto;
  max-width: 100%;
}

.alignright {
  float: right;
  margin: 5px 0 20px 20px;
  max-width: 100%;
}

.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
  max-width: 100%;
}

.wp-caption {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  max-width: 100% !important;
  padding: 5px;
  text-align: center;
  margin-bottom: 16px;
}

.wp-caption.alignnone,
.wp-caption.aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.wp-caption img {
  border: 0 none;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  padding: 0;
  width: auto;
  display: block;
}

.wp-caption .wp-caption-text {
  font-size: 0.78rem;
  line-height: 1.6;
  margin: 0;
  padding: 8px 4px 4px;
  color: var(--text-soft);
}

/* ==========================================================================
   ۱۹. واکنش‌گرایی و مدیاکوئری‌ها (RESPONSIVE & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .portal-grid {
    grid-template-columns: minmax(0, 60%) minmax(0, 40%);
  }

  .sidebar-ads-col {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .hamburger-btn { 
    display: flex; 
  }
  
  .primary-menu { 
    display: none; 
  }
}

@media (max-width: 768px) {
  .portal-grid {
    grid-template-columns: 100%;
    gap: 24px;
    width: 100%;
  }

  .primary-col,
  .middle-col,
  .sidebar-ads-col {
    grid-column: span 1;
    width: 100%;
    min-width: 0;
  }

  .search-form-desktop { 
    display: none; 
  }

  .mobile-search-btn { 
    display: flex; 
  }

  /* نمایش دو ستونه تمیز تبلیغات در موبایل */
  .sidebar-ads-col {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .ad-card.banner-medium,
  .ad-card.banner-skyscraper {
    min-height: 150px !important;
    padding: 10px !important;
  }

  .ad-client-title { 
    font-size: 0.82rem; 
  }

  .ad-spec-dimensions { 
    font-size: 0.68rem; 
  }

  /* ساختار هدر در موبایل */
  .top-header-inner {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-group {
    order: 1;
    flex-shrink: 0;
  }

  .custom-logo-img,
  .brand-group img {
    max-height: 42px;
    max-width: 150px;
  }

  .brand-titles h1,
  .brand-titles h2 {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  .brand-titles .brand-edition {
    font-size: 0.75rem;
  }

  .header-meta {
    order: 2;
    align-items: flex-end !important;
    text-align: left;
    margin-right: auto;
  }

  .header-rahbari-badge {
    justify-content: flex-end;
  }

  .rahbari-banner-img {
    max-height: 46px;
  }

  .persian-date-display {
    font-size: 0.72rem;
    margin-top: 2px;
  }

  .hero-card { 
    flex-direction: column; 
  }

  .hero-media { 
    width: 100%; 
    min-height: 190px; 
  }

  .hero-body { 
    padding-right: 0; 
    padding-top: 14px; 
  }

  .horizontal-article {
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
  }

  .article-thumb {
    width: 105px !important;
    height: 75px !important;
  }

  .article-title {
    font-size: 0.88rem;
    line-height: 1.4;
  }

  .article-excerpt { 
    display: none; 
  }

  .article-footer { 
    margin-top: 4px; 
  }

  .form-row { 
    grid-template-columns: 1fr; 
  }

  /* تنظیمات صفحه تکی خبر در موبایل */
  .single-main-title { 
    font-size: 1.28rem; 
    line-height: 1.5;
  }

  .single-featured-media {
    margin: 0 0 14px 0 !important;
    width: 100% !important;
  }

  .single-featured-media img {
    max-height: 260px;
    object-fit: cover;
  }

  .single-lead-box {
    font-size: 0.92rem;
    padding: 12px 14px;
    line-height: 1.75;
  }

  .single-content-body {
    font-size: 0.95rem;
    line-height: 1.9;
  }

  .single-content-body blockquote {
    padding: 12px 14px;
    font-size: 0.92rem;
  }

  .alignright,
  .alignleft {
    float: none !important;
    margin: 10px 0 !important;
    width: 100% !important;
  }

  .footer-columns { 
    grid-template-columns: 1fr; 
  }

  .sub-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .error-code-badge {
    font-size: 4.5rem;
  }

  .error-main-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .horizontal-article {
    gap: 10px;
  }

  .article-thumb {
    width: 90px !important;
    height: 65px !important;
  }

  .error-search-form {
    flex-direction: column;
  }

  .error-search-btn {
    padding: 9px;
    justify-content: center;
  }
}