/* ==========================================================
   NAPONTA JOBBAN
   Generic Article Overlay
   ========================================================== */


/* ==========================================================
   Page state
   ========================================================== */

html.nj-article-modal-open {
	overflow: hidden;
}


/* ==========================================================
   Overlay
   ========================================================== */

.nj-article-overlay[hidden] {
	display: none !important;
}


.nj-article-overlay {
	position: fixed;
	inset: 0;

	z-index: 100000;

	display: grid;
	place-items: center;

	padding: 24px;

	opacity: 0;
	pointer-events: none;

	transition:
		opacity 220ms ease;
}


.nj-article-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}


/* ==========================================================
   Glass backdrop
   ========================================================== */

.nj-article-overlay__backdrop {
	position: absolute;
	inset: 0;

	background:
		rgba(250, 248, 243, .72);

	-webkit-backdrop-filter:
		blur(12px);

	backdrop-filter:
		blur(12px);
}


/* ==========================================================
   Modal
   ========================================================== */

.nj-article-modal {
	position: relative;
	z-index: 1;

	display: grid;

	grid-template-columns:
		minmax(320px, .40fr)
		minmax(0, .60fr);

	width:
		min(
			1180px,
			calc(100vw - 48px)
		);

	height:
		min(
			760px,
			calc(100vh - 48px)
		);

	overflow: hidden;

	background: #FAF8F3;

	border:
		1px solid
		rgba(43, 43, 43, .10);

	border-radius: 24px;

	box-shadow:
		0 12px 30px rgba(43,43,43,.035),
		0 40px 80px rgba(43,43,43,.09);

	transform:
		translateY(10px)
		scale(.985);

	transition:
		transform 260ms
		cubic-bezier(.22,1,.36,1);
}


.nj-article-overlay.is-open
.nj-article-modal {
	transform:
		translateY(0)
		scale(1);
}


/* ==========================================================
   Close
   ========================================================== */

.nj-article-modal__close {
	position: absolute;

	top: 18px;
	right: 18px;

	z-index: 10;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 44px;
	height: 44px;

	margin: 0;
	padding: 0;

	background:
		rgba(250,248,243,.82) !important;

	color:
		rgba(43,43,43,.58) !important;

	border:
		1px solid
		rgba(43,43,43,.08) !important;

	border-radius: 50% !important;

	box-shadow:
		0 6px 18px
		rgba(43,43,43,.05) !important;

	-webkit-backdrop-filter:
		blur(10px);

	backdrop-filter:
		blur(10px);

	font-family: Arial, sans-serif;
	font-size: 29px;
	font-weight: 300;
	line-height: 1;

	cursor: pointer;

	transform: none !important;

	transition:
		color 180ms ease,
		background 180ms ease,
		transform 180ms ease;
}


.nj-article-modal__close:hover {
	background:
		rgba(250,248,243,.96) !important;

	color:
		#C89B3C !important;

	transform:
		rotate(4deg) !important;
}


/* ==========================================================
   Media
   ========================================================== */

.nj-article-modal__media {
	position: relative;

	min-width: 0;
	height: 100%;

	overflow: hidden;

	background: #EAE8E3;
}


.nj-article-modal__image {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;
	object-position: center;
}


/* Finom tonal kapcsolat a parchment felé */
.nj-article-modal__media::after {
	content: "";

	position: absolute;
	inset: 0;

	pointer-events: none;

	background:
		linear-gradient(
			90deg,
			transparent 65%,
			rgba(250,248,243,.16) 100%
		);
}


/* No featured image */
.nj-article-modal--no-image {
	grid-template-columns: 1fr;
}


.nj-article-modal--no-image
.nj-article-modal__media {
	display: none;
}


/* ==========================================================
   Content
   ========================================================== */

.nj-article-modal__content {
	min-width: 0;

	overflow-y: auto;
	overscroll-behavior: contain;

	padding:
		52px
		54px
		56px;

	scrollbar-width: thin;
	scrollbar-color:
		rgba(46,94,78,.22)
		transparent;
}


.nj-article-modal__content::-webkit-scrollbar {
	width: 7px;
}


.nj-article-modal__content::-webkit-scrollbar-thumb {
	background:
		rgba(46,94,78,.18);

	border-radius: 999px;
}


/* ==========================================================
   Loading
   ========================================================== */

.nj-article-modal__loading {
	display: flex;
	align-items: center;

	min-height: 160px;

	color:
		rgba(43,43,43,.48);

	font-family:
		"Manrope",
		sans-serif;

	font-size: 14px;
}


/* ==========================================================
   Header
   ========================================================== */

.nj-article-modal__category {
	display: inline-flex;

	margin: 0 0 16px;

	padding: 7px 12px;

	background:
		rgba(127,167,139,.11);

	color: #2E5E4E;

	border-radius: 999px;

	font-family:
		"Manrope",
		sans-serif;

	font-size: 11px;
	font-weight: 700;
	line-height: 1;

	letter-spacing: .09em;
	text-transform: uppercase;
}


.nj-article-modal__title {
	max-width: 650px;

	margin: 0 0 18px;

	color: #144637;

	font-family:
		"Libre Caslon Text",
		Georgia,
		serif;

	font-size:
		clamp(
			38px,
			3vw,
			48px
		);

	font-weight: 400;
	line-height: 1.08;

	letter-spacing: -.025em;

	text-wrap: balance;
}


.nj-article-modal__lead {
	max-width: 680px;

	margin: 0 0 34px;

	color:
		rgba(43,43,43,.70);

	font-family:
		"Manrope",
		sans-serif;

	font-size: 17px;
	line-height: 1.68;
}


/* ==========================================================
   Gutenberg article content
   ========================================================== */

.nj-article-modal__body {
	color:
		rgba(43,43,43,.76);

	font-family:
		"Manrope",
		sans-serif;

	font-size: 15px;
	line-height: 1.72;
}


.nj-article-modal__body > *:first-child {
	margin-top: 0;
}


.nj-article-modal__body h2 {
	margin:
		38px
		0
		12px;

	color: #144637;

	font-family:
		"Libre Caslon Text",
		Georgia,
		serif;

	font-size: 28px;
	font-weight: 400;
	line-height: 1.2;

	letter-spacing: -.015em;
}


.nj-article-modal__body h3 {
	margin:
		30px
		0
		10px;

	color: #144637;

	font-family:
		"Libre Caslon Text",
		Georgia,
		serif;

	font-size: 22px;
	font-weight: 400;
	line-height: 1.25;
}


.nj-article-modal__body p {
	margin:
		0
		0
		18px;
}


.nj-article-modal__body ul,
.nj-article-modal__body ol {
	margin:
		0
		0
		22px;

	padding-left: 24px;
}


.nj-article-modal__body li {
	margin-bottom: 8px;
}


.nj-article-modal__body strong {
	color: #144637;

	font-weight: 700;
}


.nj-article-modal__body a {
	color: #2E5E4E;

	text-decoration-color:
		rgba(200,155,60,.65);

	text-underline-offset: 3px;
}


.nj-article-modal__body blockquote {
	position: relative;

	margin:
		30px
		0;

	padding:
		19px
		22px
		19px
		26px;

	background:
		rgba(127,167,139,.07);

	border:
		1px solid
		rgba(46,94,78,.10);

	border-radius: 14px;

	color:
		rgba(43,43,43,.74);
}


.nj-article-modal__body blockquote::before {
	content: "";

	position: absolute;

	top: 18px;
	bottom: 18px;
	left: 0;

	width: 3px;

	background: #C89B3C;

	border-radius: 999px;
}


/* Gutenberg images inside article */
.nj-article-modal__body
.wp-block-image {
	margin:
		28px
		0;
}


.nj-article-modal__body
.wp-block-image img {
	border-radius: 14px;
}


/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 767px) {

	.nj-article-overlay {
		padding: 10px;
	}


	.nj-article-modal {
		display: block;

		width: 100%;

		height: auto;

		max-height:
			calc(100dvh - 20px);

		overflow-y: auto;

		border-radius: 20px;
	}


	.nj-article-modal__media {
		width: 100%;
		height: 220px;
	}


	.nj-article-modal__media::after {
		background:
			linear-gradient(
				180deg,
				transparent 55%,
				rgba(250,248,243,.28)
				100%
			);
	}


	.nj-article-modal__content {
		overflow: visible;

		padding:
			28px
			22px
			38px;
	}


	.nj-article-modal__close {
		position: sticky;

		float: right;

		top: 12px;

		margin:
			-208px
			12px
			0
			0;

		width: 42px;
		height: 42px;
	}


	.nj-article-modal__category {
		margin-bottom: 13px;
	}


	.nj-article-modal__title {
		font-size: 34px;
		line-height: 1.1;
	}


	.nj-article-modal__lead {
		margin-bottom: 28px;

		font-size: 15px;
		line-height: 1.65;
	}


	.nj-article-modal__body {
		font-size: 14px;
		line-height: 1.68;
	}


	.nj-article-modal__body h2 {
		margin-top: 32px;

		font-size: 25px;
	}

}


/* ==========================================================
   Reduced motion
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

	.nj-article-overlay,
	.nj-article-modal,
	.nj-article-modal__close {
		transition: none !important;
	}

}

/* Hidden state must always win */
.nj-article-overlay [hidden] {
	display: none !important;
}

/* ==========================================================
   Share button
   ========================================================== */

.nj-article-modal__share {
	position: absolute;

	top: 70px;
	right: 18px;

	z-index: 10;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 44px;
	height: 44px;

	margin: 0;
	padding: 0;

	background:
		rgba(250, 248, 243, .82) !important;

	color:
		rgba(43, 43, 43, .54) !important;

	border:
		1px solid rgba(43, 43, 43, .08) !important;

	border-radius: 50% !important;

	box-shadow:
		0 6px 18px
		rgba(43, 43, 43, .05) !important;

	-webkit-backdrop-filter:
		blur(10px);

	backdrop-filter:
		blur(10px);

	cursor: pointer;

	transform: none !important;

	transition:
		color 180ms ease,
		background 180ms ease,
		transform 180ms ease;
}


.nj-article-modal__share svg {
	width: 18px;
	height: 18px;
}


.nj-article-modal__share:hover {
	background:
		rgba(250, 248, 243, .96) !important;

	color: #C89B3C !important;

	transform:
		translateY(-1px) !important;
}


.nj-article-toast {
	position: absolute;

	top: 122px;
	right: 18px;
	left: auto;
	bottom: auto;

	z-index: 20;

	display: flex;
	align-items: center;
	gap: 8px;

	padding: 9px 13px;

	background: rgba(20, 70, 55, .94);
	color: #FAF8F3;

	border: 1px solid rgba(255, 255, 255, .10);
	border-radius: 10px;

	box-shadow:
		0 10px 24px rgba(20, 70, 55, .17);

	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);

	font-family: "Manrope", sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;

	opacity: 0;

	transform: translateY(-5px);

	transition:
		opacity 180ms ease,
		transform 180ms ease;

	pointer-events: none;
}


.nj-article-toast::before {
	content: "";

	position: absolute;

	top: -5px;
	right: 17px;

	width: 9px;
	height: 9px;

	background: rgba(20, 70, 55, .94);

	transform: rotate(45deg);
}


.nj-article-toast.is-visible {
	opacity: 1;

	transform: translateY(0);
}


.nj-article-toast svg {
	width: 15px;
	height: 15px;

	color: #C89B3C;
}


.nj-article-toast.is-visible {
	opacity: 1;

	transform:
		translate(-50%, 0);
}


.nj-article-toast svg {
	width: 17px;
	height: 17px;

	color: #C89B3C;
}

/* ==========================================================
   ARTICLE – editorial typography refinement
   ========================================================== */

.nj-article-modal__body {
	max-width: 690px;

	color:
		rgba(43,43,43,.74);

	font-size: 15px;
	line-height: 1.78;
}


.nj-article-modal__body p {
	margin:
		0
		0
		20px;
}


.nj-article-modal__body h2 {
	position: relative;

	margin:
		46px
		0
		17px;

	padding-top: 18px;

	color: #144637;

	font-size: 30px;
	line-height: 1.14;
}


/* Finom editorial separator */
.nj-article-modal__body h2::before {
	content: "";

	position: absolute;

	top: 0;
	left: 0;

	width: 38px;
	height: 2px;

	background: #C89B3C;

	border-radius: 999px;
}


/* Első H2-nél kisebb felső rés */
.nj-article-modal__body h2:first-child {
	margin-top: 10px;
}


.nj-article-modal__body ul,
.nj-article-modal__body ol {
	margin:
		5px
		0
		24px;

	padding-left: 25px;
}


.nj-article-modal__body li {
	margin-bottom: 9px;

	padding-left: 3px;
}


.nj-article-modal__body strong {
	color: #144637;

	font-weight: 700;
}

.nj-article-modal__lead {
	position: relative;

	max-width: 660px;

	margin: 0 0 38px;
	padding: 2px 0 2px 20px;

	color: rgba(43, 43, 43, .68);

	border-left: 2px solid rgba(200, 155, 60, .65);

	font-family: "Manrope", sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.7;
}