:root {
  /* --custom-cursor: default;
  --custom-pointer-cursor: pointer;
  --custom-text-cursor: text; */
}

::selection {
  color: #fff !important;
  background-color: #6c090c !important;
}

::-moz-selection {
  color: #fff !important;
  background-color: #6c090c !important;
}

::-webkit-selection {
  color: #fff !important;
  background-color: #6c090c !important;
}

::-ms-selection {
  color: #fff !important;
  background-color: #6c090c !important;
}

#reset-button:hover,
#reset-button:focus {
  cursor: pointer;
}

/* body,
body *:not(#accessibility-widget):not(#accessibility-widget *):not(#accessibility-toggle):not(a):not(img):not(img a):not(a img):not(#accessibility-toggle *):not(a):not(button):not(input):not(textarea):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(p):not(span):not(label):not(select):not(#accessibility-widget label):not(button[id="#reset-button"]):not(#accessibility-toggle label) {
  cursor: var(--custom-cursor) !important;
} */
/*
a,
a span *,
a p *,
a *,
button,
button *,
input[type="button"],
select,
select *,
input[type="button"] *,
input[type="submit"],
input[type="checkbox"],
input[type="checkbox"] *,
input[type="radio"],
input[type="radio"] *,
input[type="submit"],
input[type="submit"] * {
  cursor: var(--custom-pointer-cursor) !important;
} */

/* textarea,
textarea *,
span,
input,
p,
p *,
h1,
h1 *,
h2,
h2 *,
h3,
h3 *,
h4,
h4 *,
h5,
h5 *,
h6,
h6 *,
body *:not(#accessibility-widget):not(#accessibility-widget *):not(#accessibility-toggle):not(#accessibility-toggle *)::selection {
  cursor: var(--custom-text-cursor) !important;
} */

.custom-radio {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #333;
  border-radius: 50%;
  position: relative;
  margin-right: 10px;
  cursor: pointer;
}

.custom-radio::after {
  content: "";
  width: 12px;
  height: 12px;
  background-color: #333;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s ease;
}

input[type="radio"]:checked+.custom-radio::after {
  transform: translate(-50%, -50%) scale(1);
}

#accessibility-widget,
#accessibility-widget * {
  cursor: auto !important;
  line-height: normal !important;
  word-spacing: normal !important;
}

#accessibility-widget label input:hover,
#accessibility-widget label button:hover,
#accessibility-widget label select:hover {
  cursor: pointer !important;
}

#accessibility-widget label {
  font-family: 'Vazir';
  margin: 1.5rem 0;
}

#accessibility-widget label h4 {
  font-weight: bold;
  font-size: 2rem;
}

#accessibility-toggle {
  cursor: pointer !important;
}

#accessibility-widget,
#accessibility-toggle {
  filter: none !important;
}

#accessibility-widget h2 {
  margin-top: 0;
  font-size: 18px;
}

#accessibility-widget label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

#accessibility-widget {
  position: fixed;
  top: 0;
  right: -43rem;
  width: 43rem;
  height: 100%;
  background-color: #fff;
  border-left: 1px solid #ccc;
  padding: 15px;
  z-index: 10001;
  font-family: Arial, sans-serif;
  overflow-y: auto;
  transition: right 0.3s ease, transform 0.3s ease;
  max-height: 100vh;
  direction: rtl;
}

@media only screen and (max-width: 440px) {
  #accessibility-widget {
    right: -37rem;
    width: 37rem;
  }
}

@media only screen and (min-width: 441px) and (max-width: 767px) {
  #accessibility-widget {
    right: -37rem;
    width: 37rem;
  }
}

#accessibility-widget.active {
  right: 0;
  transform: translateX(0);
}

input[type="radio"]:checked+.custom-radio::after {
  transform: translate(-50%, -50%) scale(1);
}

.reduce-motion-toggle label {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
}

.widget-page,
input[type="radio"] {
  display: none;
  font-family: 'Vazir';
  opacity: 0;
  transition: opacity 0.3s ease;
}

.widget-page p {
  padding: 1rem 0 3rem 0;
  font-size: 16px;
}

.widget-page h4 {
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 24px;
  font-size: 24px;
}

.widget-page.active {
  display: block;
  opacity: 1;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-bottom: 20px;
  margin-top: 5rem;
  font-family: 'Vazir';
}

.menu-button {
  display: flex;
  flex-direction: column;
  font-family: 'Vazir';
  align-items: center;
  justify-content: center;
  padding: 5px 0;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  background: #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.menu-button i {
  font-size: 3rem;
  margin: 7px;
  text-align: center;
}

.menu-button:hover {
  background: #e0e0e0;
}

.back-button {
  border: 0 !important;
  color: rgb(0, 0, 0);
  background: transparent;
  font-size: 2rem;
  transform: scaleX(1.3);
}


#accessibility-close {
  position: absolute;
  top: 10px;
  color: white;
  border: none !important;
  background-color: transparent !important;
  border-radius: 25px;
  left: 10px;
  padding: 0.5rem 0.8rem;
  font-size: 16px;
  cursor: pointer;
}

#accessibility-toggle {
  position: fixed;
  border-radius: 40px;
  background-color: #6c090c;
  color: #fff;
  font-size: 40px;
  border: none;
  z-index: 10000;
  bottom: 2rem;
  right: 3rem;
  padding: 0.9rem 1.4rem 0rem 1.4rem;
}


@media (prefers-reduced-motion: reduce) {
  *:not(#accessibility-widget):not(#accessibility-widget *):not(#accessibility-toggle):not(#accessibility-toggle *) {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

:root[data-reduce-motion="true"] *:not(#accessibility-widget):not(#accessibility-widget *):not(#accessibility-toggle):not(#accessibility-toggle *) {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

:root[data-reduce-motion="true"] .wow {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

.reduce-motion-toggle {
  display: flex !important;
  width: 100%;
  justify-content: space-around;
}

#reduce-motion-toggle {
  width: 20px;
  height: 20px;
  margin-top: 1.3rem;
}

.reduce-motion-toggle>p {
  width: 100%;
}

.a11y-color-input {
  background: transparent;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0;
  border-radius: 9px;
}

.a11y-button-input:hover {
  cursor: pointer !important;
}

.a11y-button-input {
  cursor: pointer !important;
  background-color: #6c090c;
  border-radius: 5px !important;
  color: #fff;
  border: 0 !important;
  margin: 0 0.3rem;
  max-width: 47%;
  margin: 0 0.5rem;
  font-size: 2.8rem;
  transition: background-color 150ms linear;
}

.a11y-color-input:hover {
  cursor: pointer;
}

.a11y-button-input:hover,
.a11y-button-input:focus {
  background-color: #6c090c;
  cursor: pointer;
}

#reset-button,
#reset-text-color,
#reset-background-color,
#reset-font-size,
#reset-hide-images,
#reset-highlight-links,
#reset-word-spacing,
#reset-line-height,
#reset-cursor-size,
#reset-font-family,
#reset-color-blindness,
#reset-contrast,
#reset-reduce-motion {
  width: 100%;
  background-color: #6c090c;
  color: white;
  font-family: 'Vazir';
  padding: 1.5rem;
  font-size: 20px;
  font-weight: bolder;
  border: 0 !important;
  text-align: center;
  border-radius: 5px !important;
  margin: 1rem 0;
}

.a11y-select-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 5px;
  padding: 1rem;
}

button[data-settings="cursor-size"] {
  display: none !important;
}

.a11y-feature-current-value {
  font-size: 1.4rem;
  font-weight: bold;
  padding: 1.3rem !important;
}

body.a11y-highlight-links a:not(#accessibility-widget a):not(#accessibility-toggle) {
  background-color: #ffeb3b !important;
  color: #000000 !important;

  text-decoration: underline !important;
  font-weight: bold !important;
  outline: 2px solid #000000 !important;

  transition: all 0.1s ease;
}

body.a11y-hide-images img:not(#accessibility-widget img):not(#accessibility-widget * img):not(#accessibility-toggle img) {
  visibility: hidden !important;
}

/* ════════════ Reading mode (universal) ════════════ */

#rm-root {
  display: none;
}

body.a11y-reading-mode {
  background: var(--rm-bg, #fafaf8) !important;
}

/* Hide the entire original page; #content-wrapper holds header+content
   in every UCMS theme, footer/ticker/extras live outside it */
body.a11y-reading-mode #content-wrapper,
body.a11y-reading-mode>header,
body.a11y-reading-mode footer,
body.a11y-reading-mode .news-ticker,
body.a11y-reading-mode .return-to-top,
body.a11y-reading-mode .aca-copyright,
body.a11y-reading-mode #yii-debug-toolbar {
  display: none !important;
}

/* Keep the widget + bubble usable */
body.a11y-reading-mode #accessibility-toggle,
body.a11y-reading-mode #accessibility-widget,
body.a11y-reading-mode #rm-bubble {
  display: block;
}

body.a11y-reading-mode #rm-root {
  display: block;
  min-height: 100vh;
  background: var(--rm-bg, #fafaf8);
  color: var(--rm-text, #1a1a1a);
  direction: rtl;
  padding: 32px 16px 96px;
}

.rm-container {
  max-width: 760px;
  margin: 0 auto;
}

.rm-page-title {
  font-size: calc(var(--rm-font-size, 1.125rem) * 1.6);
  font-weight: 800;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);
  color: var(--rm-text, #1a1a1a);
  line-height: 1.4;
}

.rm-section {
  margin: 0 0 36px;
}

.rm-section-title {
  font-size: calc(var(--rm-font-size, 1.125rem) * 1.15);
  font-weight: 700;
  color: #6c090c;
  margin: 0 0 14px;
  padding-right: 12px;
  border-right: 4px solid #6c090c;
  line-height: 1.5;
}

.rm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rm-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.rm-item:last-child {
  border-bottom: none;
}

.rm-item-link {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 4px;
  text-decoration: none;
  color: var(--rm-text, #1a1a1a);
}

.rm-item-link:hover .rm-item-title,
.rm-item-link:focus .rm-item-title {
  text-decoration: underline;
  color: #6c090c;
}

.rm-item-link:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
  border-radius: 4px;
}

.rm-item-img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.05);
}

.rm-item-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.rm-item-title {
  font-size: var(--rm-font-size, 1.125rem);
  font-weight: 600;
  line-height: 1.7;
  color: var(--rm-text, #1a1a1a);
}

.rm-item-date {
  font-size: 0.8em;
  opacity: 0.65;
}

.rm-empty {
  text-align: center;
  padding: 60px 20px;
  font-size: var(--rm-font-size, 1.125rem);
  opacity: 0.7;
}

/* Dark theme (reuses your existing .reading-mode-dark toggle) */
body.a11y-reading-mode.reading-mode-dark .rm-page-title {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

body.a11y-reading-mode.reading-mode-dark .rm-item {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.a11y-reading-mode.reading-mode-dark .rm-section-title {
  color: #ff8a80;
  border-right-color: #ff8a80;
}

body.a11y-reading-mode.reading-mode-dark .rm-item-link:hover .rm-item-title,
body.a11y-reading-mode.reading-mode-dark .rm-item-link:focus .rm-item-title {
  color: #ff8a80;
}

.rm-article-meta {
  font-size: 0.85em;
  opacity: 0.65;
  margin: 0 0 20px;
}

.rm-article-summary {
  font-size: calc(var(--rm-font-size, 1.125rem) * 1.05);
  font-weight: 600;
  line-height: 1.9;
  margin: 0 0 24px;
  padding: 16px 18px;
  border-right: 4px solid #6c090c;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
  color: var(--rm-text, #1a1a1a);
}

.rm-article-body {
  font-size: var(--rm-font-size, 1.125rem);
  line-height: 2.1;
  color: var(--rm-text, #1a1a1a);
}

.rm-article-body p {
  margin: 0 0 18px;
  text-align: justify;
}

.rm-article-body h2,
.rm-article-body h3,
.rm-article-body h4 {
  margin: 28px 0 12px;
  font-weight: 700;
  line-height: 1.6;
}

.rm-article-body ul,
.rm-article-body ol {
  margin: 0 0 18px;
  padding-right: 24px;
}

.rm-article-body li {
  margin: 0 0 8px;
}

.rm-article-body blockquote {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-right: 3px solid rgba(0, 0, 0, 0.2);
  opacity: 0.9;
}

.rm-article-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 8px;
}

body.a11y-reading-mode.reading-mode-dark .rm-article-summary {
  background: rgba(255, 255, 255, 0.05);
  border-right-color: #ff8a80;
}

body.a11y-reading-mode.reading-mode-dark .rm-article-body blockquote {
  border-right-color: rgba(255, 255, 255, 0.25);
}