/**
 * Front-end styles for the Semnan widgets.
 *
 * Kept separate from the migrated design stylesheet on purpose: this file only
 * styles the markup the widgets emit, so an Elementor layout never fights the
 * original site CSS and neither can silently break the other.
 */

.semnan-widget {
	--semnan-cols: 3;
	--semnan-gap: 20px;
}

.semnan-widget + .semnan-widget {
	margin-top: 2.5rem;
}

/* --- Heading row ------------------------------------------------------- */

.semnan-widget__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 1.25rem;
}

.semnan-widget__title {
	margin: 0;
	line-height: 1.5;
}

.semnan-widget__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9rem;
	white-space: nowrap;
}

/* RTL: the "more" chevron must point left, not right. */
[dir="rtl"] .semnan-widget__more .semnan-icon {
	transform: scaleX(-1);
}

/* --- Grid -------------------------------------------------------------- */

.semnan-grid {
	display: grid;
	grid-template-columns: repeat(var(--semnan-cols), minmax(0, 1fr));
	gap: var(--semnan-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 1024px) {
	.semnan-grid {
		--semnan-cols: 2;
	}
}

@media (max-width: 640px) {
	.semnan-grid {
		--semnan-cols: 1;
	}
}

/* --- Card -------------------------------------------------------------- */

.semnan-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.05);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.semnan-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 2px 4px rgba(16, 24, 40, 0.08), 0 16px 40px rgba(16, 24, 40, 0.10);
}

.semnan-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #eef1f5;
}

.semnan-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.semnan-card:hover .semnan-card__media img {
	transform: scale(1.04);
}

/* Empty-state placeholder when a record has no thumbnail. */
.semnan-thumb-empty {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e8ecf3 0%, #f4f6fa 100%);
}

.semnan-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 18px;
	flex: 1 1 auto;
}

.semnan-card__title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.7;
	font-weight: 700;
}

.semnan-card__title a {
	color: inherit;
	text-decoration: none;
}

.semnan-card__title a:hover {
	text-decoration: underline;
}

.semnan-card__text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.9;
	color: #5b6577;
}

.semnan-card .semnan-tags {
	margin-top: auto;
	padding-top: 6px;
}

/* --- Single record ----------------------------------------------------- */

.semnan-single__title {
	margin: 0 0 12px;
	line-height: 1.5;
}

.semnan-single__media {
	margin: 0 0 20px;
}

.semnan-single__media img {
	width: 100%;
	height: auto;
	border-radius: 14px;
	display: block;
}

.semnan-single__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 0.85rem;
	color: #6b7488;
	margin-bottom: 18px;
}

/* --- Home sections ----------------------------------------------------- */

.semnan-home .semnan-sec {
	margin-bottom: 3rem;
}

.semnan-hero__body {
	padding: 32px 0;
}

.semnan-hero__title {
	margin: 0 0 12px;
	line-height: 1.4;
}

.semnan-hero__sub {
	margin: 0 0 20px;
	font-size: 1.02rem;
	line-height: 2;
	color: #5b6577;
	max-width: 62ch;
}

.semnan-join {
	padding: 28px;
	border-radius: 16px;
	background: linear-gradient(135deg, #f3f6fb 0%, #e9eff8 100%);
	text-align: center;
}

.semnan-join__text {
	margin: 0 auto 18px;
	max-width: 60ch;
	line-height: 2;
}

/* --- Buttons ----------------------------------------------------------- */

.semnan-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.semnan-btn--primary {
	background: #1f6feb;
	color: #fff;
}

.semnan-btn--primary:hover {
	color: #fff;
	filter: brightness(1.08);
	transform: translateY(-1px);
}

/* --- Misc -------------------------------------------------------------- */

.semnan-empty {
	padding: 24px;
	border: 1px dashed #d6dbe4;
	border-radius: 12px;
	text-align: center;
	color: #6b7488;
}

.semnan-icon--sm {
	width: 15px;
	height: 15px;
	flex: none;
}