/* ==========================================================================
   تک مسیر (TakMasir) — قالب سایت خبری
   هویت بصری: سرمه‌ای عمیق #09162B غالب، سفید/خاکستری روشن، فیروزه‌ای #00D1D1 فقط تأکیدی
   ========================================================================== */

/* ---- فونت استعداد (ایران‌سنس‌مانند) ---- */
@font-face {
  font-family: 'Estedad';
  src: url('https://cdn.jsdelivr.net/gh/aminabedi68/Estedad@latest/dist/Estedad-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* ---- متغیرهای رنگ برند ---- */
:root {
  --navy:        #09162B;  /* سرمه‌ای عمیق — رنگ غالب تیره */
  --navy-2:      #0C1D38;  /* سرمه‌ای روشن‌تر برای نوارها */
  --navy-3:      #0e2140;  /* برای پس‌زمینه رسانه‌ای */
  --teal:        #00D1D1;  /* فیروزه‌ای — فقط تأکیدی */
  --teal-hover:  #1ee0e0;
  --teal-dark:   #0AA1A1;  /* لینک روی پس‌زمینه روشن */
  --ink:         #0F1B2D;  /* متن اصلی تیره */
  --ink-2:       #1c2a3b;
  --body-text:   #54626f;
  --muted:       #8390a0;
  --page-bg:     #E7ECF1;  /* خاکستری روشن پس‌زمینه صفحه */
  --surface:     #F4F6F8;  /* سطح روشن قالب */
  --card:        #ffffff;
  --border:      #e5eaf0;
  --border-2:    #eef1f5;
  --on-navy:     #ffffff;
  --on-navy-mut: #a9b4c1;
  --on-navy-dim: #7d899c;
  --radius:      14px;
  --radius-sm:   9px;
  --maxw:        1180px;
}

/* ---- ریست پایه ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  direction: rtl;
  background: var(--page-bg);
  color: var(--ink);
  font-family: 'Estedad', 'Vazirmatn', Tahoma, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; text-wrap: pretty; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- لینک‌ها: پیش‌فرض فیروزه‌ای تیره، hover فیروزه‌ای روشن ---- */
a { color: var(--teal-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--teal); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.accent-bar { display: inline-block; width: 34px; height: 3px; background: var(--teal); border-radius: 2px; }

/* ==========================================================================
   نوار خبر فوری (Breaking ticker)
   ========================================================================== */
.ticker {
  background: var(--navy);
  color: var(--on-navy-mut);
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
}
.ticker .container { display: flex; align-items: center; gap: 14px; padding: 9px 20px; }
.ticker__tag {
  background: var(--teal); color: #062033; font-weight: 800;
  padding: 3px 10px; border-radius: 5px; font-size: 12px; flex-shrink: 0;
}
.ticker__track { flex: 1; overflow: hidden; white-space: nowrap; }
.ticker__item { color: #e6ebf1; font-weight: 600; }
.ticker__date { color: var(--on-navy-dim); font-size: 12.5px; flex-shrink: 0; }

/* ==========================================================================
   هدر و لوگو
   ========================================================================== */
.header { background: var(--navy); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px; }

.logo { display: flex; flex-direction: column; gap: 5px; }
.logo__fa { font-size: 26px; font-weight: 900; color: #fff; letter-spacing: 1px; line-height: 1; }
.logo__underline { width: 38px; height: 3px; border-radius: 2px; background: var(--teal); }
.logo__en { font-size: 11px; font-weight: 700; color: #aeb9c6; letter-spacing: 3px; }
.logo__dot-i { position: relative; display: inline-block; }
.logo__dot-i::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  top: -.34em; width: .15em; height: .15em; border-radius: 50%; background: var(--teal);
}

.header__tools { display: flex; align-items: center; gap: 12px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm); padding: 9px 14px; width: 230px;
}
.search input {
  background: none; border: none; outline: none; color: #fff;
  font-family: inherit; font-size: 13px; width: 100%;
}
.search input::placeholder { color: #8fa0b3; }
.search svg { flex-shrink: 0; }

/* دکمه اصلی CTA — فیروزه‌ای */
.btn {
  font-family: inherit; font-weight: 800; font-size: 13.5px; cursor: pointer;
  border-radius: var(--radius-sm); padding: 11px 20px; border: none;
  transition: background-color .15s ease, transform .05s ease;
}
.btn--cta { background: var(--teal); color: #062033; }
.btn--cta:hover { background: var(--teal-hover); }
.btn--block { width: 100%; padding: 12px; font-size: 14px; }
.btn:active { transform: translateY(1px); }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ==========================================================================
   منوی ناوبری
   ========================================================================== */
.nav { background: var(--navy-2); border-bottom: 1px solid rgba(255,255,255,.06); }
.nav__inner { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 0 20px; }
.nav__inner::-webkit-scrollbar { height: 0; }
.nav__link {
  color: #c1cbd8; font-weight: 600; font-size: 14px;
  padding: 15px 14px; border-bottom: 3px solid transparent; white-space: nowrap;
}
.nav__link:hover { color: #fff; }
.nav__link.is-active { color: #fff; font-weight: 700; border-bottom-color: var(--teal); }

.nav__toggle { display: none; }

/* ==========================================================================
   عناوین بخش
   ========================================================================== */
.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.section-title::before { content: ''; width: 5px; height: 22px; background: var(--teal); border-radius: 3px; }
.section-title h2, .section-title h3 { font-weight: 800; color: var(--ink); }
.section-title h2 { font-size: 20px; }
.section-title--light h2, .section-title--light h3 { color: #fff; }

/* ==========================================================================
   کارت‌های خبر
   ========================================================================== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.card__media {
  aspect-ratio: 16 / 9;
  height: auto;
  background-image: repeating-linear-gradient(135deg, #dbe2ea 0 9px, #e6ecf2 9px 18px);
  display: flex; align-items: center; justify-content: center;
  color: #9aa7b5; font-family: monospace; font-size: 11px;
}
/* هر عکس داخل کارت دقیقاً کادر ۱۶:۹ را پر می‌کند → همهٔ عکس‌ها یک‌اندازه */
.card__media > img,
.grid-2 .card__media > img, .grid-3 .card__media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__body { padding: 15px 16px; }
.card__cat { color: var(--teal-dark); font-weight: 800; font-size: 12px; }
.card__title { margin: 8px 0 10px; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); font-weight: 700; }
.card__title a { color: inherit; }
.card__title a:hover { color: var(--teal-dark); }
.card__meta { color: var(--muted); font-size: 12px; }

/* کارت شاخص هیرو */
.hero-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hero-card__media {
  aspect-ratio: 16 / 9;
  background-image: repeating-linear-gradient(135deg, #dbe2ea 0 9px, #e6ecf2 9px 18px);
  display: flex; align-items: center; justify-content: center;
  color: #98a6b6; font-family: monospace; font-size: 13px;
}
.hero-card__media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-card__body { padding: 22px 24px; }
.hero-card__title { margin: 10px 0 12px; font-size: 28px; line-height: 1.5; color: var(--ink); font-weight: 900; }
.hero-card__title a { color: inherit; }
.hero-card__excerpt { margin-bottom: 14px; color: var(--body-text); font-size: 15px; line-height: 2; }

/* ==========================================================================
   چیدمان اصلی: محتوا + سایدبار
   ========================================================================== */
.layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; padding: 26px 0; }
.col-main { display: flex; flex-direction: column; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }

/* باکس سایدبار */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.panel__title { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.panel__title::before { content: ''; width: 5px; height: 20px; background: var(--teal); border-radius: 3px; }
.panel__title h3 { font-size: 17px; color: var(--ink); font-weight: 800; }

/* لیست پربازدید */
.rank-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border-2); }
.rank-item:last-child { border-bottom: none; }
.rank-item__n { font-size: 22px; font-weight: 900; color: var(--teal-dark); line-height: 1; min-width: 26px; }
.rank-item__title { margin: 0 0 6px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); font-weight: 700; }
.rank-item__title a { color: inherit; }
.rank-item__cat { color: var(--muted); font-size: 12px; }

/* باکس خبرنامه (سرمه‌ای) */
.newsletter-box { background: var(--navy); border-radius: var(--radius); padding: 24px; }
.newsletter-box h3 { color: #fff; font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.newsletter-box p { color: var(--on-navy-mut); font-size: 13.5px; line-height: 1.9; margin-bottom: 16px; }
.field {
  width: 100%; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: #fff; border-radius: var(--radius-sm); padding: 12px 14px;
  font-family: inherit; font-size: 13.5px; margin-bottom: 10px; outline: none;
}
.field::placeholder { color: #8b97a6; }
.field:focus { border-color: var(--teal); }

/* پیام موفقیت خبرنامه */
.newsletter-ok { color: var(--teal); font-weight: 700; font-size: 13.5px; margin-top: 4px; }

/* ==========================================================================
   نوار ویدیو / چندرسانه‌ای
   ========================================================================== */
.video-card { position: relative; border-radius: 12px; overflow: hidden; background: var(--navy); aspect-ratio: 16/9; }
.video-card__bg { position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, var(--navy-3) 0 10px, #122748 10px 20px); }
.video-card__dur { position: absolute; top: 12px; right: 12px; background: rgba(0,209,209,.92); color: #062033; font-weight: 800; font-size: 11px; padding: 4px 9px; border-radius: 6px; }
.video-card__play { position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(0,209,209,.95); display: flex; align-items: center; justify-content: center; transition: transform .15s ease; }
.video-card:hover .video-card__play { transform: translate(-50%,-50%) scale(1.08); }
.video-card__cap { position: absolute; bottom: 0; right: 0; left: 0; padding: 16px; background: linear-gradient(transparent, rgba(6,17,33,.9)); }
.video-card__cap h3 { color: #fff; font-size: 15px; line-height: 1.6; font-weight: 700; }
.video-card__cap h3 a { color: inherit; }

/* ==========================================================================
   فوتر
   ========================================================================== */
.footer { background: var(--navy); padding: 34px 0 24px; margin-top: 8px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer__brand .logo__fa { font-size: 22px; }
.footer__brand p { color: #96a2b1; font-size: 13.5px; line-height: 2; max-width: 320px; margin-top: 7px; }
.footer__col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer__col ul { display: flex; flex-direction: column; gap: 9px; }
.footer__col a { color: var(--on-navy-mut); font-size: 13.5px; }
.footer__col a:hover { color: var(--teal); }
.footer__bottom { padding-top: 18px; color: #6f7d8f; font-size: 12.5px; text-align: center; }

/* ==========================================================================
   صفحه دسته‌بندی
   ========================================================================== */
.page-head { background: var(--navy); padding: 40px 0; }
.page-head__cat { color: var(--teal); font-weight: 800; font-size: 14px; }
.page-head h1 { color: #fff; font-size: 34px; font-weight: 900; margin: 10px 0 8px; }
.page-head p { color: var(--on-navy-mut); font-size: 15px; max-width: 640px; line-height: 1.9; }
.breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--on-navy-dim); font-size: 13px; margin-bottom: 14px; }
.breadcrumb a { color: var(--on-navy-mut); }
.breadcrumb span { color: var(--on-navy-dim); }

/* لیست افقی مقالات */
.list-item { display: grid; grid-template-columns: 220px 1fr; gap: 18px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.list-item__media { aspect-ratio: 16 / 9; background-image: repeating-linear-gradient(135deg, #dbe2ea 0 9px, #e6ecf2 9px 18px); display: flex; align-items: center; justify-content: center; color: #9aa7b5; font-family: monospace; font-size: 11px; }
.list-item__media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-item__body { padding: 16px 18px 16px 0; display: flex; flex-direction: column; justify-content: center; }
.list-item__title { margin: 9px 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); font-weight: 700; }
.list-item__title a { color: inherit; }
.list-item__excerpt { color: var(--body-text); font-size: 14px; line-height: 1.9; margin-bottom: 10px; }

.article-list { display: flex; flex-direction: column; gap: 16px; }

/* صفحه‌بندی */
.pagination { display: flex; gap: 8px; justify-content: center; padding: 30px 0 10px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; border: 1px solid var(--border); background: var(--card); color: var(--ink-2);
}
.pagination a:hover { border-color: var(--teal); color: var(--teal-dark); }
.pagination .is-active { background: var(--teal); border-color: var(--teal); color: #062033; }

/* ==========================================================================
   صفحه تک‌خبر
   ========================================================================== */
.article-hero { background: var(--navy); padding: 40px 0 46px; }
.article-hero .breadcrumb { margin-bottom: 18px; }
.article-hero__cat { display: inline-block; background: var(--teal); color: #062033; font-weight: 800; font-size: 12px; padding: 5px 12px; border-radius: 6px; margin-bottom: 16px; }
.article-hero h1 { color: #fff; font-size: 36px; line-height: 1.5; font-weight: 900; max-width: 820px; }
.article-hero__lead { color: var(--on-navy-mut); font-size: 17px; line-height: 2; max-width: 760px; margin-top: 16px; }
.article-meta { display: flex; align-items: center; gap: 16px; margin-top: 22px; color: var(--on-navy-mut); font-size: 13.5px; }
.article-meta .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color: #062033; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.article-meta strong { color: #fff; font-weight: 700; }

.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; padding: 30px 0; }
.article-figure { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; aspect-ratio: 16 / 9; background-image: repeating-linear-gradient(135deg, #dbe2ea 0 9px, #e6ecf2 9px 18px); display: flex; align-items: center; justify-content: center; color: #98a6b6; font-family: monospace; }
.article-figure > img { width: 100%; height: 100%; object-fit: cover; display: block; }

.prose { color: #2c3a4a; font-size: 17px; line-height: 2.1; }
.prose p { margin-bottom: 20px; }
.prose h2 { font-size: 23px; color: var(--ink); font-weight: 800; margin: 30px 0 14px; }
.prose h2::before { content: ''; display: inline-block; width: 5px; height: 20px; background: var(--teal); border-radius: 3px; margin-inline-end: 10px; vertical-align: -3px; }
.prose blockquote { margin: 24px 0; padding: 4px 18px; border-inline-start: 3px solid var(--teal); color: var(--ink); font-size: 19px; font-weight: 600; line-height: 1.9; }
.prose a { border-bottom: 1px solid currentColor; }
.prose ul { list-style: disc; padding-inline-start: 22px; margin-bottom: 20px; }
.prose ul li { margin-bottom: 8px; }

/* اشتراک‌گذاری */
.share { display: flex; align-items: center; gap: 10px; padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 30px 0; }
.share span { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.share__btn { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); }
.share__btn:hover { background: var(--teal); border-color: var(--teal); color: #062033; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--body-text); }
.tag:hover { border-color: var(--teal); color: var(--teal-dark); }

.toc { position: sticky; top: 20px; }

/* ==========================================================================
   صفحه درباره / تماس
   ========================================================================== */
.about-intro { padding: 40px 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.about-intro__text p { color: var(--body-text); font-size: 16px; line-height: 2.1; margin-bottom: 18px; }
.about-intro__text h2 { font-size: 22px; color: var(--ink); margin: 26px 0 12px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.stat__num { font-size: 32px; font-weight: 900; color: var(--ink); }
.stat__num b { color: var(--teal-dark); }
.stat__label { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 20px; }
.value { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.value__icon { width: 44px; height: 44px; border-radius: 11px; background: rgba(0,209,209,.12); display: flex; align-items: center; justify-content: center; color: var(--teal-dark); margin-bottom: 14px; }
.value h3 { font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.value p { color: var(--body-text); font-size: 14px; line-height: 1.9; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 40px 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.input {
  width: 100%; border: 1px solid var(--border); background: var(--card); color: var(--ink);
  border-radius: var(--radius-sm); padding: 12px 14px; font-family: inherit; font-size: 14px; outline: none;
}
.input:focus { border-color: var(--teal); }
textarea.input { resize: vertical; min-height: 130px; }

.contact-info { background: var(--navy); border-radius: var(--radius); padding: 30px; color: #fff; height: fit-content; }
.contact-info h3 { font-size: 20px; margin-bottom: 6px; }
.contact-info .accent-bar { margin-bottom: 20px; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.contact-line:last-child { border-bottom: none; }
.contact-line__icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(0,209,209,.14); display: flex; align-items: center; justify-content: center; color: var(--teal); flex-shrink: 0; }
.contact-line__label { color: var(--on-navy-mut); font-size: 12.5px; }
.contact-line__val { color: #fff; font-size: 14.5px; font-weight: 600; margin-top: 2px; }

.form-ok { background: rgba(0,209,209,.1); border: 1px solid var(--teal); color: var(--teal-dark); border-radius: var(--radius-sm); padding: 14px; font-weight: 700; font-size: 14px; margin-bottom: 16px; display: none; }
.form-ok.show { display: block; }

/* ==========================================================================
   ریسپانسیو
   ========================================================================== */
@media (max-width: 980px) {
  .layout, .article-layout { grid-template-columns: 1fr; }
  .about-intro, .contact-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .toc { position: static; }
}
@media (max-width: 720px) {
  /* موبایل: تاریخِ کنار نوار فوری مخفی شود تا خبر فوری به خط بعد نیفتد */
  .ticker__date { display: none; }
  .ticker .container { flex-wrap: nowrap; }
  .ticker__track { min-width: 0; }
  .header__inner { flex-wrap: wrap; }
  .search { width: 100%; order: 3; }
  .nav__inner { gap: 0; }
  .grid-3, .values-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .list-item { grid-template-columns: 1fr; }
  .list-item__body { padding: 16px; }
  .hero-card__title { font-size: 22px; }
  .article-hero h1 { font-size: 26px; }
  .page-head h1 { font-size: 26px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid-3, .values-grid, .stats, .footer__grid { grid-template-columns: 1fr; }
}
