/* ===== REFERENCE CARDS (carousel) ===== */
.ref-card {
	min-width: 290px;
	max-width: 290px;
	background: #fff;
	border-radius: 10px;
	border: 1px solid #e5e9ef;
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
}

.ref-card:hover {
	border-color: #d1d5db;
	box-shadow: 0px 0px 9px rgba(15, 23, 42, 0.05);
}

.ref-card-img {
	position: relative;
	height: 140px;
	overflow: hidden;
	background: #f0f2f5;
}

.ref-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s;
}

.ref-card:hover .ref-card-img img {
	transform: scale(1.03);
}

.ref-card-body {
	padding: 16px 16px 18px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ref-card-date {
	font-size: 12px;
	color: #9ca3af;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ref-card-date svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	stroke: #9ca3af;
}

.ref-card-badges {
	display: flex;
	gap: 6px;
	margin-bottom: 12px;
	overflow: hidden;
	position: relative;
}

.ref-card-badges::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 24px;
	height: 100%;
	background: linear-gradient(to right, transparent, #fff);
	pointer-events: none;
}

.ref-card-badge {
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 14px;
	font-weight: 500;
	white-space: nowrap;
	flex-shrink: 0;
}

.ref-card-badge-green {
	background: #e8f5e9;
	color: #2e7d32;
}

.ref-card-badge-blue {
	background: #e3f0fb;
	color: #1565a8;
}

.ref-card-title {
	font-size: 15px;
	font-weight: 500;
	color: #1f2937;
	line-height: 1.35;
	margin-bottom: 14px;
	min-height: 44px;
}

.ref-card-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
	flex: 1;
}

.ref-card-meta-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 13px;
}

.ref-card-meta-label {
	color: #9ca3af;
	min-width: 50px;
	flex-shrink: 0;
}

.ref-card-meta-value {
	color: #374151;
}

.ref-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 10px;
	border-top: 1px solid #f0f2f5;
}

.ref-card-link {
	font-size: 14px;
	color: #2a73b5;
	font-weight: 500;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 5px;
}

.ref-card-link svg {
	width: 14px;
	height: 14px;
	transition: transform 0.2s;
}

.ref-card:hover .ref-card-link svg {
	transform: translateX(2px);
}

.ref-card-time {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: #6b7280;
}

.ref-card-time svg {
	width: 14px;
	height: 14px;
}

@media (max-width: 767px) {
	.ref-card {
		min-width: 70vw;
		max-width: 70vw;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}
}

/* ===== BACKDROP ===== */
.ref-lb-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0);
	backdrop-filter: blur(0px);
	-webkit-backdrop-filter: blur(0px);
	opacity: 0;
	transition: background 0.2s, backdrop-filter 0.2s, -webkit-backdrop-filter 0.2s, opacity 0.2s;
}

.ref-lb-overlay-visible {
	background: rgb(135 135 135 / 9%);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 1;
}

/* ===== MODAL ===== */
.ref-lb-modal {
	background: #fff;
	border-radius: 12px;
	max-width: 800px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	border: 1px solid #5c646b47;
	transform: scale(0.95);
	opacity: 0;
	transition: transform 0.2s ease-out, opacity 0.2s;
}

.ref-lb-modal-visible {
	transform: scale(1);
	opacity: 1;
}

/* ===== HEADER (image only) ===== */
.ref-lb-header {
	position: relative;
	height: 220px;
	overflow: hidden;
}

.ref-lb-header img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ref-lb-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(0,0,0,0.18);
	border: none;
	color: #fff;
	font-size: 28px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	z-index: 2;
	transition: background 0.2s;
}

.ref-lb-close:hover {
	background: rgba(0,0,0,0.35);
}

/* ===== BODY ===== */
.ref-lb-body {
	padding: 20px 24px 24px;
	text-align: left;
}

/* ===== TITLE + DATE (below image) ===== */
.ref-lb-title {
	font-size: 23px;
	font-weight: 600;
	color: #1a2b3c;
	line-height: 1.3;
	margin: 0 0 6px;
	text-align: left;
}

.ref-lb-datum {
	font-size: 13px;
	color: #6b7280;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-bottom: 14px;
	font-weight: 500;
}

.ref-lb-datum svg {
	width: 14px;
	height: 14px;
	stroke: #9ca3af;
	stroke-width: 2;
	fill: none;
	flex-shrink: 0;
}

/* ===== BADGES ===== */
.ref-lb-badges {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.ref-badge {
	font-size: 12px;
	padding: 4px 11px;
	border-radius: 20px;
	font-weight: 500;
	line-height: 1.4;
}

.ref-badge-green {
	background: #e8f5e9;
	color: #2e7d32;
}

.ref-badge-blue {
	background: #e3f0fb;
	color: #1565a8;
}

/* ===== STORY ===== */
.ref-lb-story {
	font-size: 14.5px;
	line-height: 1.72;
	color: #4b5563;
	margin-bottom: 18px;
}

.ref-lb-story strong {
	color: #1a4e78;
	font-weight: 500;
}

.ref-lb-story p {
	margin: 0 0 8px;
	text-align: left;
}

.ref-lb-story p:last-child {
	margin-bottom: 0;
}

/* ===== SEPARATOR ===== */
.ref-lb-separator {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
}

.ref-lb-sep-line {
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

.ref-lb-sep-line:first-child {
	display: none;
}

.ref-lb-sep-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.7px;
	color: #9ca3af;
	font-weight: 500;
	white-space: nowrap;
}

/* ===== PARAMS GRID ===== */
.ref-lb-params {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	margin-bottom: 20px;
	border: 1px solid #e5e9ef;
	border-radius: 10px;
	overflow: hidden;
}

.ref-lb-param {
	padding: 10px 14px;
	border-bottom: 1px solid #f0f2f5;
}

.ref-lb-param:nth-child(odd) {
	border-right: 1px solid #f0f2f5;
}

.ref-lb-param:nth-last-child(-n+2) {
	border-bottom: none;
}

.ref-lb-param-label {
	font-size: 12px;
	color: #9ca3af;
	margin-bottom: 2px;
}

.ref-lb-param-value {
	font-size: 14px;
	color: #1f2937;
	font-weight: 400;
}

.ref-lb-param-bold {
	font-weight: 600;
	color: #1a2b3c;
}

/* ===== FLAGS ===== */
.ref-lb-flag {
	display: inline-block;
	width: 16px;
	height: 11px;
	border-radius: 1px;
	overflow: hidden;
	position: relative;
	vertical-align: middle;
	margin-right: 4px;
	border: 1px solid rgba(0,0,0,0.08);
}

.ref-lb-flag--cz {
	background: linear-gradient(180deg, #fff 50%, #d7141a 50%);
}

.ref-lb-flag--cz::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 5.5px 0 5.5px 8px;
	border-color: transparent transparent transparent #11457e;
}

.ref-lb-flag--sr {
	background: linear-gradient(180deg, #fff 33.33%, #0b4ea2 33.33%, #0b4ea2 66.66%, #ee1c25 66.66%);
}

/* ===== TIME STRIP ===== */
.ref-lb-time-strip {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	padding: 11px 14px;
	background: #eef5fc;
	border-radius: 10px;
	border: 1px solid #d0e3f5;
}

.ref-lb-time-icon {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border: 1px solid #d0e3f5;
}

.ref-lb-time-icon svg {
	width: 16px;
	height: 16px;
}

.ref-lb-time-text {
	font-size: 14px;
	color: #1a4e78;
	line-height: 1.45;
}

.ref-lb-time-text strong {
	font-weight: 500;
	color: #174e88;
}

/* ===== QUOTE CARD ===== */
.ref-lb-quote-card {
	background: #f8fafc;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 20px;
}

.ref-lb-quote-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.ref-lb-quote-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e3f0fb;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ref-lb-quote-avatar svg {
	width: 14px;
	height: 14px;
}

.ref-lb-quote-name {
	font-size: 13px;
	font-weight: 500;
	color: #1f2937;
}

.ref-lb-quote-role {
	font-size: 12px;
	color: #9ca3af;
}

.ref-lb-quote-text {
	font-size: 14px;
	color: #4b5563;
	line-height: 1.6;
	font-style: italic;
	margin: 0;
}

/* ===== CTA ===== */
.ref-lb-cta {
	display: flex;
	gap: 10px;
}

.ref-lb-btn-green {
	flex: 1;
	padding: 11px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	display: block;
	background: var(--ib-cta-green, #0ba619);
	color: #fff;
	border: none;
	transition: background 0.2s;
}

.ref-lb-btn-green:hover {
	background: var(--ib-cta-green-hover, #0e8f1b);
	color: #fff;
	text-decoration: none;
}

.ref-lb-btn-outline {
	flex: 1;
	padding: 11px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
	background: transparent;
	color: #374151;
	border: 1px solid #d1d5db;
	transition: background 0.2s;
}

.ref-lb-btn-outline:hover {
	background: #f9fafb;
}

.ref-lb-btn-all-ref {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-decoration: none;
	color: #374151;
}

.ref-lb-btn-all-ref:hover {
	color: #374151;
	text-decoration: none;
}

.ref-lb-btn-all-ref svg {
	width: 14px;
	height: 14px;
}

/* ===== RESPONSIVITA ===== */
@media (max-width: 640px) {
	.ref-lb-overlay {
		padding: 0;
	}

	.ref-lb-modal {
		max-width: 100%;
		max-height: 100vh;
		height: 100vh;
		border-radius: 0;
		border: none;
	}

	.ref-lb-header {
		height: 170px;
	}

	.ref-lb-body {
		padding: 14px 16px 20px;
	}

	.ref-lb-params {
		grid-template-columns: 1fr;
	}

	.ref-lb-param:nth-child(odd) {
		border-right: none;
	}

	.ref-lb-param {
		border-bottom: 1px solid #f0f2f5;
	}

	.ref-lb-param:last-child {
		border-bottom: none;
	}

	.ref-lb-cta {
		flex-direction: column;
	}
}

@media (min-width: 641px) and (max-width: 768px) {
	.ref-lb-modal {
		max-width: 90vw;
	}
}
