/*
 * About page ("درباره ما", page-about.php). Loaded after home-sections.css (shared heads, badge, clients, reveal).
 * Motion: reveal/hover use transform/opacity; the values cards (section 3) animate their size on purpose
 * (margin/padding), because their text must reflow into the wider card. All transitions are off for reduced motion.
 */

.site-main--about {
	padding-bottom: clamp(56px, 3.75vw, 72px);
}

.site-main--about > section + section {
	margin-top: clamp(56px, 5vw, 96px);
}

/* ---------- 1. Hero / page title ---------- */
.about-hero {
	padding-top: clamp(24px, 2vw, 36px);
}

.about-hero__title {
	margin: 0;
	color: var(--at-ink);
	font-size: clamp(22px, 1.4vw + 4px, 26px);
	font-weight: 600;
	line-height: 1.6;
}

.about-hero__text {
	margin: 12px 0 0;
	color: var(--at-muted);
	font-size: 16px;
	line-height: 2;
}

/* ---------- 2. Story (reuses .home-about__*) ---------- */
.site-main--about > .about-story {
	margin-top: clamp(40px, 3.6vw, 70px);
}

.about-story__inner {
	grid-template-columns: minmax(0, 692fr) minmax(0, 680fr);
	gap: 68px;
}

.about-story .at-section-head__title {
	color: var(--at-ink);
}

.about-story .home-about__content p + p {
	margin-top: 0;
}

.about-story__media .at-badge {
	bottom: 23%;
	min-height: 82px;
	background: var(--at-page);
}

/* ---------- 3. Vision / values / mission ---------- */
.site-main--about > .about-values {
	margin-top: clamp(64px, 4.6vw, 86px);
	padding-block: 40px; /* the cards overhang the panel by 40px */
}

.about-values__panel {
	display: grid;
	grid-template-columns: minmax(0, 627fr) minmax(0, 546fr);
	gap: clamp(32px, 6.15vw, 118px);
	align-items: center;
	padding-inline: 54px 95px; /* RTL: start (right) 54, end (left) 95 */
	border-radius: 48px;
	background: rgba(238, 254, 255, 0.6);
}

.about-values__content {
	color: var(--at-muted);
	font-size: 16px;
	line-height: 2;
}

.about-values__content .at-section-head__title {
	margin-bottom: 20px;
	color: var(--at-ink);
}

.about-values__content p {
	margin: 0;
	text-align: justify;
}

.about-values__actions {
	display: flex;
	margin-top: 24px;
}

/*
 * Hover/focus grows the active card in WIDTH ONLY, so nothing below it moves:
 * - every card has the same padding in both states, and all rows share one height (grid-auto-rows: 1fr);
 * - the text column has a fixed width derived from the list width (container query units), so lines
 *   never rewrap when the card widens; the content is centred, so it stays put while the card's
 *   inline margins shrink to 0.
 */
.about-values__list {
	--vc-inset: 42px;   /* inline margin of a resting card (each side) */
	--vc-pad-s: 43px;   /* padding-inline-start (right in RTL) */
	--vc-pad-e: 41px;   /* padding-inline-end */
	--vc-gap: 43px;     /* icon to text */
	--vc-icon: 50px;
	display: grid;
	grid-auto-rows: 1fr;
	gap: 23px;
	margin: -40px 0;
	padding: 0;
	list-style: none;
	container-type: inline-size;
}

.value-card {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--vc-gap);
	margin-inline: var(--vc-inset);
	padding-block: 24px;
	padding-inline: var(--vc-pad-s) var(--vc-pad-e);
	border: 1px solid transparent;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 10px 40px -12px rgba(2, 2, 2, 0.06);
	cursor: default;
	transition:
		margin-inline 0.35s ease,
		border-color 0.35s ease,
		box-shadow 0.35s ease;
}

.value-card.is-active {
	margin-inline: 0;
	border-color: #d6dfdf;
	box-shadow: 0 18px 48px -18px rgba(70, 158, 162, 0.28);
}

.value-card:focus {
	outline: none;
}

.value-card:focus-visible {
	outline: 2px solid var(--at-ink);
	outline-offset: 3px;
}

.value-card__icon {
	display: flex;
	flex: 0 0 var(--vc-icon);
	align-items: center;
	justify-content: center;
	width: var(--vc-icon);
	height: var(--vc-icon);
	color: var(--at-teal);
	transition: transform 0.35s ease;
}

.value-card__icon .at-icon {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
}

.value-card__icon .at-icon--vision {
	width: 28px;
}

.value-card__icon .at-icon--values {
	width: 47px;
}

.value-card__icon .at-icon--mission {
	width: 49px;
}

.value-card.is-active .value-card__icon {
	transform: scale(1.06);
}

.value-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

/* Fixed text width = the resting card's content box, so the wrap is identical in both states. */
@supports (width: 1cqi) {
	.value-card__body {
		flex: 0 0 auto;
		width: calc(100cqi - 2 * var(--vc-inset) - var(--vc-pad-s) - var(--vc-pad-e) - var(--vc-icon) - var(--vc-gap) - 2px);
	}
}

.value-card__title {
	margin: 0 0 8px;
	color: var(--at-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 28px;
	transition: color 0.35s ease;
}

.value-card.is-active .value-card__title {
	color: var(--at-teal);
}

.value-card__text {
	margin: 0;
	color: var(--at-muted);
	font-size: 14px;
	line-height: 28px;
}

/* ---------- 4. Benefits ---------- */
.about-benefits__head {
	max-width: 920px;
	margin-bottom: 32px;
}

.about-benefits__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.about-benefits__item {
	display: flex;
}

.benefit-card {
	position: relative;
	display: block;
	flex: 1 1 auto;
	min-height: 167px;
	padding: 16px 16px 46px;
	border: 1px solid var(--at-line);
	border-radius: 24px;
	background: #fff;
	color: var(--at-muted);
	text-decoration: none;
	transition: transform 0.4s var(--at-ease), box-shadow 0.4s var(--at-ease), border-color 0.3s ease;
}

.benefit-card__title {
	margin: 0 0 8px;
	color: var(--at-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 28px;
	transition: color 0.3s ease;
}

.benefit-card__text {
	margin: 0;
	font-size: 14px;
	line-height: 28px;
}

.benefit-card__go {
	position: absolute;
	left: 4px;
	bottom: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--at-teal);
	color: #fff;
	transition: transform 0.4s var(--at-ease), background-color 0.3s ease;
}

.benefit-card__go .at-icon {
	display: block;
	width: 14px;
	height: 14px;
}

.benefit-card:hover,
.benefit-card:focus-visible {
	transform: translateY(-4px);
	border-color: rgba(87, 179, 183, 0.45);
	box-shadow: 0 18px 40px -22px rgba(2, 2, 2, 0.28);
}

.benefit-card:hover .benefit-card__title,
.benefit-card:focus-visible .benefit-card__title {
	color: var(--at-teal);
}

.benefit-card:hover .benefit-card__go,
.benefit-card:focus-visible .benefit-card__go {
	transform: rotate(-45deg);
	background: var(--at-teal-hover);
}

.benefit-card:focus-visible {
	outline: 2px solid var(--at-ink);
	outline-offset: 3px;
}

/* ---------- 5. Clients: shared .home-clients styles ---------- */
.site-main--about > .home-clients {
	margin-top: clamp(48px, 3.6vw, 69px); /* design: 69px under the benefit cards at 1920 */
}


/* ---------- 6. Call to action ---------- */
.site-main--about > .about-cta {
	margin-top: clamp(56px, 6.4vw, 123px);
	padding-top: 28px; /* the photo rises 28px above the box */
}

.about-cta__box {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 445px;
	padding-block: 48px;
	padding-inline: 40px 0;
	border-radius: 48px;
	background: linear-gradient(90deg, rgba(87, 179, 183, 0.2), rgba(87, 179, 183, 0));
}

.about-cta__content {
	position: relative;
	z-index: 1;
	width: min(624px, 52%);
	color: var(--at-muted);
	font-size: 16px;
	line-height: 2;
}

.about-cta__eyebrow {
	margin: 0 0 4px;
	color: var(--at-teal);
	font-size: 16px;
}

.about-cta .at-section-head__title {
	margin-bottom: 16px;
	color: var(--at-ink);
}

.about-cta__text {
	margin: 0;
	text-align: justify;
}

.about-cta__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
	margin-top: 24px;
}

.about-cta__call {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	color: var(--at-muted);
	text-decoration: none;
}

.about-cta__call-icon {
	display: flex;
	flex: 0 0 48px;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--at-teal);
	color: #fff;
	transition: transform 0.35s var(--at-ease), background-color 0.3s ease;
}

.about-cta__call-icon .at-icon {
	display: block;
	width: 21px;
	height: 21px;
}

.about-cta__call-text {
	display: flex;
	flex-direction: column;
	line-height: 1.6;
}

.about-cta__call-label {
	color: #8d8d8d;
	font-size: 12px;
}

.about-cta__call-number {
	color: var(--at-muted);
	font-size: 16px;
	font-weight: 600;
	text-align: right;
}

.about-cta__call:hover .about-cta__call-icon,
.about-cta__call:focus-visible .about-cta__call-icon {
	transform: rotate(-12deg) scale(1.06);
	background: var(--at-teal-hover);
}

.about-cta__call:focus-visible {
	outline: 2px solid var(--at-ink);
	outline-offset: 4px;
	border-radius: 999px;
}

.about-cta__arrow {
	position: absolute;
	left: 45.35%;
	top: 63.6%;
	width: 113px;
	color: var(--at-teal);
	opacity: 0.5;
	pointer-events: none;
}

.about-cta__arrow .at-icon {
	display: block;
	width: 100%;
	height: auto;
}

.about-cta__media {
	position: absolute;
	left: 15px;
	bottom: 0;
	width: min(610px, 42.4%);
	height: auto;
	border-radius: 28px;
	transform-origin: 50% 100%;
	transition: transform 0.6s var(--at-ease);
}

.about-cta__box:hover .about-cta__media {
	transform: scale(1.015);
}

/* ---------- 7. Team (dynamic) ---------- */
.site-main--about > .about-team {
	margin-top: clamp(56px, 3.5vw, 68px);
}

.about-team__head {
	max-width: 930px;
	margin-bottom: 56px;
}

.about-team__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 44px 23px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.team-card {
	position: relative;
	min-height: 104px;
	padding: 34px 16px 12px;
	border: 1px solid #e2e2e2;
	border-radius: 16px;
	background: linear-gradient(100deg, rgba(87, 179, 183, 0) 0%, rgba(87, 179, 183, 0.13) 100%), var(--at-page);
	text-align: center;
	transition: transform 0.4s var(--at-ease), box-shadow 0.4s var(--at-ease);
}

.team-card__marker,
.team-card__photo {
	position: absolute;
	top: -21px;
	left: 50%;
	margin-left: -21px;
	transition: transform 0.4s var(--at-ease);
}

.team-card__marker {
	display: block;
	width: 42px;
	height: 47px;
	color: #4e9fa2;
	filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 4px 8px rgba(2, 2, 2, 0.08));
}

.team-card__marker .at-icon {
	display: block;
	width: 100%;
	height: 100%;
}

.team-card__photo {
	width: 42px;
	height: 42px;
	border: 2px solid #fff;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 1px rgba(87, 179, 183, 0.6), 0 4px 8px rgba(2, 2, 2, 0.08);
}

.team-card__name {
	margin: 0;
	color: var(--at-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 28px;
}

.team-card__role {
	margin: 0;
	color: var(--at-muted);
	font-size: 14px;
	line-height: 28px;
}

.team-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 36px -24px rgba(2, 2, 2, 0.3);
}

.team-card:hover .team-card__marker,
.team-card:hover .team-card__photo {
	transform: translateY(-3px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1439.98px) {
	.about-values__panel {
		padding-inline: 40px 56px;
	}

	.about-values__list {
		--vc-inset: 24px;
		--vc-pad-s: 24px;
		--vc-pad-e: 24px;
		--vc-gap: 24px;
	}

	.about-benefits__grid {
		gap: 16px;
	}

	.about-cta__arrow {
		display: none;
	}
}

@media (max-width: 1279.98px) {
	.about-story__inner {
		gap: 40px;
	}

	.about-values__panel {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		padding-inline: 32px;
	}

	.about-benefits__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.about-cta__content {
		width: 56%;
	}
}

@media (max-width: 991.98px) {
	/* Story: .about-story__inner overrides the shared .home-about__inner columns, so stack it here too. */
	.about-story__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	/* Values: content on top, cards stacked below inside the panel. */
	.site-main--about > .about-values {
		padding-block: 0;
	}

	.about-values__panel {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
		padding: 40px 32px;
	}

	.about-values__list {
		margin: 0;
		gap: 16px;
	}

	.about-values__list {
		--vc-inset: 24px;
	}

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

	/* CTA: text first, photo below. */
	.site-main--about > .about-cta {
		padding-top: 0;
	}

	.about-cta__box {
		flex-direction: column;
		align-items: stretch;
		min-height: 0;
		padding: 40px 32px 0;
		background: linear-gradient(180deg, rgba(87, 179, 183, 0.2), rgba(87, 179, 183, 0.04));
	}

	.about-cta__content {
		width: auto;
	}

	.about-cta__media {
		position: static;
		align-self: center;
		width: min(480px, 100%);
		margin-top: 24px;
	}
}

@media (max-width: 767.98px) {
	.about-hero,
	.about-hero__text {
		text-align: start;
	}

	.about-values__panel {
		padding: 32px 20px;
		border-radius: 32px;
	}

	/* Phones: no size change (avoids layout jumps on tap); the active card is still highlighted. */
	.about-values__list {
		--vc-inset: 0px;
		--vc-pad-s: 20px;
		--vc-pad-e: 20px;
		--vc-gap: 20px;
	}

	.value-card {
		padding-block: 20px;
	}

	.value-card.is-active .value-card__icon {
		transform: none;
	}

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

	.about-cta__box {
		padding: 32px 20px 0;
		border-radius: 32px;
	}
}

@media (max-width: 599.98px) {
	.about-benefits__grid,
	.about-team__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.about-values__list {
		--vc-icon: 40px;
	}

	.about-cta__actions {
		gap: 16px 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.value-card,
	.value-card__icon,
	.value-card__title,
	.benefit-card,
	.benefit-card__go,
	.about-cta__call-icon,
	.about-cta__media,
	.team-card,
	.team-card__marker,
	.team-card__photo {
		transition: none;
	}

	.value-card.is-active .value-card__icon,
	.benefit-card:hover,
	.benefit-card:focus-visible,
	.benefit-card:hover .benefit-card__go,
	.benefit-card:focus-visible .benefit-card__go,
	.about-cta__call:hover .about-cta__call-icon,
	.about-cta__box:hover .about-cta__media,
	.team-card:hover,
	.team-card:hover .team-card__marker,
	.team-card:hover .team-card__photo {
		transform: none;
	}
}
