/*
Theme Name: Mike Hotel
Theme URI: https://example.com/
Author: Mike Hotel
Description: Motyw blokowy serwisu Mike Hotel (SP-MH) – darmowa nauka teorii do PPL(A) i SPL. Styl premium „niebieska godzina”, bez Elementora, gotowy na WooCommerce. Działa z wtyczką „Mike Hotel – Nauka” (symulatory i testy).
Version: 1.6.3
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mikehotel
Tags: block-theme, full-site-editing, e-commerce, education
*/

/* ---------- Typografia pomocnicza ---------- */
.mh-label,
.is-style-mh-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-2);
}
.has-ink-background-color .mh-label,
.has-ink-background-color .is-style-mh-label,
.wp-block-cover .mh-label,
.wp-block-cover .is-style-mh-label,
.mh-on-dark .mh-label {
	color: var(--wp--preset--color--label-dark);
}
.mh-lead {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 300;
	line-height: 1.6;
}
.mh-mono,
.mh-meta {
	font-family: var(--wp--preset--font-family--mono);
}
.mh-meta {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-family: inherit;
	color: var(--wp--preset--color--ink-2);
}
.mh-stat {
	font-size: 48px;
	font-weight: 300;
	line-height: 1;
	letter-spacing: -0.02em;
}

/* ---------- Przyciski ---------- */
.wp-block-button.is-style-mh-white .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--ink);
}
.wp-block-button.is-style-mh-white .wp-block-button__link:hover {
	background: var(--wp--preset--color--on-dark);
	color: var(--wp--preset--color--ink);
}
.wp-block-button.is-style-mh-ink .wp-block-button__link {
	background: var(--wp--preset--color--ink);
	color: #fff;
}
.wp-block-button.is-style-mh-link .wp-block-button__link {
	background: transparent;
	color: inherit;
	padding: 6px 0;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 6px;
}
.wp-block-button.is-style-mh-link .wp-block-button__link:hover {
	background: transparent;
	text-decoration-thickness: 2px;
}

/* ---------- Nagłówek ---------- */
.mh-header {
	color: #fff;
}
.mh-header a {
	color: #fff;
	text-decoration: none;
}
.mh-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--label-dark);
}
.mh-header .mh-brand {
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
}
.mh-header .mh-brand img {
	width: 64px;
	height: 64px;
	display: block;
	border-radius: 50%;
	/* jasny pierścień i poświata: naszywka nie zlewa się z ciemnym nagłówkiem */
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 18px rgba(37, 99, 201, 0.55);
}
@media (max-width: 600px) {
	.mh-header .mh-brand img {
		width: 52px;
		height: 52px;
	}
}
.mh-header .mh-brand-name {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}
.mh-header .mh-brand-name strong {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.32em;
}
.mh-header .mh-brand-name small {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--wp--preset--color--on-dark-2);
}
.mh-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--ink);
	color: #fff;
	padding: 32px;
}
.mh-header .wc-block-mini-cart__button {
	color: #fff;
}
/* Nagłówek na zdjęciu hero (strona startowa) */
.mh-header-overlay {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 20;
}
.mh-header-overlay .mh-header {
	background: transparent !important;
}
body.admin-bar .mh-header-overlay {
	top: var(--wp-admin--admin-bar--height, 32px);
}
.mh-front {
	position: relative;
}
@media (max-width: 781px) {
	.mh-header .mh-header-actions .mh-hide-mobile {
		display: none;
	}
}

/* ---------- Hero ---------- */
.mh-hero.wp-block-cover {
	min-height: max(820px, 100svh) !important;
}
.mh-hero .wp-block-cover__image-background {
	object-position: 50% 60%;
}
.mh-hero h1 {
	max-width: 14ch;
	margin-inline: auto;
}
.mh-hero .mh-lead {
	max-width: 40ch;
	margin-inline: auto;
	color: var(--wp--preset--color--on-dark);
}

/* ---------- Media i karty ---------- */
.mh-ratio-4-3 img,
.mh-ratio-3-2 img,
.mh-ratio-1-1 img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.mh-ratio-4-3 img { aspect-ratio: 4 / 3; }
.mh-ratio-3-2 img { aspect-ratio: 3 / 2; }
.mh-ratio-1-1 img { aspect-ratio: 1 / 1; }
.mh-card a {
	text-decoration: none;
	color: inherit;
}
.mh-card a:hover h3 {
	text-decoration: underline;
}
.mh-placeholder {
	aspect-ratio: 1 / 1;
	background: linear-gradient(180deg, #14315e, #a9c7f0);
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 10px !important;
}
.mh-placeholder p {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	padding: 4px 8px;
	margin: 0;
}
.mh-links {
	border-top: 1px solid var(--wp--preset--color--hair);
	padding-top: 32px;
}

/* ---------- Ramki w lekcjach ---------- */
.mh-callout {
	padding: 20px 24px !important;
	margin-block: 28px !important;
}
.mh-zapamietaj {
	background: #eaf0f8;
}
.mh-czesty-blad {
	background: #fdecec;
}
.mh-callout__label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	margin-bottom: 6px !important;
}
.mh-czesty-blad .mh-callout__label {
	color: var(--wp--preset--color--warn);
}
.mh-callout > *:last-child {
	margin-bottom: 0;
}

/* ---------- Treść stron ---------- */
.mh-page-header {
	background: radial-gradient(120% 140% at 50% 120%, #2a5a9a 0%, rgba(42, 90, 154, 0) 55%), linear-gradient(180deg, #070f1e 0%, #0e2141 60%, #163566 100%);
	color: #fff;
	padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px);
	margin-block-start: 0;
	margin-block-end: clamp(40px, 6vw, 72px);
	position: relative;
	overflow: hidden;
}
/* Delikatna linia horyzontu, jak na zdjęciu w hero */
.mh-page-header::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(169, 199, 240, .55), transparent);
}
.mh-page-header .mh-label,
.mh-page-header .mh-breadcrumb { color: var(--wp--preset--color--label-dark); margin: 0 0 18px; }
.mh-breadcrumb a { color: inherit; text-decoration: none; }
.mh-breadcrumb a:hover { color: #fff; }
.mh-breadcrumb span[aria-hidden] { margin-inline: .7em; opacity: .6; }
.mh-page-header .mh-page-title {
	color: #fff;
	font-size: clamp(34px, 5vw, 56px);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.08;
	margin: 0;
	text-wrap: balance;
}
.mh-page-header .mh-meta { color: var(--wp--preset--color--on-dark-2); margin-top: 16px; }
.mh-page-header .mh-label a { color: inherit; }
.entry-content > h2,
.wp-block-post-content > h2 {
	font-size: clamp(28px, 3vw, 36px);
	margin-top: 2.4em;
}
.entry-content > h3,
.wp-block-post-content > h3 {
	font-size: 22px;
	margin-top: 1.8em;
}

/* ---------- WooCommerce: spójne z paletą ---------- */
.woocommerce .wc-block-components-button,
.wc-block-components-button:not(.is-link) {
	border-radius: 2px;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 13px;
	font-weight: 600;
}
.wc-block-components-product-badge,
.wc-block-grid__product-onsale {
	border-radius: 2px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}

/* ---------- Dostępność i ruch ---------- */
:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		transition-duration: 0ms !important;
		animation-duration: 0ms !important;
	}
}

/* Pasek liczb: 2×2 na telefonie */
@media (max-width: 781px) {
	.mh-stats.wp-block-columns {
		flex-wrap: wrap !important;
		row-gap: 32px;
	}
	.mh-stats.wp-block-columns > .wp-block-column {
		flex-basis: calc(50% - 16px) !important;
	}
}
.mh-footer ul {
	list-style: none;
}
.mh-footer li {
	margin: 0 0 10px;
}
.mh-card .wp-block-image img {
	width: 100%;
}
/* Sekcje stykają się bez białych przerw; stopka bez odstępu */
.wp-site-blocks > footer,
.wp-site-blocks > .mh-front + * {
	margin-block-start: 0;
}

/* Tabele i kod w lekcjach */
.wp-block-table.mh-table { margin-block: 28px; overflow-x: auto; }
.wp-block-table.mh-table table { table-layout: auto; border-collapse: collapse; font-size: 15px; line-height: 1.5; width: 100%; }
.wp-block-table.mh-table th,
.wp-block-table.mh-table td { border: 1px solid var(--wp--preset--color--hair); padding: 10px 14px; text-align: left; vertical-align: top; }
.wp-block-table.mh-table thead { border-bottom: 0; }
.wp-block-table.mh-table thead th { background: var(--wp--preset--color--mist); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--ink-2); border-bottom: 2px solid var(--wp--preset--color--ink); }
.wp-block-table.mh-table td:first-child { white-space: nowrap; }
@media (max-width: 640px) { .wp-block-table.mh-table td:first-child { white-space: normal; } .wp-block-table.mh-table th, .wp-block-table.mh-table td { padding: 8px 10px; } }
.wp-block-post-content :where(p, li, td) > code,
.wp-block-post-content :where(p, li, td) > strong > code { background: var(--wp--preset--color--mist); border-radius: 4px; padding: 1px 5px; font-size: .9em; }
.wp-block-post-content .wp-block-code { font-size: 14px; white-space: pre-wrap; }
.wp-block-table.mh-table th, .wp-block-table.mh-table td { overflow-wrap: normal; word-break: normal; }
.wp-block-table.mh-table-wide table { min-width: 640px; }

/* Bloki do czytania – węższe niż „wide”, szersze niż tekst */
.wp-block-post-content > .mh-block-quiz.alignwide,
.wp-block-post-content > .mh-block-metar.alignwide { max-width: 960px; }

/* ---------- Teoria: karty przedmiotów ---------- */
.mh-subjects { gap: 20px; margin-block: 40px 48px; }
.mh-subject-card {
	border: 1px solid var(--wp--preset--color--hair);
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fff;
	transition: border-color .15s ease, transform .15s ease;
}
.mh-subject-card:hover { border-color: var(--wp--preset--color--ink); }
.mh-subject-card > * { margin: 0 !important; }
.mh-subject-card .mh-meta { color: var(--wp--preset--color--accent); font-size: 13px; letter-spacing: .1em; }
.mh-subject-card h3 { font-size: 21px; line-height: 1.25; }
.mh-subject-lessons { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.mh-subject-lessons a { color: var(--wp--preset--color--ink); text-decoration-color: var(--wp--preset--color--accent); text-underline-offset: 3px; }
.mh-subject-lessons a::after { content: " →"; color: var(--wp--preset--color--accent); }
.mh-soon { color: var(--wp--preset--color--ink-2); font-size: 15px; }
.wp-site-blocks > main { margin-block-start: 0; }

/* ---------- Karty egzaminów PPL(A) / SPL (sekcja „Nauka do egzaminu”) ---------- */
.mh-exam-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 24px;
}
.mh-exam {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 28px;
	border: 1px solid var(--wp--preset--color--hair);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(11, 15, 20, 0.06);
}
.mh-exam__head {
	display: flex;
	align-items: center;
	gap: 16px;
}
.mh-exam__thumb {
	width: 64px;
	height: 64px;
	flex: none;
	border-radius: 14px;
	object-fit: cover;
}
.mh-exam__kicker {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.mh-exam__title {
	margin: 2px 0 0;
	font-size: 34px;
	line-height: 1.1;
	letter-spacing: -0.01em;
}
.mh-exam__sub {
	margin: 2px 0 0;
	color: var(--wp--preset--color--ink-2);
	font-size: 15px;
}
.mh-exam__stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mh-exam__stats li {
	display: flex;
	flex-direction: column;
	padding: 12px;
	border-radius: 10px;
	background: var(--wp--preset--color--mist);
}
.mh-exam__stats strong {
	font-size: 22px;
	line-height: 1.2;
}
.mh-exam__stats span {
	font-size: 12px;
	color: var(--wp--preset--color--ink-2);
	line-height: 1.3;
}
.mh-exam__preview {
	padding: 18px;
	border-radius: 12px;
	background: var(--wp--preset--color--ink);
	color: #fff;
}
.mh-exam__meta {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--label-dark);
}
.mh-exam__q {
	margin: 10px 0 12px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}
.mh-exam__opts {
	display: grid;
	gap: 6px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}
.mh-exam__opts li {
	display: flex;
	justify-content: space-between;
	padding: 9px 12px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	font-size: 14px;
	color: var(--wp--preset--color--on-dark);
}
.mh-exam__opts li.is-ok {
	border-color: #2f9e62;
	background: rgba(47, 158, 98, 0.18);
	color: #fff;
}
.mh-exam__opts li span {
	color: #5fd38f;
	font-weight: 700;
}
.mh-exam__progress {
	height: 6px;
	margin-bottom: 8px;
	border-radius: 99px;
	background: rgba(255, 255, 255, 0.15);
	overflow: hidden;
}
.mh-exam__progress span {
	display: block;
	height: 100%;
	border-radius: 99px;
	background: var(--wp--preset--color--label-dark);
}
.mh-exam__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	margin-top: auto;
}
.mh-exam__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 28px;
	border-radius: 10px;
	background: var(--wp--preset--color--accent);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
}
.mh-exam__btn:hover {
	background: var(--wp--preset--color--accent-dark);
}
.mh-exam__link {
	color: var(--wp--preset--color--ink) !important;
	font-weight: 600;
	text-decoration: none;
}
@media (max-width: 600px) {
	.mh-exam {
		padding: 20px;
		gap: 18px;
	}
	.mh-exam__title {
		font-size: 28px;
	}
	.mh-exam__btn {
		width: 100%;
	}
	.mh-exam__progress + .mh-exam__meta span:last-child {
		display: none;
	}
}
