/*
 * The guide's card (inc/guide-card.php): the way into «آموزش زبان انگلیسی از صفر تا صد» on many pages. Yalda, one
 * line, the button and the guide's own map (page-learn-english-from-zero.php): the four levels in the guide's colours,
 * green, blue, gold and purple, then the goal. It sizes itself by its own width (container query), so the same card
 * fits a page, a column or a phone. Tokens only, so the night theme follows.
 */
.ygc { container-type: inline-size; margin: 28px 0; }
.ygc *, .ygc *::before, .ygc *::after { box-sizing: border-box; }
.ygc__in { position: relative; overflow: hidden; border: 1px solid var(--ye-border-accent); background: linear-gradient(135deg, var(--ye-tint-soft) 0%, var(--ye-surface) 52%, var(--ye-gold-tint) 100%); color: var(--ye-text); }

/* ---------- Card ---------- */
.ygc--card .ygc__in { display: grid; gap: 20px; padding: 22px; border-radius: 24px; box-shadow: var(--ye-shadow-sm); }
.ygc__copy { min-width: 0; }
.ygc .ygc__kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 3px 4px 3px 14px; border-radius: 999px; background: var(--ye-sun-soft); color: var(--ye-sun-ink); font-size: 13.5px; font-weight: var(--ye-w-bold); line-height: 1.9; }
.ygc__face { display: block; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--ye-surface); object-fit: cover; object-position: top; box-shadow: 0 0 0 2px var(--ye-surface); }
.ygc .ygc__title { margin: 12px 0 0; padding: 0; color: var(--ye-ink); font-size: 23px; font-weight: var(--ye-w-heading); line-height: 1.6; text-wrap: balance; }
.ygc .ygc__text { margin: 6px 0 0; color: var(--ye-muted); font-size: 15px; line-height: 2; }
.ygc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.ygc__btn, .ygc__btn:visited { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 20px; border-radius: 14px; background: var(--ye-fill-deep); color: #fff; font-size: 15.5px; font-weight: var(--ye-w-bold); line-height: 1.4; text-decoration: none; box-shadow: 0 8px 20px rgba(67, 22, 143, .2); transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.ygc__btn .fa-map-signs { color: var(--ye-sun); }
.ygc__btn:hover, .ygc__btn:focus { background: var(--ye-fill-hover); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(67, 22, 143, .26); }
.ygc__link, .ygc__link:visited { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 16px; border: 1px solid var(--ye-border-strong); border-radius: 14px; background: var(--ye-surface); color: var(--ye-ink); font-size: 14.5px; font-weight: var(--ye-w-semibold); line-height: 1.4; text-decoration: none; transition: border-color .15s ease, color .15s ease; }
.ygc__link i { color: var(--ye-accent); }
.ygc__link:hover, .ygc__link:focus { border-color: var(--ye-border-accent); color: var(--ye-deep); text-decoration: none; }

/* The map: the guide's four levels, then the goal; each opens its step. */
.ygc__map { --ygc-c: var(--ye-accent); display: flex; align-self: center; gap: 6px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.ygc__map.has-here { padding-top: 16px; }
.ygc__stop { --ygc-c: var(--ye-accent); --ygc-c-tint: var(--ye-tint-strong); position: relative; flex: 1 1 0; min-width: 0; margin: 0; padding: 0; list-style: none; }
.ygc__stop--beginner { --ygc-c: var(--ye-green); --ygc-c-tint: var(--ye-green-tint); }
.ygc__stop--pre-intermediate { --ygc-c: var(--ye-info); --ygc-c-tint: var(--ye-info-tint); }
.ygc__stop--intermediate { --ygc-c: var(--ye-gold-ink); --ygc-c-tint: var(--ye-gold-tint); }
.ygc__stop--goal { --ygc-c: var(--ye-sale); --ygc-c-tint: var(--ye-sale-tint); }
.ygc__stop a, .ygc__stop a:visited { display: block; height: 100%; padding: 12px 8px 10px; border-top: 6px solid var(--ygc-c); border-radius: 6px 6px 14px 14px; background: var(--ygc-c-tint); color: var(--ye-ink); text-align: center; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.ygc__stop a:hover, .ygc__stop a:focus { color: var(--ye-ink); text-decoration: none; transform: translateY(-2px); box-shadow: var(--ye-shadow-sm); }
.ygc .ygc__stop small { display: block; color: var(--ygc-c); font-size: 12.5px; font-weight: var(--ye-w-bold); line-height: 1.8; }
.ygc .ygc__stop strong { display: block; overflow: hidden; color: var(--ye-ink); font-size: 14.5px; font-weight: var(--ye-w-bold); line-height: 1.8; white-space: nowrap; text-overflow: ellipsis; }
.ygc__stop.is-here a { box-shadow: 0 0 0 2px var(--ygc-c); }
.ygc__pin { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); padding: 0 9px; border-radius: 999px; background: var(--ygc-c); color: var(--ye-surface); font-size: 11.5px; font-weight: var(--ye-w-bold); line-height: 1.9; white-space: nowrap; pointer-events: none; }

/* Wide: the words beside the map. */
@container (min-width: 880px) {
	.ygc--card .ygc__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: 30px; padding: 28px 30px; }
	.ygc .ygc__title { font-size: 25px; }
	.ygc__stop a { padding: 16px 8px 14px; }
}
/* Narrow (a column, a phone): the map keeps the four levels; the buttons fill the line. */
@container (max-width: 519px) {
	.ygc--card .ygc__in { gap: 16px; padding: 18px 16px; border-radius: 20px; }
	.ygc .ygc__title { margin-top: 10px; font-size: 20px; }
	.ygc .ygc__text { font-size: 14.5px; }
	.ygc__actions > a { flex: 1 1 auto; }
	.ygc__map { gap: 4px; }
	.ygc__stop--goal { display: none; }
	.ygc__stop a { padding: 9px 3px 8px; border-top-width: 5px; border-radius: 5px 5px 12px 12px; }
	.ygc .ygc__stop small { font-size: 11.5px; }
	.ygc .ygc__stop strong { font-size: 13px; }
}

/* ---------- Strip: one line where a whole card would crowd the page ---------- */
.ygc--strip { margin: 20px 0; }
.ygc--strip .ygc__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px 12px 12px; border-radius: 18px; text-align: start; }
.ygc__badge { display: inline-grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; overflow: hidden; border-radius: 50%; background: var(--ye-sun-soft); color: var(--ye-sun-ink); font-size: 20px; }
.ygc__badge .ygc__face { width: 48px; height: 48px; box-shadow: none; background: transparent; }
.ygc .ygc__line { flex: 1 1 220px; min-width: 0; margin: 0; color: var(--ye-muted); font-size: 14.5px; line-height: 1.9; }
.ygc .ygc__line strong { color: var(--ye-ink); font-size: 15.5px; font-weight: var(--ye-w-bold); }
.ygc--strip .ygc__btn { min-height: 46px; padding: 0 18px; font-size: 15px; }
@container (max-width: 519px) {
	.ygc--strip .ygc__btn { flex: 1 1 100%; }
}

/* Night: the button's shadow is a soft glow instead of a dark cast. */
:root[data-theme="dark"] .ygc__btn { box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }

@media (prefers-reduced-motion: reduce) {
	.ygc__btn, .ygc__stop a { transition: none; }
	.ygc__btn:hover, .ygc__btn:focus, .ygc__stop a:hover, .ygc__stop a:focus { transform: none; }
}
