/**
 * ماهنامه — Gates Notes–style newsletter signup card (RTL).
 */

.paper-sheet--newsletter .paper-crumbs {
	margin-bottom: 28px;
}

.mahnameh-card {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	width: 100%;
	max-width: 920px;
	margin: 0 auto 1.5rem;
	overflow: hidden;
	border-radius: 14px;
	background: #fff;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.04),
		0 8px 28px rgba(0, 0, 0, 0.08);
	direction: rtl;
}

body[data-nazemi-theme="dark"] .mahnameh-card,
body[data-nazemi-theme="dim"] .mahnameh-card {
	background: color-mix(in srgb, var(--paper-sheet) 92%, #fff);
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.2),
		0 10px 32px rgba(0, 0, 0, 0.28);
}

.mahnameh-card__copy {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.5rem;
	padding: clamp(28px, 4.5vw, 48px) clamp(24px, 4vw, 44px);
	min-height: 320px;
	box-sizing: border-box;
}

.mahnameh-card__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.55rem, 2.8vw, 2.15rem);
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: var(--paper-ink, #1a1a1a);
	text-align: right;
}

.mahnameh-card__lead {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 400;
	line-height: 1.75;
	color: var(--paper-muted, #5c5c5c);
	text-align: right;
	max-width: 36em;
}

.mahnameh-card__flash {
	margin: 0;
	padding: 0.7em 0.9em;
	font-size: 0.88rem;
	line-height: 1.55;
	border: 1px solid var(--paper-rule, rgba(26, 26, 26, 0.14));
}

.mahnameh-card__flash--ok {
	color: var(--paper-ink);
	background: color-mix(in srgb, var(--paper-ink) 4%, transparent);
}

.mahnameh-card__flash--err {
	color: var(--paper-ink);
	background: color-mix(in srgb, var(--paper-ink) 7%, transparent);
}

.mahnameh-card__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: auto;
	position: relative;
}

.mahnameh-card__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.mahnameh-card__email {
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	padding: 0 14px;
	margin: 0;
	border: 1px solid color-mix(in srgb, var(--paper-ink, #1a1a1a) 18%, transparent);
	border-radius: 6px;
	background: transparent;
	color: var(--paper-ink, #1a1a1a);
	font-family: inherit;
	font-size: 0.92rem;
	text-align: right;
	direction: rtl;
	outline: none;
}

.mahnameh-card__email::placeholder {
	color: var(--paper-faint, #8a8a8a);
}

.mahnameh-card__email:focus {
	border-color: var(--paper-ink, #1a1a1a);
}

.mahnameh-card__btn {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 0.85em 1.2em;
	margin: 0;
	border: 0;
	border-radius: 6px;
	background: #2d2e30;
	color: #fff;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	text-align: center;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.mahnameh-card__btn:hover {
	background: #1a1a1a;
}

.mahnameh-card__btn:focus-visible {
	outline: 2px solid var(--paper-ink, #1a1a1a);
	outline-offset: 3px;
}

body[data-nazemi-theme="dark"] .mahnameh-card__btn,
body[data-nazemi-theme="dim"] .mahnameh-card__btn {
	background: var(--paper-ink);
	color: var(--paper-page);
}

body[data-nazemi-theme="dark"] .mahnameh-card__btn:hover,
body[data-nazemi-theme="dim"] .mahnameh-card__btn:hover {
	opacity: 0.9;
}

.mahnameh-card__media {
	position: relative;
	min-height: 280px;
	background: #c5d0d8;
	overflow: hidden;
}

.mahnameh-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (max-width: 760px) {
	.paper-sheet--newsletter .paper-crumbs {
		margin-bottom: 18px;
	}

	.mahnameh-card {
		grid-template-columns: 1fr;
		max-width: none;
		width: 100%;
		margin: 0 0 1rem;
		border-radius: 12px;
	}

	.mahnameh-card__media {
		order: -1;
		min-height: 0;
		aspect-ratio: 5 / 4;
	}

	.mahnameh-card__copy {
		min-height: 0;
		gap: 1.15rem;
		padding: 22px 18px 24px;
	}

	.mahnameh-card__title {
		font-size: clamp(1.35rem, 5.5vw, 1.7rem);
		margin-bottom: 0.5rem;
	}

	.mahnameh-card__lead {
		font-size: 0.92rem;
		line-height: 1.65;
	}

	.mahnameh-card__email,
	.mahnameh-card__btn {
		font-size: 16px;
		min-height: 48px;
	}

	.mahnameh-card__email {
		height: 48px;
	}
}

@media (max-width: 420px) {
	.mahnameh-card {
		border-radius: 10px;
	}

	.mahnameh-card__media {
		aspect-ratio: 1 / 1;
	}

	.mahnameh-card__copy {
		padding: 18px 16px 22px;
	}
}
