:root {
  --w-spacer-0: 0;
  --w-spacer-1: 0.25rem;
  --w-spacer-2: 0.5rem;
  --w-spacer-3: 1rem;
  --w-spacer-4: 1.5rem;
  --w-spacer-5: 3rem;
}

/* Bootstrap breakpoints */
@media (min-width: 576px)  { /* sm */ }
@media (min-width: 768px)  { /* md */ }
@media (min-width: 992px)  { /* lg */ }
@media (min-width: 1200px) { /* xl */ }
@media (min-width: 1400px) { /* xxl */ }

/* ---------------- Margin ---------------- */

/* All sides */
.w-m-0 { margin: var(--w-spacer-0) !important; }
.w-m-1 { margin: var(--w-spacer-1) !important; }
.w-m-2 { margin: var(--w-spacer-2) !important; }
.w-m-3 { margin: var(--w-spacer-3) !important; }
.w-m-4 { margin: var(--w-spacer-4) !important; }
.w-m-5 { margin: var(--w-spacer-5) !important; }

/* Top */
.w-mt-0 { margin-top: var(--w-spacer-0) !important; }
.w-mt-1 { margin-top: var(--w-spacer-1) !important; }
.w-mt-2 { margin-top: var(--w-spacer-2) !important; }
.w-mt-3 { margin-top: var(--w-spacer-3) !important; }
.w-mt-4 { margin-top: var(--w-spacer-4) !important; }
.w-mt-5 { margin-top: var(--w-spacer-5) !important; }

/* Bottom */
.w-mb-0 { margin-bottom: var(--w-spacer-0) !important; }
.w-mb-1 { margin-bottom: var(--w-spacer-1) !important; }
.w-mb-2 { margin-bottom: var(--w-spacer-2) !important; }
.w-mb-3 { margin-bottom: var(--w-spacer-3) !important; }
.w-mb-4 { margin-bottom: var(--w-spacer-4) !important; }
.w-mb-5 { margin-bottom: var(--w-spacer-5) !important; }

/* Start (left in LTR, right in RTL) */
.w-ms-0 { margin-inline-start: var(--w-spacer-0) !important; }
.w-ms-1 { margin-inline-start: var(--w-spacer-1) !important; }
.w-ms-2 { margin-inline-start: var(--w-spacer-2) !important; }
.w-ms-3 { margin-inline-start: var(--w-spacer-3) !important; }
.w-ms-4 { margin-inline-start: var(--w-spacer-4) !important; }
.w-ms-5 { margin-inline-start: var(--w-spacer-5) !important; }

/* End (right in LTR, left in RTL) */
.w-me-0 { margin-inline-end: var(--w-spacer-0) !important; }
.w-me-1 { margin-inline-end: var(--w-spacer-1) !important; }
.w-me-2 { margin-inline-end: var(--w-spacer-2) !important; }
.w-me-3 { margin-inline-end: var(--w-spacer-3) !important; }
.w-me-4 { margin-inline-end: var(--w-spacer-4) !important; }
.w-me-5 { margin-inline-end: var(--w-spacer-5) !important; }

/* X axis */
.w-mx-0 { margin-left: var(--w-spacer-0) !important; margin-right: var(--w-spacer-0) !important; }
.w-mx-1 { margin-left: var(--w-spacer-1) !important; margin-right: var(--w-spacer-1) !important; }
.w-mx-2 { margin-left: var(--w-spacer-2) !important; margin-right: var(--w-spacer-2) !important; }
.w-mx-3 { margin-left: var(--w-spacer-3) !important; margin-right: var(--w-spacer-3) !important; }
.w-mx-4 { margin-left: var(--w-spacer-4) !important; margin-right: var(--w-spacer-4) !important; }
.w-mx-5 { margin-left: var(--w-spacer-5) !important; margin-right: var(--w-spacer-5) !important; }

/* Y axis */
.w-my-0 { margin-top: var(--w-spacer-0) !important; margin-bottom: var(--w-spacer-0) !important; }
.w-my-1 { margin-top: var(--w-spacer-1) !important; margin-bottom: var(--w-spacer-1) !important; }
.w-my-2 { margin-top: var(--w-spacer-2) !important; margin-bottom: var(--w-spacer-2) !important; }
.w-my-3 { margin-top: var(--w-spacer-3) !important; margin-bottom: var(--w-spacer-3) !important; }
.w-my-4 { margin-top: var(--w-spacer-4) !important; margin-bottom: var(--w-spacer-4) !important; }
.w-my-5 { margin-top: var(--w-spacer-5) !important; margin-bottom: var(--w-spacer-5) !important; }

/* Auto centering */
.w-mx-auto { margin-left: auto !important; margin-right: auto !important; }
.w-my-auto { margin-top: auto !important; margin-bottom: auto !important; }

/* ---------------- Padding ---------------- */

/* All sides */
.w-p-0 { padding: var(--w-spacer-0) !important; }
.w-p-1 { padding: var(--w-spacer-1) !important; }
.w-p-2 { padding: var(--w-spacer-2) !important; }
.w-p-3 { padding: var(--w-spacer-3) !important; }
.w-p-4 { padding: var(--w-spacer-4) !important; }
.w-p-5 { padding: var(--w-spacer-5) !important; }

/* Top */
.w-pt-0 { padding-top: var(--w-spacer-0) !important; }
.w-pt-1 { padding-top: var(--w-spacer-1) !important; }
.w-pt-2 { padding-top: var(--w-spacer-2) !important; }
.w-pt-3 { padding-top: var(--w-spacer-3) !important; }
.w-pt-4 { padding-top: var(--w-spacer-4) !important; }
.w-pt-5 { padding-top: var(--w-spacer-5) !important; }

/* Bottom */
.w-pb-0 { padding-bottom: var(--w-spacer-0) !important; }
.w-pb-1 { padding-bottom: var(--w-spacer-1) !important; }
.w-pb-2 { padding-bottom: var(--w-spacer-2) !important; }
.w-pb-3 { padding-bottom: var(--w-spacer-3) !important; }
.w-pb-4 { padding-bottom: var(--w-spacer-4) !important; }
.w-pb-5 { padding-bottom: var(--w-spacer-5) !important; }

/* Start */
.w-ps-0 { padding-inline-start: var(--w-spacer-0) !important; }
.w-ps-1 { padding-inline-start: var(--w-spacer-1) !important; }
.w-ps-2 { padding-inline-start: var(--w-spacer-2) !important; }
.w-ps-3 { padding-inline-start: var(--w-spacer-3) !important; }
.w-ps-4 { padding-inline-start: var(--w-spacer-4) !important; }
.w-ps-5 { padding-inline-start: var(--w-spacer-5) !important; }

/* End */
.w-pe-0 { padding-inline-end: var(--w-spacer-0) !important; }
.w-pe-1 { padding-inline-end: var(--w-spacer-1) !important; }
.w-pe-2 { padding-inline-end: var(--w-spacer-2) !important; }
.w-pe-3 { padding-inline-end: var(--w-spacer-3) !important; }
.w-pe-4 { padding-inline-end: var(--w-spacer-4) !important; }
.w-pe-5 { padding-inline-end: var(--w-spacer-5) !important; }

/* X axis */
.w-px-0 { padding-left: var(--w-spacer-0) !important; padding-right: var(--w-spacer-0) !important; }
.w-px-1 { padding-left: var(--w-spacer-1) !important; padding-right: var(--w-spacer-1) !important; }
.w-px-2 { padding-left: var(--w-spacer-2) !important; padding-right: var(--w-spacer-2) !important; }
.w-px-3 { padding-left: var(--w-spacer-3) !important; padding-right: var(--w-spacer-3) !important; }
.w-px-4 { padding-left: var(--w-spacer-4) !important; padding-right: var(--w-spacer-4) !important; }
.w-px-5 { padding-left: var(--w-spacer-5) !important; padding-right: var(--w-spacer-5) !important; }

/* Y axis */
.w-py-0 { padding-top: var(--w-spacer-0) !important; padding-bottom: var(--w-spacer-0) !important; }
.w-py-1 { padding-top: var(--w-spacer-1) !important; padding-bottom: var(--w-spacer-1) !important; }
.w-py-2 { padding-top: var(--w-spacer-2) !important; padding-bottom: var(--w-spacer-2) !important; }
.w-py-3 { padding-top: var(--w-spacer-3) !important; padding-bottom: var(--w-spacer-3) !important; }
.w-py-4 { padding-top: var(--w-spacer-4) !important; padding-bottom: var(--w-spacer-4) !important; }
.w-py-5 { padding-top: var(--w-spacer-5) !important; padding-bottom: var(--w-spacer-5) !important; }



.w-d-block        { display: block !important; }
.w-d-inline       { display: inline !important; }
.w-d-inline-block { display: inline-block !important; }
.w-d-flex         { display: flex !important; }
.w-d-grid         { display: grid !important; }
.w-d-none         { display: none !important; }

/* Direction */
.w-flex-row    { flex-direction: row !important; }
.w-flex-column { flex-direction: column !important; }

/* Wrapping */
.w-flex-wrap      { flex-wrap: wrap !important; }
.w-flex-nowrap    { flex-wrap: nowrap !important; }
.w-flex-wrap-rev  { flex-wrap: wrap-reverse !important; }

/* Justify */
.w-justify-start   { justify-content: flex-start !important; }
.w-justify-center  { justify-content: center !important; }
.w-justify-end     { justify-content: flex-end !important; }
.w-justify-between { justify-content: space-between !important; }
.w-justify-around  { justify-content: space-around !important; }
.w-justify-evenly  { justify-content: space-evenly !important; }

/* Align items */
.w-align-start   { align-items: flex-start !important; }
.w-align-center  { align-items: center !important; }
.w-align-end     { align-items: flex-end !important; }
.w-align-stretch { align-items: stretch !important; }

/* Align self */
.w-align-self-start   { align-self: flex-start !important; }
.w-align-self-center  { align-self: center !important; }
.w-align-self-end     { align-self: flex-end !important; }
.w-align-self-stretch { align-self: stretch !important; }

.w-text-start  { text-align: left !important; }
.w-text-center { text-align: center !important; }
.w-text-end    { text-align: right !important; }

.w-fw-bold   { font-weight: 700 !important; }
.w-fw-normal { font-weight: 400 !important; }
.w-fw-light  { font-weight: 300 !important; }

.w-fst-italic { font-style: italic !important; }
.w-fst-normal { font-style: normal !important; }

.w-text-nowrap { white-space: nowrap !important; }
.w-text-wrap   { white-space: normal !important; }

.w-w-100   { width: 100% !important; }
.w-h-100   { height: 100% !important; }
.w-min-vh-100 { min-height: 100vh !important; }
.w-min-vw-100 { min-width: 100vw !important; }


/* ========= BASE UTILITIES ========= */

/* Margin all */
.w-m-0 { margin: var(--w-spacer-0) !important; }
.w-m-1 { margin: var(--w-spacer-1) !important; }
.w-m-2 { margin: var(--w-spacer-2) !important; }
.w-m-3 { margin: var(--w-spacer-3) !important; }
.w-m-4 { margin: var(--w-spacer-4) !important; }
.w-m-5 { margin: var(--w-spacer-5) !important; }

/* Padding all */
.w-p-0 { padding: var(--w-spacer-0) !important; }
.w-p-1 { padding: var(--w-spacer-1) !important; }
.w-p-2 { padding: var(--w-spacer-2) !important; }
.w-p-3 { padding: var(--w-spacer-3) !important; }
.w-p-4 { padding: var(--w-spacer-4) !important; }
.w-p-5 { padding: var(--w-spacer-5) !important; }

/* Directions (example for top, repeat for bottom/start/end/x/y) */
.w-mt-0 { margin-top: var(--w-spacer-0) !important; }
.w-mt-1 { margin-top: var(--w-spacer-1) !important; }
.w-mt-2 { margin-top: var(--w-spacer-2) !important; }
.w-mt-3 { margin-top: var(--w-spacer-3) !important; }
.w-mt-4 { margin-top: var(--w-spacer-4) !important; }
.w-mt-5 { margin-top: var(--w-spacer-5) !important; }

.w-pt-0 { padding-top: var(--w-spacer-0) !important; }
.w-pt-1 { padding-top: var(--w-spacer-1) !important; }
.w-pt-2 { padding-top: var(--w-spacer-2) !important; }
.w-pt-3 { padding-top: var(--w-spacer-3) !important; }
.w-pt-4 { padding-top: var(--w-spacer-4) !important; }
.w-pt-5 { padding-top: var(--w-spacer-5) !important; }

/* Horizontal & vertical */
.w-mx-auto { margin-left: auto !important; margin-right: auto !important; }
.w-my-auto { margin-top: auto !important; margin-bottom: auto !important; }


/* Small devices (≥576px) */
@media (min-width: 576px) {
  .w-m-sm-0 { margin: var(--w-spacer-0) !important; }
  .w-m-sm-1 { margin: var(--w-spacer-1) !important; }
  .w-m-sm-2 { margin: var(--w-spacer-2) !important; }
  .w-m-sm-3 { margin: var(--w-spacer-3) !important; }
  .w-m-sm-4 { margin: var(--w-spacer-4) !important; }
  .w-m-sm-5 { margin: var(--w-spacer-5) !important; }

  .w-p-sm-0 { padding: var(--w-spacer-0) !important; }
  .w-p-sm-1 { padding: var(--w-spacer-1) !important; }
  .w-p-sm-2 { padding: var(--w-spacer-2) !important; }
  .w-p-sm-3 { padding: var(--w-spacer-3) !important; }
  .w-p-sm-4 { padding: var(--w-spacer-4) !important; }
  .w-p-sm-5 { padding: var(--w-spacer-5) !important; }

  /* same pattern for mt, mb, ms, me, pt, pb, ps, pe, mx, my, px, py */
}

/* Medium devices (≥768px) */
@media (min-width: 768px) {
  .w-m-md-0 { margin: var(--w-spacer-0) !important; }
  .w-m-md-1 { margin: var(--w-spacer-1) !important; }
  .w-m-md-2 { margin: var(--w-spacer-2) !important; }
  .w-m-md-3 { margin: var(--w-spacer-3) !important; }
  .w-m-md-4 { margin: var(--w-spacer-4) !important; }
  .w-m-md-5 { margin: var(--w-spacer-5) !important; }
  
  .w-p-md-0 { padding: var(--w-spacer-0) !important; }
  .w-p-md-1 { padding: var(--w-spacer-1) !important; }
  .w-p-md-2 { padding: var(--w-spacer-2) !important; }
  .w-p-md-3 { padding: var(--w-spacer-3) !important; }
  .w-p-md-4 { padding: var(--w-spacer-4) !important; }
  .w-p-md-5 { padding: var(--w-spacer-5) !important; }
}

/* Large (≥992px), XL (≥1200px), XXL (≥1400px) → same pattern */


/* راست به چپ */
.w-rtl {
  direction: rtl;
  text-align: right;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}