/* Advert Management – front end */

.advm-zone {
	--advm-cols: 3;
	clear: both;
	width: 100%;
	margin: 28px 0;
	box-sizing: border-box;
}

.advm-zone *,
.advm-zone *::before,
.advm-zone *::after {
	box-sizing: border-box;
}

.advm-zone__label {
	margin: 0 0 8px;
	font-size: 11px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8a8a8a;
	text-align: left;
}

/* Desktop: up to 3 in a row */
.advm-grid {
	display: grid;
	grid-template-columns: repeat(var(--advm-cols, 3), minmax(0, 1fr));
	gap: var(--advm-gap, 16px);
	align-items: start;
}

/* A single advert keeps a sensible size instead of stretching across the page */
.advm-cols-1 .advm-grid {
	max-width: var(--advm-single-max, 728px);
	margin-left: auto;
	margin-right: auto;
}

.advm-cols-1 .advm-zone__label {
	max-width: var(--advm-single-max, 728px);
	margin-left: auto;
	margin-right: auto;
}

/* Mobile: one column (max 3 stacked) */
@media (max-width: 767px) {
	.advm-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.advm-ad {
	position: relative;
	min-width: 0;
	margin: 0;
}

.advm-ad__media {
	position: relative;
	width: 100%;
	aspect-ratio: var(--advm-ratio, auto);
	overflow: hidden;
	border-radius: 4px;
	background: #f2f2f2;
	line-height: 0;
}

.advm-ad__link {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 0;
	text-decoration: none !important;
	border: 0 !important;
	box-shadow: none !important;
}

.advm-ad__img,
.advm-ad__video {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
	border: 0;
	border-radius: 0;
	transition: transform .35s ease;
}

.advm-ad__link:hover .advm-ad__img,
.advm-ad__link:focus-visible .advm-ad__img {
	transform: scale(1.02);
}

.advm-ad__link:focus-visible {
	outline: 3px solid #1a73e8;
	outline-offset: -3px;
}

.advm-ad__title {
	display: block;
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.35;
	font-weight: 600;
	color: inherit !important;
	text-decoration: none !important;
}

.advm-ad__title:hover {
	text-decoration: underline !important;
}

/* Video controls: pause/play + mute/unmute */
.advm-ad__controls {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 2;
	display: flex;
	gap: 8px;
	line-height: 1;
}

.advm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(0, 0, 0, .62) !important;
	color: #fff !important;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
	transition: background .2s ease, transform .2s ease;
}

.advm-btn:hover {
	background: rgba(0, 0, 0, .85) !important;
	transform: scale(1.06);
}

.advm-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.advm-i {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Icon states */
.advm-i--play,
.advm-i--sound { display: none; }
.advm-ad.is-paused .advm-i--pause { display: none; }
.advm-ad.is-paused .advm-i--play { display: block; }
.advm-ad:not(.is-muted) .advm-i--muted { display: none; }
.advm-ad:not(.is-muted) .advm-i--sound { display: block; }

@media (max-width: 767px) {
	.advm-zone { margin: 22px 0; }
	.advm-btn { width: 40px; height: 40px; }
}

/* The advert's own page */
.advm-page__media {
	margin: 0 0 24px;
	line-height: 0;
}

.advm-page__media img,
.advm-page__media video {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.advm-page__cta {
	margin-top: 28px;
}

.advm-page__btn {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 4px;
	background: #111;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
	transition: background .2s ease;
}

.advm-page__btn:hover {
	background: #333;
}

/* Elementor editor placeholder */
.advm-editor-placeholder {
	padding: 24px;
	border: 2px dashed #c3c4c7;
	color: #646970;
	font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-align: center;
	background: #fafafa;
}

@media print {
	.advm-zone { display: none !important; }
}
