/*
Theme Name: Kozlovski.com
Theme URI: https://www.youtube.com/@KalkozWeb/playlists
Author: Kozlovski.com
Description: A comic-magazine theme for Kozlovski.com language courses. Shows your WooCommerce courses as comic panels with speech bubbles, plus sections for formats, upcoming titles and the YouTube channel.
Version: 1.5.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kozlovski
Tags: e-commerce, education, custom-menu, custom-logo, featured-images
*/

/* ---------- Tokens ---------- */
:root {
	--ink: #000000;
	--paper: #ffffff;
	--sun: #ffd400;
	--cyan: #00a6e0;
	--magenta: #e6007e;
	--sky: #e3f4fc;
	--muted: #3d3d3d;
	--line: 3px;
	--shadow: 6px 6px 0 var(--ink);
	--display: "Bangers", "Impact", sans-serif;
	--body: "Comic Neue", "Trebuchet MS", sans-serif;
	--arabic: "Cairo", "Tahoma", sans-serif;
	--wrap: 1160px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background-color: var(--paper);
	background-image: linear-gradient(rgba(255, 251, 230, 0.7), rgba(255, 251, 230, 0.7)), url("assets/bg-comics-tile.jpg");
	background-size: auto, 640px auto;
	background-position: 0 0, 0 0;
	background-repeat: no-repeat, repeat;
	color: var(--ink);
	font-family: var(--body);
	font-size: 1.125rem;
	line-height: 1.55;
	font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--magenta); }

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

h1, h2, h3, h4 {
	font-family: var(--display);
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 1.05;
	margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.75rem; }

p { margin: 0 0 1em; }

[lang="ar"], .is-arabic { font-family: var(--arabic); font-weight: 700; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: 8px; left: 8px; z-index: 100;
	background: var(--sun); padding: 8px 14px; border: var(--line) solid var(--ink);
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Halftone dots: the printed-comic texture */
.halftone {
	background-color: transparent;
	background-image: none;
}

/* ---------- Buttons ---------- */
.btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.wp-block-button__link {
	display: inline-block;
	font-family: var(--display);
	font-size: 1.35rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	line-height: 1.1;
	padding: 0.6em 1.1em 0.5em;
	background: var(--sun);
	color: var(--ink);
	border: var(--line) solid var(--ink);
	border-radius: 0;
	box-shadow: 4px 4px 0 var(--ink);
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.wp-block-button__link:hover {
	background: var(--sun);
	color: var(--ink);
	transform: translate(2px, 2px);
	box-shadow: 2px 2px 0 var(--ink);
}

.btn--ghost { background: var(--paper); }
.btn--ghost:hover { background: var(--paper); }
.btn--red { background: var(--magenta); color: var(--paper); }
.btn--red:hover { background: var(--magenta); color: var(--paper); }

/* ---------- Header ---------- */
.site-header {
	border-bottom: var(--line) solid var(--ink);
	background: var(--paper);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 14px;
	padding-bottom: 14px;
	flex-wrap: wrap;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}

.brand__mark {
	font-family: var(--display);
	font-size: 2.1rem;
	line-height: 1;
	padding: 6px 12px 3px;
	background: var(--sun);
	border: var(--line) solid var(--ink);
	box-shadow: 4px 4px 0 var(--ink);
	transform: rotate(-2deg);
	color: var(--ink);
}

.brand__mark span { color: var(--magenta); }

.custom-logo { max-height: 64px; width: auto; }

.main-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	align-items: center;
}

.main-nav a {
	font-weight: 700;
	text-decoration: none;
	font-size: 1.05rem;
}

.main-nav a:hover,
.main-nav .current-menu-item > a { text-decoration: underline; color: var(--ink); }

.cart-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cart-count {
	display: inline-grid;
	place-items: center;
	min-width: 26px;
	height: 26px;
	padding: 0 6px;
	background: var(--magenta);
	color: var(--paper);
	border: 2px solid var(--ink);
	border-radius: 13px;
	font-size: 0.85rem;
}

/* ---------- Speech bubbles ---------- */
.bubble {
	position: relative;
	display: inline-block;
	background: var(--paper);
	border: var(--line) solid var(--ink);
	border-radius: 50% / 46%;
	padding: 0.7em 1.2em;
	font-family: var(--display);
	font-size: 2rem;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
}

.bubble[lang="ar"] { font-family: var(--arabic); font-weight: 800; font-size: 1.8rem; line-height: 1.3; padding: 0.45em 1.1em; }

/* tail: outer black triangle + inner white triangle */
.bubble::before,
.bubble::after {
	content: "";
	position: absolute;
	left: 26%;
	border-style: solid;
}
.bubble::before {
	bottom: -22px;
	border-width: 22px 14px 0 0;
	border-color: var(--ink) transparent transparent transparent;
}
.bubble::after {
	bottom: -15px;
	left: calc(26% + 3px);
	border-width: 16px 9px 0 0;
	border-color: var(--paper) transparent transparent transparent;
}

.bubble--right::before { left: auto; right: 26%; border-width: 22px 0 0 14px; }
.bubble--right::after { left: auto; right: calc(26% + 3px); border-width: 16px 0 0 9px; }

/* ---------- Hero (magazine cover) ---------- */
.hero { border-bottom: var(--line) solid var(--ink); }

.hero .wrap {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 40px;
	align-items: center;
	padding-top: 56px;
	padding-bottom: 64px;
}

.hero__cover-line {
	display: inline-block;
	background: var(--magenta);
	color: var(--paper);
	font-family: var(--display);
	font-size: 1.4rem;
	letter-spacing: 0.04em;
	padding: 4px 12px 2px;
	border: var(--line) solid var(--ink);
	transform: rotate(-2deg);
	margin-bottom: 18px;
}

.hero h1 { max-width: 12ch; }

.hero__text {
	font-size: 1.25rem;
	max-width: 34ch;
	margin-bottom: 1.4em;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__panel {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--paper);
	border: var(--line) solid var(--ink);
	box-shadow: 10px 10px 0 var(--ink);
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: var(--line);
	background-color: var(--ink);
}

.hero__cell {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	overflow: visible;
}

.hero__cell:nth-child(1) { background: color-mix(in srgb, var(--sun) 80%, transparent); }
.hero__cell:nth-child(2) { background: color-mix(in srgb, var(--sky) 80%, transparent); background-image: radial-gradient(var(--cyan) 1.4px, transparent 1.6px); background-size: 12px 12px; }
.hero__cell:nth-child(3) { background: color-mix(in srgb, #ffe0f0 80%, transparent); background-image: radial-gradient(var(--magenta) 1.3px, transparent 1.5px); background-size: 12px 12px; }
.hero__cell:nth-child(4) { background: color-mix(in srgb, var(--cyan) 80%, transparent); }

.hero__cell .bubble { font-size: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: 18px; }
.hero__cell .bubble[lang="ar"] { font-size: clamp(1.3rem, 2.7vw, 2rem); }

.hero__cell small {
	position: absolute;
	left: 0;
	bottom: 0;
	background: var(--paper);
	border-top: var(--line) solid var(--ink);
	border-right: var(--line) solid var(--ink);
	padding: 2px 8px;
	font-weight: 700;
	font-size: 0.85rem;
}

/* The one orchestrated moment: bubbles pop in on load */
@media (prefers-reduced-motion: no-preference) {
	.hero__cell .bubble { animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
	.hero__cell:nth-child(1) .bubble { animation-delay: 0.15s; }
	.hero__cell:nth-child(2) .bubble { animation-delay: 0.45s; }
	.hero__cell:nth-child(3) .bubble { animation-delay: 0.75s; }
	.hero__cell:nth-child(4) .bubble { animation-delay: 1.05s; }
}

@keyframes pop {
	from { transform: scale(0.2); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section--tight { padding: 56px 0; }
.section + .section { border-top: var(--line) solid var(--ink); }

.caption {
	display: inline-block;
	background: var(--sun);
	border: var(--line) solid var(--ink);
	padding: 4px 12px;
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 14px;
}

.section__head { max-width: 640px; margin-bottom: 36px; }
.section__head p { font-size: 1.2rem; color: var(--muted); }

/* ---------- Course panels ---------- */
.courses {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 32px;
}

.course {
	display: flex;
	flex-direction: column;
	background: var(--paper);
	border: var(--line) solid var(--ink);
	box-shadow: var(--shadow);
}

.course__art {
	position: relative;
	aspect-ratio: 4 / 3;
	border-bottom: var(--line) solid var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background-size: 12px 12px;
}

.course__art img { width: 100%; height: 100%; object-fit: cover; }

.course__art--cyan { background-color: var(--sky); background-image: radial-gradient(var(--cyan) 1.4px, transparent 1.6px); }
.course__art--magenta { background-color: #ffe0f0; background-image: radial-gradient(var(--magenta) 1.3px, transparent 1.5px); }
.course__art--sun { background-color: #fff3b0; background-image: radial-gradient(#e0b400 1.4px, transparent 1.6px); }
.course__art--ink { background-color: #e9e9e9; background-image: radial-gradient(#7a7a7a 1.2px, transparent 1.4px); }

.course__art .bubble { margin: 34px 0 20px; font-size: 2rem; }

.course__price {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	background: var(--sun);
	border: var(--line) solid var(--ink);
	font-family: var(--display);
	font-size: 1.35rem;
	line-height: 1;
	padding: 6px 10px 3px;
	transform: rotate(4deg);
}

.course__price del { font-size: 1rem; opacity: 0.6; }
.course__price ins { text-decoration: none; }
.course__price--free { background: var(--magenta); color: var(--paper); }
.course__price--soon { background: var(--paper); }

.course__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 18px 20px;
}

.course__body h3 { font-size: 1.85rem; margin-bottom: 0.3em; }
.course__body h3 a { text-decoration: none; }
.course__body p { color: var(--muted); font-size: 1.05rem; }
.course__body .btn { margin-top: auto; align-self: flex-start; font-size: 1.2rem; }

.courses-more { margin-top: 40px; }

/* ---------- Formats strip ---------- */
.strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--line);
	background: var(--ink);
	border: var(--line) solid var(--ink);
	box-shadow: var(--shadow);
}

.strip__panel {
	background: var(--paper);
	padding: 24px 20px 26px;
}

.strip__panel svg { width: 56px; height: 56px; margin-bottom: 12px; }
.strip__panel h3 { font-size: 1.6rem; }
.strip__panel p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- Next issue ---------- */
.next-issue {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
}

.next-issue__card {
	position: relative;
	padding: 28px 24px 26px;
	border: var(--line) solid var(--ink);
	box-shadow: var(--shadow);
	background: var(--paper);
}

.next-issue__card .caption { background: var(--cyan); color: var(--ink); }
.next-issue__card:nth-child(2) .caption { background: var(--magenta); color: var(--paper); }
.next-issue__card p { margin: 0; color: var(--muted); }

/* ---------- YouTube band ---------- */
.yt-band { background: transparent; color: var(--ink); border-top: var(--line) solid var(--ink); }
.yt-band h2, .yt-band p { background: var(--paper); color: var(--ink); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 8px 14px; }

.yt-band .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	padding-top: 48px;
	padding-bottom: 48px;
}
.yt-band h2 { margin: 0 0 0.2em; }
.yt-band p { margin: 0; font-size: 1.2rem; max-width: 46ch; }

/* ---------- Footer ---------- */
.site-footer {
	border-top: var(--line) solid var(--ink);
	background: var(--ink);
	color: var(--paper);
	padding: 36px 0;
	font-size: 1rem;
}

.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--sun); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer .brand__mark { font-size: 1.5rem; box-shadow: none; }

/* ---------- Pages, posts, shop ---------- */
.page-wrap { padding-top: 48px; padding-bottom: 72px; }
.entry { max-width: 760px; }
.entry--wide { max-width: none; }
.entry h1 { margin-bottom: 0.5em; }
.entry-content > * { max-width: 72ch; }
.entry-content h2 { margin-top: 1.2em; }

.post-list article { padding: 28px 0; border-bottom: var(--line) solid var(--ink); }
.post-list h2 a { text-decoration: none; }

/* WooCommerce product grid as comic panels */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background: var(--paper);
	border: var(--line) solid var(--ink);
	box-shadow: var(--shadow);
	padding: 0 0 18px;
	text-align: left;
}

.woocommerce ul.products li.product a img { margin: 0 0 14px; border-bottom: var(--line) solid var(--ink); }

.woocommerce ul.products li.product .c1k-placeholder { margin: 0 0 14px; }
.woocommerce div.product div.images .c1k-placeholder { aspect-ratio: 1 / 1; border: var(--line) solid var(--ink); box-shadow: var(--shadow); }
.woocommerce div.product div.images .c1k-placeholder .bubble { font-size: 3rem; }

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--display);
	font-weight: 400;
	font-size: 1.6rem;
	padding: 0 16px;
	line-height: 1.05;
}

.woocommerce ul.products li.product .price {
	color: var(--ink);
	font-family: var(--display);
	font-size: 1.4rem;
	padding: 0 16px;
}

.woocommerce ul.products li.product .button { margin-left: 16px; }

.woocommerce div.product .product_title { font-family: var(--display); font-weight: 400; }
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--ink); font-family: var(--display); font-size: 2rem; }

.woocommerce div.product div.images img { border: var(--line) solid var(--ink); box-shadow: var(--shadow); }

.woocommerce span.onsale {
	background: var(--magenta);
	border: var(--line) solid var(--ink);
	font-family: var(--display);
	font-weight: 400;
	line-height: 2.6;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border: var(--line) solid var(--ink);
	border-top-width: var(--line);
	background: var(--sky);
	color: var(--ink);
}

.woocommerce-message::before, .woocommerce-info::before { color: var(--ink); }

.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.woocommerce form .form-row input.input-text {
	border: 2px solid var(--ink);
	border-radius: 0;
	padding: 10px 12px;
	font-family: var(--body);
	font-size: 1rem;
}

/* Course covers from the sample pages */
.course__art--cover { background: var(--paper); }
.course__art--cover img,
.course__art img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.woocommerce ul.products li.product .course__art--cover { aspect-ratio: 4 / 5; border-bottom: var(--line) solid var(--ink); }
.woocommerce div.product div.images .course__art--cover { aspect-ratio: auto; }
.woocommerce div.product div.images .course__art--cover img { height: auto; }

/* ---------- What's inside + samples ---------- */
.c1k-inside {
	clear: both;
	padding: 48px 0 24px;
	border-top: var(--line) solid var(--ink);
	margin-top: 32px;
}

.c1k-inside h2 { margin-top: 1.3em; }
.c1k-inside__intro { max-width: 72ch; }
.c1k-inside__intro p { font-size: 1.2rem; }
.c1k-ar { font-size: 1.15rem; line-height: 1.9; }

.c1k-facts {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.c1k-facts li {
	background: var(--sun);
	border: var(--line) solid var(--ink);
	padding: 4px 12px;
	font-weight: 700;
}

.c1k-includes { max-width: 72ch; padding-left: 1.2em; }
.c1k-includes li { margin-bottom: 0.5em; }
.c1k-includes li::marker { color: var(--magenta); }

.c1k-sample-title { font-weight: 700; font-size: 1.15rem; }

.c1k-media {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 28px;
	align-items: start;
	margin: 24px 0 32px;
}

.c1k-pages {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.c1k-panel {
	margin: 0;
	background: var(--paper);
	border: var(--line) solid var(--ink);
	box-shadow: var(--shadow);
}

.c1k-panel img,
.c1k-panel video { display: block; width: 100%; height: auto; background: var(--ink); }
.c1k-pages .c1k-panel img { aspect-ratio: 3 / 4; object-fit: contain; object-position: center; background: var(--paper); }
.c1k-panel a { display: block; border-bottom: var(--line) solid var(--ink); }
.c1k-panel--video video { border-bottom: var(--line) solid var(--ink); max-height: 640px; }

.c1k-panel--audio {
	padding: 28px 20px 0;
	text-align: center;
}
.c1k-panel--audio .bubble { margin-bottom: 34px; }
.c1k-panel--audio audio { width: 100%; margin-bottom: 14px; }
.c1k-panel--audio figcaption { margin: 0 -20px; }

.c1k-panel figcaption {
	padding: 10px 14px;
	font-weight: 700;
	font-size: 1rem;
	background: var(--paper);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.hero .wrap { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 48px; }
	.hero__panel { max-width: 460px; width: 100%; }
	.strip { grid-template-columns: 1fr 1fr; }
	.next-issue { grid-template-columns: 1fr; }
	.c1k-media { grid-template-columns: 1fr; }
	.c1k-pages { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
	body { font-size: 1.05rem; }
	.section { padding: 52px 0; }
	.strip { grid-template-columns: 1fr; }
	.brand__mark { font-size: 1.7rem; }
	.hero__panel { box-shadow: 6px 6px 0 var(--ink); }
	.courses { gap: 24px; }
}

/* ---------- Readability: all writing sits in a solid caption box ---------- */
:root { --caption: #fffbe6; }

main.site-main :is(p, li, h1, h2, h3, h4, figcaption) {
	background: var(--caption);
	color: var(--ink);
	border: 2px solid var(--ink);
	padding: 0.3em 0.7em;
	box-shadow: 3px 3px 0 var(--ink);
}

main.site-main :is(h1, h2, h3, h4) {
	display: inline-block;
	max-width: 100%;
	line-height: 1.15;
	margin-top: 0.4em;
}

main.site-main li { margin-bottom: 0.6em; }

/* Blocks that already have their own solid background keep it */
main.site-main :is(.course, .strip__panel, .next-issue__card, .c1k-panel) :is(p, li, h1, h2, h3, h4, figcaption),
main.site-main .woocommerce ul.products li.product :is(p, li, h1, h2, h3, h4, span, a) {
	background: transparent;
	border: 0;
	padding: 0;
	box-shadow: none;
}
main.site-main :is(.course, .strip__panel, .next-issue__card) :is(h3) { display: block; }
main.site-main .course h3 { margin-top: 0; }
main.site-main .strip__panel p,
main.site-main .next-issue__card p,
main.site-main .course__body p,
main.site-main .yt-band p { margin-bottom: 0.6em; }
main.site-main .c1k-facts li {
	background: var(--sun);
	border: var(--line) solid var(--ink);
	box-shadow: none;
	padding: 4px 12px;
	margin: 0;
}
main.site-main p:has(> .btn),
main.site-main p:has(> a.button) {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
}
main.site-main .woocommerce ul.products li.product {
	background: #ffffff;
	border: var(--line) solid var(--ink);
	padding: 0 0 18px;
}
main.site-main .woocommerce ul.products li.product .woocommerce-loop-product__title {
	background: transparent;
	border: 0;
	display: block;
	padding: 0 16px;
	box-shadow: none;
}

/* WooCommerce tables, forms, breadcrumbs and tabs */
main.site-main :is(.woocommerce-breadcrumb, .woocommerce-result-count, .woocommerce-tabs, .woocommerce-Tabs-panel, .summary, table, .cart_totals, .woocommerce-cart-form, form.checkout, .woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content, .woocommerce-form-login, .woocommerce-form-register, .woocommerce-ordering) {
	background: #ffffff;
	border: 2px solid var(--ink);
	padding: 12px 14px;
	color: var(--ink);
}
main.site-main .woocommerce table th,
main.site-main .woocommerce table td { background: transparent; border-color: var(--ink); }
main.site-main .woocommerce-tabs ul.tabs li a { font-weight: 700; }

/* Caption boxes for the course page sections */
main.site-main .c1k-inside .c1k-sample-title { display: inline-block; }

/* Buy one part of a course */
.c1k-formats { margin: 22px 0 0; padding: 16px; background: var(--paper); border: var(--line) solid var(--ink); box-shadow: var(--shadow); }
.c1k-formats h3 { margin: 0 0 12px; font-family: var(--display); font-size: 1.4rem; }
.c1k-formats__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c1k-formats__btn { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: var(--sun); color: var(--ink); border: var(--line) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); text-decoration: none; font-weight: 700; }
.c1k-formats__btn:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 560px) { .c1k-formats__grid { grid-template-columns: 1fr; } }

/* Four one-line part buttons under each course card */
.c1k-parts { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-top: var(--line) solid var(--ink); }
.c1k-parts__btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; background: var(--sun); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; line-height: 1.2; white-space: nowrap; box-sizing: border-box; }
.c1k-parts__btn:hover { background: var(--ink); color: var(--paper); }
.c1k-parts__icon svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 4; stroke-linejoin: round; }
.c1k-parts__name { flex: 1; min-width: 0; line-height: 1.15; }
.c1k-parts__price { white-space: nowrap; }
.c1k-parts__btn { white-space: normal; }
.woocommerce ul.products li.product .c1k-parts { padding: 10px 0 0; border-top: 0; }

/* Hero poster replaces the greeting squares; heading kept for screen readers only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero__poster { display: block; width: 100%; height: auto; border: var(--line) solid var(--ink); box-shadow: 10px 10px 0 var(--ink); background: var(--paper); }
