/*
 * YouTeacher Games — Homepage stylesheet
 * Loaded only on front-page.php via astra_child_homepage_assets()
 * No hardcoded colours except where the spec fixes an exact hex.
 * All brand values reference CSS custom properties from style.css.
 */

/* ── Reset Astra's own layout wrappers on this page ─────────── */
body.home .ast-container,
body.home #page,
body.home #content,
body.home .ast-page-builder-template {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
}

/* ── Shared container ────────────────────────────────────────── */
.yt-container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 24px;
}

/* ── Shared button primitives ────────────────────────────────── */
.yt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-sans);
	font-weight: var(--font-weight-semibold);
	line-height: 1;
	border-radius: 9999px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .18s ease, box-shadow .18s ease;
	white-space: nowrap;
}
.yt-btn--primary {
	background-color: #E67E22;
	color: #FFFFFF !important;
}
.yt-btn--primary:hover  { background-color: #F2A65A; color: #FFFFFF !important; text-decoration: none; }
.yt-btn--primary:active { background-color: #C56A1A; }
.yt-btn--primary:focus  { outline: none; box-shadow: 0 0 0 3px rgba(230,126,34,.25); }

.yt-btn--lg { font-size: 1rem;       min-height: 52px; padding: 14px 32px; }
.yt-btn--sm { font-size: .8125rem;   min-height: 36px; padding: 8px  18px; }


/* ================================================================
   HEADER  gs-header / gs-logo / gs-nav
   ================================================================ */

/* Suppress any Astra header element that makes it into the DOM on any page */
.ast-primary-header-bar,
.ast-above-header-bar,
.ast-below-header-bar,
#ast-fixed-header,
.ast-desktop-header,
.ast-mobile-header {
	display: none !important;
}

.gs-header {
	position: sticky;
	top: 0;
	z-index: 200;
	background: #FFFFFF;
	/* spec: no border, no shadow */
}

.gs-header__inner {
	display: flex;
	align-items: center;
	max-width: 1200px;
	margin-inline: auto;
	padding: 0 24px;
	height: 64px;
	gap: 0;
}

/* Logo — horizontal lockup: mark + wordmark */
.gs-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}
.gs-logo:hover,
.gs-logo:focus { text-decoration: none; }

.gs-logo__mark {
	display: block;
	flex-shrink: 0;
}

.gs-logo__wordmark {
	font-family: 'Rubik', sans-serif;
	font-size: 1.125rem;        /* 18px */
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #111111;
	line-height: 1;
}

.gs-logo__games {
	font-family: 'Rubik', sans-serif;
	font-size: .7rem;           /* ~65% of 1.125rem wordmark */
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #3A7CA5;
	vertical-align: baseline;
	margin-left: .25em;
	line-height: 1;
}

/* Footer version: white wordmark; GAMES label keeps its blue */
.gs-logo--footer .gs-logo__wordmark { color: #FFFFFF; }

/* Nav — pushed to the right */
.gs-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}

.gs-nav__list {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
}

/* All nav links — covers both wp_nav_menu() .menu-item and any manual items */
.gs-nav__list li > a {
	display: block;
	padding: 8px 14px;
	font-family: 'Inter', sans-serif;
	font-size: .9375rem;        /* 15px */
	font-weight: 400;           /* spec: no bold */
	color: #111111;
	text-decoration: none;
	border-radius: 6px;
	transition: color .15s ease, background-color .15s ease;
}
.gs-nav__list li > a:hover { color: #E67E22; background: transparent; text-decoration: none; }

/* WordPress active/current states */
.gs-nav__list .current-menu-item > a,
.gs-nav__list .current-menu-ancestor > a,
.gs-nav__list .current_page_item > a,
.gs-nav__list .current_page_ancestor > a {
	color: #E67E22;
}

/* External link — WordPress adds no special class so target by rel or data attr.
   In Appearance → Menus the admin can add CSS class "gs-nav__item--external". */
.gs-nav__list .gs-nav__item--external > a { color: #6B7280; }
.gs-nav__list .gs-nav__item--external > a:hover { color: #E67E22; }

/* Cart icon */
.gs-nav__cart {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin-left: 8px;
	color: #111111;
	border-radius: 6px;
	text-decoration: none;
	transition: color .15s ease;
}
.gs-nav__cart:hover { color: #E67E22; }

.gs-nav__cart-badge {
	position: absolute;
	top: 2px; right: 2px;
	background: #E67E22;
	color: #FFFFFF;
	font-family: 'Inter', sans-serif;
	font-size: 10px;
	font-weight: 700;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Mobile toggle — hidden on desktop */
.gs-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	margin-left: auto;
	background: none;
	border: 1px solid #E5E7EB;
	border-radius: 6px;
	color: #111111;
	cursor: pointer;
	/* override global button styles */
	padding: 0;
	min-height: unset;
	box-shadow: none;
	border-radius: 6px;
}
.gs-nav__toggle:hover { background: #F3F4F6; color: #111111; box-shadow: none; }


/* ================================================================
   HERO  — off-white, left-aligned
   ================================================================ */
.yt-hero {
	background: #FAFAF8;
	padding: 96px 24px 100px;
}

.yt-hero__layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	align-items: center;
	gap: 48px;
}

.yt-hero__text {
	max-width: 580px;
}

.yt-hero__h1 {
	font-family: 'Rubik', sans-serif;
	font-size: clamp(2.25rem, 4vw, 3rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #111111;
	margin: 0 0 20px;
}

.yt-hero__sub {
	font-family: 'Inter', sans-serif;
	font-size: 1.125rem;
	font-weight: 400;
	color: #9CA3AF;
	line-height: 1.6;
	margin: 0 0 36px;
}

/* Minimal right-side decoration: stacked rounded rectangles */
.yt-hero__decoration {
	position: relative;
	height: 280px;
}
.yt-hero__decoration::before,
.yt-hero__decoration::after {
	content: '';
	position: absolute;
	border-radius: 16px;
}
.yt-hero__decoration::before {
	inset: 0;
	background: #E5E7EB;
	opacity: .5;
}
.yt-hero__decoration::after {
	top: 24px; left: 24px; right: -24px; bottom: -24px;
	background: rgba(230,126,34,.08);
	border: 2px solid rgba(230,126,34,.15);
}


/* ================================================================
   TRUST BAR
   ================================================================ */
.yt-trust-bar {
	background: #FAFAF8;
	border-top: 1px solid #E5E7EB;
	border-bottom: 1px solid #E5E7EB;
	padding: 20px 24px;
}

.yt-trust-bar__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 40px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.yt-trust-bar__item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: 'Inter', sans-serif;
	font-size: .875rem;
	font-weight: 400;
	color: #9CA3AF;
}

.yt-trust-bar__item svg {
	color: #9CA3AF;
	flex-shrink: 0;
}


/* ================================================================
   SECTION HEADER (shared)
   ================================================================ */
.yt-section-header {
	text-align: center;
	margin-bottom: 48px;
}

.yt-section-header__title {
	font-family: 'Rubik', sans-serif;
	font-size: 1.75rem;
	font-weight: 700;
	color: #111111;
	letter-spacing: -0.01em;
	margin: 0 0 12px;
}

.yt-section-header__sub {
	font-family: 'Inter', sans-serif;
	font-size: 1.0625rem;
	color: #9CA3AF;
	margin: 0;
}


/* ================================================================
   FEATURED GAMES
   ================================================================ */
.yt-featured {
	background: #FFFFFF;
	padding: 80px 24px;
}

/* 3-column grid */
.yt-product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Product card */
.yt-card {
	background: #FFFFFF;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s ease, transform .2s ease;
}
.yt-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,.10);
	transform: translateY(-2px);
}

.yt-card__img-link { display: block; text-decoration: none; }

.yt-card__thumb {
	position: relative;
	aspect-ratio: 4/3;
	background: #F3F4F6;
	overflow: hidden;
}
.yt-card__thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.yt-card:hover .yt-card__thumb img { transform: scale(1.03); }

.yt-card__badge {
	position: absolute;
	top: 10px; left: 10px;
	background: #E67E22;
	color: #FFFFFF;
	font-family: 'Inter', sans-serif;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 9999px;
}

.yt-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
	gap: 10px;
}

.yt-card__title {
	font-family: 'Rubik', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	color: #111111;
	margin: 0;
	line-height: 1.35;
}
.yt-card__title a { color: inherit; text-decoration: none; }
.yt-card__title a:hover { color: #E67E22; text-decoration: none; }

.yt-card__desc {
	font-family: 'Inter', sans-serif;
	font-size: .875rem;
	color: #6B7280;
	line-height: 1.55;
	margin: 0;
	flex: 1;
}

.yt-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.yt-card__price {
	font-family: 'Inter', sans-serif;
	font-size: 1.0625rem;
	font-weight: 700;
	color: #E67E22;
}
.yt-card__price del {
	color: #9CA3AF;
	font-weight: 400;
	font-size: .8125rem;
	margin-right: 2px;
}

/* "View all" CTA */
.yt-featured__cta {
	text-align: center;
	margin-top: 48px;
}

/* Empty state */
.yt-empty {
	text-align: center;
	padding: 64px 0;
	color: #9CA3AF;
}
.yt-empty svg {
	display: block;
	margin: 0 auto 16px;
	color: #E5E7EB;
}
.yt-empty p {
	font-family: 'Inter', sans-serif;
	font-size: 1rem;
	color: #9CA3AF;
	margin: 0;
}


/* ================================================================
   WHY TEACHERS LOVE OUR GAMES
   ================================================================ */
.yt-why {
	background: #FAFAF8;
	padding: 80px 24px;
	border-top: 1px solid #E5E7EB;
}

.yt-why__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.yt-why-card {
	background: #FFFFFF;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 24px;
	transition: box-shadow .2s ease;
}
.yt-why-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.07); }

.yt-why-card__icon {
	width: 48px; height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(230,126,34,.10);
	color: #E67E22;
	border-radius: 10px;
	margin-bottom: 16px;
}

.yt-why-card__title {
	font-family: 'Rubik', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	color: #111111;
	margin: 0 0 8px;
}

.yt-why-card__body {
	font-family: 'Inter', sans-serif;
	font-size: .875rem;
	color: #6B7280;
	line-height: 1.6;
	margin: 0;
}


/* ================================================================
   FOOTER
   ================================================================ */
.yt-footer {
	background: #111111;
	font-family: 'Inter', sans-serif;
}

.yt-footer__body { padding: 64px 24px 48px; }

.yt-footer__inner {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 64px;
	align-items: start;
}

.yt-footer__brand { max-width: 260px; }

/* Logo in footer already gets white wordmark via .gs-logo--footer */
.yt-footer__brand .gs-logo { margin-bottom: 16px; }

.yt-footer__tagline {
	font-size: .875rem;
	color: #9CA3AF;
	margin: 0;
	line-height: 1.6;
}

.yt-footer__cols {
	display: flex;
	gap: 48px;
	justify-content: flex-end;
}

.yt-footer__col-heading {
	font-family: 'Inter', sans-serif;
	font-size: .75rem;
	font-weight: 600;
	color: #FFFFFF;
	text-transform: uppercase;
	letter-spacing: .08em;
	margin: 0 0 16px;
}

.yt-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.yt-footer__links a {
	font-size: .875rem;
	color: #9CA3AF;
	text-decoration: none;
	transition: color .15s ease;
}
.yt-footer__links a:hover { color: #E67E22; text-decoration: none; }

/* Bottom bar */
.yt-footer__bottom {
	border-top: 1px solid #1F2937;
	padding: 16px 24px;
}
.yt-footer__bottom .yt-container {
	display: flex;
	align-items: center;
}
.yt-footer__copy {
	font-family: 'Inter', sans-serif;
	font-size: .75rem;
	color: #9CA3AF;
	margin: 0;
}


/* ================================================================
   ACCESSIBILITY
   ================================================================ */
.skip-link {
	position: absolute;
	top: -9999px;
	left: 16px;
	z-index: 9999;
	background: #E67E22;
	color: #FFFFFF;
	padding: 10px 20px;
	border-radius: 0 0 6px 6px;
	font-family: 'Inter', sans-serif;
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
}
.skip-link:focus { top: 0; }

@media (pointer: coarse) {
	.yt-btn, .gs-nav__cart { min-height: 44px; min-width: 44px; }
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

/* ── Tablet: 1024px ── */
@media (max-width: 1024px) {
	.yt-why__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.yt-product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.yt-footer__cols {
		gap: 32px;
	}
}

/* ── Tablet: 768px ── */
@media (max-width: 768px) {

	/* Mobile nav */
	.gs-nav__toggle { display: flex; }

	.gs-nav {
		position: fixed;
		inset: 64px 0 0 0;
		background: #FFFFFF;
		border-top: 1px solid #E5E7EB;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding: 16px;
		gap: 0;
		transform: translateX(100%);
		transition: transform .25s ease;
		overflow-y: auto;
		z-index: 199;
	}
	.gs-nav--open { transform: translateX(0); }

	.gs-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.gs-nav__item > a,
	.gs-nav__list li > a {
		font-size: 1rem;
		padding: 14px 12px;
		border-bottom: 1px solid #E5E7EB;
		border-radius: 0;
	}

	.gs-nav__cart {
		margin-left: 0;
		justify-content: flex-start;
		width: 100%;
		padding: 14px 12px;
		border-radius: 0;
		border-bottom: 1px solid #E5E7EB;
	}

	/* Hero */
	.yt-hero {
		padding: 64px 24px 72px;
	}
	.yt-hero__layout {
		grid-template-columns: 1fr;
		gap: 0;
	}
	.yt-hero__decoration { display: none; }

	/* Products */
	.yt-product-grid { grid-template-columns: 1fr 1fr; }

	/* Footer */
	.yt-footer__inner {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.yt-footer__brand { max-width: 100%; }
	.yt-footer__cols  { flex-wrap: wrap; gap: 32px; }
}

/* ── Mobile: 480px ── */
@media (max-width: 480px) {
	.yt-hero__h1 { font-size: 2rem; }
	.yt-hero__sub { font-size: 1rem; }
	.yt-btn--lg   { min-height: 48px; padding: 12px 24px; }

	.yt-product-grid { grid-template-columns: 1fr; }
	.yt-why__grid    { grid-template-columns: 1fr; }

	.yt-trust-bar__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.yt-footer__cols { flex-direction: column; gap: 28px; }
}
