.rml-library {
	--rml-blue: #0055a4;
	--rml-blue-dark: #003f7f;
	--rml-yellow: #ffd200;
	--rml-ink: #132238;
	--rml-muted: #637287;
	--rml-line: #b9cde0;
	--rml-surface: #ffffff;
	--rml-soft: #f2f6fa;
	--rml-danger: #b42318;
	--rml-radius: 2px;
}

.rml-library,
.rml-library * {
	box-sizing: border-box;
	font-family:'Vazirmatn', 'Tahoma', sans-serif;
}
h1, h2, h3,h4, h5, h6, span, p, a{
    font-family:'Vazirmatn', 'Tahoma', sans-serif;;
}
.rml-library {
    width: 100%;
    /* max-width: 1320px; */
    margin: 0 auto;
    padding: clamp(28px, 5vw, 72px) clamp(16px, 3.5vw, 44px);
    color: var(--rml-ink);
    line-height: 1.7;
    padding-inline: var(--space-8);
}

.rml-library--error {
	margin-block: 24px;
	padding: 16px 20px;
	border-right: 4px solid var(--rml-danger);
	background: #fff4f2;
	color: #7a271a;
}

.rml-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	margin-bottom: clamp(30px, 5vw, 60px);
	padding: 18px 20px;
	border: 1px solid #dbe5ee;
	background: var(--rml-soft);
}

.rml-filter > label {
	color: var(--rml-blue-dark);
	font-weight: 700;
}

.rml-filter__control {
	position: relative;
	width: min(100%, 360px);
}

.rml-filter__select {
	width: 100%;
	min-height: 46px;
	padding: 8px 16px 8px 44px;
	border: 1px solid #a9bfd4;
	border-radius: var(--rml-radius);
	background: var(--rml-surface);
	color: var(--rml-ink);
	font: inherit;
	font-size: 14px;
	appearance: none;
	cursor: pointer;
}

.rml-filter__select:focus {
	border-color: var(--rml-blue);
	outline: 3px solid rgb(0 85 164 / 18%);
	outline-offset: 1px;
}

.rml-filter__select:disabled {
	cursor: wait;
	opacity: 0.65;
}

.rml-filter__control > .dashicons {
	position: absolute;
	top: 50%;
	left: 14px;
	transform: translateY(-50%);
	color: var(--rml-blue);
	pointer-events: none;
}

.rml-filter__feedback {
	flex: 1 1 240px;
	min-height: 24px;
	color: var(--rml-muted);
	font-size: 13px;
}

.rml-filter__feedback.is-error {
	color: var(--rml-danger);
}

.rml-filter__retry {
	margin-right: 10px;
	padding: 3px 8px;
	border: 1px solid currentcolor;
	border-radius: 2px;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.rml-library__content[aria-busy='true'] {
	opacity: 0.6;
	pointer-events: none;
}

.rml-section + .rml-section {
	margin-top: clamp(64px, 9vw, 120px);
}

.rml-section__header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: clamp(24px, 3vw, 40px);
	border-bottom: 1px solid var(--rml-line);
}

.rml-section__header h2 {
	position: relative;
	margin: 0;
	padding: 0 0 14px 24px;
	color: var(--rml-blue);
	font-size: clamp(22px, 2.2vw, 32px);
	font-weight: 800;
	line-height: 1.35;
}

.rml-section__header h2::after {
	position: absolute;
	right: 0;
	bottom: -1px;
	width: min(100%, 110px);
	height: 3px;
	background: var(--rml-yellow);
	content: '';
}

.rml-catalog-grid {
	display: grid;
	direction: ltr;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-flow: row;
	grid-auto-rows: clamp(270px, 31vw, 420px);
	gap: clamp(16px, 2.2vw, 30px);
}

.rml-catalog-card,
.rml-video-card {
	position: relative;
	display: block;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--rml-radius);
	background: var(--rml-blue-dark);
	box-shadow: 0 8px 22px rgb(15 35 55 / 9%);
	color: #fff;
	direction: rtl;
	text-align: right;
	text-decoration: none;
	isolation: isolate;
	transition: transform 220ms ease, box-shadow 220ms ease;
}

.rml-catalog-card--featured {
	/*grid-column: span 2;*/
	/*grid-row: span 2;*/
}

.rml-card__image,
.rml-card__img {
	display: block;
	width: 100%;
	height: 100%;
}

.rml-card__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	overflow: hidden;
}

.rml-card__img {
	object-fit: cover;
	object-position: center;
	transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 300ms ease;
}

.rml-card__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgb(1 24 49 / 52%);
	transition: background-color 260ms ease;
}

.rml-card__content {
	position: absolute;
	right: 20px;
	bottom: 20px;
	left: 20px;
	display: grid;
	gap: 2px;
	z-index: 2;
}

.rml-card__content strong {
	color: #fff;
	font-size: clamp(16px, 1.5vw, 22px);
	font-weight: 800;
	line-height: 1.5;
}

.rml-card__content span {
	color: rgb(255 255 255 / 82%);
	font-size: 12px;
}

.rml-card__arrow {
	position: absolute;
	bottom: 24px;
	left: 20px;
	z-index: 2;
	width: 30px;
	height: 30px;
	color: var(--rml-yellow);
	font-size: 30px;
	transition: transform 220ms ease;
}

.rml-catalog-card .rml-card__content {
	left: 64px;
}

.rml-video-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 26px);
}

.rml-video-card {
	width: 100%;
	aspect-ratio: 16 / 9;
	padding: 0;
	cursor: pointer;
}

.rml-video-card:disabled {
	cursor: default;
}

.rml-video-card .rml-card__overlay {
	background-color: rgb(0 73 144 / 28%);
}

.rml-video-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	width: clamp(52px, 5vw, 76px);
	height: clamp(52px, 5vw, 76px);
	place-items: center;
	border: 1px solid rgb(255 255 255 / 55%);
	border-radius: 50%;
	background: rgb(255 210 0 / 86%);
	box-shadow: 0 10px 30px rgb(0 0 0 / 18%);
	color: var(--rml-blue-dark);
	transform: translate(-50%, -50%);
	transition: transform 220ms ease, background-color 220ms ease;
}

.rml-video-card__play .dashicons {
	width: 32px;
	height: 32px;
	font-size: 32px;
	line-height: 1;
}

.rml-video-card .rml-card__content {
	right: 16px;
	bottom: 14px;
	left: 16px;
}

.rml-video-card .rml-card__content strong {
	font-size: clamp(13px, 1.2vw, 17px);
}

.rml-card--text-only {
	background: var(--rml-blue-dark);
}

.rml-card--text-only .rml-card__overlay {
	display: none;
}

.rml-catalog-card:hover,
.rml-catalog-card:focus-visible,
.rml-video-card:not(:disabled):hover,
.rml-video-card:not(:disabled):focus-visible {
	box-shadow: 0 16px 36px rgb(0 53 105 / 22%);
	transform: translateY(-6px);
}

.rml-catalog-card:hover .rml-card__img,
.rml-catalog-card:focus-visible .rml-card__img,
.rml-video-card:not(:disabled):hover .rml-card__img,
.rml-video-card:not(:disabled):focus-visible .rml-card__img {
	filter: saturate(1.08) contrast(1.04);
	transform: scale(1.055);
}

.rml-video-card:not(:disabled):hover .rml-card__overlay,
.rml-video-card:not(:disabled):focus-visible .rml-card__overlay {
	background-color: rgb(0 73 144 / 52%);
}

.rml-video-card:not(:disabled):hover .rml-video-card__play,
.rml-video-card:not(:disabled):focus-visible .rml-video-card__play {
	background: var(--rml-yellow);
	transform: translate(-50%, -50%) scale(1.08);
}

.rml-catalog-card:hover .rml-card__arrow,
.rml-catalog-card:focus-visible .rml-card__arrow {
	transform: translateX(-6px);
}

.rml-catalog-card:focus-visible,
.rml-video-card:focus-visible,
.rml-modal__close:focus-visible,
.rml-filter__retry:focus-visible {
	outline: 3px solid var(--rml-yellow);
	outline-offset: 3px;
}

.rml-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 160px;
	padding: 30px;
	border: 1px dashed #b8c7d5;
	background: var(--rml-soft);
	color: var(--rml-muted);
	text-align: center;
}

.rml-empty p {
	margin: 0;
}

.rml-empty .dashicons {
	color: var(--rml-blue);
}

.rml-modal[hidden] {
	display: none;
}

.rml-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
}

.rml-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(2 18 34 / 84%);
	backdrop-filter: blur(4px);
}

.rml-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(1080px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	border-radius: 4px;
	background: #071828;
	box-shadow: 0 28px 80px rgb(0 0 0 / 48%);
}

.rml-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 64px;
	padding: 10px 18px;
	background: #fff;
}

.rml-modal__header h2 {
	margin: 0;
	color: var(--rml-blue-dark);
	font: inherit;
	font-size: 18px;
	font-weight: 800;
}

.rml-modal__close {
	display: grid;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--rml-soft);
	color: var(--rml-blue-dark);
	cursor: pointer;
}

.rml-modal__close .dashicons {
	width: 28px;
	height: 28px;
	font-size: 28px;
}

.rml-modal__player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.rml-modal__player iframe,
.rml-modal__player video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

body.rml-modal-open {
	overflow: hidden;
}

@media (max-width: 980px) {
	.rml-catalog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: auto;
	}

	.rml-catalog-card,
	.rml-catalog-card--featured {
		grid-column: auto;
		grid-row: auto;
		aspect-ratio: 3 / 4;
	}

	.rml-video-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.rah-as-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 76px;
    gap: 10px;
    font-size: 0.9rem;
    padding-inline: var(--space-8);
}
.rah-as-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

@media (max-width: 640px) {
	.rml-library {
		padding-inline: 14px;
	}

	.rml-filter {
		align-items: stretch;
		padding: 14px;
	}

	.rml-filter__control,
	.rml-filter__feedback {
		width: 100%;
		flex-basis: 100%;
	}

	.rml-catalog-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.rml-catalog-card,
	.rml-catalog-card--featured {
		aspect-ratio: 4 / 5;
	}

	.rml-video-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.rml-card__content {
		right: 15px;
		bottom: 14px;
		left: 15px;
	}

	.rml-catalog-card .rml-card__content {
		left: 52px;
	}

	.rml-card__arrow {
		bottom: 16px;
		left: 14px;
	}

	.rml-modal {
		padding: 10px;
	}

	.rml-modal__dialog {
		max-height: calc(100vh - 20px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rml-library *,
	.rml-library *::before,
	.rml-library *::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
