/*
Theme Name: BetMiz Journal
Description: مجلهٔ فارسی بت‌میز با چیدمان راست‌چین برای اصطلاحات، قوانین و راهنمای استفاده از بت‌میز.
Version: 3.1.0
Requires at least: 6.4
Requires PHP: 7.4
Author: BetMiz
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: betmiz-journal
*/

@font-face {
  font-family: "Noto Sans Arabic";
  src: url("assets/noto-sans-arabic-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Arabic";
  src: url("assets/noto-sans-arabic-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bm-paper: #f8f8f2;
  --bm-surface: #fff;
  --bm-ink: #222723;
  --bm-muted: #525b55;
  --bm-rule: #cbd0c7;
  --bm-rule-soft: #dfe3da;
  --bm-charcoal: #2b2f2c;
  --bm-signal: #2bdf00;
  --bm-leaf: #23623a;
  --bm-highlight: #a7ec7e;
  --bm-forest: #153b2b;
  --bm-gold: #ded09a;
  --bm-font: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --bm-edge: clamp(1.05rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-block-size: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--bm-ink);
  background: var(--bm-paper);
  font: 400 1rem/1.85 var(--bm-font);
}
main { flex: 1 0 auto; }
img { max-inline-size: 100%; block-size: auto; }
figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.5; text-wrap: pretty; }
p { margin: 0; }
a { color: inherit; }
a, button, input, summary { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #23623a;
  outline-offset: 3px;
}
::selection { color: #182319; background: #a7ec7e; }
.bm-wrap { inline-size: min(100% - var(--bm-edge) * 2, 76rem); margin-inline: auto; }
.screen-reader-text, .bm-skip:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.bm-skip:focus {
  position: absolute;
  z-index: 20;
  inset-block-start: .45rem;
  inset-inline-start: var(--bm-edge);
  padding: .6rem 1rem;
  color: white;
  background: var(--bm-charcoal);
}

/* Masthead and navigation */
.bm-header { position: relative; z-index: 5; color: #fff; background: var(--bm-charcoal); border-block-end: 3px solid #434942; }
.bm-header-row { display: flex; align-items: center; gap: clamp(1rem, 3vw, 3rem); min-block-size: 5.2rem; }
.bm-brand { display: inline-flex; align-items: center; min-inline-size: 0; flex-shrink: 1; }
.bm-brand a { text-decoration: none; }
.bm-brand-name { font-size: clamp(1.32rem, 2.2vw, 1.95rem); line-height: 1.4; font-weight: 900; overflow-wrap: anywhere; }
.bm-wordmark { display: inline-flex; direction: ltr; align-items: center; flex-wrap: wrap; gap: .56rem; }
.bm-brand-mark { display: inline-flex; align-items: center; gap: .11em; white-space: nowrap; font: 400 clamp(1.4rem, 2.3vw, 2rem)/1 "Segoe UI", Arial, sans-serif; letter-spacing: -.05em; }
.bm-word-bet { padding: .04em .29em .1em .22em; color: #f7fbf4; border: .09em solid var(--bm-signal); border-radius: 2em; font-size: .84em; font-weight: 600; letter-spacing: -.045em; }
.bm-word-miz { color: #eeefec; font-weight: 300; }
.bm-brand-edition { padding-inline-start: .58rem; border-inline-start: 1px solid #737b71; color: var(--bm-gold); font: 700 .7rem/1.25 "Segoe UI", Arial, sans-serif; letter-spacing: .105em; }
.bm-brand .custom-logo { display: block; max-inline-size: min(12.4rem, 40vw); max-block-size: 3.2rem; inline-size: auto; block-size: auto; object-fit: contain; }
.bm-nav { min-inline-size: 0; }
.bm-nav ul, .bm-mobile-nav ul, .bm-footer ul { list-style: none; padding: 0; margin: 0; }
.bm-nav ul { display: flex; align-items: center; flex-wrap: wrap; gap: .05rem clamp(.9rem, 2.2vw, 2.2rem); }
.bm-nav a, .bm-mobile-nav a, .bm-footer a { text-decoration: none; }
.bm-nav a { display: block; padding-block: .55rem; font-size: .88rem; font-weight: 600; }
.bm-nav .current-menu-item > a, .bm-nav .current_page_item > a, .bm-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--bm-signal); }
.bm-nav a:hover, .bm-footer a:hover, .bm-mobile-nav a:hover { text-decoration: underline; text-underline-offset: .32em; }
.bm-search, .bm-mobile-nav { position: relative; }
.bm-search { margin-inline-start: auto; flex: none; }
.bm-search summary, .bm-mobile-nav summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-block-size: 2.75rem;
  min-inline-size: 2.75rem;
  padding: .35rem .75rem;
  border: 1px solid var(--bm-rule);
  border-radius: .3rem;
  font-size: .82rem;
  font-weight: 650;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
.bm-search summary svg, .bm-mobile-nav summary svg { inline-size: 1.05rem; block-size: 1.05rem; }
.bm-header summary { border-color: #747b72; }
.bm-header summary:hover { border-color: var(--bm-highlight); }
.bm-header :is(a, summary):focus-visible { outline-color: var(--bm-highlight); }
.bm-header .bm-mobile-nav nav a:focus-visible { outline-color: var(--bm-leaf); }
.bm-search[open] summary, .bm-mobile-nav[open] summary { color: #152217; background: var(--bm-highlight); border-color: var(--bm-highlight); }
.bm-search > form, .bm-search > .bm-search-panel, .bm-mobile-nav > nav, .bm-mobile-nav > ul {
  position: absolute;
  z-index: 6;
  inset-inline-end: 0;
  inset-block-start: calc(100% + .6rem);
  inline-size: min(21rem, calc(100vw - var(--bm-edge) * 2));
  padding: .85rem;
  background: white;
  color: var(--bm-ink);
  border: 1px solid var(--bm-rule);
  box-shadow: 0 .6rem 1.8rem #202a2421;
}
.bm-mobile-nav { display: none; }
.bm-mobile-nav a { display: block; padding: .55rem .4rem; border-block-end: 1px solid var(--bm-rule-soft); }
.bm-search-form { display: flex; align-items: stretch; gap: .45rem; }
.bm-search-form > label { min-inline-size: 0; flex: 1; }
.bm-search-input, .bm-search-form input[type="search"] {
  min-inline-size: 0; flex: 1; inline-size: 100%; min-block-size: 2.75rem; padding: .35rem .7rem;
  color: var(--bm-ink); background: #fff; border: 1px solid #8c988e; border-radius: .18rem;
}
.bm-search-submit, .bm-search-form button {
  flex: none; padding: .35rem .85rem; border: 1px solid var(--bm-charcoal); border-radius: .18rem; background: var(--bm-charcoal); color: white;
}

/* Journal front and listing pages */
.bm-main { padding-block-end: clamp(3rem, 6vw, 6rem); }
.bm-home-title { margin-block: clamp(1.7rem, 4vw, 3.8rem) clamp(1rem, 2.3vw, 1.75rem); font-size: clamp(2.1rem, 5.1vw, 4.2rem); font-weight: 900; line-height: 1.34; }
.bm-home-intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem); align-items: center;
  gap: 1rem clamp(1.75rem, 4vw, 4rem); margin-block: clamp(1.7rem, 4vw, 3.8rem) clamp(1rem, 2.3vw, 1.75rem);
}
.bm-home-intro .bm-home-title { margin: 0; overflow-wrap: anywhere; }
.bm-home-search { min-inline-size: 0; }
.bm-home-search .bm-search-form {
  gap: 0; inline-size: 100%; padding: .2rem; background: var(--bm-surface);
  border: 1px solid #8c988e; border-radius: .23rem;
}
.bm-home-search .bm-search-input { border: 0; background: transparent; font-size: .89rem; }
.bm-home-search .bm-search-submit { min-block-size: 2.75rem; padding-inline: .95rem; font-size: .87rem; }
.bm-home-search .bm-search-input:focus-visible, .bm-home-search .bm-search-submit:focus-visible { outline-offset: -3px; }
.bm-home-search .bm-search-submit:focus-visible { outline-color: var(--bm-highlight); }
.bm-header-row:not(:has(> .bm-search)) .bm-nav { margin-inline-start: auto; }
.bm-hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr);
  grid-template-areas: "copy media";
  overflow: hidden;
  color: #fcfcf8;
  background: var(--bm-forest);
}
.bm-hero-media { grid-area: media; display: block; position: relative; overflow: hidden; min-block-size: 23rem; background: #283c30; }
.bm-hero-media img, .bm-card-media img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.bm-hero-media img { position: absolute; inset: 0; }
.bm-hero-copy {
  grid-area: copy; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: .85rem; min-inline-size: 0; padding: clamp(1.5rem, 3.5vw, 3.4rem);
}
.bm-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; color: var(--bm-leaf); font-weight: 700; font-size: .81rem; line-height: 1.6; }
.bm-hero .bm-kicker { color: var(--bm-gold); }
.bm-hero .bm-kicker::before, .bm-card .bm-kicker::before {
  content: ""; flex: none; inline-size: 1.3rem; block-size: 2px; background: currentColor; margin-inline-end: .18rem;
}
.bm-kicker, .bm-kicker a, .bm-hero h2 a, .bm-card h2 a { text-decoration: none; }
a.bm-kicker:hover, .bm-kicker a:hover, .bm-hero h2 a:hover, .bm-card h2 a:hover, .bm-read:hover { text-decoration: underline; text-underline-offset: .24em; }
.bm-hero h2 { font-size: clamp(1.6rem, 3.1vw, 2.9rem); line-height: 1.56; font-weight: 850; overflow-wrap: anywhere; }
.bm-excerpt { color: var(--bm-muted); line-height: 1.92; }
.bm-hero .bm-excerpt { color: #e4ebe3; font-size: clamp(.95rem, 1.35vw, 1.075rem); }
.bm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .65rem; color: var(--bm-muted); font-size: .8rem; line-height: 1.8; }
.bm-meta a { text-decoration: none; }
.bm-meta a:hover { text-decoration: underline; }
.bm-meta .bm-byline + time { border-inline-start: 1px solid currentColor; padding-inline-start: .65rem; }
.bm-hero .bm-meta { color: #c2cec2; }
.bm-read { display: inline-flex; align-items: center; gap: .45rem; padding-block: .25rem; color: var(--bm-highlight); font-size: .92rem; font-weight: 700; text-decoration: none; }
.bm-hero a:focus-visible { outline-color: var(--bm-highlight); outline-offset: -2px; }
.bm-section-head { display: flex; align-items: center; gap: 1.15rem; margin-block: clamp(2.5rem, 5vw, 4.5rem) 1.5rem; }
.bm-section-head h2 { flex: 0 1 auto; font-size: clamp(1.48rem, 2.6vw, 2rem); line-height: 1.55; font-weight: 850; }
.bm-section-head::after { content: ""; block-size: 1px; background: var(--bm-rule); flex: 1; }
.bm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.3rem, 2.8vw, 2.45rem); align-items: stretch; }
.bm-card { display: flex; flex-direction: column; min-inline-size: 0; padding-block-end: 1.15rem; border-block-end: 1px solid var(--bm-rule); }
.bm-card-media { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #e3e7df; }
.bm-card-copy { flex: 1; display: flex; align-items: flex-start; flex-direction: column; gap: .58rem; min-inline-size: 0; padding-block-start: 1rem; }
.bm-card h2 { font-size: clamp(1.2rem, 1.66vw, 1.6rem); font-weight: 800; line-height: 1.6; overflow-wrap: anywhere; }
.bm-card .bm-excerpt { font-size: .94rem; }
.bm-card .bm-meta { padding-block-start: .6rem; margin-block-start: auto; }
.bm-card-text .bm-card-copy { padding: clamp(1.15rem, 2.4vw, 1.8rem); background: #e9efe5; border-block-start: .25rem solid var(--bm-leaf); }
.bm-card-text h2 { font-size: clamp(1.35rem, 2.1vw, 1.88rem); }
.bm-card-text:nth-child(3n+2) .bm-card-copy { background: #f1efdf; border-color: #93804d; }
.bm-card-text:nth-child(3n) .bm-card-copy { background: #e5ebe9; border-color: #64796c; }
.bm-pagination { margin-block-start: 2.75rem; }
.bm-pagination .nav-links, .bm-pagination ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.bm-pagination .page-numbers:not(ul) {
  display: inline-flex; align-items: center; justify-content: center; min-inline-size: 2.6rem; min-block-size: 2.6rem;
  padding: .3rem .7rem; border: 1px solid var(--bm-rule); text-decoration: none;
}
.bm-pagination .current, .bm-pagination a:hover { color: white; background: var(--bm-charcoal); border-color: var(--bm-charcoal); }
.bm-pagination .dots { border-color: transparent; }

/* Reading and common WordPress content */
.bm-page-head { padding-block: clamp(2rem, 5vw, 4rem) 1.8rem; margin-block-end: 1.8rem; border-block-end: 1px solid var(--bm-rule); }
.bm-page-head h1, .bm-article h1 { color: var(--bm-ink); font-size: clamp(1.95rem, 4vw, 3.7rem); font-weight: 850; line-height: 1.48; overflow-wrap: anywhere; }
.bm-page-head p { max-inline-size: 48rem; margin-block-start: .65rem; color: var(--bm-muted); }
.bm-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-block: 1.75rem 1.1rem; color: var(--bm-muted); font-size: .84rem; }
.bm-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; list-style: none; margin: 0; padding: 0; }
.bm-breadcrumb a { text-underline-offset: .25em; }
.bm-page-head .bm-description { max-inline-size: 48rem; color: var(--bm-muted); }
.bm-page-head .bm-description p + p { margin-block-start: .6rem; }
.bm-meta a.bm-byline { font-weight: 700; text-underline-offset: .25em; }
.bm-meta .bm-byline:hover { text-decoration: underline; }
.bm-article { max-inline-size: 57rem; margin-inline: auto; }
.bm-article > header { max-inline-size: 48rem; margin-inline: auto; padding-block: .5rem 1.6rem; }
.bm-article > header > * + * { margin-block-start: .8rem; }
.bm-article-image { margin-block: .35rem 2rem; }
.bm-article-image img, img.bm-article-image { display: block; inline-size: 100%; block-size: auto; }
.bm-prose { max-inline-size: 44rem; margin-inline: auto; font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 2.08; overflow-wrap: break-word; }
.bm-prose > * { margin-block: 0 1.2em; }
.bm-prose > :first-child { margin-block-start: 0; }
.bm-prose h2, .bm-prose h3, .bm-prose h4 { margin-block: 1.65em .55em; font-weight: 800; line-height: 1.65; }
.bm-prose h2 { font-size: 1.57em; }
.bm-prose h3 { font-size: 1.25em; }
.bm-prose a { color: var(--bm-leaf); text-decoration-thickness: .08em; text-underline-offset: .25em; }
.bm-prose ul, .bm-prose ol { padding-inline-start: 1.65em; }
.bm-prose li + li { margin-block-start: .27em; }
.bm-prose blockquote { border-inline-start: 4px solid var(--bm-leaf); padding: .65rem 1.15rem; background: #e9efe5; }
.bm-prose img { height: auto; }
.bm-prose iframe, .bm-prose video { max-inline-size: 100%; }
.bm-prose figcaption, .wp-caption-text { margin-block-start: .45rem; color: var(--bm-muted); font-size: .85rem; line-height: 1.7; }
.bm-prose pre, .bm-prose .wp-block-table { overflow-x: auto; }
.bm-prose table { border-collapse: collapse; }
.bm-prose th, .bm-prose td { padding: .55rem .7rem; border: 1px solid var(--bm-rule); }
.bm-prose .wp-block-button__link { color: white; background: var(--bm-charcoal); text-decoration: none; }
.bm-prose .is-style-outline .wp-block-button__link { color: var(--bm-charcoal); background: transparent; }
.bm-prose .aligncenter { display: block; margin-inline: auto; }
.bm-prose .alignleft { float: left; margin: .4em 1em .75em 0; }
.bm-prose .alignright { float: right; margin: .4em 0 .75em 1em; }
.bm-prose::after { content: ""; display: block; clear: both; }
.bm-prose .wp-caption { max-inline-size: 100%; }
.bm-prose .wp-block-gallery { padding-inline-start: 0; }
.bm-prose .wp-block-pullquote { border-block: 1px solid var(--bm-rule); }
.bm-tags, .bm-comments { max-inline-size: 44rem; margin-inline: auto; padding-block-start: 1.4rem; border-block-start: 1px solid var(--bm-rule); }
.bm-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: 2rem; }
.bm-tags a { padding: .2rem .7rem; font-size: .82rem; text-decoration: none; color: var(--bm-leaf); background: #e9efe5; }
.bm-tags a:hover { text-decoration: underline; }
.bm-post-nav { max-inline-size: 44rem; margin: 2.5rem auto 0; }
.bm-post-nav .nav-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: .75rem; }
.bm-post-nav a { display: block; block-size: 100%; padding: .8rem 1.05rem; border: 1px solid var(--bm-rule); color: var(--bm-charcoal); text-decoration: none; font-weight: 700; }
.bm-post-nav a:hover { border-color: var(--bm-leaf); text-decoration: underline; text-underline-offset: .25em; }
.bm-post-nav-label { display: block; margin-block-end: .25rem; font-size: .78rem; font-weight: 400; color: var(--bm-muted); }
.bm-comments { margin-block-start: 3rem; overflow-wrap: anywhere; }
.bm-comments h2, .bm-comments h3 { font-size: 1.35rem; }
.bm-comment-list, .bm-comment-list .children { list-style: none; padding: 0; }
.bm-comment-list .children { margin-inline-start: clamp(.35rem, 2vw, 1.25rem); }
.bm-comment-list .comment-body { padding-block: 1rem; border-block-end: 1px solid var(--bm-rule-soft); }
.bm-comment-list .avatar { vertical-align: middle; border-radius: 50%; margin-inline-end: .45rem; }
.bm-comment-list .comment-metadata, .bm-comments .comment-notes, .bm-comments .logged-in-as { color: var(--bm-muted); font-size: .85rem; }
.bm-comments form { display: grid; gap: .85rem; margin-block-start: .85rem; }
.bm-comments label { display: block; font-size: .9rem; font-weight: 650; }
.bm-comments .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.bm-comments input:not([type="checkbox"], [type="submit"]), .bm-comments textarea, .bm-prose .post-password-form input[type="password"] {
  inline-size: 100%; padding: .55rem .75rem; color: var(--bm-ink); background: white; border: 1px solid #8c988e; border-radius: .18rem;
}
.bm-comments textarea { resize: vertical; }
.bm-comments input[type="submit"], .bm-prose .post-password-form input[type="submit"] {
  padding: .45rem 1rem; border: 0; border-radius: .18rem; color: white; background: var(--bm-charcoal); cursor: pointer;
}
.bm-empty { padding-block: 1.25rem; }
.bm-empty .bm-search-form { max-inline-size: 28rem; margin-block-start: 1rem; }
.bm-empty .bm-read { margin-block-start: 1rem; color: var(--bm-leaf); text-decoration: underline; }
.bm-footer { background: var(--bm-charcoal); color: #f8f9f4; }
.bm-footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.15rem 2rem; padding-block: 2rem; }
.bm-footer-row ul { display: flex; flex-wrap: wrap; gap: .4rem 1.15rem; }
.bm-footer-row p, .bm-footer-row nav { color: #d6dcd5; font-size: .88rem; }
.bm-footer a:focus-visible { outline-color: var(--bm-highlight); }

@media (max-width: 56rem) {
  .bm-nav { display: none; }
  .bm-mobile-nav { display: block; }
  .bm-mobile-nav, .bm-search { position: static; }
  .bm-header-row { position: relative; gap: .7rem; min-block-size: 4.6rem; }
  .bm-brand { margin-inline-end: auto; }
  .bm-search { margin-inline-start: 0; }
  .bm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm-hero-media { min-block-size: 20rem; }
}
@media (max-width: 42rem) {
  .bm-home-intro { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .bm-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "copy"; }
  .bm-hero-media { min-block-size: 0; aspect-ratio: 16 / 9; }
  .bm-hero-copy { gap: .65rem; padding: 1.35rem; }
}
@media (max-width: 36rem) {
  .bm-header-row { min-block-size: 4.05rem; gap: .4rem; }
  .bm-search summary, .bm-mobile-nav summary { padding-inline: .55rem; }
  .bm-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .bm-card-text .bm-card-copy { min-block-size: 12rem; }
  .bm-footer-row { align-items: flex-start; flex-direction: column; }
}
@media print {
  body { display: block; color: black; background: white; }
  .bm-header, .bm-footer, .bm-breadcrumb, .bm-search, .bm-pagination { display: none; }
  .bm-article, .bm-prose, .bm-wrap { max-inline-size: none; inline-size: auto; }
  .bm-main { padding: 0; }
}
