/**
 * Araby AdSense — theme advertising units.
 * Secondary content: never styled like articles or buttons.
 */

.aa-ad {
	display: block;
	width: 100%;
	max-width: 100%;
	margin-block: 1.75rem 2rem;
	clear: both;
	box-sizing: border-box;
}

.aa-ad__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	overflow: hidden;
}

.aa-ad__label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ck-color-body, #64748b);
	opacity: 0.8;
}

.aa-ad__unit {
	width: 100%;
	max-width: 100%;
	text-align: center;
}

.aa-ad__unit ins.adsbygoogle,
.aa-ad__unit iframe,
.aa-ad__unit img {
	display: block;
	max-width: 100% !important;
	height: auto;
	margin-inline: auto;
}

.aa-ad__image-link {
	display: inline-block;
	max-width: 100%;
}

.aa-ad__placeholder,
.aa-ad__demo,
.aa-adsense-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 336px;
	min-height: 280px;
	margin-inline: auto;
	padding: 1rem;
	box-sizing: border-box;
	border: 1px dashed #cbd5e1;
	background: repeating-linear-gradient(
		-45deg,
		#f8fafc,
		#f8fafc 10px,
		#f1f5f9 10px,
		#f1f5f9 20px
	);
	color: #64748b;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Keep a transparent/absolute header inside #page so it does not cover the top banner. */
body:has(> .aa-ad--before_header) #page.ck-site {
	position: relative;
}

/* Header / footer leaderboard: 728×90 — sits above the header, not stretched. */
.aa-ad--before_header {
	margin-block: 0;
	padding-block: 8px;
	background: #f8fafc;
}

.aa-ad--after_header,
.aa-ad--before_footer {
	margin-block: 0.5rem;
}

.aa-ad--before_header .aa-ad__box,
.aa-ad--after_header .aa-ad__box,
.aa-ad--before_footer .aa-ad__box {
	min-height: 90px;
	max-width: 728px;
}

.aa-ad--before_header .aa-ad__demo,
.aa-ad--before_header .aa-ad__placeholder,
.aa-ad--after_header .aa-ad__demo,
.aa-ad--after_header .aa-ad__placeholder,
.aa-ad--before_footer .aa-ad__demo,
.aa-ad--before_footer .aa-ad__placeholder {
	width: 728px;
	max-width: 100%;
	min-height: 90px;
	height: 90px;
	padding: 0;
}

/* In-article / after article: 336×280 */
.aa-ad--before_article .aa-ad__demo,
.aa-ad--after_article .aa-ad__demo,
.aa-ad--after_percent_1 .aa-ad__demo,
.aa-ad--after_percent_2 .aa-ad__demo,
.aa-ad--in_content .aa-ad__demo,
.aa-ad--mid_article .aa-ad__demo,
.aa-ad--after_intro .aa-ad__demo {
	max-width: 336px;
	min-height: 280px;
}

/* Sidebar: 300×250 */
.aa-ad--sidebar_top .aa-ad__demo,
.aa-ad--sidebar_middle .aa-ad__demo,
.aa-ad--sidebar_bottom .aa-ad__demo {
	max-width: 300px;
	min-height: 250px;
}

@media (max-width: 767px) {
	.aa-ad--before_header .aa-ad__demo,
	.aa-ad--before_header .aa-ad__placeholder,
	.aa-ad--after_header .aa-ad__demo,
	.aa-ad--before_footer .aa-ad__demo {
		max-width: 100%;
		min-height: 50px;
		height: 50px;
	}
}

.aa-ad__demo,
.aa-ad__placeholder {
	max-width: 100%;
}

.aa-adsense-preview {
	max-width: 336px;
}

.aa-adsense-preview__ad {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 218px;
}

.aa-ad-el {
	max-width: 100%;
}

.ck-page-links + .aa-ad,
.ck-article-pages + .aa-ad,
.aa-ad + .ck-article-pages,
.aa-ad + .ck-related {
	margin-top: 2rem;
}

.aa-ad + .aa-ad {
	margin-top: 2.5rem;
}

.ck-widget .aa-ad {
	margin-block: 0 1.25rem;
}

@media (max-width: 767px) {
	.aa-ad {
		margin-block: 1.25rem 1.5rem;
	}
}

.aa-ad,
.aa-ad ins,
.aa-ad iframe,
.aa-ad img {
	max-width: 100%;
	box-sizing: border-box;
}

.aa-ad iframe {
	width: 100%;
}

.ck-posts .aa-ad,
.aa-posts-grid .aa-ad,
.aa-posts-list .aa-ad {
	grid-column: 1 / -1;
	width: 100%;
}

@media (min-width: 1025px) {
	.aa-ad.ck-hide-desktop,
	.ck-hide-desktop {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.aa-ad.ck-hide-tablet,
	.ck-hide-tablet {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.aa-ad.ck-hide-mobile,
	.ck-hide-mobile {
		display: none !important;
	}
}
