/* ============================================================
   رسانه پشت پرده — Front-end design system
   Minimal • news • RTL • Vazirmatn
   Palette: white / black / dark-red / light-gray
   ============================================================ */

:root {
  --c-bg: #ffffff;
  --c-ink: #111111;
  --c-ink-soft: #3f3f46;
  --c-muted: #6b7280;
  --c-line: #e7e7ea;
  --c-gray: #f4f4f5;
  --c-gray-2: #ededf0;
  --c-red: #991b1b;
  --c-red-dark: #7f1d1d;
  --c-red-soft: #fdecec;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(17,17,17,.05), 0 8px 24px rgba(17,17,17,.06);
  --shadow-sm: 0 1px 3px rgba(17,17,17,.08);
  --container: 1180px;
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 16px;
  line-height: 1.75;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-weight: 800; line-height: 1.4; margin: 0 0 .5em; letter-spacing: -.2px; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 18px; }
.muted { color: var(--c-muted); }
.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--c-ink);
  color: #d4d4d8;
  font-size: 13px;
  border-bottom: 3px solid var(--c-red);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 38px; }
.topbar .date { color: #a1a1aa; }
.topbar .socials { display: flex; gap: 14px; }
.topbar .socials a { color: #d4d4d8; transition: color .15s; }
.topbar .socials a:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--c-bg); border-bottom: 1px solid var(--c-line); position: sticky; top: 0; z-index: 50; }
.header-main { display: flex; align-items: center; gap: 18px; height: 78px; }
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand .logo { font-size: 30px; font-weight: 900; color: var(--c-ink); letter-spacing: -1px; }
.brand .logo b { color: var(--c-red); }
.brand .sub { font-size: 12.5px; color: var(--c-muted); margin-top: 2px; font-weight: 600; }
.header-spacer { flex: 1; }

/* nav */
.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  padding: 10px 14px; font-weight: 700; font-size: 15px; color: var(--c-ink-soft);
  border-radius: var(--radius-sm); transition: background .15s, color .15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--c-red); background: var(--c-red-soft); }

/* search */
.search-box { position: relative; }
.search-box form { display: flex; align-items: center; }
.search-box input {
  border: 1px solid var(--c-line); background: var(--c-gray); border-radius: 30px;
  padding: 9px 16px 9px 38px; font-family: inherit; font-size: 14px; width: 190px;
  transition: width .2s, border-color .15s; outline: none;
}
.search-box input:focus { width: 230px; border-color: var(--c-red); background: #fff; }
.search-box .btn-search { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--c-muted); padding: 6px; }

/* hamburger */
.hamburger { display: none; border: 1px solid var(--c-line); background: #fff; border-radius: 8px; padding: 8px 10px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--c-ink); margin: 4px 0; transition: .2s; }

/* mobile drawer */
.mobile-nav { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 20px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; border: 1px solid transparent; transition: .15s; }
.btn-primary { background: var(--c-red); color: #fff; }
.btn-primary:hover { background: var(--c-red-dark); }
.btn-ghost { background: #fff; color: var(--c-ink); border-color: var(--c-line); }
.btn-ghost:hover { border-color: var(--c-red); color: var(--c-red); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Section heads ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 900; }
.section-title::before { content: ""; width: 5px; height: 22px; background: var(--c-red); border-radius: 4px; display: inline-block; }
.section-more { font-size: 14px; font-weight: 700; color: var(--c-muted); }
.section-more:hover { color: var(--c-red); }

/* ---------- Category chip ---------- */
.chip { display: inline-block; font-size: 12px; font-weight: 800; color: var(--c-red); background: var(--c-red-soft); padding: 3px 10px; border-radius: 30px; }
.chip-solid { background: var(--c-ink); color: #fff; }

/* ---------- News card ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.news-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s, border-color .2s; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--c-gray-2); }
.news-card .thumb { position: relative; aspect-ratio: 16/9; background: var(--c-gray); overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .thumb img { transform: scale(1.05); }
.news-card .thumb .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #c4c4cc; font-weight: 900; font-size: 26px; background: repeating-linear-gradient(45deg, #f4f4f5, #f4f4f5 12px, #efeff1 12px, #efeff1 24px); }
.news-card .thumb .chip { position: absolute; top: 10px; right: 10px; }
.news-card .pin { position: absolute; top: 10px; left: 10px; background: var(--c-red); color: #fff; border-radius: 30px; padding: 3px 9px; font-size: 11px; font-weight: 800; }
.news-card .body { padding: 14px 15px 16px; display: flex; flex-direction: column; flex: 1; }
.news-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.news-card h3 a:hover { color: var(--c-red); }
.news-card .excerpt { color: var(--c-muted); font-size: 14px; line-height: 1.7; margin-bottom: 12px; flex: 1; }
.news-card .meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--c-muted); border-top: 1px solid var(--c-line); padding-top: 10px; }
.news-card .meta .by { font-weight: 700; color: var(--c-ink-soft); }

/* horizontal mini list (top news) */
.mini-list { display: grid; gap: 14px; }
.mini-item { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px dashed var(--c-line); }
.mini-item:last-child { border-bottom: 0; }
.mini-item .num { font-size: 20px; font-weight: 900; color: var(--c-red); min-width: 26px; }
.mini-item h4 { font-size: 14.5px; margin: 0 0 4px; font-weight: 700; }
.mini-item h4 a:hover { color: var(--c-red); }
.mini-item .meta { font-size: 12px; color: var(--c-muted); }

/* ---------- Hero row (top news + slider) ---------- */
.hero-row { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: stretch; }

/* ---------- Slider (compact) ---------- */
.slider { position: relative; height: 360px; border-radius: var(--radius); overflow: hidden; background: var(--c-ink); box-shadow: var(--shadow-sm); }
.slider .slides { height: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide .ph { width:100%;height:100%;background:linear-gradient(135deg,#1f2937,#111827);}
.slide .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,0) 100%); }
.slide .caption { position: absolute; bottom: 0; right: 0; left: 0; padding: 20px 22px; color: #fff; }
.slide .caption .chip { margin-bottom: 8px; }
.slide .caption h3 { font-size: 19px; color: #fff; margin: 0; line-height: 1.5; }
.slider .dots { position: absolute; bottom: 12px; left: 16px; display: flex; gap: 7px; z-index: 3; }
.slider .dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.45); padding: 0; }
.slider .dots button.active { background: #fff; width: 22px; border-radius: 5px; }
.slider .nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(0,0,0,.4); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; }
.slider .nav:hover { background: var(--c-red); }
.slider .nav.prev { right: 10px; }
.slider .nav.next { left: 10px; }

/* ---------- Featured reports (wide cards) ---------- */
.report-card { display: grid; grid-template-columns: 220px 1fr; gap: 0; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s; }
.report-card:hover { box-shadow: var(--shadow); }
.report-card .thumb { aspect-ratio: auto; }
.report-card .thumb img { height: 100%; }
.report-card .body { padding: 16px 18px; }
.report-card h3 { font-size: 18px; }
.reports-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* ---------- Video cards ---------- */
.video-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.video-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.video-card .thumb { position: relative; aspect-ratio: 16/9; background: #000; }
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.video-card .play span { width: 54px; height: 54px; border-radius: 50%; background: rgba(153,27,27,.92); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; padding-right: 3px; }
.video-card .dur { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.video-card .body { padding: 12px 14px 14px; }
.video-card h4 { font-size: 15px; margin: 0 0 6px; }
.video-card .meta { font-size: 12px; color: var(--c-muted); }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--c-ink); border-radius: 14px; color: #fff; padding: 34px; display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: center; }
.newsletter h3 { color: #fff; font-size: 23px; margin: 0 0 6px; }
.newsletter p { color: #c4c4cc; margin: 0; font-size: 14.5px; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input { flex: 1; border: none; border-radius: 9px; padding: 13px 16px; font-family: inherit; font-size: 14px; outline: none; }
.newsletter .btn-primary { padding-inline: 22px; }

/* ---------- Footer ---------- */
.site-footer { background: #0c0c0d; color: #a1a1aa; margin-top: 40px; padding-top: 44px; border-top: 4px solid var(--c-red); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.site-footer .logo { font-size: 26px; font-weight: 900; color: #fff; }
.site-footer .logo b { color: var(--c-red); }
.site-footer p { font-size: 13.5px; line-height: 1.9; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; padding: 5px 0; font-size: 13.5px; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-socials { display: flex; gap: 10px; margin-top: 14px; }
.footer-socials a { width: 36px; height: 36px; border-radius: 8px; background: #1c1c1f; display: flex; align-items: center; justify-content: center; color: #d4d4d8; }
.footer-socials a:hover { background: var(--c-red); color: #fff; }
.footer-bottom { border-top: 1px solid #1f1f23; padding: 18px 0; font-size: 12.5px; text-align: center; color: #71717a; }
.footer-bottom .tags { margin-top: 8px; color: #52525b; font-size: 11.5px; }

/* ---------- Article (single) ---------- */
.article-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 34px; align-items: start; }
.breadcrumb { font-size: 13px; color: var(--c-muted); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--c-red); }
.article-header h1 { font-size: 30px; line-height: 1.5; margin-bottom: 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13.5px; color: var(--c-muted); padding: 12px 0; border-block: 1px solid var(--c-line); margin-bottom: 22px; }
.article-meta .by { font-weight: 700; color: var(--c-ink-soft); }
.article-figure { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.article-body { font-size: 17px; line-height: 2.1; color: var(--c-ink-soft); }
.article-body h2 { font-size: 22px; margin: 1.4em 0 .6em; color: var(--c-ink); }
.article-body h3 { font-size: 19px; margin: 1.2em 0 .5em; color: var(--c-ink); }
.article-body img { border-radius: var(--radius); margin: 1.2em 0; }
.article-body blockquote { margin: 1.4em 0; padding: 14px 20px; border-right: 4px solid var(--c-red); background: var(--c-red-soft); border-radius: 8px; font-weight: 600; color: var(--c-red-dark); }
.article-body a { color: var(--c-red); border-bottom: 1px solid rgba(153,27,27,.3); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--c-line); }
.article-tags a { font-size: 13px; background: var(--c-gray); padding: 5px 12px; border-radius: 30px; color: var(--c-ink-soft); }
.article-tags a:hover { background: var(--c-red); color: #fff; }
.share-row { display: flex; gap: 8px; margin-top: 20px; }
.share-row a { width: 38px; height: 38px; border-radius: 8px; background: var(--c-gray); display: flex; align-items: center; justify-content: center; color: var(--c-ink-soft); }
.share-row a:hover { background: var(--c-red); color: #fff; }

/* sidebar */
.sidebar-box { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; }
.sidebar-box > h4 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sidebar-box > h4::before { content:""; width:4px;height:18px;background:var(--c-red);border-radius:3px; }

/* ---------- Page header ---------- */
.page-head { background: var(--c-gray); border-bottom: 1px solid var(--c-line); padding: 30px 0; margin-bottom: 30px; }
.page-head h1 { font-size: 26px; margin: 0; }
.page-head .sub { color: var(--c-muted); margin-top: 6px; }

/* pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--c-line); border-radius: 8px; font-weight: 700; font-size: 14px; padding: 0 10px; }
.pagination a:hover { border-color: var(--c-red); color: var(--c-red); }
.pagination .active span, .pagination [aria-current] span { background: var(--c-red); color: #fff; border-color: var(--c-red); }
.pagination .disabled span { color: #c4c4cc; }

/* alerts */
.flash { padding: 12px 16px; border-radius: 9px; margin-bottom: 18px; font-weight: 600; font-size: 14px; }
.flash-success { background: #ecfdf3; color: #027a48; border: 1px solid #a6f4c5; }
.flash-error { background: #fef3f2; color: #b42318; border: 1px solid #fda29b; }

/* empty */
.empty { text-align: center; padding: 50px 20px; color: var(--c-muted); }
.empty .ic { font-size: 40px; margin-bottom: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-row { grid-template-columns: 1fr; }
  .slider { height: 320px; }
  .article-wrap { grid-template-columns: 1fr; }
  .cards-grid.cols-4 { grid-template-columns: repeat(3,1fr); }
  .newsletter { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .main-nav, .search-box { display: none; }
  .hamburger { display: block; }
  .cards-grid, .cards-grid.cols-4, .reports-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav.open { display: block; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .header-main { height: 64px; }
  .brand .logo { font-size: 24px; }
  .slider { height: 240px; }
  .slide .caption h3 { font-size: 16px; }
  .cards-grid, .cards-grid.cols-4, .reports-grid { grid-template-columns: 1fr; }
  .report-card { grid-template-columns: 120px 1fr; }
  .report-card h3 { font-size: 15px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .article-header h1 { font-size: 23px; }
  .article-body { font-size: 16px; line-height: 2; }
  .newsletter { padding: 24px; }
  .section { padding: 26px 0; }
}

/* ---------- Mobile drawer styling ---------- */
.mobile-nav { position: fixed; inset: 0; z-index: 100; }
.mobile-nav .backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.mobile-nav .panel { position: absolute; top: 0; right: 0; bottom: 0; width: 78%; max-width: 320px; background: #fff; padding: 22px; overflow-y: auto; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
.mobile-nav .panel .logo { font-size: 24px; font-weight: 900; margin-bottom: 4px; }
.mobile-nav .panel .logo b { color: var(--c-red); }
.mobile-nav .panel .sub { font-size: 12px; color: var(--c-muted); margin-bottom: 18px; }
.mobile-nav .panel a.nav-link { display: block; padding: 13px 12px; border-radius: 9px; font-weight: 700; font-size: 16px; border-bottom: 1px solid var(--c-line); }
.mobile-nav .panel a.nav-link:hover { background: var(--c-red-soft); color: var(--c-red); }
.mobile-nav .panel form { margin-top: 16px; display: flex; gap: 6px; }
.mobile-nav .panel input { flex: 1; border: 1px solid var(--c-line); border-radius: 8px; padding: 11px 12px; font-family: inherit; }
.no-scroll { overflow: hidden; }
