/*
Theme Name: نشریه کوه ران
Theme URI: https://koohrun.company
Author: تیم کوه ران
Author URI: https://koohrun.company
Description: قالب تحریریه‌ای RTL با طراحی مینیمال و تیره. نسخه ۳۳ با ناوبری چسبان، Ticker زنده، و چیدمان BroadSheet تحلیلی.
Version: 33.0.18
Requires at least: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: koohrun-pro
*/

/* ------------------------------------------------------------
   1. Fonts
------------------------------------------------------------ */
@font-face {
  font-family: "B Zar";
  src: url("assets/fonts/BZar.woff") format("woff"),
       url("assets/fonts/BZar.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ascent-override: 105%;
  descent-override: 30%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "B Zar";
  src: url("assets/fonts/BZarBd.woff") format("woff"),
       url("assets/fonts/BZarBd.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  ascent-override: 105%;
  descent-override: 30%;
  line-gap-override: 0%;
}

/* ------------------------------------------------------------
   2. Foundation
------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg-deep, #030305);
  color-scheme: dark;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg, #050507);
  color: var(--t1, #ece9e3);
  font-family: var(--ff, "B Zar", Tahoma, sans-serif);
  font-size: 1.05rem;
  line-height: 1.9;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold, #d4af6a);
  outline-offset: 3px;
}

hr {
  height: 1px;
  margin: 2rem 0;
  border: 0;
  background: var(--border-2, rgba(255,255,255,.1));
}

/* ------------------------------------------------------------
   3. WordPress utilities
------------------------------------------------------------ */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.screen-reader-text:focus {
  position: fixed !important;
  z-index: 100000;
  top: 1rem;
  right: 1rem;
  width: auto !important;
  height: auto !important;
  padding: .7rem 1rem !important;
  margin: 0 !important;
  overflow: visible;
  clip: auto !important;
  clip-path: none !important;
  background: var(--surface-2, #141419);
  color: var(--t1, #ece9e3);
  border: 1px solid var(--gold, #d4af6a);
  border-radius: 6px;
}

.alignleft { float: left; margin: 0 0 1rem 1.5rem; }
.alignright { float: right; margin: 0 1rem 1rem 0; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { color: var(--t3, #69665f); font-size: .9rem; }
.sticky { position: relative; }

/* ------------------------------------------------------------
   4. Content typography
------------------------------------------------------------ */
.entry-content, .post-content {
  overflow-wrap: anywhere;
  word-break: normal;
}
.entry-content > *, .post-content > * { max-width: 100%; }
.entry-content p, .post-content p { margin: 0 0 1.15rem; }
.entry-content h2, .entry-content h3, .entry-content h4,
.post-content h2, .post-content h3, .post-content h4 {
  margin: 2rem 0 .8rem;
  font-family: "B Zar", Tahoma, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  color: var(--gold-hi, #e8c98a);
}
.entry-content h2, .post-content h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.entry-content h3, .post-content h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.entry-content ul, .entry-content ol,
.post-content ul, .post-content ol {
  margin: 0 0 1.3rem;
  padding-inline-start: 1.7rem;
}
.entry-content li, .post-content li { margin: .35rem 0; }
.entry-content blockquote, .post-content blockquote {
  margin: 1.75rem 0;
  padding: .9rem 1.1rem;
  border-inline-start: 2px solid var(--gold, #d4af6a);
  background: rgba(255,255,255,.025);
  color: var(--t2, #9b9891);
}
.entry-content pre, .post-content pre {
  max-width: 100%;
  overflow: auto;
  padding: 1rem;
  background: #020204;
  border: 1px solid var(--border, rgba(255,255,255,.07));
  border-radius: 6px;
}
.entry-content code, .post-content code {
  padding: .08em .3em;
  background: rgba(255,255,255,.05);
  border-radius: 4px;
}
.entry-content table, .post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.entry-content th, .entry-content td,
.post-content th, .post-content td {
  padding: .65rem .7rem;
  border: 1px solid var(--border-2, rgba(255,255,255,.1));
  text-align: start;
}
.entry-content a, .post-content a {
  color: var(--gold-hi, #e8c98a);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.entry-content a:hover, .post-content a:hover { color: #f1d99e; }

/* ------------------------------------------------------------
   5. Media
------------------------------------------------------------ */
.entry-content img, .post-content img,
.entry-content video, .post-content video {
  max-width: 100%;
  height: auto;
}
.entry-content iframe, .post-content iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}
.entry-content figure, .post-content figure { margin: 1.5rem 0; }
.entry-content figcaption, .post-content figcaption {
  margin-top: .5rem;
  color: var(--t3, #69665f);
  font-size: .88rem;
  line-height: 1.7;
}

/* ------------------------------------------------------------
   6. Forms
------------------------------------------------------------ */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: .65rem .8rem;
  color: var(--t1, #ece9e3);
  background: var(--surface-1, #0d0d11);
  border: 1px solid var(--border-2, rgba(255,255,255,.09));
  border-radius: 6px;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold, #d4af6a); }
button, input[type="submit"], input[type="button"] {
  border: 1px solid var(--gold-line, rgba(212,175,106,.32));
  border-radius: 6px;
  padding: .55rem .9rem;
  background: var(--surface-2, #121217);
  color: var(--t1, #ece9e3);
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  border-color: var(--gold, #d4af6a);
  color: var(--gold-hi, #e8c98a);
}

/* ------------------------------------------------------------
   7. Header fallback/base
------------------------------------------------------------ */
.site-header { width: 100%; margin: 0; background: #040406; }
.header__inner { width: min(100%, var(--max-width, 1480px)); margin-inline: auto; }
.brand { color: var(--gold, #d4af6a); }
.brand__logo { display: block; }
.brand__text { font-family: "B Zar", Tahoma, sans-serif; color: var(--gold, #d4af6a); }
.meta, .info-line { min-width: 0; }

/* ------------------------------------------------------------
   8. Page structure
------------------------------------------------------------ */
.main-content {
  width: 100%;
  margin-inline: auto;
}
.content-area { width: 100%; min-width: 0; }
.page-title, .entry-title {
  font-family: "B Zar", Tahoma, sans-serif;
  font-weight: 400;
}
.pagination { margin-top: 2rem; }
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: .25rem .55rem;
  border: 1px solid var(--border, rgba(255,255,255,.07));
  border-radius: 5px;
}
.pagination .current {
  border-color: var(--gold-line, rgba(212,175,106,.32));
  color: var(--gold-hi, #e8c98a);
}

/* ------------------------------------------------------------
   9. Single/page fallback
------------------------------------------------------------ */
.entry-page {
  width: min(100%, var(--content-width, 820px));
  margin-inline: auto;
  padding: 2rem 0 4rem;
}
.post-thumbnail, .post-feature-inline { max-width: 100%; margin: 1.5rem 0 2rem; }
.post-thumbnail img, .post-feature-inline img, .single-thumbnail {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ------------------------------------------------------------
   10. Empty states
------------------------------------------------------------ */
.no-posts, .no-results, .card--empty,
.booklets-empty, .newspapers-empty, .articles-empty {
  padding: 2rem;
  text-align: center;
  color: var(--t2, #9b9891);
  background: var(--surface-0, #08080b);
  border: 1px solid var(--border, rgba(255,255,255,.07));
  border-radius: 7px;
}

/* ------------------------------------------------------------
   11. Comments
------------------------------------------------------------ */
.comments-area {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, rgba(255,255,255,.07));
}
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-list .comment {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.07));
}
.comment-meta { color: var(--t3, #69665f); font-size: .9rem; }
.comment-content { color: var(--t2, #9b9891); }

/* ------------------------------------------------------------
   12. Motion safety
------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------
   13. Responsive foundation
------------------------------------------------------------ */
@media (max-width: 1100px) { body { font-size: 1.02rem; } }
@media (max-width: 720px) {
  .alignleft, .alignright { float: none; margin: 1rem auto; }
  .entry-page { padding-top: 1.25rem; }
}

