/*
Theme Name:        Bamorabi (بامربی)
Theme URI:         https://bamorabi.ir
Description:       قالب اختصاصی، کاملاً مستقل، سبک و فوق‌سریع سامانه هوشمند بامربی. طراحی اختصاصی با معماری ماژولار و بی‌نیاز از المنتور و هرگونه قالب والد.
Author:            تیم توسعه فنی بامربی
Author URI:        https://bamorabi.ir
Version:           2.0.0
Text Domain:       bamorabi
Requires at least: 5.8
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ══════════════════════════════════════════════════════════════
   1. Universal Typography – Vazirmatn (وزیرمتن - ۹ وزن کامل)
   هماهنگ با کتابخانه فونت وردپرس (WordPress Font Library)
   ══════════════════════════════════════════════════════════════ */
:root {
  --bmr-font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --wp--preset--font-family--vazirmatn: 'Vazirmatn', sans-serif !important;

  /* Global Theme Color Tokens */
  --bmr-primary: #008DD2;
  --bmr-primary-rgb: 0, 141, 210;
  --bmr-primary-dark: #0076b0;
  --bmr-primary-light: #f0f9ff;
  --bmr-primary-subtle: #e0f2fe;
  --bmr-dark: #0f172a;
  --bmr-slate: #1e293b;
  --bmr-text-slate: #334155;
  --bmr-text-muted: #64748b;
  --bmr-border: #e2e8f0;
  --bmr-bg-page: #f8fafc;
  --bmr-bg-card: #ffffff;
}

/* اعمال فونت وزیرمتن با اولویت کامل روی تمام المان‌های صفحه و فرم‌ها */
html,
body,
button,
input,
select,
optgroup,
textarea,
p,
h1, h2, h3, h4, h5, h6,
span,
a,
li,
td, th,
label,
blockquote,
div,
section,
article,
aside,
header,
footer,
nav,
main,
figure,
figcaption,
code,
pre,
[class*="bmr-"] {
  font-family: var(--bmr-font-family) !important;
}

/* ══════════════════════════════════════════════════════════════
   2. Standalone Core CSS Resets (جایگزین کامل استایل‌های قالب والد)
   ══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bmr-bg-page);
  color: var(--bmr-dark);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  font-size: 15px;
}

/* حذف پیش‌فرض خطوط زیر لینک‌ها در تمام قالب */
a,
a:hover,
a:focus,
a:active,
a:visited {
  text-decoration: none !important;
  text-decoration-line: none !important;
  color: inherit;
  outline: none;
}

/* حذف خط تیره و هرگونه خط کشیدگی زیر تایتل کارت‌های متحرک و اسلایدرها */
.bmr-ad-item,
.bmr-ad-item:hover,
.bmr-ad-item:focus,
.bmr-ad-item:active,
.bmr-ad-item:visited,
.bmr-ad-item *,
.bmr-ad-name,
.bmr-ad-details,
.bmr-ad-sub,
.bmr-vip-section a,
.bmr-vip-section strong,
.bmr-vip-section span,
.bmr-coach-card-title,
.bmr-gym-card-title {
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: none !important;
  border: none !important;
  box-shadow: none;
}

/* تصاویر و رسانه‌ها */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* لیست‌ها */
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* دکمه‌ها و فرم‌ها */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
  border: none;
  background: none;
}

/* ══════════════════════════════════════════════════════════════
   3. WordPress Standard Block & Content Classes
   ══════════════════════════════════════════════════════════════ */
.site-content {
  min-height: 70vh;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px 23px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1.5em;
}

.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}

.aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5em;
}

.alignwide {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.wp-caption {
  margin-bottom: 1.5em;
  max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption-text {
  text-align: center;
  font-size: 13px;
  color: var(--bmr-text-muted);
  margin-top: 6px;
}

/* ══════════════════════════════════════════════════════════════
   4. Base Layout Helpers
   ══════════════════════════════════════════════════════════════ */
.bmr-container {
  width: 100%;
  max-width: 1240px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 16px;
  padding-left: 16px;
}

.bmr-container-fluid {
  width: 100%;
  padding-right: 16px;
  padding-left: 16px;
}

/* ══════════════════════════════════════════════════════════════
   5. Generic templates (index / page / single / archive / 404)
   ══════════════════════════════════════════════════════════════ */
.bmr-generic {
  padding: 32px 0 56px;
}

.bmr-entry {
  background: var(--bmr-bg-card);
  border: 1px solid var(--bmr-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.bmr-entry-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.5;
  margin: 0 0 16px;
  color: var(--bmr-dark);
}

.bmr-entry-thumb img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 16px;
}

.bmr-entry-content {
  line-height: 2;
  color: var(--bmr-text-slate);
}

.bmr-entry-content--builder {
  padding: 0;
}

.bmr-generic-header {
  margin-bottom: 24px;
}

.bmr-generic-desc {
  color: var(--bmr-text-muted);
}

.bmr-generic-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.bmr-generic-card {
  background: var(--bmr-bg-card);
  border: 1px solid var(--bmr-border);
  border-radius: 16px;
  overflow: hidden;
}

.bmr-generic-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.bmr-generic-card-body {
  padding: 16px;
}

.bmr-generic-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.bmr-generic-card-excerpt,
.bmr-generic-empty {
  color: var(--bmr-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.navigation.pagination {
  margin-top: 28px;
  text-align: center;
}

.navigation.pagination .page-numbers {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 3px;
  border: 1px solid var(--bmr-border);
  border-radius: 10px;
  background: var(--bmr-bg-card);
}

.navigation.pagination .page-numbers.current {
  background: var(--bmr-primary);
  border-color: var(--bmr-primary);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   6. صفحه ۴۰۴
   ══════════════════════════════════════════════════════════════ */
.bmr-404-wrap {
  min-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 35%, rgba(var(--bmr-primary-rgb), 0.10), transparent 70%),
    var(--bmr-bg-page);
}

.bmr-404-code {
  font-size: clamp(5.5rem, 22vw, 11rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--bmr-primary) 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0 0 8px;
}

.bmr-404-title {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 800;
  color: var(--bmr-dark);
  margin: 0 0 10px;
}

.bmr-404-text {
  max-width: 420px;
  margin: 0 auto 28px;
  color: var(--bmr-text-muted);
  line-height: 2;
  font-size: 0.95rem;
}

.bmr-404-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.bmr-404-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bmr-404-btn--primary {
  background: var(--bmr-primary);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(var(--bmr-primary-rgb), 0.25);
}

.bmr-404-btn--primary:hover {
  background: var(--bmr-primary-dark);
  transform: translateY(-2px);
}

.bmr-404-btn--ghost {
  background: #fff;
  color: var(--bmr-text-slate) !important;
  border-color: var(--bmr-border);
}

.bmr-404-btn--ghost:hover {
  border-color: var(--bmr-primary);
  color: var(--bmr-primary) !important;
  transform: translateY(-2px);
}
