.cap-home,
.cap-home * {
	box-sizing: border-box;
}

.cap-home {
	--cap-text: #f8fbf9;
	--cap-muted: #b8cbc4;
	--cap-surface: #0e2b24;
	--cap-surface-soft: #14352d;
	--cap-border: rgba(255, 255, 255, 0.13);
	min-height: 100svh;
	width: 100%;
	margin: 0;
	padding: clamp(18px, 2.5vw, 34px) clamp(18px, 5vw, 76px) 16px;
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: clamp(14px, 2vh, 24px);
	background:
		radial-gradient(circle at 15% 18%, rgba(97, 206, 112, 0.12), transparent 28%),
		radial-gradient(circle at 84% 70%, rgba(153, 14, 179, 0.11), transparent 30%),
		var(--cap-bg, #071f1a);
	color: var(--cap-text);
	font-family: Vazirmatn, IRANSans, IRANSansX, Tahoma, Arial, sans-serif;
	line-height: 1.7;
}

.admin-bar .cap-home {
	min-height: calc(100svh - 32px);
}

.cap-home a {
	color: inherit;
	text-decoration: none;
}

.cap-home__header,
.cap-home__footer {
	width: min(1180px, 100%);
	margin-inline: auto;
}

.cap-home__header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 20px;
}

.cap-home__brand {
	display: inline-flex;
	width: fit-content;
	align-items: center;
}

.cap-home__brand img {
	display: block;
	width: auto;
	height: clamp(42px, 5vw, 56px);
	max-width: 148px;
	object-fit: contain;
}

.cap-home__quick-links,
.cap-home__account,
.cap-home__footer nav {
	display: flex;
	align-items: center;
	gap: 10px 18px;
}

.cap-home__quick-links a,
.cap-home__account-secondary,
.cap-home__footer a {
	color: var(--cap-muted);
	font-size: 14px;
	transition: color 160ms ease;
}

.cap-home__quick-links a:hover,
.cap-home__quick-links a:focus-visible,
.cap-home__account-secondary:hover,
.cap-home__account-secondary:focus-visible,
.cap-home__footer a:hover,
.cap-home__footer a:focus-visible {
	color: #fff;
}

.cap-home__account {
	justify-content: flex-end;
}

.cap-home__account-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 39px;
	padding: 7px 18px;
	border: 1px solid rgba(226, 177, 48, 0.62);
	border-radius: 11px;
	background: rgba(226, 177, 48, 0.1);
	color: #ffe5a0;
	font-size: 14px;
	font-weight: 800;
}

.cap-home__main {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: min(1080px, 100%);
	margin-inline: auto;
}

.cap-home__intro {
	margin-bottom: clamp(12px, 2vh, 22px);
	text-align: center;
}

.cap-home__eyebrow {
	margin: 0 0 2px;
	color: var(--cap-yellow);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.cap-home__intro h1 {
	margin: 0;
	color: #fff;
	font-size: clamp(30px, 4vw, 50px);
	line-height: 1.35;
}

.cap-home__intro > p:last-child {
	margin: 3px 0 0;
	color: var(--cap-muted);
	font-size: clamp(14px, 1.5vw, 17px);
}

.cap-home__stage {
	width: 100%;
	padding: clamp(14px, 2vw, 24px);
	border: 1px solid var(--cap-border);
	border-radius: 26px;
	background: rgba(14, 43, 36, 0.88);
	box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
	backdrop-filter: blur(8px);
}

.cap-home__tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 9px;
	width: min(650px, 100%);
	margin: 0 auto clamp(14px, 2vh, 20px);
}

.cap-home__tab {
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid var(--cap-border);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--cap-text);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.cap-home__tab:hover {
	transform: translateY(-1px);
	background: rgba(255, 255, 255, 0.08);
}

.cap-home__tab[aria-selected="true"] {
	border-color: transparent;
	color: #10231e;
}

.cap-home__tab--child[aria-selected="true"] {
	background: var(--cap-yellow);
}

.cap-home__tab--parent[aria-selected="true"] {
	background: var(--cap-green);
}

.cap-home__tab--teacher[aria-selected="true"] {
	background: #c86ddd;
}

.cap-home__tab:focus-visible,
.cap-home a:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.cap-home__panel[hidden] {
	display: none;
}

.cap-home__panel-heading {
	margin-bottom: 14px;
	text-align: center;
}

.cap-home__panel-heading h2 {
	margin: 0;
	color: #fff;
	font-size: clamp(21px, 2.5vw, 30px);
	line-height: 1.45;
}

.cap-home__panel-heading p {
	margin: 3px 0 0;
	color: var(--cap-muted);
	font-size: 14px;
}

.cap-home__choices {
	display: grid;
	gap: 13px;
	width: 100%;
	margin-inline: auto;
}

.cap-home__choices--three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cap-home__choices--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	max-width: 760px;
}

.cap-home__choice {
	min-height: 172px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 14px;
	border: 1px solid var(--cap-border);
	border-top: 4px solid var(--choice-color);
	border-radius: 18px;
	background: var(--cap-surface-soft);
}

.cap-home__choice--yellow {
	--choice-color: var(--cap-yellow);
}

.cap-home__choice--green {
	--choice-color: var(--cap-green);
}

.cap-home__choice--purple {
	--choice-color: #c86ddd;
}

.cap-home__choice h3 {
	margin: 0 0 4px;
	color: var(--choice-color);
	font-size: clamp(18px, 2vw, 22px);
}

.cap-home__choice p {
	margin: 0;
	color: var(--cap-muted);
	font-size: 13px;
}

.cap-home__choice > a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 8px 12px;
	border-radius: 11px;
	background: var(--choice-color);
	color: #10231e;
	font-size: 14px;
	font-weight: 900;
	transition: filter 160ms ease, transform 160ms ease;
}

.cap-home__choice > a:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.cap-home__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cap-home__footer p {
	margin: 0;
	color: #78968b;
	font-size: 12px;
}

@media (min-width: 900px) and (min-height: 720px) {
	.cap-home {
		height: 100svh;
		overflow: hidden;
	}

	.admin-bar .cap-home {
		height: calc(100svh - 32px);
	}
}

@media (max-width: 780px) {
	.admin-bar .cap-home {
		min-height: calc(100svh - 46px);
	}

	.cap-home__header {
		grid-template-columns: 1fr auto;
	}

	.cap-home__quick-links {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-content: center;
	}

	.cap-home__choices--three {
		grid-template-columns: 1fr;
	}

	.cap-home__choice {
		min-height: 0;
	}
}

@media (max-width: 560px) {
	.cap-home {
		padding: 14px 13px 12px;
	}

	.cap-home__brand img {
		height: 42px;
		max-width: 116px;
	}

	.cap-home__account {
		gap: 9px;
	}

	.cap-home__account-primary {
		min-height: 36px;
		padding-inline: 13px;
	}

	.cap-home__account-secondary,
	.cap-home__quick-links a {
		font-size: 13px;
	}

	.cap-home__intro h1 {
		font-size: 29px;
	}

	.cap-home__stage {
		padding: 12px;
		border-radius: 20px;
	}

	.cap-home__tabs {
		gap: 6px;
	}

	.cap-home__tab {
		min-height: 42px;
		padding-inline: 7px;
		font-size: 13px;
	}

	.cap-home__choices--two {
		grid-template-columns: 1fr;
	}

	.cap-home__footer {
		flex-direction: column;
		gap: 6px;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cap-home *,
	.cap-home *::before,
	.cap-home *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

/* نسخهٔ مینیمال صفحهٔ خانه: چهار تب، فضای خالی بیشتر و کارت‌های تمام‌کلیک */
.cap-home__brand img {
	display: block !important;
	width: 234px !important;
	height: auto !important;
	max-width: 234px !important;
	max-height: 83px !important;
	object-fit: contain !important;
	image-rendering: auto;
}

.cap-home__panel--alpha .cap-home__panel-heading h1 {
	color: var(--cap-yellow) !important;
}

.cap-home__welcome-cta {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: min(390px, 100%);
	min-height: 68px;
	margin-top: 24px;
	padding: 9px 18px;
	border: 2px solid var(--cap-yellow);
	border-radius: 12px;
	background: transparent;
	color: var(--cap-yellow) !important;
	text-align: center;
	transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.cap-home__welcome-cta span {
	font-size: 14px;
	font-weight: 700;
}

.cap-home__welcome-cta strong {
	font-size: 16px;
	font-weight: 900;
}

.cap-home__welcome-cta:hover,
.cap-home__welcome-cta:focus-visible {
	background: var(--cap-yellow);
	color: #16261f !important;
	transform: translateY(-1px);
}

.cap-home__account {
	gap: 7px;
}

.cap-home__account-primary,
.cap-home__account-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 82px;
	min-height: 34px;
	padding: 5px 12px;
	border: 1px solid currentColor;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 800;
}

.cap-home__account-primary {
	border-color: var(--cap-yellow);
	background: var(--cap-yellow);
	color: #16261f;
}

.cap-home__account-secondary {
	border-color: var(--cap-green);
	background: var(--cap-green);
	color: #16261f;
}

.cap-home__stage {
	padding: 14px;
	border-radius: 18px;
}

.cap-home__tabs {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 7px;
	width: min(720px, 100%);
	margin-bottom: 12px;
}

.cap-home__tab {
	min-height: 38px;
	padding: 5px 10px;
	border-radius: 8px;
	font-size: 13px;
}

.cap-home__tab--alpha[aria-selected="true"] {
	background: var(--cap-purple);
	color: #fff;
}

.cap-home__panel {
	display: grid;
	grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.8fr);
	align-items: center;
	gap: 18px;
	min-height: clamp(270px, 38vh, 390px);
	padding: clamp(12px, 2vw, 24px);
}

.cap-home__visual {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 230px;
}

.cap-home__visual img {
	display: block;
	width: min(100%, 250px);
	max-height: 310px;
	object-fit: contain;
}

.cap-home__panel-copy {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
}

.cap-home__panel-heading {
	margin-bottom: 16px;
	text-align: right;
}

.cap-home__panel-heading h1,
.cap-home__panel-heading h2 {
	margin: 0;
	font-size: clamp(21px, 2.5vw, 30px);
}

.cap-home__panel-heading p {
	margin: 2px 0 0;
	font-size: 13px;
}

.cap-home__choices {
	gap: 7px;
}

.cap-home__choice {
	min-height: 92px;
	padding: 13px 14px;
	border: 2px solid var(--choice-color);
	border-top-width: 2px;
	border-radius: 10px;
	background: transparent;
	box-shadow: none;
	transition: background 160ms ease, transform 160ms ease;
}

.cap-home__choice:hover,
.cap-home__choice:focus-visible {
	background: color-mix(in srgb, var(--choice-color) 11%, transparent);
	transform: translateY(-1px);
}

.cap-home__choice-inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
}

.cap-home__choice h3 {
	margin: 0 0 2px;
	font-size: 17px;
}

.cap-home__choice p {
	font-size: 12px;
}

.cap-home__welcome-copy {
	max-width: 420px;
	color: var(--cap-muted);
	font-size: 14px;
}

.cap-home__welcome-copy p {
	margin: 0;
}

@media (max-width: 780px) {
	.cap-home__panel {
		grid-template-columns: 1fr;
		gap: 6px;
		padding: 9px;
	}

	.cap-home__visual {
		grid-column: 1;
		grid-row: 1;
		min-height: 120px;
	}

	.cap-home__visual img {
		width: min(100%, 145px);
		max-height: 150px;
	}

	.cap-home__panel-copy {
		grid-column: 1;
		grid-row: 2;
	}

	.cap-home__panel-heading {
		text-align: center;
	}

	.cap-home__welcome-cta {
		margin-inline: auto;
	}
}

@media (max-width: 560px) {
	.cap-home__tabs {
		gap: 4px;
	}

	.cap-home__tab {
		padding-inline: 4px;
		font-size: 12px;
	}
}

/* Keep secondary navigation readable when the theme overrides link colors. */
.cap-home .cap-home__quick-links a,
.cap-home .cap-home__footer a,
.cap-home .cap-home__footer p {
	color: #b8cbc4 !important;
	opacity: 1;
}
.cap-home .cap-home__quick-links a:hover,
.cap-home .cap-home__quick-links a:focus-visible,
.cap-home .cap-home__footer a:hover,
.cap-home .cap-home__footer a:focus-visible {
	color: #fff !important;
}
