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

:root{
  --bg:#f4f6f9;
  --surface:#ffffff;
  --surface-2:#f9fbfd;
  --text:#18212f;
  --muted:#6f7c8f;
  --line:#dce3ec;
  --primary:#c8161d;
  --primary-dark:#a00f15;
  --primary-soft:#fde9ea;
  --dark:#111827;
  --accent:#0d6efd;
  --shadow:0 8px 30px rgba(15,23,42,.06);
  --radius:12px;
  --radius-sm:8px;
  --container:min(1320px, calc(100% - 32px));
}
body.dark-theme {
  --bg:#0f172a;
  --surface:#1e293b;
  --surface-2:#334155;
  --text:#f8fafc;
  --muted:#94a3b8;
  --line:#334155;
  --primary:#ef4444;
  --primary-dark:#dc2626;
  --primary-soft:rgba(239, 68, 68, 0.15);
  --shadow:0 8px 30px rgba(0,0,0,0.4);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:'Vazirmatn', Tahoma, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.75;
  transition: background-color 0.3s, color 0.3s;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.container{width:var(--container);margin-inline:auto}
.site-shell{min-height:100vh;display:flex;flex-direction:column; padding-bottom: 60px;}

/* Reading Progress Bar */
.reading-progress-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 1000;
}
.reading-progress-bar {
  height: 100%; background: var(--primary); width: 0;
}

/* Breaking Bar & Marquee / Ticker */
.breaking-bar{background:var(--primary);color:#fff;box-shadow:inset 0 -1px 0 rgba(255,255,255,.1); overflow:hidden;}
.breaking-inner{padding:10px 0;gap:14px; display:flex; align-items:center;}
.breaking-label{
  background:rgba(255,255,255,.14); padding:4px 10px;border-radius:999px;
  font-weight:800;white-space:nowrap; flex-shrink:0; z-index:2;
}
.ticker-wrap {
  overflow: hidden;
  width: 100%;
  position: relative;
}
.ticker{
  display:flex;
  gap:36px;
  white-space:nowrap;
  animation: tickerAnimation 30s linear infinite;
}
.ticker:hover {
  animation-play-state: paused;
}
.ticker::-webkit-scrollbar{display:none}
.ticker a{position:relative;padding-inline-start:16px; font-weight:500;}
.ticker a::before{
  content:"";position:absolute;right:0;top:50%;width:5px;height:5px;border-radius:50%;
  background:#fff;transform:translateY(-50%);
}

@keyframes tickerAnimation {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(100%, 0, 0); }
}

main{flex:1; padding-bottom:24px;}
.utility-bar{background:#0f172a; color:#e5e7eb; font-size:13px;}
.utility-inner,.header-inner,.topbar-inner,.footer-bottom{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.utility-inner{padding:8px 0}
.utility-right,.utility-links{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.utility-links a{opacity:.9}
.dot{opacity:.5}

.site-header{
  position:sticky;top:0;z-index:20;background:rgba(var(--surface),.96);
  backdrop-filter:blur(12px);box-shadow:var(--shadow);
}
body.dark-theme .site-header { background: rgba(30, 41, 59, 0.96); }

.header-inner{padding:12px 0;gap:18px}
.brand{display:flex;align-items:center;gap:14px;min-width:0}
.brand img{width:44px;height:44px}
.brand-copy{display:grid;gap:2px}
.brand strong{font-size:20px; font-weight:800;}
.brand small{color:var(--muted);font-size:12px}

.main-nav{display:flex;align-items:center;gap:18px;flex:1;justify-content:center}
.main-nav a{color:var(--text);font-weight:700;font-size:14px;padding:10px 0;position:relative}
.main-nav a.active,.main-nav a:hover{color:var(--primary)}
.main-nav a.active::after,.main-nav a:hover::after{
  content:"";position:absolute;right:0;left:0;bottom:0;height:2px;background:var(--primary);border-radius:999px
}

.header-actions{display:flex;align-items:center;gap:12px}
.desktop-nav-extras { display: flex; align-items: center; gap: 12px; }
.mobile-nav-extras { display: none; }

/* Theme Toggle & Push Bell */
.icon-btn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  width: 42px; height: 42px; border-radius: 50%; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.icon-btn:hover { background: var(--line); }

.search-inline{
  display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--line);
  border-radius:999px;padding:4px 6px 4px 12px;min-width:280px
}
.search-inline input{border:none;background:transparent;outline:none;width:100%;font-size:14px;color:var(--text)}
.search-inline button{
  border:none;background:var(--primary);color:#fff;border-radius:999px;padding:8px 14px;cursor:pointer;font-weight:700
}

.menu-toggle{display:none;border:none;background:var(--surface-2);border:1px solid var(--line);width:42px;height:42px;border-radius:12px;font-size:20px;cursor:pointer;color:var(--text)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:999px;padding:10px 18px;border:1px solid transparent;font-weight:700;cursor:pointer;transition:.2s ease}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-ghost{background:transparent;border-color:var(--line);color:var(--text)}
.btn-small{padding:6px 12px;font-size:13px}
.wide{width:100%}
.user-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--surface);padding:8px 14px;border-radius:999px;font-weight:700}

/* Typography & Layout */
.section{padding:20px 0}
.page-hero,.newsroom-hero{padding:20px 0 10px}
.eyebrow{display:inline-flex;align-items:center;gap:8px;background:var(--primary-soft);color:var(--primary);padding:6px 10px;border-radius:999px;font-weight:800;font-size:12px}
.section-head h1,.section-head h2,.section-head h3,.newsroom-hero h1,.page-hero h1,h1,h2,h3,h4{margin:0;line-height:1.4;font-weight:800;color:var(--text);}
.newsroom-hero h1,.page-hero h1{font-size:clamp(24px,4vw,36px);margin-top:8px}
.page-hero p,.newsroom-hero p,.lead{color:var(--muted)}
.headline-metrics{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:12px;min-width:min(100%,420px)}
.headline-metrics div,.metric-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px;box-shadow:var(--shadow)}
.headline-metrics strong,.metric-card strong{display:block;font-size:24px;color:var(--primary); font-weight:800;}
.headline-metrics span,.metric-card span{color:var(--muted);font-size:12px}
.card-soft{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.nested{padding:14px}
.newsroom-hero .container{display:grid;gap:16px}
.hero-grid{display:grid;grid-template-columns:1.8fr 1fr;gap:16px}
.hero-feature{overflow:hidden}
.hero-feature>img{aspect-ratio:16/9;object-fit:cover;background:var(--surface-2)}
.hero-feature-body{padding:16px}
.hero-feature h2{font-size:clamp(20px,3vw,28px);margin:10px 0}
.hero-stack{display:grid;gap:12px}
.headline-card{padding:14px}
.headline-card h3{font-size:16px;margin:8px 0}
.meta-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;color:var(--muted);font-size:12px}
.chip{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;background:var(--surface-2);color:var(--text);font-size:11px;font-weight:800}
.chip-outline{background:transparent;border:1px solid var(--line)}
.chip-alert{background:rgba(239, 68, 68, 0.1);color:var(--primary)}
.stat-row{display:flex;gap:8px;flex-wrap:wrap}
.stat-pill{display:inline-flex;align-items:center;gap:4px;padding:6px 10px;background:var(--surface-2);border:1px solid var(--line);border-radius:999px;font-size:12px;color:var(--text);font-weight:600;}

/* Lists & Grid */
.two-col-news{display:grid;grid-template-columns:1.4fr .9fr;gap:16px}
.news-wire{padding:16px}
.wire-list{display:grid;gap:8px}
.wire-item{display:grid;grid-template-columns:120px 1fr;gap:12px;padding:10px 0;border-bottom:1px dashed var(--line)}
.wire-item:last-child{border-bottom:none}
.sidebar-stack{display:grid;gap:16px}
.side-panel{padding:16px}
.mini-list{display:grid;gap:12px}
.mini-item{display:grid;grid-template-columns:82px 1fr;gap:10px;align-items:start}
.mini-item.no-thumb{grid-template-columns:1fr}
.mini-item img{width:82px;height:62px;border-radius:8px;object-fit:cover;background:var(--surface-2)}
.mini-item strong{display:block;line-height:1.5; font-size:14px;}
.category-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.category-block{padding:16px}
.list-story{display:grid;grid-template-columns:140px 1fr;gap:14px;padding:12px 0;border-bottom:1px solid var(--line)}
.list-story:last-child{border-bottom:none;padding-bottom:0}
.list-story img{width:140px;height:100px;object-fit:cover;border-radius:8px;background:var(--surface-2)}

/* Article Cards with Hover */
.cards-grid{display:grid;gap:16px}
.cards-grid.three{grid-template-columns:repeat(3,1fr)}
.cards-grid.four{grid-template-columns:repeat(4,1fr)}
.story-card{overflow:hidden; position: relative;}
.story-card>img{width:100%;aspect-ratio:16/10;object-fit:cover;background:var(--surface-2); transition: transform 0.3s ease;}
.story-card:hover>img { transform: scale(1.05); }
.story-body{padding:14px; position:relative; background:var(--surface); z-index:2;}
.story-body h3{font-size:17px;margin:8px 0}
.story-body p{margin:0;color:var(--muted);font-size:13px}
.story-stats{margin-top:10px}
.quick-view-btn { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.6); color: #fff; border: none; padding: 4px 8px; border-radius: 6px; font-size: 11px; cursor: pointer; z-index: 5; backdrop-filter: blur(4px); transition: 0.2s;}
.quick-view-btn:hover { background: var(--primary); }

/* Layouts */
.with-sidebar{display:grid;grid-template-columns:300px 1fr;gap:20px}
.sidebar{padding:16px;align-self:start;position:sticky;top:100px}
.article-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px}
.article-main{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px}
.article-cover{width:100%;border-radius:var(--radius-sm);margin:16px 0;background:var(--surface-2);aspect-ratio:16/9;object-fit:cover}

/* Advanced Article Tools */
.article-tools { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); flex-wrap: wrap; gap: 10px; }
.share-buttons { display: flex; gap: 8px; }
.share-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; text-decoration: none; font-weight: bold; font-size: 12px;}
.share-eitaa { background: #e85d24; }
.share-bale { background: #26a9e0; }
.share-rubika { background: #8e24aa; }
.share-tg { background: #0088cc; }
.font-resizer { display: flex; gap: 6px; align-items: center; background: var(--surface-2); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); }
.font-resizer button { background: transparent; border: none; font-size: 16px; color: var(--text); cursor: pointer; font-weight: bold; }
.bookmark-btn.bookmarked { background: var(--primary); color: #fff; border-color: var(--primary); }

.article-body{font-size:16px; line-height: 1.9;}
.article-body p{margin:0 0 16px}
.ai-box{padding:16px;margin:16px 0; border-right: 4px solid var(--primary); background: var(--primary-soft);}
.sticky-video { position: sticky; top: 100px; z-index: 10; box-shadow: var(--shadow); border-radius: var(--radius-sm); }

/* Forms & Tables */
.stack-form{display:grid;gap:12px}
.stack-form label{display:grid;gap:6px;font-weight:700; font-size: 14px;}
.stack-form input,.stack-form select,.stack-form textarea{width:100%;padding:10px 14px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);font:inherit}
.table{width:100%;border-collapse:collapse;font-size:13px}
.table th,.table td{padding:10px;border-bottom:1px solid var(--line);text-align:right;}
.table th{background:var(--surface-2); font-weight:800;}

/* Pagination */
.pagination{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:24px}
.pagination a{width:40px;height:40px;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;border:1px solid var(--line);background:var(--surface)}
.pagination a.active{background:var(--primary);color:#fff;border-color:var(--primary)}

/* Skeleton Loader */
.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--surface-2) 50%, var(--line) 75%); background-size: 200% 100%; animation: loading 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal-content { background: var(--surface); width: min(100%, 700px); max-height: 85vh; border-radius: var(--radius); padding: 24px; position: relative; overflow-y: auto; color: var(--text); box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 16px; left: 16px; background: var(--surface-2); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--text); font-weight: bold; }

/* Bottom Nav (Mobile) */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,0.05); z-index: 50; padding: 8px 16px; justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom, 8px); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.bottom-nav a.active { color: var(--primary); }

/* Misc */
.site-footer{margin-top:32px;background:#0f172a;color:#e5e7eb;padding-top:32px}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:18px;padding-bottom:24px}
.footer-list{list-style:none;padding:0;margin:0;display:grid;gap:8px;font-size:14px;}
.footer-list a{color:#cbd5e1}
.filter-box { background: var(--surface-2); padding: 16px; border-radius: var(--radius-sm); margin-bottom: 20px; border: 1px solid var(--line); }

/* Print Media */
@media print {
  .utility-bar, .breaking-bar, .site-header, .site-footer, .sidebar, .article-side, .article-tools, .bottom-nav { display: none !important; }
  body { background: #fff; color: #000; }
  .article-main { border: none; box-shadow: none; padding: 0; }
  a { text-decoration: none; color: #000; }
}

@media (max-width:1180px){
  .hero-grid,.two-col-news,.article-layout,.with-sidebar,.category-grid,.footer-grid{grid-template-columns:1fr}
  .sidebar{position:static}
  .cards-grid.three, .cards-grid.four{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:920px){
  .menu-toggle{display:inline-flex;}
  .main-nav{
    display:none;position:absolute;top:100%;right:16px;left:16px;background:var(--surface);border:1px solid var(--line);
    border-radius:var(--radius);box-shadow:var(--shadow);padding:16px;flex-direction:column;align-items:flex-start;
    z-index: 50;
  }
  .main-nav.is-open{display:flex}
  .main-nav a { padding: 8px 0; width: 100%; }
  
  .header-inner{flex-wrap:nowrap;}
  .header-actions{width:auto;justify-content:flex-end;}
  
  .desktop-nav-extras { display: none; }
  .mobile-nav-extras {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
}
@media (max-width:720px){
  .headline-metrics{grid-template-columns:1fr}
  .cards-grid.three,.cards-grid.four{grid-template-columns:1fr}
  .wire-item{grid-template-columns:1fr}
  .list-story,.mini-item{grid-template-columns:1fr}
  .list-story img,.mini-item img{width:100%;height:auto;aspect-ratio:16/10}
  .search-inline{width:100%}
  .utility-inner,.breaking-inner,.footer-bottom{flex-direction:column;align-items:flex-start}
  .bottom-nav { display: flex; }
  .site-shell { padding-bottom: 60px; }
}