/* Area "home": home page of a country site (template-parts/home-country.php). See DESIGN.md. */

/* ---------- 1. hero ---------- */
.e-home-hero {
	position: relative;
	overflow: hidden;
	padding: var(--e-s8) 0 var(--e-s12);
	background: linear-gradient(180deg, var(--e-primary-50) 0%, #f7f9ff 60%, var(--e-bg) 100%);
}
.e-home-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--e-s10); align-items: center; }
.e-home-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--e-s5); min-width: 0; }
.e-home-hero__chip { max-width: 100%; background: var(--e-bg); box-shadow: var(--e-shadow-sm); }
.e-home-hero__title { overflow-wrap: break-word; }
.e-home-hero__lead { color: var(--e-text); }
.e-home-hero__actions { display: flex; flex-direction: column; align-items: stretch; gap: var(--e-s4); width: 100%; margin-top: var(--e-s1); }
.e-home-hero__cta { white-space: normal; }
.e-home-hero__cta svg, .e-home-online__btn svg, .e-home-final .e-btn svg { transition: transform .15s; }
.e-home-hero__cta:hover svg, .e-home-online__btn:hover svg, .e-home-final .e-btn:hover svg { transform: translateX(3px); }

.e-home-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; line-height: 1.4; color: var(--e-muted); }
.e-home-trust b { color: var(--e-ink); font-weight: 700; }
.e-home-trust--quote { display: block; max-width: 56ch; padding-left: var(--e-s3); border-left: 3px solid var(--e-star); font-style: italic; }

.e-home-hero__media { position: relative; display: flex; justify-content: center; }
.e-home-hero__media::before {
	content: "";
	position: absolute;
	top: 6%; bottom: 6%; left: 50%;
	width: min(100%, 420px);
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(37, 99, 235, .2), rgba(37, 99, 235, 0));
}
.e-home-hero__img {
	position: relative;
	width: auto;
	height: 340px;
	max-width: 100%;
	object-fit: contain;
	filter: drop-shadow(0 20px 32px rgba(15, 23, 42, .16));
}

@media (min-width: 640px) {
	.e-home-hero__actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
	.e-home-hero__cta { white-space: nowrap; }
}
@media (min-width: 960px) {
	.e-home-hero { padding: var(--e-s16) 0 var(--e-s20); }
	.e-home-hero__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: var(--e-s12); }
	.e-home-hero__grid--solo { grid-template-columns: minmax(0, 1fr); }
	.e-home-hero__text { gap: var(--e-s6); }
	.e-home-hero__img { height: 520px; }
}

/* ---------- 2. how to prepare: numbered steps (timeline on the phone, three columns on desktop) ---------- */
.e-home-steps__list { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 640px; margin: 0 auto; }
.e-home-step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--e-s4); row-gap: var(--e-s2); align-content: start; padding-bottom: var(--e-s8); }
.e-home-step:last-child { padding-bottom: 0; }
.e-home-step__num { grid-row: 1 / span 2; }
.e-home-step__title, .e-home-step__text { grid-column: 2; }
.e-home-step__title { padding-top: 6px; }
.e-home-step__text { color: var(--e-text); font-size: 16px; }
.e-home-step:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 19px; top: 48px; bottom: 8px;
	width: 2px;
	border-radius: 2px;
	background: var(--e-line);
}
@media (min-width: 960px) {
	.e-home-steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e-s10); max-width: none; }
	.e-home-step { grid-template-columns: minmax(0, 1fr); row-gap: var(--e-s3); padding-bottom: 0; }
	.e-home-step__num { grid-row: auto; }
	.e-home-step__title, .e-home-step__text { grid-column: 1; }
	.e-home-step__title { padding-top: var(--e-s2); }
	.e-home-step:not(:last-child)::before { left: 56px; right: calc(16px - var(--e-s10)); top: 19px; bottom: auto; width: auto; height: 2px; }
}

/* ---------- 3. online test invitation ---------- */
.e-home-online__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--e-s8);
	padding: var(--e-s6);
	border: 1px solid var(--e-line);
	border-radius: var(--e-radius-xl);
	background: var(--e-bg);
	box-shadow: var(--e-shadow-md);
}
.e-home-online__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--e-s4); min-width: 0; }
.e-home-online__tag { gap: 8px; }
.e-home-online__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--e-success); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.e-home-online__text { max-width: 56ch; }
.e-home-online__facts { display: flex; flex-wrap: wrap; gap: var(--e-s2); }
.e-home-online__facts .e-chip { border: 1px solid var(--e-line); background: var(--e-bg-soft); color: var(--e-ink); }
.e-home-online__facts svg { color: var(--e-success); }
.e-home-online__btn { width: 100%; margin-top: var(--e-s2); white-space: normal; }
.e-home-online__media { min-width: 0; }
.e-home-online__img { width: 100%; border-radius: var(--e-radius-lg); }
@media (min-width: 640px) {
	.e-home-online__card { padding: var(--e-s10); }
	.e-home-online__btn { width: auto; }
}
@media (min-width: 960px) {
	.e-home-online__card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: var(--e-s12); padding: var(--e-s12); }
	.e-home-online__card--solo { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 4. page text: facts and FAQ (accordion built by home.js; readable as a plain list without JS) ---------- */
.e-home-text .emy-faq { margin-top: var(--e-s12); }
.e-home-text .emy-faq > * + * { margin-top: .75em; }
.e-home-text .emy-faq > h2 { margin-top: 0; margin-bottom: var(--e-s4); }
.e-home-text .emy-faq > h3 { margin-top: 1.25em; padding-top: 1.25em; border-top: 1px solid var(--e-line); }

.e-home-text .e-faq--ready { border-bottom: 1px solid var(--e-line); }
.e-home-text .e-faq--ready > h3 { margin: 0; padding: 0; font-size: inherit; line-height: inherit; }
.e-home-text .e-faq--ready > h2 + h3 { margin-top: 0; }
.e-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--e-s4);
	width: 100%;
	min-height: 56px;
	padding: var(--e-s4) 0;
	border: 0;
	background: none;
	color: var(--e-ink);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	text-align: left;
}
.e-faq__q:hover { color: var(--e-primary-700); }
.e-faq__q svg { flex: none; color: var(--e-muted); transition: transform .2s; }
.e-faq__q[aria-expanded="true"] svg { transform: rotate(180deg); color: var(--e-primary); }
.e-home-text .e-faq--ready > .e-faq__panel { margin-top: 0; padding-bottom: var(--e-s5); }
.e-home-text .e-faq--ready > .e-faq__panel[hidden] { padding: 0; } /* hidden="until-found" keeps the box */
.e-faq__panel > * + * { margin-top: .75em; }

/* ---------- 5. why Emyat ---------- */
.e-home-why__card { display: flex; flex-direction: column; gap: var(--e-s3); padding: 0 0 var(--e-s6); overflow: hidden; }
.e-home-why__card > :not(.e-home-why__media) { padding: 0 var(--e-s6); }
.e-home-why__media { margin-bottom: var(--e-s2); overflow: hidden; background: var(--e-primary-50); aspect-ratio: 3 / 2; }
.e-home-why__img { width: 100%; height: 100%; object-fit: cover; }
.e-home-why__text { font-size: 16px; line-height: 1.6; }

/* ---------- 6. reviews: rating summary and a scroll-snap strip ---------- */
.e-home-reviews__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--e-s6); margin-bottom: var(--e-s8); }
.e-home-reviews__intro { display: flex; flex-direction: column; gap: var(--e-s5); min-width: 0; max-width: 760px; }
.e-home-score { display: flex; align-items: center; gap: var(--e-s4); }
.e-home-score__value { font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--e-ink); }
.e-home-score__count { margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--e-muted); }
.e-home-reviews__nav { display: none; gap: var(--e-s2); } /* phones swipe; shown from 640px by the rule below */
.e-home-reviews__nav[hidden] { display: none; }
.e-home-reviews__arrow {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--e-line);
	border-radius: 50%;
	background: var(--e-bg);
	color: var(--e-ink);
	transition: background-color .15s, border-color .15s, opacity .15s;
}
.e-home-reviews__arrow:hover:not(:disabled) { border-color: #cbd5e1; background: var(--e-bg-soft); }
.e-home-reviews__arrow:disabled { opacity: .4; cursor: default; }
.e-home-reviews__arrow--prev svg { transform: rotate(180deg); }

.e-home-reviews__strip {
	margin: 0 calc(-1 * var(--e-s5));
	padding: var(--e-s1) var(--e-s5) var(--e-s4);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 var(--e-s5);
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}
.e-home-reviews__strip:focus-visible { outline-offset: -3px; }
.e-home-reviews__list { display: flex; gap: var(--e-s4); }
.e-home-reviews__list::after { content: ""; flex: 0 0 1px; } /* keeps the end padding when scrolled to the last card */
.e-home-review {
	position: relative;
	flex: 0 0 min(84%, 340px);
	display: flex;
	flex-direction: column;
	gap: var(--e-s3);
	padding: var(--e-s5);
	scroll-snap-align: start;
}
.e-home-review::after {
	content: "\201D";
	content: "\201D" / "";
	position: absolute;
	top: 6px;
	right: 18px;
	font: 700 64px/1 Georgia, "Times New Roman", serif;
	color: var(--e-primary-50);
	pointer-events: none;
}
.e-home-review__head { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--e-s3); padding-right: var(--e-s8); }
.e-home-review__avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: cover; background: var(--e-bg-soft); }
.e-home-review__avatar--letter { display: grid; place-items: center; background: var(--e-primary-50); color: var(--e-primary-700); font-weight: 700; }
.e-home-review__name { min-width: 0; font-weight: 700; line-height: 1.35; color: var(--e-ink); overflow-wrap: anywhere; }
.e-home-review__text { position: relative; z-index: 1; font-size: 16px; line-height: 1.6; overflow-wrap: break-word; }
.e-home-review__text > * + * { margin-top: .6em; }
@media (min-width: 640px) {
	.e-home-reviews__nav { display: flex; }
	.e-home-review { flex-basis: calc((100% - var(--e-s4)) / 2); }
}
@media (min-width: 960px) {
	.e-home-review { flex-basis: calc((100% - 2 * var(--e-s4)) / 3); padding: var(--e-s6); }
}

/* ---------- 7. latest articles (cards: template-parts/post-card.php) ---------- */
.e-home-blog__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--e-s2) var(--e-s6); margin-bottom: var(--e-s8); }
.e-home-blog__all { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 650; }
.e-home-blog__all svg { transition: transform .15s; }
.e-home-blog__all:hover svg { transform: translateX(3px); }

/* ---------- 8. final call to action ---------- */
.e-home-final__band {
	position: relative;
	display: grid;
	gap: var(--e-s6);
	padding: var(--e-s8) var(--e-s5);
	overflow: hidden;
	border-radius: var(--e-radius-xl);
	background:
		radial-gradient(600px 300px at 100% 0%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 70%),
		linear-gradient(135deg, var(--e-primary) 0%, var(--e-primary-700) 100%);
	color: #fff;
}
.e-home-final__band .e-h2 { color: #fff; }
.e-home-final__text p { margin-top: var(--e-s3); max-width: 52ch; font-size: 18px; }
.e-home-final__actions { display: flex; flex-direction: column; align-items: stretch; gap: var(--e-s4); }
.e-home-final__actions .e-btn { padding-left: var(--e-s5); padding-right: var(--e-s5); white-space: normal; }
.e-home-final .e-btn--light:focus-visible, .e-home-final .e-store:focus-visible { outline-color: #fff; }
@media (min-width: 640px) {
	.e-home-final__band { padding: var(--e-s10); }
	.e-home-final__actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (min-width: 960px) {
	.e-home-final__band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--e-s10); padding: var(--e-s12) var(--e-s16); }
	.e-home-final__actions { flex-direction: column; align-items: flex-start; }
}
