/* Mehrad Stories widget */
.elementor-widget-mehrad_stories .elementor-widget-container {
  display: block;
  overflow: visible;
}

.mehrad-stories {
  --mehrad-story-ring-color: #e7316d;
  --mehrad-story-glow-color: #e7316d;
  --mehrad-story-seen-color: #b7bdc7;
  --mehrad-story-radius: 999px;
  --mehrad-story-border-width: 0px;
  --mehrad-story-border-color: transparent;
  --mehrad-story-title-color: #263242;
  --mehrad-story-badge-bg: #e7316d;
  --mehrad-story-badge-color: #ffffff;
  --mehrad-story-viewer-title-color: #ffffff;
  width: min(1320px, calc(100% - 32px));
  margin: 24px auto;
  direction: rtl;
  overflow: visible;
}

.mehrad-stories-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 26px;
  width: 100%;
  margin: 0;
  padding: 10px 10px 14px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mehrad-stories-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.mehrad-story-item {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  min-width: 104px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mehrad-story-item:focus-visible {
  outline: 2px solid var(--mehrad-story-ring-color);
  outline-offset: 6px;
  border-radius: 18px;
}

.mehrad-story-item::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  z-index: 0;
  width: 90px;
  height: 90px;
  transform: translateX(-50%);
  border-radius: var(--mehrad-story-radius);
  background: var(--mehrad-story-glow-color);
  opacity: .055;
  filter: blur(14px);
  pointer-events: none;
}

.mehrad-story-cover {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  padding: 0;
  overflow: hidden;
  border: var(--mehrad-story-border-width) solid var(--mehrad-story-border-color);
  border-radius: var(--mehrad-story-radius);
  background: var(--mehrad-story-ring-color);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--mehrad-story-ring-color) 10%, transparent),
    0 16px 34px color-mix(in srgb, var(--mehrad-story-glow-color) 18%, transparent);
}

@supports not (color: color-mix(in srgb, #000 10%, transparent)) {
  .mehrad-story-cover {
    box-shadow: 0 0 0 5px rgba(231, 49, 109, .10), 0 16px 34px rgba(231, 49, 109, .18);
  }
}

.mehrad-story-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--mehrad-story-ring-color);
}

.mehrad-story-cover::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 1;
  border-radius: inherit;
  background: #fff;
}

.mehrad-story-cover img,
.mehrad-story-cover video {
  position: absolute;
  inset: 6px;
  z-index: 3;
  display: block;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: max(0px, calc(var(--mehrad-story-radius) - 4px));
  object-fit: cover;
  background: #fff;
}

.mehrad-story-cover-icon {
  position: absolute;
  inset: 9px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: max(0px, calc(var(--mehrad-story-radius) - 4px));
  background: #fff;
  color: var(--mehrad-story-ring-color);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.mehrad-story-cover-text {
  font-size: 13px;
  letter-spacing: -.2px;
}

.mehrad-story-title {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--mehrad-story-title-color);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mehrad-story-badge {
  position: absolute;
  top: 70px;
  right: 50%;
  z-index: 5;
  padding: 5px 8px;
  transform: translateX(50%);
  border-radius: 8px;
  background: var(--mehrad-story-badge-bg);
  color: var(--mehrad-story-badge-color);
  box-shadow: 0 6px 14px rgba(231, 49, 109, .18);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.mehrad-story-item.is-seen::before {
  background: var(--mehrad-story-seen-color);
  opacity: .045;
}

.mehrad-story-item.is-seen .mehrad-story-cover {
  background: var(--mehrad-story-seen-color);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--mehrad-story-seen-color) 10%, transparent),
    0 12px 24px color-mix(in srgb, var(--mehrad-story-seen-color) 18%, transparent);
}

.mehrad-story-item.is-seen .mehrad-story-cover::before {
  background: var(--mehrad-story-seen-color);
}


html.dark .mehrad-stories {
  --mehrad-story-title-color: #f8fafc;
  --mehrad-story-badge-bg: #fb2c67;
  --mehrad-story-badge-color: #ffffff;
  --mehrad-story-viewer-title-color: #ffffff;
}

/* Viewer */
html.mehrad-story-open,
html.mehrad-story-open body {
  overscroll-behavior: none;
}

.mehrad-story-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  contain: layout style paint;
  background: rgba(6, 10, 18, .84);
  transform: translateZ(0);
}

.mehrad-story-modal.is-open {
  display: flex;
}

.mehrad-story-box {
  position: relative;
  width: min(430px, calc(100vw - 28px));
  height: min(760px, calc(100vh - 44px));
  overflow: hidden;
  border-radius: 24px;
  background: #080b12;
  box-shadow: 0 18px 56px rgba(0, 0, 0, .30);
  contain: layout style paint;
  direction: rtl;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.mehrad-story-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #080b12;
  contain: layout style paint;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.mehrad-story-media img,
.mehrad-story-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.mehrad-story-media video {
  pointer-events: none;
  background: #05070d;
  user-select: none;
  -webkit-user-select: none;
}

.mehrad-story-media video::-webkit-media-controls,
.mehrad-story-media video::-webkit-media-controls-enclosure,
.mehrad-story-media video::-webkit-media-controls-panel,
.mehrad-story-media video::-webkit-media-controls-play-button,
.mehrad-story-media video::-webkit-media-controls-mute-button,
.mehrad-story-media video::-webkit-media-controls-timeline,
.mehrad-story-media video::-webkit-media-controls-current-time-display,
.mehrad-story-media video::-webkit-media-controls-time-remaining-display {
  display: none !important;
  opacity: 0 !important;
}

.mehrad-story-progress {
  position: absolute;
  top: 12px;
  right: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  flex-direction: row;
  gap: 5px;
  height: 4px;
  overflow: visible;
  direction: rtl;
  background: transparent;
}

.mehrad-story-progress-segment {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .38);
}

.mehrad-story-progress-segment > span {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right center;
  will-change: transform;
}

.mehrad-story-progress-segment.is-done > span {
  transform: scaleX(1);
}

.mehrad-story-caption {
  position: absolute;
  top: 24px;
  right: 18px;
  left: 68px;
  z-index: 7;
  overflow: hidden;
  color: var(--mehrad-story-viewer-title-color, #fff);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.7;
  text-overflow: ellipsis;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  white-space: nowrap;
}

.mehrad-story-close {
  position: absolute;
  top: 24px;
  left: 16px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .32);
  color: #fff;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.mehrad-story-nav {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #111827;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  cursor: pointer;
  opacity: .95;
  transition: opacity .18s ease, transform .18s ease;
}

.mehrad-story-nav:hover {
  transform: translateY(-50%) scale(1.04);
  opacity: 1;
}

.mehrad-story-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mehrad-story-prev {
  left: 14px;
}

.mehrad-story-next {
  right: 14px;
}

.mehrad-story-modal.mehrad-stories-no-arrows .mehrad-story-nav,
.mehrad-story-modal.mehrad-stories-hide-arrows-desktop .mehrad-story-nav {
  display: none;
}

.mehrad-story-action {
  position: absolute;
  bottom: 26px;
  left: 50%;
  z-index: 9;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 42px;
  padding: 0 20px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #111827;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .18);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.mehrad-story-action:hover,
.mehrad-story-action:focus {
  background: #fff;
  color: #111827;
  text-decoration: none;
}

.mehrad-story-text-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: clamp(34px, 8vw, 72px) clamp(24px, 7vw, 54px);
  overflow: auto;
  direction: rtl;
  font-size: clamp(17px, 3.2vw, 24px);
  font-weight: 800;
  line-height: 2;
}

.mehrad-story-text-card * {
  box-sizing: border-box;
  max-width: 100%;
}

.mehrad-story-text-card p,
.mehrad-story-text-card h1,
.mehrad-story-text-card h2,
.mehrad-story-text-card h3,
.mehrad-story-text-card ul,
.mehrad-story-text-card ol {
  margin: 0 0 12px;
}

.mehrad-story-text-card p:last-child,
.mehrad-story-text-card h1:last-child,
.mehrad-story-text-card h2:last-child,
.mehrad-story-text-card h3:last-child,
.mehrad-story-text-card ul:last-child,
.mehrad-story-text-card ol:last-child {
  margin-bottom: 0;
}

.mehrad-story-text-right {
  align-items: flex-start;
  text-align: right;
}

.mehrad-story-text-center {
  align-items: center;
  text-align: center;
}

.mehrad-story-text-left {
  align-items: flex-end;
  direction: ltr;
  text-align: left;
}

.mehrad-story-text-left * {
  direction: inherit;
}

@media (max-width: 768px) {
  .mehrad-stories {
    width: calc(100% - 24px);
    margin: 18px auto;
  }

  .mehrad-stories-track {
    justify-content: flex-start;
    gap: 18px;
    padding: 9px 8px 12px;
  }

  .mehrad-story-item {
    flex-basis: 86px;
    width: 86px;
    min-width: 86px;
  }

  .mehrad-story-item::before {
    top: -3px;
    width: 78px;
    height: 78px;
    opacity: .05;
    filter: blur(12px);
  }

  .mehrad-story-cover {
    width: 74px;
    height: 74px;
    margin-bottom: 8px;
  }

  .mehrad-story-cover img,
  .mehrad-story-cover video {
    inset: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
  }

  .mehrad-story-cover-icon {
    inset: 8px;
    font-size: 15px;
  }

  .mehrad-story-cover-text {
    font-size: 11.5px;
  }

  .mehrad-story-title {
    font-size: 12px;
  }

  .mehrad-story-badge {
    top: 62px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .mehrad-story-modal {
    padding: 0;
  }

  .mehrad-story-box {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }

  .mehrad-story-progress {
    top: 10px;
    right: 10px;
    left: 10px;
    gap: 4px;
  }

  .mehrad-story-caption {
    top: 22px;
    right: 14px;
    left: 60px;
  }

  .mehrad-story-close {
    top: 22px;
    left: 12px;
  }

  .mehrad-story-nav {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, .78);
  }

  .mehrad-story-prev {
    left: 10px;
  }

  .mehrad-story-next {
    right: 10px;
  }

  .mehrad-story-modal.mehrad-stories-hide-arrows-mobile .mehrad-story-nav {
    display: none;
  }

  .mehrad-story-modal.mehrad-stories-hide-arrows-desktop:not(.mehrad-stories-hide-arrows-mobile) .mehrad-story-nav {
    display: flex;
  }

  .mehrad-story-action {
    bottom: 22px;
    min-width: 104px;
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
  }

  .mehrad-story-text-card {
    padding: 72px 24px 86px;
    font-size: 18px;
    line-height: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mehrad-stories-track {
    scroll-behavior: auto;
  }

  .mehrad-story-nav {
    transition: none;
  }
}

html.dark .mehrad-stories .mehrad-story-title {
  color: var(--mehrad-story-title-color);
}

html.dark .mehrad-stories .mehrad-story-badge {
  background: var(--mehrad-story-badge-bg);
  color: var(--mehrad-story-badge-color);
}

html.dark .mehrad-story-caption {
  color: var(--mehrad-story-viewer-title-color, #ffffff);
}

html.dark .mehrad-story-text-card {
  color: #f8fafc;
}


/* Mehrad v1.0.93 - restore consistent Story cover positioning */
.elementor-widget-mehrad_stories .mehrad-story-cover{
	position:relative!important;
	display:flex!important;
	align-items:center!important;
	justify-content:center!important;
	margin-inline:auto!important;
	overflow:hidden!important;
}
.elementor-widget-mehrad_stories .mehrad-story-cover > img,
.elementor-widget-mehrad_stories .mehrad-story-cover > video{
	position:absolute!important;
	top:6px!important;
	right:6px!important;
	bottom:6px!important;
	left:6px!important;
	inset:6px!important;
	width:calc(100% - 12px)!important;
	min-width:0!important;
	max-width:none!important;
	height:calc(100% - 12px)!important;
	min-height:0!important;
	max-height:none!important;
	margin:0!important;
	padding:0!important;
	object-fit:cover!important;
	object-position:center center!important;
	transform:none!important;
	border-radius:max(0px,calc(var(--mehrad-story-radius) - 4px))!important;
}
.elementor-widget-mehrad_stories .mehrad-story-cover-icon{
	inset:9px!important;
	margin:0!important;
	transform:none!important;
}
