/*
Theme Name: ساعت ۲۵
Theme URI: https://www.saat25.ir
Author: Saat25
Description: قالب سبک و سریع برای سایت خبری فارسی، با یک رنگ تأکید و صفحه اول دسته‌بندی‌شده.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: saat25
*/

:root {
  --ink: #14171c;
  --navy: #12284c;
  --text: #374151;
  --muted: #6b7280;
  --line: #e4e6ea;
  --bg: #f3f4f6;
  --card: #ffffff;
  --accent: #c8102e;
  --accent-dark: #9f0d25;
  --wrap: 1200px;
  --font: Tahoma, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.9 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--ink); }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 4px; }
.skip:focus { top: 8px; }

/* ---------- هدر ---------- */
.topbar { background: var(--navy); color: #c9ced6; font-size: 12.5px; line-height: 2.2; }
.head-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.site-header { background: #fff; }
.logo { font-size: 30px; font-weight: 900; color: var(--accent); letter-spacing: -.5px; line-height: 1.4; }
.custom-logo { max-height: 56px; width: auto; }
.search { display: flex; }
.search input { width: 230px; max-width: 100%; border: 1px solid var(--line); border-inline-end: 0; border-radius: 6px 0 0 6px; padding: 7px 12px; font: inherit; font-size: 14px; background: var(--bg); }
[dir="rtl"] .search input { border-radius: 0 6px 6px 0; border-inline-end: 0; border-inline-start: 1px solid var(--line); }
.search button { border: 0; background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 700; padding: 7px 16px; cursor: pointer; border-radius: 6px 0 0 6px; }
[dir="rtl"] .search button { border-radius: 6px 0 0 6px; }
.search button:hover { background: var(--accent-dark); }

.nav-bar { background: #fff; border-block: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .nav-bar { top: 32px; }
.nav-toggle { display: none; border: 0; background: none; font: inherit; font-weight: 800; color: var(--ink); padding: 10px 0; cursor: pointer; }
.primary-nav .menu { display: flex; flex-wrap: wrap; gap: 2px; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 11px 14px; font-weight: 700; font-size: 15px; color: var(--ink); box-shadow: inset 0 -3px 0 transparent; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-cat > a { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.primary-nav .sub-menu, .primary-nav .children { display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 190px; background: #fff; border: 1px solid var(--line); border-top: 0; box-shadow: 0 10px 24px rgba(20,23,28,.12); z-index: 60; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu,
.primary-nav li:hover > .children, .primary-nav li:focus-within > .children { display: block; }
.primary-nav .sub-menu a, .primary-nav .children a { font-weight: 500; box-shadow: none; padding: 9px 16px; }

/* ---------- خبر فوری ---------- */
.ticker { display: flex; align-items: center; gap: 14px; margin-top: 18px; background: #fff; border: 1px solid var(--line); overflow: hidden; font-size: 14.5px; }
.ticker-label { flex: none; align-self: stretch; display: flex; align-items: center; background: var(--accent); color: #fff; font-weight: 800; padding: 0 16px; }
.ticker-items { position: relative; flex: 1; min-width: 0; height: 26px; }
.ticker-items a { position: absolute; inset: 0; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; pointer-events: none; transition: opacity .3s; font-weight: 600; color: var(--ink); }
.ticker-items a.is-active { opacity: 1; pointer-events: auto; }
.ticker-items a:hover { color: var(--accent); }

/* ---------- عنوان بخش‌ها ---------- */
.sec-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sec-title { position: relative; font-size: 20px; font-weight: 900; line-height: 1.6; padding-block: 2px 10px; padding-inline-start: 14px; margin-bottom: -1px; border-bottom: 2px solid var(--accent); }
.sec-title::before { content: ""; position: absolute; inset-inline-start: 0; top: 9px; width: 5px; height: 20px; background: var(--accent); }
.sec-title a:hover { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; }
.chips a { font-size: 13px; padding: 1px 12px; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 4px; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.sec-more { margin-inline-start: auto; padding-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.sec-more:hover { text-decoration: underline; }
.sec { margin-top: 40px; }

/* ---------- خبر اصلی ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.hero-main { position: relative; min-height: 440px; background: #1f2329; overflow: hidden; border-radius: 12px; }
.hero-main > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,12,15,.88) 0%, rgba(10,12,15,.15) 62%, rgba(10,12,15,0) 100%); }
.hero-text { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; padding: 28px; color: #fff; }
.hero-title { margin-top: 10px; color: #fff; font-size: 30px; font-weight: 900; line-height: 1.7; }
.hero-title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.hero-text .badge { position: relative; z-index: 3; }
.hero-excerpt { margin: 6px 0 0; color: #e5e7eb; font-size: 15px; max-width: 70ch; }
.hero-side { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; }
.hero-side .row { flex: 1; align-items: center; padding-block: 12px; }
.hero-side .row + .row { border-top: 1px solid var(--line); }

/* ---------- کارت‌ها ---------- */
.badge { display: inline-block; align-self: flex-start; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.9; padding: 0 10px; border-radius: 3px; }
.badge:hover { background: var(--accent-dark); }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.card-media { display: block; aspect-ratio: 16 / 10; background: #e5e7eb; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.8; }
.card-title a:hover, .row-title a:hover { color: var(--accent); }
.card-excerpt { margin: 0; font-size: 14px; line-height: 1.9; color: var(--muted); }
.meta { font-size: 12.5px; color: var(--muted); }
.ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e5e7eb, #f3f4f6); }

.list { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; }
.list .row { padding-block: 14px; }
.list .row + .row { border-top: 1px solid var(--line); }
.row { display: flex; gap: 12px; align-items: flex-start; }
.row-media { flex: none; width: 104px; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; background: #e5e7eb; }
.row-media img { width: 100%; height: 100%; object-fit: cover; }
.row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { font-size: 16px; font-weight: 700; line-height: 1.85; }
.row--lg { gap: 16px; }
.row--lg .row-media { width: 220px; }
.row .num { flex: none; width: 28px; font-size: 24px; font-weight: 900; line-height: 1.5; color: var(--accent); }
.list--plain .row-media { width: 84px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; margin-top: 36px; }
.sidebar .box { position: sticky; top: 70px; }
.admin-bar .sidebar .box { top: 102px; }
.sidebar .sec-head { border: 0; }
.sidebar .sec-title { margin-bottom: 10px; }
.sidebar .list { margin-top: 0; }
.more-btn { display: inline-block; margin-top: 16px; padding: 8px 22px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14.5px; border-radius: 6px; }
.more-btn:hover { background: var(--accent); }

.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }

/* ---------- آرشیو و جستجو ---------- */
.archive-head { margin: 28px 0 20px; }
.archive-head .sec-title { font-size: 24px; display: inline-block; }
.archive-desc { margin-top: 10px; color: var(--muted); max-width: 70ch; }
.archive-head .chips { margin-top: 12px; padding: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.empty { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 32px; text-align: center; }
.navigation.pagination { margin-top: 28px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.page-numbers { min-width: 40px; text-align: center; padding: 4px 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-weight: 700; }
.page-numbers.current, a.page-numbers:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- مطلب ---------- */
.article { max-width: 800px; margin: 28px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 32px; }
.article-head h1 { margin-top: 12px; font-size: 32px; font-weight: 900; line-height: 1.75; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.lead-img { margin: 22px -32px; }
.lead-img img { width: 100%; }
.lead-img figcaption { padding: 8px 32px 0; font-size: 13px; color: var(--muted); }
.entry-content { font-size: 17.5px; line-height: 2.15; color: #1f2937; max-width: 70ch; margin-inline: auto; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content h2, .entry-content h3 { margin: 1.7em 0 .6em; line-height: 1.7; }
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 20px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.entry-content img { border-radius: 6px; margin-block: 1em; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 18px; border-inline-start: 4px solid var(--accent); background: var(--bg); }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; margin: 0 0 1.25em; }
.entry-content ul { list-style: disc; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.tags a { font-size: 13px; padding: 1px 12px; border: 1px solid var(--line); border-radius: 4px; }
.tags a:hover { border-color: var(--accent); color: var(--accent); }
.related, .comments { max-width: 800px; margin: 36px auto 0; }
.related .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.comments { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.comment-list { list-style: none; padding: 0; margin: 16px 0; }
.comment-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-inline-start: 22px; }
.comment-meta { font-size: 13px; color: var(--muted); }
.comments input[type="text"], .comments input[type="email"], .comments input[type="url"], .comments textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font: inherit; background: var(--bg); }
.comments .submit { border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 700; padding: 8px 22px; border-radius: 6px; cursor: pointer; }

/* ---------- فوتر ---------- */
.site-footer { margin-top: 56px; background: var(--navy); color: #c9ced6; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-block: 32px; }
.logo--foot { color: #fff; }
.foot-desc { margin: 6px 0 0; max-width: 46ch; font-size: 14px; }
.foot-menu { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-menu a:hover { color: #fff; text-decoration: underline; }
.copy { border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; padding-block: 12px; }

/* ---------- وردپرس ---------- */
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: 13px; color: var(--muted); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 960px) {
  .hero, .layout { grid-template-columns: minmax(0, 1fr); }
  .hero-main { min-height: 320px; }
  .hero-title { font-size: 24px; }
  .grid, .related .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar .box { position: static; }
}
@media (max-width: 720px) {
  .head-main { flex-direction: column; align-items: stretch; gap: 10px; }
  .search { width: 100%; }
  .search input { flex: 1; width: auto; }
  .nav-toggle { display: block; }
  .primary-nav { display: none; padding-bottom: 8px; }
  .primary-nav.is-open { display: block; }
  .primary-nav .menu { flex-direction: column; }
  .primary-nav a { box-shadow: none; border-bottom: 1px solid var(--line); }
  .primary-nav .sub-menu, .primary-nav .children { display: block; position: static; border: 0; box-shadow: none; padding-inline-start: 14px; }
  .sec-grid, .grid, .related .grid { grid-template-columns: minmax(0, 1fr); }
  .row--lg { flex-direction: column; }
  .row--lg .row-media { width: 100%; }
  .article { padding: 18px; border-radius: 0; margin-inline: -16px; }
  .lead-img { margin-inline: -18px; }
  .lead-img figcaption { padding-inline: 18px; }
  .article-head h1 { font-size: 24px; }
  .entry-content { font-size: 16.5px; }
  .hero-text { padding: 18px; }
  .hero-excerpt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
