/* Quotes — soft infinite marquee + glass modal */

.neto-quotes {
	position: relative;
	isolation: isolate;
	padding-block: clamp(3.5rem, 7vw, 5.5rem);
	overflow: hidden;
	background: transparent;
}

.neto-quotes:has(.neto-quotes__marquee.is-scroll-mode) {
	overflow: visible;
}

.neto-quotes::before {
	display: none;
}

.neto-quotes__wrap {
	position: relative;
	z-index: 1;
	width: min(100% - 1.75rem, var(--neto-content-max, 1300px));
	max-width: none;
	margin-inline: auto;
	padding-inline: 0;
	overflow: hidden;
}

/* Let the marquee own horizontal scrolling on mobile */
.neto-quotes:has(.neto-quotes__marquee.is-scroll-mode) .neto-quotes__wrap {
	overflow: visible;
}

@media (max-width: 640px) {
	.neto-quotes__wrap {
		width: min(100% - 1.25rem, var(--neto-content-max, 1300px));
	}
}

.neto-quotes__head {
	max-width: 42rem;
	margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.neto-quotes__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0 0 0.85rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--neto-muted);
}

.neto-quotes__eyebrow-line {
	display: block;
	width: 1.75rem;
	height: 2px;
	border-radius: 999px;
	background: var(--neto-accent);
	transform-origin: right center;
	transition: transform 0.7s ease;
}

html[data-neto-ui-theme="dark"] .neto-quotes__eyebrow-line {
	background: #00d7ff;
}

.neto-quotes__eyebrow [lang="en"] {
	opacity: 0.85;
}

.neto-quotes__eyebrow-fa {
	color: var(--neto-ink);
	font-weight: 700;
	letter-spacing: 0;
}

.neto-quotes__title {
	margin: 0;
	font-size: clamp(1.2rem, 1.85vw, 1.5rem);
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.55;
	color: var(--neto-ink);
	text-wrap: balance;
}

.neto-quotes__marquee {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 100%;
	margin-top: 0.25rem;
	overflow: hidden;
	direction: ltr;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

/* Mobile: real overflow scroll so finger drag always works */
.neto-quotes__marquee.is-scroll-mode {
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x;
	scrollbar-width: none;
	cursor: grab;
}

.neto-quotes__marquee.is-scroll-mode::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.neto-quotes__marquee.is-scroll-mode .neto-quotes__track {
	transform: none !important;
	animation: none !important;
	will-change: auto;
}

.neto-quotes__marquee.is-scroll-mode .neto-quotes__open {
	touch-action: pan-x;
}

.neto-quotes__marquee.is-dragging {
	cursor: grabbing;
	touch-action: none !important;
}

.neto-quotes__marquee.is-dragging .neto-quotes__open {
	pointer-events: none;
	touch-action: none !important;
}

/* Track = two identical sets; CSS fallback loops rightward; JS drives when ready. */
.neto-quotes__track {
	display: flex;
	width: max-content;
	align-items: stretch;
	padding-block: 0.75rem 0.35rem;
	animation: neto-quotes-scroll 42s linear infinite;
	will-change: transform;
}

.neto-quotes__track.is-js-marquee {
	animation: none !important;
}

.neto-quotes__marquee:hover .neto-quotes__track:not(.is-js-marquee),
.neto-quotes.is-modal-open .neto-quotes__track:not(.is-js-marquee),
html.neto-quotes-lock .neto-quotes__track:not(.is-js-marquee) {
	animation-play-state: paused;
}

.neto-quotes__set {
	display: flex;
	align-items: stretch;
	flex-shrink: 0;
	gap: 1.25rem;
	/* half-gap padding so join between sets equals item gap */
	padding-left: 0.625rem;
	padding-right: 0.625rem;
}

.neto-quotes__card {
	flex: 0 0 auto;
	width: 20rem;
	max-width: 78vw;
	direction: rtl;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.85rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent !important;
	box-shadow: none;
	color: inherit;
	font: inherit;
	text-align: right;
}

/* جهت برعکس: حرکت به راست (seamless روی دو ست) */
@keyframes neto-quotes-scroll {
	from {
		transform: translateX(-50%);
	}
	to {
		transform: translateX(0);
	}
}

.neto-quotes__open {
	display: block !important;
	width: 100%;
	min-width: 0;
	flex: 1 1 auto;
	margin: 0;
	padding: 0;
	border: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	color: inherit !important;
	font: inherit;
	text-align: right;
	cursor: pointer;
	box-shadow: none !important;
	white-space: normal !important;
	transition: transform 0.35s ease;
	-webkit-touch-callout: none;
}

.neto-quotes__open:hover,
.neto-quotes__open:focus,
.neto-quotes__open:active,
.neto-quotes__open:focus-visible {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: inherit !important;
	border-color: transparent !important;
	box-shadow: none !important;
	outline: none;
	transform: translateY(-3px);
	white-space: normal !important;
}

.neto-quotes__bubble {
	position: relative;
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.65rem;
	height: 100%;
	min-height: 100%;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
	padding: 1.25rem 1.25rem 1.55rem;
	border-radius: 1.6rem 1.6rem 1.6rem 0.45rem;
	background:
		radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--neto-accent) 14%, transparent), transparent 55%),
		linear-gradient(165deg, color-mix(in srgb, var(--neto-card) 96%, var(--neto-brand)) 0%, var(--neto-card) 55%) !important;
	box-shadow:
		0 1px 0 color-mix(in srgb, #fff 70%, transparent) inset,
		0 18px 40px rgba(5, 43, 66, 0.1);
	white-space: normal !important;
	transition: box-shadow 0.35s ease;
}

html[data-neto-ui-theme="dark"] .neto-quotes__bubble {
	background:
		radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, #00d7ff 10%, transparent), transparent 50%),
		linear-gradient(165deg, #1d1d1f 0%, #191919 60%) !important;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.05) inset,
		0 18px 44px rgba(0, 0, 0, 0.45);
}

.neto-quotes__open:hover .neto-quotes__bubble,
.neto-quotes__open:focus-visible .neto-quotes__bubble {
	box-shadow:
		0 1px 0 color-mix(in srgb, #fff 70%, transparent) inset,
		0 22px 48px rgba(0, 77, 119, 0.16);
}

.neto-quotes__excerpt {
	display: block !important;
	margin: 0;
	flex: 1 1 auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	font-size: 0.92rem;
	font-weight: 400;
	line-height: 1.85;
	text-align: justify;
	text-justify: inter-word;
	color: var(--neto-ink);
	white-space: normal !important;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

.neto-quotes__excerpt::before,
.neto-quotes__modal-quote::before {
	content: "«";
	font-size: 1em;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
	margin-inline-end: 0.15em;
}

.neto-quotes__tail {
	position: absolute;
	inset-inline-end: 1.55rem;
	bottom: -0.55rem;
	width: 1.1rem;
	height: 1.1rem;
	background: var(--neto-card);
	transform: rotate(45deg);
	border-radius: 0 0 3px 0;
	box-shadow: 3px 3px 8px rgba(5, 43, 66, 0.06);
	z-index: 0;
	pointer-events: none;
}

html[data-neto-ui-theme="dark"] .neto-quotes__tail {
	background: #191919;
	box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.35);
}

.neto-quotes__person {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-inline: 0.35rem 0.15rem;
	margin-top: 0.15rem;
	min-width: 0;
}

.neto-quotes__avatar {
	width: 3rem;
	height: 3rem;
	border-radius: 999px;
	overflow: hidden;
	display: grid;
	place-items: center;
	background: linear-gradient(145deg, color-mix(in srgb, var(--neto-brand) 18%, #fff), var(--neto-card));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--neto-page) 80%, transparent), 0 8px 18px rgba(0, 77, 119, 0.14);
	flex-shrink: 0;
}

html[data-neto-ui-theme="dark"] .neto-quotes__avatar {
	background: linear-gradient(145deg, #27272a, #191919);
	box-shadow: 0 0 0 3px #09090b, 0 8px 20px rgba(0, 0, 0, 0.45);
}

.neto-quotes__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.neto-quotes__initial {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--neto-brand);
}

.neto-quotes__meta {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
	flex: 1 1 auto;
}

.neto-quotes__badge {
	display: grid;
	place-items: center;
	width: 2.15rem;
	height: 2.15rem;
	margin-inline-start: auto;
	flex-shrink: 0;
	border-radius: 999px;
	border: 1px solid var(--neto-line);
	background: color-mix(in srgb, var(--neto-card) 92%, var(--neto-brand)) !important;
	color: var(--neto-brand) !important;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(5, 43, 66, 0.08);
}

.neto-quotes__badge:hover,
.neto-quotes__badge:focus-visible {
	border-color: var(--neto-brand);
	color: var(--neto-brand) !important;
	background: var(--neto-card) !important;
	outline: none;
}

html[data-neto-ui-theme="dark"] .neto-quotes__badge {
	background: #191919 !important;
	border-color: #27272a;
	color: #fafafa !important;
}

html[data-neto-ui-theme="dark"] .neto-quotes__badge:hover,
html[data-neto-ui-theme="dark"] .neto-quotes__badge:focus-visible {
	border-color: #00d7ff;
	color: #00d7ff !important;
}

.neto-quotes__name {
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.35;
	color: var(--neto-ink);
}

.neto-quotes__role {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--neto-muted);
}

.neto-quotes__platform-icon {
	display: block;
	flex-shrink: 0;
}

/* Modal */
.neto-quotes__modal[hidden] {
	display: none !important;
}

.neto-quotes__modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: grid;
	place-items: center;
	padding: 1.25rem;
	isolation: isolate;
	font-family: var(--neto-font, "Vazirmatn FD", Tahoma, sans-serif);
	direction: rtl;
	color: var(--neto-ink, #052b42);
}

.neto-quotes__modal,
.neto-quotes__modal * {
	font-family: "Vazirmatn FD", Tahoma, sans-serif !important;
}

.neto-quotes__modal-panel {
	position: relative;
	z-index: 1;
	width: min(34rem, 100%);
	padding: 1.85rem 1.6rem 1.7rem;
	border-radius: 1.75rem 1.75rem 1.75rem 0.65rem;
	border: 0;
	background:
		radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--neto-accent, #0f72d2) 16%, transparent), transparent 55%),
		color-mix(in srgb, var(--neto-card, #fff) 92%, transparent);
	box-shadow: 0 30px 80px rgba(20, 40, 70, 0.28);
	backdrop-filter: blur(22px) saturate(1.15);
	-webkit-backdrop-filter: blur(22px) saturate(1.15);
	transform: translateY(12px) scale(0.97);
	opacity: 0;
	transition: transform 0.32s ease, opacity 0.32s ease;
	font-family: var(--neto-font, "Vazirmatn FD", Tahoma, sans-serif);
}

.neto-quotes__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 20, 35, 0.55);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	cursor: pointer;
}

html[data-neto-ui-theme="dark"] .neto-quotes__modal-backdrop {
	background: rgba(0, 0, 0, 0.72);
}

html[data-neto-ui-theme="dark"] .neto-quotes__modal-panel {
	background:
		radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, #00d7ff 12%, transparent), transparent 50%),
		color-mix(in srgb, #191919 90%, transparent);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.neto-quotes__modal.is-open .neto-quotes__modal-panel {
	transform: none;
	opacity: 1;
}

html.neto-quotes-lock,
html.neto-quotes-lock body {
	overflow: hidden !important;
	overscroll-behavior: none;
}

.neto-quotes__modal-quote {
	margin: 0 0 1.35rem;
	padding: 0;
	border: 0;
	font-size: 1.05rem;
	font-weight: 400;
	line-height: 1.95;
	text-align: justify;
	text-justify: inter-word;
	color: var(--neto-ink, #052b42);
	white-space: normal !important;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.neto-quotes__modal-top {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.95rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--neto-line);
}

.neto-quotes__modal-badge {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	margin-inline-start: auto;
	border-radius: 999px;
	border: 1px solid var(--neto-line);
	background: color-mix(in srgb, var(--neto-card) 88%, var(--neto-brand)) !important;
	color: var(--neto-brand) !important;
	text-decoration: none !important;
}

.neto-quotes__modal-badge:hover,
.neto-quotes__modal-badge:focus-visible {
	border-color: var(--neto-brand);
	color: var(--neto-brand) !important;
}

.neto-quotes__modal-avatar {
	width: 3.75rem;
	height: 3.75rem;
	border-radius: 999px;
	overflow: hidden;
	display: grid;
	place-items: center;
	background: color-mix(in srgb, var(--neto-brand) 14%, var(--neto-card));
	border: 1px solid var(--neto-line);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--neto-brand);
	flex-shrink: 0;
}

.neto-quotes__modal-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.neto-quotes__modal-name {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--neto-ink);
}

.neto-quotes__modal-role {
	margin: 0.2rem 0 0;
	font-size: 0.88rem;
	color: var(--neto-muted);
}

.neto-quotes [data-neto-reveal] {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.neto-quotes [data-neto-reveal].is-in {
	opacity: 1;
	transform: none;
}

.neto-quotes__head[data-neto-reveal].is-in .neto-quotes__eyebrow-line {
	transform: scaleX(1);
}

@media (max-width: 720px) {
	.neto-quotes__item {
		width: min(18rem, 84vw);
	}

	.neto-quotes__bubble {
		padding: 1.1rem 1.1rem 1.35rem;
		border-radius: 1.35rem 1.35rem 1.35rem 0.4rem;
	}

	.neto-quotes__excerpt {
		font-size: 0.88rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.neto-quotes__track {
		animation: none !important;
		flex-wrap: wrap;
		width: 100%;
		max-width: var(--neto-content-max);
		margin-inline: auto;
		justify-content: center;
		padding-inline: var(--neto-pad-x);
	}

	.neto-quotes__set[aria-hidden="true"] {
		display: none !important;
	}

	.neto-quotes__set {
		flex-wrap: wrap;
		justify-content: center;
		padding-left: 0;
		padding-right: 0;
	}

	.neto-quotes [data-neto-reveal] {
		opacity: 1;
		transform: none;
	}

	.neto-quotes__modal-panel {
		transition: none;
	}
}
