/*
 * Rules theme.json cannot express. Keep this file small; tokens belong in theme.json.
 */

/* Visible keyboard focus everywhere (WCAG 2.4.7). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--acelkek);
	outline-offset: 2px;
}

.has-grafit-background-color :where(a, button, input, summary):focus-visible {
	outline-color: var(--wp--preset--color--sarga);
}

/* Minimum touch target (FELADAT 5.2). */
.wp-element-button,
.wp-block-navigation-item__content,
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close,
.wp-block-search__button {
	min-height: var(--wp--custom--touch-target);
	min-width: var(--wp--custom--touch-target);
}

.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none;
}

/* Four-colour stripe: the four vehicles of the logo (FELADAT 5.3). */
.jmbsz-csik {
	display: flex;
	height: var(--wp--custom--stripe-height);
	margin: 0;
}

.jmbsz-csik > * {
	flex: 1;
	margin: 0 !important;
}

/* Card group style. */
.wp-block-group.is-style-kartya {
	background: var(--wp--preset--color--feher);
	border: 1px solid var(--wp--preset--color--keret);
	border-radius: var(--wp--custom--radius--card);
	overflow: hidden;
}

/* Two-line excerpt on news cards (FELADAT 5.5/4). */
.jmbsz-kivonat-2-sor .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Header: hide secondary items on small screens (mobile mockup 02). */
@media (max-width: 781px) {
	.jmbsz-fejlec__teljes-nev,
	.jmbsz-fejlec__belepes,
	.jmbsz-fejlec__kereses {
		display: none !important;
	}
}

/* Never allow horizontal scrolling between 320 and 1440 px (FELADAT 8). */
html,
body {
	overflow-x: clip;
}

img,
video {
	max-width: 100%;
	height: auto;
}

iframe,
embed {
	max-width: 100%;
}

.wp-block-table {
	overflow-x: auto;
}

/* Lists without bullets (footer, quick links). */
.jmbsz-lista-jel-nelkul {
	list-style: none;
}

/* Category label pill on cards. */
.jmbsz-cimke a,
.jmbsz-legfrissebb {
	display: inline-block;
	padding: 3px 10px;
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--grafit);
	color: var(--wp--preset--color--feher);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}

.jmbsz-legfrissebb {
	display: none;
	margin: 0;
	background: var(--wp--preset--color--sarga);
	color: var(--wp--preset--color--grafit);
}

/* News list: highlight the newest post on page 1 only. */
body:not(.paged) .jmbsz-hirlista .wp-block-post:first-child {
	grid-column: 1 / -1;
}

body:not(.paged) .jmbsz-hirlista .wp-block-post:first-child .jmbsz-hirkartya {
	display: flex;
	flex-wrap: wrap;
	border-radius: 18px;
}

body:not(.paged) .jmbsz-hirlista .wp-block-post:first-child .jmbsz-hirkartya__kep {
	flex: 1 1 360px;
	min-width: 0;
}

body:not(.paged) .jmbsz-hirlista .wp-block-post:first-child .jmbsz-hirkartya__szoveg {
	flex: 1 1 300px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 32px !important;
}

body:not(.paged) .jmbsz-hirlista .wp-block-post:first-child .jmbsz-legfrissebb {
	display: inline-block;
}

body:not(.paged) .jmbsz-hirlista .wp-block-post:first-child .wp-block-post-title {
	font-size: clamp(24px, 3vw, 30px) !important;
}

/* Category filter pills (news header band). */
.jmbsz-szuro {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.jmbsz-szuro__elem {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	padding: 0 18px;
	border: 1.5px solid #5A616B;
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--feher) !important;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.jmbsz-szuro__elem[aria-current="page"] {
	border-color: var(--wp--preset--color--sarga);
	background: var(--wp--preset--color--sarga);
	color: var(--wp--preset--color--grafit) !important;
	font-weight: 700;
}

/* Pagination buttons. */
.jmbsz-lapozo .page-numbers,
.jmbsz-lapozo .wp-block-query-pagination-previous,
.jmbsz-lapozo .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wp--custom--touch-target);
	min-height: var(--wp--custom--touch-target);
	padding: 0 14px;
	border: 1px solid #C7CDD3;
	border-radius: 10px;
	color: var(--wp--preset--color--grafit);
	font-weight: 600;
	text-decoration: none;
}

.jmbsz-lapozo .page-numbers.current {
	border-color: var(--wp--preset--color--grafit);
	background: var(--wp--preset--color--grafit);
	color: var(--wp--preset--color--feher);
	font-weight: 700;
}

/* Monthly archive list. */
.jmbsz-archivum {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jmbsz-archivum a {
	display: block;
	padding: 8px 0;
	border-bottom: 1px solid #EEF0F3;
	text-decoration: none;
}

/* Hero: large logo on a dark circle. */
.jmbsz-hos__kor {
	width: min(440px, 100%);
	aspect-ratio: 1 / 1;
	margin-inline: auto;
	border-radius: var(--wp--custom--radius--pill);
}

.jmbsz-hos__logo {
	width: 86%;
	margin: 0;
}

.jmbsz-hos__logo img {
	width: 100%;
}

@media (max-width: 781px) {
	.jmbsz-hos .wp-block-columns {
		flex-direction: column-reverse;
	}

	.jmbsz-hos__kor {
		width: 190px;
		background: transparent !important;
	}

	.jmbsz-hos .wp-block-button,
	.jmbsz-hos .wp-block-button__link {
		width: 100%;
	}
}

/* Fee bar. */
.jmbsz-tagdij-sav__kicsi {
	color: var(--wp--preset--color--szoveg-halvany);
	font-size: 19px;
	font-weight: 600;
}

/* Ticked list. */
.jmbsz-pipas-lista {
	margin: 0;
	padding: 0;
	list-style: none;
	font-weight: 600;
	color: #2B2F36;
}

.jmbsz-pipas-lista li {
	position: relative;
	padding-left: 28px;
}

.jmbsz-pipas-lista li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.25em;
	width: 20px;
	height: 20px;
	background: no-repeat center / 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A6C99' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
}

.jmbsz-pipas-lista--sor {
	display: flex;
	flex: 1 1 520px;
	flex-wrap: wrap;
	gap: 10px 28px;
}

/* Benefit cards: top border in a vehicle colour. */
.jmbsz-elonykartya {
	border-top-width: 4px !important;
}

.jmbsz-felso-keret-piros { border-top-color: var(--wp--preset--color--piros) !important; }
.jmbsz-felso-keret-ezust { border-top-color: var(--wp--preset--color--ezust) !important; }
.jmbsz-felso-keret-sarga { border-top-color: var(--wp--preset--color--sarga) !important; }
.jmbsz-felso-keret-buszacel { border-top-color: var(--wp--preset--color--buszacel) !important; }

.jmbsz-ikon-doboz {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 12px;
	border-radius: 12px;
	background: var(--wp--preset--color--ikon-hatter);
}

/* Arrow link. */
.jmbsz-nyil-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: var(--wp--custom--touch-target);
	text-decoration: none;
}

/* Numbered steps. */
.jmbsz-lepesek {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: jmbsz-lepes;
	font-weight: 600;
	color: var(--wp--preset--color--grafit);
}

.jmbsz-lepesek li {
	padding-top: 20px;
	border-top: 4px solid var(--wp--preset--color--grafit);
	counter-increment: jmbsz-lepes;
}

.jmbsz-lepesek li::before {
	content: counter(jmbsz-lepes);
	display: block;
	margin-bottom: 8px;
	color: var(--wp--preset--color--acelkek);
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 40px;
	font-weight: 800;
	line-height: 1.2;
}

/* Member quick links. */
.jmbsz-gyorslinkek {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jmbsz-gyorslinkek a {
	display: flex;
	box-sizing: border-box; /* height: 100% includes the padding, so tiles never overlap the next row */
	flex-direction: column;
	gap: 12px;
	height: 100%;
	padding: 20px;
	border: 1px solid var(--wp--preset--color--keret);
	border-radius: var(--wp--custom--radius--card-small);
	background: var(--wp--preset--color--feher);
	color: var(--wp--preset--color--grafit);
	font-weight: 700;
	text-decoration: none;
}

.jmbsz-gyorslinkek a:hover {
	border-color: var(--wp--preset--color--acelkek);
}

/* Partner names. */
.jmbsz-partnerek {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jmbsz-partnerek li {
	padding: 12px 20px;
	border: 1px solid #D3D8DD;
	border-radius: 10px;
	color: #3A3F47;
	font-weight: 600;
}

/* Membership page: price card facts. */
.jmbsz-tenyek {
	display: grid;
	gap: 10px;
	margin: 8px 0 16px;
}

.jmbsz-tenyek > div {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--wp--preset--color--keret);
}

.jmbsz-tenyek dt {
	color: var(--wp--preset--color--szoveg-halvany);
}

.jmbsz-tenyek dd {
	margin: 0;
	color: var(--wp--preset--color--grafit);
	font-weight: 700;
}

/* Vertical steps (membership page). */
.jmbsz-lepesek--fuggoleges {
	grid-template-columns: 1fr;
	gap: 16px;
}

.jmbsz-lepesek--fuggoleges li {
	display: flex;
	gap: 16px;
	align-items: baseline;
	padding-top: 16px;
	border-top-width: 2px;
}

.jmbsz-lepesek--fuggoleges li::before {
	flex: none;
	margin: 0;
	font-size: 32px;
}

/* FAQ. */
.wp-block-details {
	background: var(--wp--preset--color--feher);
}

/* Keep display: list-item so the native disclosure marker stays visible. */
.wp-block-details summary {
	min-height: var(--wp--custom--touch-target);
	padding-block: 10px;
	color: var(--wp--preset--color--grafit);
	font-weight: 700;
	cursor: pointer;
}

/* The FAQ items are open by default: keep each answer close to its question. */
.wp-block-details > summary + * {
	margin-block-start: 4px;
}

/* Header layout fixes (Tamás' screenshot, 2026-10-28 19:01). */

/* No white gap between header stripe, main and footer. */
.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.jmbsz-fejlec__logo,
.jmbsz-fejlec__muveletek {
	flex: none;
}

.jmbsz-fejlec__teljes-nev {
	max-width: 15rem;
}

/*
 * The whole brand area (logo, "JMBSZ", full name) leads home through the logo's own link: its ::after
 * covers the group, so there is still one link for screen readers and keyboards, and the text looks
 * the same. The focus ring is drawn around the whole area.
 */
.jmbsz-fejlec__logo {
	position: relative;
}

.jmbsz-fejlec__logo .wp-block-image a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.jmbsz-fejlec__logo .wp-block-image a:focus-visible {
	outline: none;
}

.jmbsz-fejlec__logo .wp-block-image a:focus-visible::after {
	outline: 3px solid var(--wp--preset--color--acelkek);
	outline-offset: 4px;
}

.jmbsz-fomenu {
	flex: 1 1 auto;
	min-width: 0;
}

.jmbsz-fomenu .wp-block-navigation__container {
	flex-wrap: nowrap;
}

/* Menu labels and button labels never break inside a word. */
.wp-element-button,
.jmbsz-fomenu .wp-block-navigation-item__content,
.jmbsz-fejlec__belepes a {
	white-space: nowrap;
}

/* Header search: 44 x 44 outlined icon button (mockup), not the default dark button. */
.jmbsz-fejlec__kereses .wp-block-search__button {
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
	padding: 0;
	border: 1px solid #D3D8DD;
	border-radius: 10px;
	background: var(--wp--preset--color--feher);
	color: var(--wp--preset--color--grafit);
}

.jmbsz-fejlec__kereses .wp-block-search__button:hover,
.jmbsz-fejlec__kereses .wp-block-search__button:focus-visible {
	border-color: var(--wp--preset--color--grafit);
	background: var(--wp--preset--color--hatter);
	color: var(--wp--preset--color--grafit);
}

.jmbsz-fejlec__kereses .wp-block-search__button svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* 1200-1299 px: six menu items plus the actions only fit with tighter gaps (measured: 24 px gaps overlap the search button at 1200 px). */
@media (min-width: 1200px) and (max-width: 1299px) {
	.jmbsz-fomenu .wp-block-navigation__container {
		gap: var(--wp--preset--spacing--30) !important;
	}
}

@media (min-width: 1200px) and (max-width: 1249px) {
	.jmbsz-fomenu .wp-block-navigation__container {
		gap: var(--wp--preset--spacing--20) !important;
	}
}

/*
 * Below 1200 px the logo, five menu items, search, login and join button no longer fit in one row
 * (estimated content width ~1100 px + 2 x 24 px gutter; to be confirmed by browser measurement).
 */
@media (max-width: 1199px) {
	.jmbsz-fomenu .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.jmbsz-fomenu .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.jmbsz-fomenu {
		flex: none;
		order: 3;
	}

	.jmbsz-fejlec .jmbsz-fejlec__muveletek {
		margin-left: auto !important;
	}
}

/* Hamburger: 44 x 44 outlined button as in mockup 02. */
.jmbsz-fomenu .wp-block-navigation__responsive-container-open,
.jmbsz-fomenu .wp-block-navigation__responsive-container-close {
	align-items: center;
	justify-content: center;
	border: 1px solid #D3D8DD;
	border-radius: 10px;
	background: var(--wp--preset--color--feher);
	color: var(--wp--preset--color--grafit);
}

/* Small screens: compact header per mockup 02 (logo 60 x 46, smaller join button). */
@media (max-width: 781px) {
	.jmbsz-fejlec > .wp-block-group {
		gap: 10px !important;
	}

	.jmbsz-fejlec__logo {
		gap: 8px !important;
	}

	.jmbsz-fejlec__logo img {
		width: 60px !important;
		height: 46px !important;
	}

	.jmbsz-fejlec__logo .has-large-font-size {
		font-size: 20px !important;
	}

	.jmbsz-fejlec__muveletek .wp-block-button__link {
		padding: 10px 14px !important;
		font-size: 15px !important;
	}
}

/* Very narrow screens (below 360 px): the logo image carries the name (alt text), hide the wordmark. */
@media (max-width: 359px) {
	.jmbsz-fejlec__logo .has-large-font-size {
		display: none;
	}
}

/* Logo copies in boxes (footer, membership card, join box) and the hero. */
.jmbsz-logo-kicsi {
	margin: 0;
	line-height: 0;
}

.jmbsz-logo-kicsi.aligncenter {
	text-align: center;
}

.jmbsz-logo-kicsi img,
.jmbsz-hos__logo img {
	display: inline-block;
	max-width: 100%;
	height: auto;
}

/* Login and search inside the menu: only in the opened mobile menu (the header shows them on wide screens). */
.jmbsz-fomenu .wp-block-navigation__responsive-container:not(.is-menu-open) .jmbsz-csak-menuben {
	display: none !important;
}

@media (min-width: 782px) {
	.jmbsz-fomenu .jmbsz-csak-menuben {
		display: none !important;
	}
}

/* Opened mobile menu: left aligned, levels visible, large tap targets. */
.jmbsz-fomenu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start !important;
	padding: 72px 24px 32px;
}

.jmbsz-fomenu .is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	gap: 8px !important;
	width: 100%;
}

.jmbsz-fomenu .is-menu-open .wp-block-navigation-item {
	align-items: flex-start !important;
	width: 100%;
}

.jmbsz-fomenu .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
}

.jmbsz-fomenu .is-menu-open .wp-block-navigation__submenu-container {
	gap: 0 !important;
	padding: 0 0 8px 16px !important;
	border-left: 3px solid var(--wp--preset--color--keret);
}

.jmbsz-fomenu .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 6px 0 !important;
	font-weight: 400;
}

.jmbsz-fomenu .is-menu-open .wp-block-search {
	width: 100%;
	margin-top: 16px;
}

/* Long words and URLs in content never push the page wider than the screen. */
.wp-block-post-content {
	overflow-wrap: anywhere;
}

/* Submenu chevron vertically centred next to the label (desktop menu). */
.jmbsz-fomenu .wp-block-navigation__container > .wp-block-navigation-item.has-child {
	align-items: center;
}

.jmbsz-fomenu .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-icon {
	align-self: center;
	margin-top: 0;
}

.jmbsz-fomenu .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-icon {
	display: inline-flex;
	align-items: center;
	height: auto;
}

.jmbsz-fomenu .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-icon svg {
	display: block;
	margin-top: 0;
}

/* The open mobile overlay lists every submenu expanded, so no chevron there (core hides it, the rule above would bring it back). */
.jmbsz-fomenu .is-menu-open .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-icon {
	display: none;
}

/* Keep the label vertically centred inside the 44 px touch target, so the chevron lines up with it. */
.jmbsz-fomenu .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
}

/* Tablet widths: even rows instead of orphans (benefit cards 2 x 2, member links 2 x 2). */
@media (min-width: 600px) and (max-width: 1099px) {
	.jmbsz-elony-racs {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	/* Four member links: two rows of two (msg 233). */
	.jmbsz-gyorslinkek {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/*
 * Legacy content colour (staging review 2026-10-28): 46 posts/pages use the core "vivid-cyan-blue"
 * preset for body text and links. defaultPalette:false only hides it in the editor; WordPress still
 * prints the variable and the class rules. Map it to the theme text colour, and give links inside
 * those blocks the theme link colour. The other core colours in old content (vivid-red, vivid-purple)
 * were replaced in the content itself with theme colours (msg 182, csere-lista 12).
 */
body {
	--wp--preset--color--vivid-cyan-blue: var(--wp--preset--color--szoveg);
}

.wp-block-post-content .has-link-color:not(.has-background) a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--acelkek);
}

.wp-block-post-content .has-link-color:not(.has-background) a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--grafit);
}

/*
 * Contact line written as a heading in old content ("További tájékoztatás és információ: info@...", /online/):
 * a heading that holds a mailto link reads as body-sized bold text, not as a section title (Tamás, 2026-11-02).
 */
.wp-block-post-content :is(h2, h3, h4):has(a[href^="mailto:"]) {
	font-family: var(--wp--preset--font-family--source-sans-3);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0;
}

/*
 * YouTube click-to-load facade (inc/youtube.php, assets/js/yt-facade.js). Inside a core embed
 * block with an aspect ratio it fills the wrapper like the iframe would; elsewhere it keeps 16:9.
 */
.jmbsz-yt {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	container-type: inline-size;
	background: var(--wp--preset--color--grafit);
}

.wp-embed-responsive .wp-has-aspect-ratio .jmbsz-yt {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
}

.jmbsz-yt__link,
.jmbsz-yt__frame {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	color: #fff;
	text-decoration: none;
}

.jmbsz-yt__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--sarga);
	outline-offset: -3px;
}

.jmbsz-yt__thumb {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jmbsz-yt__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	line-height: 0;
}

.jmbsz-yt__play-bg {
	fill: #212121;
	fill-opacity: 0.85;
}

.jmbsz-yt__link:hover .jmbsz-yt__play-bg,
.jmbsz-yt__link:focus-visible .jmbsz-yt__play-bg {
	fill: var(--wp--preset--color--piros);
	fill-opacity: 1;
}

.jmbsz-yt__title {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	display: -webkit-box;
	overflow: hidden;
	padding: 12px 16px 28px;
	background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
	font-weight: 600;
	line-height: 1.3;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.jmbsz-yt__note {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 6px 12px;
	background: rgba(0, 0, 0, 0.8);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.35;
}

/* Narrow embeds (columns, phones): the title gives way to the play button, the note gets smaller. */
@container (max-width: 400px) {
	.jmbsz-yt__title {
		display: none;
	}

	.jmbsz-yt__note {
		padding: 4px 8px;
		font-size: 12px;
	}
}

/*
 * Episode cards on the Tamások Asztala podcast page (msg 210): image beside the text on wider screens,
 * stacked on phones. Fixed image column and aspect ratio, so every card has the same height.
 */
.jmbsz-adas-kartya {
	display: grid;
	grid-template-columns: 360px minmax(0, 1fr);
	align-items: center;
}

.jmbsz-adas-kartya > .wp-block-post-featured-image {
	align-self: stretch;
}

.jmbsz-adas-kartya > .wp-block-post-featured-image a,
.jmbsz-adas-kartya > .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 232px;
	aspect-ratio: 730 / 470;
	object-fit: cover;
}

@media (min-width: 600px) and (max-width: 1099px) {
	.jmbsz-adas-kartya {
		grid-template-columns: 280px minmax(0, 1fr);
	}

	.jmbsz-adas-kartya > .wp-block-post-featured-image a,
	.jmbsz-adas-kartya > .wp-block-post-featured-image img {
		min-height: 180px;
	}
}

@media (max-width: 599px) {
	.jmbsz-adas-kartya {
		grid-template-columns: minmax(0, 1fr);
	}

	.jmbsz-adas-kartya > .wp-block-post-featured-image a,
	.jmbsz-adas-kartya > .wp-block-post-featured-image img {
		height: auto;
		min-height: 0;
	}
}

/* Cookie consent banner (msg 214): bottom card in the theme colours; both choices equally prominent. */
.jmbsz-suti {
	position: fixed;
	right: 16px;
	bottom: 16px;
	left: 16px;
	z-index: 1000;
	max-width: 1240px;
	margin: 0 auto;
	padding: 24px 28px;
	border-top: 5px solid var(--wp--preset--color--sarga);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--grafit);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
	color: var(--wp--preset--color--feher);
	font-size: 16px;
	line-height: 1.55;
}

.jmbsz-suti[hidden] {
	display: none;
}

/* With the settings open the banner can be taller than a small screen: it scrolls inside. */
.jmbsz-suti {
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.jmbsz-suti__belso {
	display: flex;
	flex-wrap: wrap;
	gap: 20px 32px;
	align-items: center;
}

.jmbsz-suti__szoveg {
	flex: 1 1 520px;
}

.jmbsz-suti__cim {
	margin: 0 0 6px;
	color: var(--wp--preset--color--feher);
	font-size: 19px;
}

.jmbsz-suti__szoveg p {
	margin: 0;
	color: var(--wp--preset--color--sotet-halvany);
}

.jmbsz-suti__szoveg a {
	color: var(--wp--preset--color--feher);
	text-decoration: underline;
}

.jmbsz-suti__gombok {
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	gap: 12px;
}

.jmbsz-suti__gomb {
	min-height: var(--wp--custom--touch-target);
	padding: 11px 22px;
	border: 2px solid var(--wp--preset--color--sarga);
	border-radius: var(--wp--custom--radius--button-small);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.jmbsz-suti__gomb--elfogad {
	background: var(--wp--preset--color--sarga);
	color: var(--wp--preset--color--grafit);
}

.jmbsz-suti__gomb--szukseges {
	border-color: var(--wp--preset--color--feher);
	background: transparent;
	color: var(--wp--preset--color--feher);
}

.jmbsz-suti__gomb:hover {
	filter: brightness(1.08);
}

.jmbsz-suti__gomb--szukseges:hover,
.jmbsz-suti__gomb--beallitas:hover {
	background: rgba(255, 255, 255, 0.1);
}

.jmbsz-suti__gomb--beallitas {
	border-color: var(--wp--preset--color--feher);
	background: transparent;
	color: var(--wp--preset--color--feher);
}

/* Settings panel: the two categories and the save button (msg 220, 226). */
.jmbsz-suti__panel {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #2E333B;
}

.jmbsz-suti__panel[hidden] {
	display: none;
}

.jmbsz-suti__kategoriak {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 12px 24px;
	margin: 0 0 20px;
	padding: 0;
	border: 0;
}

.jmbsz-suti__kategoria {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	color: var(--wp--preset--color--sotet-halvany);
	cursor: pointer;
}

.jmbsz-suti__kategoria strong {
	display: block;
	color: var(--wp--preset--color--feher);
}

.jmbsz-suti__kategoria input {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 2px 0 0;
	accent-color: var(--wp--preset--color--sarga);
	cursor: pointer;
}

.jmbsz-suti__kategoria input:disabled {
	cursor: default;
}

.jmbsz-suti__kategoria input:focus-visible {
	outline: 3px solid var(--wp--preset--color--sarga);
	outline-offset: 2px;
}

.jmbsz-suti__gomb--mentes {
	background: var(--wp--preset--color--sarga);
	color: var(--wp--preset--color--grafit);
}

.jmbsz-suti__gomb:focus-visible,
.jmbsz-suti__szoveg a:focus-visible {
	outline: 3px solid var(--wp--preset--color--sarga);
	outline-offset: 3px;
}

@media (max-width: 599px) {
	.jmbsz-suti {
		right: 8px;
		bottom: 8px;
		left: 8px;
		max-height: calc(100vh - 16px);
		padding: 20px;
		font-size: 15px;
	}

	.jmbsz-suti__gombok {
		flex: 1 1 100%;
		flex-direction: column;
	}

	.jmbsz-suti__gomb {
		width: 100%;
	}
}

/* Visually hidden text for screen readers (the block theme has no classic stylesheet that would provide it). */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/*
 * Law library page (msg 232): section cards with the documents as tidy rows. The core File blocks stay as they are;
 * only their look changes. A PDF mark before each title, the download button on the right, on phones too.
 */
.jmbsz-jogtar-szakasz h2 {
	font-size: var(--wp--preset--font-size--large);
}

.jmbsz-jogtar-lista > .wp-block-file {
	display: flex;
	font-size: var(--wp--preset--font-size--base); /* core shrinks the File block to 0.8em */
	gap: 12px 20px;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid var(--wp--preset--color--keret);
}

.jmbsz-jogtar-lista > .wp-block-file:last-child {
	border-bottom: 0;
}

.jmbsz-jogtar-lista > .wp-block-file > a:first-child {
	position: relative;
	padding-left: 34px;
	color: var(--wp--preset--color--szoveg) !important;
	font-weight: 600;
	line-height: 1.45;
	text-decoration: none;
}

.jmbsz-jogtar-lista > .wp-block-file > a:first-child:hover {
	color: var(--wp--preset--color--acelkek) !important;
	text-decoration: underline;
}

.jmbsz-jogtar-lista > .wp-block-file > a:first-child::before {
	position: absolute;
	top: 0.05em;
	left: 0;
	width: 22px;
	height: 22px;
	content: "";
	background: no-repeat center / 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9302C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 13h6M9 17h4'/%3E%3C/svg%3E");
}

.jmbsz-jogtar-lista > .wp-block-file > .wp-block-file__button {
	flex: none;
	margin: 0;
	padding: 8px 18px;
	border-radius: var(--wp--custom--radius--button-small);
	font-size: 15px;
	white-space: nowrap;
}

@media (max-width: 599px) {
	.jmbsz-jogtar-szakasz {
		padding-right: 20px !important;
		padding-left: 20px !important;
	}

	.jmbsz-jogtar-lista > .wp-block-file {
		font-size: 16px;
	}

	.jmbsz-jogtar-lista > .wp-block-file > .wp-block-file__button {
		padding: 8px 12px;
		font-size: 14px;
	}
}

/*
 * Coffee pages (msg 234, 235): one look for both. Media & Text blocks and the video/image columns become theme cards,
 * images with rounded corners, text in the body font weight. The blocks themselves are unchanged.
 */
.jmbsz-kave > .wp-block-media-text,
.jmbsz-kave-media > .wp-block-column {
	margin-top: 0;
	margin-bottom: 24px;
	padding: 28px;
	border: 1px solid var(--wp--preset--color--keret);
	border-top: 4px solid var(--wp--preset--color--sarga);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--feher);
}

.jmbsz-kave > .wp-block-media-text {
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	align-items: center;
	gap: 32px;
}

.jmbsz-kave > .wp-block-media-text.has-media-on-the-right {
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.jmbsz-kave > .wp-block-media-text > .wp-block-media-text__content {
	padding: 0;
}

.jmbsz-kave img,
.jmbsz-kave-media img {
	border-radius: var(--wp--custom--radius--card-small);
}

.jmbsz-kave h2 {
	margin-top: 0;
}

.jmbsz-kave-media > .wp-block-column {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.jmbsz-kave-media figcaption {
	color: var(--wp--preset--color--szoveg-halvany);
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
}

@media (max-width: 781px) {
	.jmbsz-kave > .wp-block-media-text,
	.jmbsz-kave > .wp-block-media-text.has-media-on-the-right {
		grid-template-columns: 100%;
		padding: 20px;
		gap: 20px;
	}

	.jmbsz-kave > .wp-block-media-text.has-media-on-the-right > .wp-block-media-text__media {
		grid-row: 1;
	}

	.jmbsz-kave-media > .wp-block-column {
		padding: 20px;
	}
}

/*
 * Single post featured image (msg 241): inside the text column, in its own aspect ratio (no cropping), and never
 * wider than the image itself, so a 836 px wide news-mix picture is not blown up to the full screen width.
 */
.jmbsz-kiemelt-kep {
	text-align: center;
}

.jmbsz-kiemelt-kep img {
	display: inline-block;
	width: auto !important;
	max-width: 100%;
	height: auto !important;
	border-radius: var(--wp--custom--radius--card);
}
