/* Jelarmmy Ads */
.jlads {
	--per: 1;      /* ads visible at once */
	--gap: 16px;
	position: relative;
	margin: 2em auto;
}
.jlads-track {
	display: flex;
	gap: var(--gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	padding: 6px 0 12px; /* room for hover lift + shadow */
}
.jlads-track::-webkit-scrollbar { display: none; }
.jlads-slide {
	flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
	scroll-snap-align: start;
}
.jlads-slide img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
	transition: transform .35s ease, box-shadow .35s ease;
}
.jlads-slide a:hover img,
.jlads-slide a:focus-visible img {
	transform: translateY(-4px);
	box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
}

/* Reset: themes (Flatsome) give every <button> min-height, padding, margin, line-height, text-transform. */
.jlads button,
.jlads-popup button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 0;
	max-width: none;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	line-height: 1;
	font-size: 0;
	letter-spacing: 0;
	text-transform: none;
	text-shadow: none;
	vertical-align: middle;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

/* Nav bar under the ads: ‹ • • • • › (added by JS only when there is more than one ad) */
.jlads-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 4px;
}
.jlads .jlads-prev,
.jlads .jlads-next {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	color: #0b2545;
	box-shadow: 0 1px 6px rgba(0, 0, 0, .18);
	transition: background .2s ease, color .2s ease, transform .2s ease;
}
.jlads .jlads-prev::before,
.jlads .jlads-next::before {
	content: "";
	width: 8px;
	height: 8px;
	border: solid currentColor;
	border-width: 2px 2px 0 0;
}
.jlads .jlads-prev::before { transform: translateX(2px) rotate(-135deg); }
.jlads .jlads-next::before { transform: translateX(-2px) rotate(45deg); }
.jlads .jlads-prev:hover,
.jlads .jlads-next:hover { background: #0b2545; color: #fff; }
.jlads .jlads-prev:active,
.jlads .jlads-next:active { transform: scale(.92); }

.jlads-dots {
	display: flex;
	align-items: center;
	gap: 8px;
}
.jlads .jlads-dots button {
	width: 8px;
	height: 8px;
	border-radius: 8px;
	background: #c5ccd6;
	transition: width .3s ease, background .3s ease;
}
.jlads .jlads-dots button[aria-current="true"] { width: 22px; background: #c8102e; }
.jlads button:focus-visible { outline: 2px solid #c8102e; outline-offset: 2px; }
.jlads--static .jlads-nav { display: none; }

/* Locations */
.jlads--post_top,
.jlads--post_middle,
.jlads--post_bottom { max-width: 420px; }

/* Group shortcode + above-footer strip: --cols across on desktop, fewer on smaller screens */
.jlads--group,
.jlads-wrap .jlads { --per: var(--cols, 4); }
.jlads--group { max-width: 1110px; padding: 0 15px; }
.jlads-wrap { max-width: 1110px; margin: 0 auto; padding: 0 15px; }
@media (max-width: 849px) {
	.jlads--group, .jlads-wrap .jlads { --per: min(var(--cols, 4), 2.3); }
}
@media (max-width: 549px) {
	.jlads--group, .jlads-wrap .jlads { --per: min(var(--cols, 4), 1.25); }
}

/* Popup */
.jlads-popup {
	width: min(440px, 92vw);
	max-height: 94vh;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}
.jlads-popup::backdrop { background: rgba(5, 15, 30, .7); }
.jlads-popup[open] { animation: jlads-in .35s ease-out; }
.jlads-popup .jlads { margin: 0; }
.jlads-popup .jlads-slide img { max-height: 82vh; width: auto; max-width: 100%; margin: 0 auto; }
.jlads-popup .jlads-nav { margin-top: 10px; }
.jlads-popup .jlads-dots button { background: rgba(255, 255, 255, .45); }
.jlads-popup .jlads-dots button[aria-current="true"] { background: #fff; }
.jlads-popup .jlads-close {
	position: absolute;
	top: -12px;
	right: -12px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	color: #0b2545;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
	z-index: 3;
}
.jlads-popup .jlads-close::before,
.jlads-popup .jlads-close::after {
	content: "";
	position: absolute;
	width: 14px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transform: rotate(45deg);
}
.jlads-popup .jlads-close::after { transform: rotate(-45deg); }
.jlads-popup .jlads-close:hover { background: #0b2545; color: #fff; }
@keyframes jlads-in {
	from { opacity: 0; transform: translateY(16px) scale(.97); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.jlads-popup[open] { animation: none; }
	.jlads-slide img { transition: none; }
}
