/* Afristream News theme shell. Figma 672:487 (1440 x 3304). */

html { scroll-padding-top: 16px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
:where(body) a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--wp--preset--color--purple); outline-offset: 3px; }
.skip-link.screen-reader-text:focus { background: #fff; color: var(--wp--preset--color--purple); padding: 12px 18px; border-radius: 999px; z-index: 100000; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }

/* ---------- Shell ---------- */
.af-shell {
	display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; margin: 0 !important; overflow-x: clip;
	/* Sidebar columns run the full page height (Figma 829:7820 / 829:7871). */
	background: linear-gradient(to right, var(--wp--preset--color--sand) 0 114px, rgba(30,30,30,.08) 114px 115px, var(--wp--preset--color--sand) 115px 229px, rgba(30,30,30,.08) 229px 230px, transparent 230px);
}
.af-shell > * { margin-block-start: 0 !important; }
.af-sidebar-part { position: sticky; top: 0; height: 100vh; align-self: start; z-index: 5; }
.admin-bar .af-sidebar-part { top: 32px; height: calc(100vh - 32px); }
.af-column { position: relative; min-width: 0; padding: 0 32px 0 33px; isolation: isolate; }
.af-column::before {
	content: ""; position: absolute; z-index: -1; pointer-events: none;
	top: 8px; right: -10px; width: 794px; height: 270px; max-width: 70%;
	background: url("../images/kids-upper-scene.svg") no-repeat right top / contain;
}
.af-main { max-width: 1145px; }
.af-main > * + *, .af-page > * + * { margin-block-start: 40px; }

/* ---------- Sidebar (Figma 829:7819) ---------- */
.af-sidebar { display: grid; grid-template-columns: 115px 115px; height: 100%; margin: 0; }
.af-sidebar > * { margin: 0 !important; }
.af-apprail, .af-menu {
	position: relative; background: var(--wp--preset--color--sand); border-right: 1px solid rgba(30, 30, 30, 0.08);
	height: 100%; box-sizing: border-box; margin: 0 !important;
}
.af-apprail { display: flex; flex-direction: column; align-items: center; padding-top: 34px; }
.af-apprail > * { margin: 0 !important; }
.af-logo img, .af-menu__logo img { display: block; border-radius: 10px; }
.af-logo a, .af-menu__logo a { display: block; border-radius: 10px; }
.af-apprail__divider.wp-block-separator { width: 46px; margin: 38px 0 44px !important; border: 0; border-top: 1px solid rgba(30, 30, 30, 0.15); opacity: 1; }
.af-apprail__pills { display: flex; flex-direction: column; gap: 15px; }
.af-apprail__pills > * { margin: 0 !important; }
.af-pill a {
	display: flex; align-items: center; justify-content: center; width: 76px; height: 60px; box-sizing: border-box;
	border-radius: 30px; background: var(--wp--preset--color--cream); border: 1px solid rgba(0, 0, 0, 0.1);
}
.af-pill a:hover { background: #fff; }
.af-pill.is-active a { background: var(--wp--preset--color--orange); border-color: transparent; box-shadow: var(--wp--custom--shadow--nav-active); }
.af-pill img { width: 24px; height: 24px; }

.af-menu { display: flex; flex-direction: column; align-items: center; padding-top: 124px; gap: 0; }
.af-menu > * { margin: 0 !important; }
.af-menu__logo { display: none; }
.af-menu__label { font-size: 13px; text-transform: uppercase; color: rgba(30, 30, 30, 0.8); letter-spacing: .02em; margin-bottom: 30px !important; }
.af-menu__item { width: 100%; text-align: center; margin-bottom: 22px !important; }
.af-menu__item a {
	display: inline-flex; flex-direction: column; align-items: center; gap: 7px; min-width: 64px; min-height: 48px; padding: 6px 4px;
	color: rgba(30, 30, 30, 0.72); font-size: 16px; text-decoration: none; border-radius: 12px; box-sizing: border-box;
}
.af-menu__item a:hover { color: var(--wp--preset--color--purple); }
.af-menu__item img { width: 22px; height: 22px; }
.af-menu__item.is-active a { color: var(--wp--preset--color--purple); font-weight: 500; }
.af-menu__item--external img { transform: rotate(180deg); }

/* ---------- Top bar + page head ---------- */
.af-topbar-part { margin: 0; }
.af-topbar { display: flex; align-items: center; padding-top: 27px; padding-left: 126px; margin: 0; }
.af-topbar > * { margin: 0 !important; }
.af-main { padding-top: 36px; }
.af-page-head > * { margin: 0 !important; }
.af-page-title { font-size: var(--wp--preset--font-size--xxl); font-weight: 600; line-height: 48px; color: var(--wp--preset--color--ink); }
.af-page-intro { margin-top: 10px !important; font-size: 16px; line-height: 30px; color: rgba(30, 30, 30, 0.8); }
.af-main > .af-rail + .af-rail { margin-block-start: 45px; }
.af-chips { margin-block-start: 21px !important; }
.af-main > .af-hero { margin-block-start: 28px; }

/* ---------- Footer ---------- */
.af-footer-part { margin-top: 80px; }
.af-footer { max-width: 1145px; border-top: 1px solid rgba(30, 30, 30, 0.1); padding: 28px 0 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.af-footer > * { margin: 0 !important; }
.af-footer__note { max-width: 640px; font-size: 14px; color: var(--wp--preset--color--muted); }
.af-footer__links { font-size: 14px; color: var(--wp--preset--color--muted); }
.af-footer__links a { display: inline-block; padding: 12px 0; font-weight: 500; }

/* ---------- Generic pages ---------- */
.af-page { max-width: 760px; padding-bottom: 40px; }

/* ---------- Tablet 768-1199: single menu column ---------- */
@media (max-width: 1199px) {
	.af-shell { grid-template-columns: 115px minmax(0, 1fr); background: linear-gradient(to right, var(--wp--preset--color--sand) 0 114px, rgba(30,30,30,.08) 114px 115px, transparent 115px); }
	.af-sidebar { grid-template-columns: 115px; }
	.af-apprail { display: none; }
	.af-menu { padding-top: 34px; }
	.af-menu__logo { display: block; margin-bottom: 40px !important; }
	.af-topbar { padding-left: 0; }
	.af-column { padding: 0 24px; }
	.af-column::before { max-width: 60%; }
}

/* ---------- Mobile < 768: sidebar becomes a top bar ---------- */
@media (max-width: 767px) {
	.af-shell { display: block; background: none; }
	.af-sidebar-part, .admin-bar .af-sidebar-part { position: static; height: auto; }
	.af-sidebar { display: block; }
	.af-menu {
		flex-direction: row; align-items: center; justify-content: flex-start; gap: 4px; height: auto;
		padding: 8px 10px; border-right: 0; border-bottom: 1px solid rgba(30, 30, 30, 0.08); overflow-x: auto;
	}
	.af-menu__logo { margin: 0 8px 0 0 !important; flex: none; }
	.af-menu__label { display: none; }
	.af-menu__item { width: auto; margin: 0 !important; flex: none; }
	.af-menu__item a { flex-direction: row; gap: 5px; min-width: 0; min-height: 44px; padding: 8px 6px; font-size: 14px; }
	.af-menu__item img { width: 20px; height: 20px; }
	.af-menu__item--external { margin-left: auto !important; }
	.af-column { padding: 0 16px; }
	.af-column::before { display: none; }
	.af-topbar { padding-top: 16px; }
	.af-search { max-width: none; height: 50px; }
	.af-main { padding-top: 24px; }
	.af-main > * + * { margin-block-start: 28px; }
	.af-main > .af-rail + .af-rail { margin-block-start: 36px; }
	.af-chips { margin-block-start: 20px !important; }
	.af-page-title { line-height: 1.2; }
	.af-page-intro { line-height: 1.5; }
	.af-footer-part { margin-top: 48px; }
}
