/**
 * قسم كلمة المدير التنفيذي في ثيم تنمية العرضية (template-parts/home/home-ceo.php).
 * شريط تركوازي عميق بعرض الصفحة بنقش البذور وتوهج أخضر خافت. على الشاشات الواسعة «رسالة موقّعة»: الرأس، ثم الكلمة
 * بخط كبير خفيف وعلامة اقتباس خضراء في بدايتها، ثم شريط توقيع زجاجي أفقي واحد (صورة دائرية بحلقة خضراء والاسم والمنصب
 * والمؤهل، وفي الطرف الآخر شرائح التواصل وحساباته). وعلى الشاشات الضيقة كل شيء في الوسط: الكلمة ثم التوقيع تحتها.
 */

.tn-section.tn-ceo {
	--tn-grid-color: rgba(255, 255, 255, 0.07);
	background:
		radial-gradient(ellipse 60% 70% at 50% 100%, rgba(var(--theme-secondary-rgb), 0.22), transparent 70%),
		var(--tn-grid),
		var(--tn-deep);
	color: #ffffff;
}

.tn-ceo__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 860px;
	margin-inline: auto;
	text-align: center;
}

.tn-ceo__inner .tn-head {
	width: 100%;
	margin-bottom: 8px;
}

/* ==========================================================================
   الكلمة
   ========================================================================== */

.tn-ceo__quote {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 760px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.tn-ceo__mark {
	display: block;
	width: 76px;
	height: 57px;
	margin-bottom: 20px;
	fill: var(--theme-secondary);
}

.tn-ceo__text {
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
	font-weight: 300;
	line-height: 2;
}

/* ==========================================================================
   التوقيع
   ========================================================================== */

.tn-ceo__sign {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-top: 40px;
}

.tn-ceo__quote + .tn-ceo__sign::before {
	content: '';
	display: block;
	width: 1px;
	height: 34px;
	margin-bottom: 4px;
	background: linear-gradient(transparent, rgba(var(--theme-secondary-rgb), 0.9));
}

/* الصورة في دائرة بحلقة خضراء وفاصل بلون الخلفية */
.tn-ceo__ring {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 112px;
	height: 112px;
	padding: 4px;
	overflow: hidden;
	border: 3px solid var(--theme-secondary);
	border-radius: 50%;
	background: var(--tn-deep);
	box-shadow: 0 0 0 8px rgba(var(--theme-secondary-rgb), 0.14);
}

.tn-ceo__img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	object-position: center top;
}

.tn-ceo__ring.is-empty {
	color: var(--theme-secondary);
}

/* زخرفة رمز الشعار للشاشات الواسعة فقط (انظر أسفل الملف) */
.tn-ceo__art {
	display: none;
}

@keyframes tn-ceo-float {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-8px);
	}
}

.tn-ceo__ring-sprout {
	width: 52px;
	height: 52px;
}

.tn-ceo__who {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.tn-ceo__name {
	margin: 0;
	color: #ffffff;
	font-size: 1.3rem;
	font-weight: 800;
	line-height: 1.5;
}

.tn-ceo__role {
	color: var(--tn-leaf-light);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.6;
}

.tn-ceo__degree {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.88rem;
	font-weight: 500;
	line-height: 1.6;
}

/* الشرائح: الخبرة والبريد والهاتف وحسابات التواصل في صف واحد */
.tn-ceo__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.tn-ceo__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	max-width: 100%;
	padding: 6px 16px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.5;
}

.tn-ceo__chip a {
	min-width: 0;
	overflow-wrap: anywhere;
	color: inherit;
	text-decoration: none;
}

.tn-ceo__chip a:hover,
.tn-ceo__chip a:focus-visible {
	color: var(--tn-leaf-light);
}

.tn-ceo__chip-icon {
	flex-shrink: 0;
	color: var(--theme-secondary);
}

/* حسابات التواصل دوائر صغيرة بنفس روح الشرائح */
.tn-ceo__chip--social {
	padding: 0;
	border: 0;
	background: none;
}

.tn-ceo__chip--social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.tn-ceo__chip--social svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.tn-ceo__chip--social a:hover,
.tn-ceo__chip--social a:focus-visible {
	border-color: var(--theme-secondary);
	background: var(--theme-secondary);
	color: #ffffff;
}

.tn-ceo a:focus-visible {
	outline: 2px solid var(--tn-leaf-light);
	outline-offset: 3px;
}

/* ==========================================================================
   الشاشات الواسعة: «رسالة موقّعة»
   الرأس ثم الكلمة بعرض أوسع وعلامة الاقتباس في بدايتها، وتحتها شريط توقيع زجاجي أفقي واحد:
   الصورة والاسم والمنصب في البداية، والشرائح وحسابات التواصل في صف بالطرف الآخر
   ========================================================================== */

@media (min-width: 992px) {
	.tn-section.tn-ceo {
		padding-block: 68px;
	}

	.tn-ceo__inner {
		position: relative;
		max-width: 1120px;
	}

	/* رمز الشعار في الطرف الأيسر: هالة خضراء ناعمة بحلقتين رقيقتين، والرمز فوقها بلونيه بتدرج فاتح، يطفو ببطء */
	.tn-ceo__art {
		position: absolute;
		top: -16px;
		inset-inline-end: 10px;
		z-index: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 220px;
		height: 220px;
		border-radius: 50%;
		background: radial-gradient(circle, rgba(var(--theme-secondary-rgb), 0.24), rgba(var(--theme-secondary-rgb), 0.06) 58%, transparent 70%);
		pointer-events: none;
	}

	.tn-ceo__art::before,
	.tn-ceo__art::after {
		content: '';
		position: absolute;
		inset: 14px;
		border: 1px solid rgba(255, 255, 255, 0.12);
		border-radius: 50%;
	}

	.tn-ceo__art::after {
		inset: 40px;
		border-color: rgba(var(--theme-secondary-rgb), 0.35);
		border-style: dashed;
	}

	.tn-ceo__art-emblem {
		--tn-emblem-top: rgba(255, 255, 255, 0.92);
		--tn-emblem-leaf: var(--theme-secondary);
		position: relative;
		width: 108px;
		height: 108px;
		filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.28));
		animation: tn-ceo-float 6s ease-in-out infinite;
	}

	/* المحتوى فوق الزخرفة */
	.tn-ceo__inner > :not(.tn-ceo__art) {
		position: relative;
		z-index: 1;
	}

	/* الرأس في عمود الكلمة نفسه فيبقى بعيداً عن الرمز */
	.tn-ceo__inner .tn-head {
		max-width: min(860px, calc(100% - 290px));
		align-self: flex-start;
		justify-content: flex-start;
		text-align: start;
	}

	.tn-ceo__inner .tn-head__main {
		align-items: flex-start;
	}

	.tn-ceo__quote {
		align-self: flex-start;
	}

	.tn-ceo__inner .tn-head {
		margin-bottom: 14px;
	}

	/* الكلمة: علامة الاقتباس في البداية والنص بجانبها */
	.tn-ceo__quote {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-items: start;
		gap: 22px;
		/* تُترك مساحة لرمز الشعار في الطرف الآخر */
		max-width: min(860px, calc(100% - 290px));
		text-align: start;
	}

	.tn-ceo__mark {
		width: 58px;
		height: 44px;
		margin: 6px 0 0;
	}

	.tn-ceo__text {
		font-size: clamp(1.15rem, 1rem + 0.45vw, 1.4rem);
		line-height: 1.95;
	}

	/* شريط التوقيع */
	.tn-ceo__sign {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 14px 18px;
		align-self: stretch;
		margin-top: 34px;
		padding: 14px 18px;
		border: 1px solid rgba(255, 255, 255, 0.14);
		border-radius: var(--tn-radius-lg);
		background: rgba(255, 255, 255, 0.05);
		text-align: start;
	}

	/* الخط العمودي بين الكلمة والتوقيع لا يلزم مع الشريط */
	.tn-ceo__quote + .tn-ceo__sign::before {
		display: none;
	}

	.tn-ceo__ring {
		width: 68px;
		height: 68px;
		padding: 3px;
		border-width: 2px;
		box-shadow: 0 0 0 5px rgba(var(--theme-secondary-rgb), 0.14);
	}

	.tn-ceo__ring-sprout {
		width: 34px;
		height: 34px;
	}

	.tn-ceo__who {
		align-items: flex-start;
		gap: 0;
	}

	.tn-ceo__name {
		font-size: 1.15rem;
	}

	.tn-ceo__role,
	.tn-ceo__degree {
		font-size: 0.85rem;
	}

	/* الشرائح في الطرف الآخر من الشريط */
	.tn-ceo__chips {
		justify-content: flex-end;
		gap: 6px;
		margin: 0;
		margin-inline-start: auto;
	}

	.tn-ceo__chip:not(.tn-ceo__chip--social) {
		min-height: 36px;
		padding: 5px 14px;
		font-size: 0.82rem;
	}

	.tn-ceo__chip--social a {
		width: 36px;
		height: 36px;
	}
}

/* حين يتسع الشريط لسطر واحد يصير كبسولة */
@media (min-width: 1200px) {
	.tn-ceo__sign {
		border-radius: 999px;
	}
}
/* ==========================================================================
   الاستجابة
   ========================================================================== */

@media (max-width: 640px) {
	.tn-ceo__mark {
		width: 56px;
		height: 42px;
		margin-bottom: 14px;
	}

	.tn-ceo__text {
		line-height: 1.95;
	}

	.tn-ceo__sign {
		margin-top: 30px;
	}

	.tn-ceo__ring {
		width: 96px;
		height: 96px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tn-ceo__chip--social a {
		transition: none;
	}

	.tn-ceo__art-emblem {
		animation: none;
	}
}
