/**
 * AE Blog — responsive overrides for list, archive, category, and detail layouts.
 * Loads after home.css to fix laptop / tablet / mobile gaps without editing minified bundles.
 */

/* ── Blog home titles: replace missing Cambria-Bold with Outfit ── */
.blog-content-bg .blog-top-section .top-blog-box figcaption h1,
.blog-content-bg .blog-top-section .top-blog-box figcaption h1 a,
.blog-content-bg .blog-top-section .top-three-blog-list ul li figcaption h2,
.blog-content-bg .blog-top-section .top-three-blog-list ul li figcaption h2 a,
.blog-content-bg .categories-section h2,
.blog-content-bg .categories-grid__title,
.blog-content-bg .latest-blog-cat-bg .insights-post-card__title,
.blog-content-bg .latest-blog-cat-bg .insights-post-card__title a,
.blog-content-bg .latest-blog-cat-bg .item-content-bkg figcaption h2,
.blog-content-bg .latest-blog-cat-bg .item-content-bkg figcaption h2 a,
.blog-content-bg .latest-blog-cat-bg .item-content-bkg figcaption h3,
.blog-content-bg .latest-blog-cat-bg .item-content-bkg figcaption h3 a,
.blog-content-bg .development-blog .blog-head-box h2,
.blog-content-bg .development-blog .development-box figcaption h2,
.blog-content-bg .development-blog .development-box figcaption h2 a,
.blog-content-bg .development-blog .development-box-thumb figcaption h2,
.blog-content-bg .development-blog .development-box-thumb figcaption h2 a,
.blog-content-bg .cta-section .cta-des h2 {
	font-family: Outfit, "OpenSans-Bold", Helvetica, Arial, sans-serif !important;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.blog-content-bg .blog-top-section .top-blog-box figcaption p,
.blog-content-bg .blog-top-section .top-three-blog-list ul li figcaption p,
.blog-content-bg .categories-section h2 + p,
.blog-content-bg .categories-section__eyebrow {
	font-family: Outfit, "OpenSans-Regular", Helvetica, Arial, sans-serif;
}

/* ── Sidebar inquiry form card (single post) ── */
.mira-sidebar-form-wrap.sidebar-form-box {
	background: #fff;
	border: 1px solid #e8ecf4;
	border-radius: 16px;
	padding: 20px 18px 18px;
	box-shadow: 0 4px 24px rgba(11, 19, 43, 0.06);
}

.mira-sidebar-form-wrap .mira-sidebar-form.enquiryForm {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mira-sidebar-form-wrap br {
	display: none;
}

.mira-sidebar-form-wrap .wpcf7,
.mira-sidebar-form-wrap .form-group label {
	display: none;
}

/* ── Shared: prevent horizontal overflow ── */
.blog-content-bg,
.blog_detail_bg,
.mira-single-container,
.latest-blog-cat-bg,
.blog-top-section,
.categories-section,
.insights-home-hero {
	overflow-x: clip;
}

.blog-content-bg img,
.blog_detail_bg img,
.mira-archive-hero img {
	max-width: 100%;
	height: auto;
}

/* ── Laptop: 1024px – 1366px ── */
@media (max-width: 1366px) {
	.blog-top-section {
		padding: 36px clamp(20px, 3vw, 48px);
	}

	.blog-top-section .top-blog-box {
		min-height: auto;
	}

	.blog-top-section .top-blog-box figure {
		flex: 0 0 42%;
		max-width: 42%;
	}

	.blog-top-section .top-blog-box figcaption {
		padding: clamp(20px, 2.5vw, 32px);
	}

	.blog-top-section .top-blog-box figcaption h1 {
		font-size: clamp(24px, 2.2vw, 30px);
	}

	.blog-top-section .top-three-blog-list ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.search-cat-box .cat-search-box {
		flex: 0 1 260px;
		max-width: 38%;
		min-width: 200px;
	}

	.insights-home-hero--split .insights-home-hero__content,
	.insights-home-hero--bleed .insights-home-hero__content {
		padding-left: clamp(20px, 3.5vw, 40px);
		padding-right: clamp(20px, 3.5vw, 40px);
	}

	.categories-section {
		padding-left: clamp(20px, 3vw, 40px);
		padding-right: clamp(20px, 3vw, 40px);
	}
}

/* ── Tablet + small laptop: up to 1024px ── */
@media (max-width: 1024px) {
	.blog-top-section .top-blog-box {
		flex-direction: row-reverse;
		align-items: stretch;
		min-height: 0;
		height: auto;
		border-radius: 18px;
		padding: 14px;
		margin-bottom: 14px;
	}

	.blog-top-section .top-blog-box figure {
		flex: 0 0 44%;
		max-width: 44%;
		margin: 0;
		border-radius: 14px;
		overflow: hidden;
		align-self: center;
	}

	.blog-top-section .top-blog-box figure img {
		width: 100%;
		height: auto;
		object-fit: cover;
	}

	.blog-top-section .top-blog-box figcaption {
		flex: 1 1 auto;
		min-width: 0;
		padding: 4px 10px 4px 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 10px;
		grid-template-columns: unset;
		grid-template-rows: unset;
		grid-template-areas: unset;
	}

	.blog-top-section .top-blog-box figcaption h1 {
		font-size: clamp(17px, 2.4vw, 22px);
		line-height: 1.3;
	}

	.blog-top-section .top-blog-box figcaption p {
		display: none;
	}

	.blog-top-section .top-three-blog-list ul {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.search-cat-box {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.search-cat-box .cat-search-box {
		flex: 1 1 100%;
		max-width: 100%;
		min-width: 0;
		width: 100%;
	}

	.search-cat-box .search-pill-form,
	.search-cat-box .search-pill-input {
		width: 100%;
	}

	.top-cat-list {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}

	.top-cat-list::-webkit-scrollbar {
		display: none;
	}

	.latest-blog-cat-bg .insights-posts-wrap .insights-posts-grid,
	.latest-blog-cat-bg .insights-posts-wrap .alm-reveal,
	.latest-blog-cat-bg .insights-posts-wrap .alm-listing {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.categories-list {
		position: static;
		top: auto;
		padding-left: 0;
		margin-top: 8px;
	}

	.blog-tab-pill__scroll {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.blog-tab-pill__scroll::-webkit-scrollbar {
		display: none;
	}

	.mira-archive-hero {
		padding: 120px clamp(16px, 4vw, 24px) 48px;
	}

	.mira-archive-hero h1 {
		font-size: clamp(28px, 4.5vw, 38px);
	}

	.container-home > .col-md-9,
	.container-home > .col-md-3,
	.archive .row > .col-md-9 {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.alm-reveal article {
		width: 100%;
	}

	.latest-blog-cat-bg {
		padding-left: clamp(12px, 3vw, 20px);
		padding-right: clamp(12px, 3vw, 20px);
	}

	.insights-home-hero {
		--ih-header-offset: 88px;
	}

	.insights-home-hero__row {
		gap: 0;
		min-height: 0;
	}

	.insights-home-hero--split .insights-home-hero__row {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.insights-home-hero--split .insights-home-hero__content {
		padding: calc(var(--ih-header-offset, 88px) + 12px) clamp(18px, 5vw, 28px) 24px;
		background-color: #141616;
		color: #f7f4ef;
		justify-content: flex-start;
	}

	.insights-home-hero--split .insights-home-hero__content::after {
		display: none;
	}

	.insights-home-hero--split .insights-home-hero__brand {
		margin-bottom: 12px;
		font-size: clamp(18px, 4.5vw, 24px);
	}

	.insights-home-hero--split h1 {
		margin-bottom: 12px;
		font-size: clamp(26px, 7vw, 34px);
	}

	.insights-home-hero--split .insights-home-hero__description {
		margin-bottom: 18px;
		font-size: 14.5px;
		line-height: 1.55;
	}

	.insights-home-hero--split .insights-home-hero__actions {
		margin-bottom: 0;
	}

	.insights-home-hero--split .insights-home-hero__cta {
		padding: 12px 22px;
		font-size: 14px;
	}

	.insights-home-hero--split .insights-home-hero__media {
		min-height: 0;
		padding: 16px 16px 20px;
	}

	.insights-home-hero--split .insights-home-hero__image {
		max-height: 280px;
		width: min(100%, 340px);
	}

	.insights-home-hero--bleed .insights-home-hero__row,
	.insights-home-hero--bleed .insights-home-hero__content {
		min-height: 0;
	}

	.insights-home-hero--bleed .insights-home-hero__content {
		padding: calc(var(--ih-header-offset, 88px) + 16px) clamp(18px, 5vw, 28px) 28px;
		min-height: 0;
	}

	.insights-home-hero--bleed .insights-home-hero__image {
		object-position: 60% center;
	}

	.insights-home-hero--bleed::before {
		background:
			linear-gradient(180deg, rgba(12, 14, 14, 0.82) 0%, rgba(12, 14, 14, 0.55) 45%, rgba(12, 14, 14, 0.78) 100%),
			linear-gradient(90deg, rgba(12, 14, 14, 0.75) 0%, rgba(12, 14, 14, 0.35) 100%);
	}

	.insights-home-hero-stats__inner {
		padding: 16px clamp(16px, 4vw, 28px);
	}

	.insights-home-hero-stats ul {
		justify-content: flex-start;
		gap: 12px 20px;
	}

	.insights-home-hero-stats li {
		flex: 1 1 40%;
		border-right: 0;
		padding-right: 0;
		padding-bottom: 8px;
		border-bottom: 1px solid rgba(24, 27, 27, 0.08);
	}

	.insights-home-hero-stats li:last-child {
		border-bottom: 0;
	}

	.development-blog .row > [class*="col-"],
	.development-blog .development-box > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

/* ── Mobile landscape / large phones: up to 767px ── */
@media (max-width: 767px) {
	.insights-home-hero {
		--ih-header-offset: 72px;
		padding: 0 !important;
		min-height: 0 !important;
	}

	.insights-home-hero--split .insights-home-hero__row {
		min-height: 0 !important;
		height: auto !important;
	}

	.insights-home-hero--split .insights-home-hero__content {
		padding: 84px 16px 22px !important;
		min-height: 0 !important;
		height: auto !important;
		justify-content: flex-start !important;
		align-items: flex-start !important;
	}

	.insights-home-hero--split .insights-home-hero__brand {
		margin-bottom: 10px;
	}

	.insights-home-hero--split .insights-home-hero__brand::after {
		margin-top: 8px;
		width: 36px;
	}

	.insights-home-hero--split h1 {
		margin-bottom: 10px !important;
		padding-bottom: 0 !important;
		font-size: clamp(24px, 7vw, 30px);
	}

	.insights-home-hero--split .insights-home-hero__description {
		margin: 0 0 16px !important;
		font-size: 14px;
		line-height: 1.5;
	}

	.insights-home-hero--split .insights-home-hero__actions {
		margin: 0 !important;
	}

	.insights-home-hero--split .insights-home-hero__media {
		display: none !important;
	}

	.insights-home-hero--bleed .insights-home-hero__content {
		padding: 84px 16px 24px !important;
		min-height: 0 !important;
	}

	.insights-home-hero-stats ul {
		flex-direction: column;
		gap: 10px;
	}

	.insights-home-hero-stats li {
		flex: 1 1 auto;
		width: 100%;
		padding-bottom: 10px;
	}

	.insights-home-hero-stats__inner {
		padding: 14px 16px;
	}

	.blog-top-section .top-blog-box {
		flex-direction: column;
		padding: 12px;
	}

	.blog-top-section .top-blog-box figure {
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
	}

	.blog-top-section .top-blog-box figcaption {
		padding: 12px 4px 4px;
	}

	.categories-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.categories-section {
		padding: 40px 16px;
	}

	.latest-blog-cat-bg .insights-posts-wrap .insights-post-card__media,
	.latest-blog-cat-bg .insights-posts-wrap .item-content-bkg figure {
		aspect-ratio: 16 / 10;
		overflow: hidden;
	}

	.latest-blog-cat-bg .insights-posts-wrap .insights-post-card__media img,
	.latest-blog-cat-bg .insights-posts-wrap .item-content-bkg figure img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.layout-23-cols .our_blog_list .item-holder {
		padding-left: 0;
		padding-right: 0;
	}

	.our_blog_list .item-content-bkg {
		flex-direction: column;
	}

	.our_blog_list .item-content-bkg figure {
		width: 100%;
		height: auto;
		max-height: 220px;
		overflow: hidden;
	}

	.our_blog_list .item-content-bkg figcaption {
		padding: 14px 0 0;
		width: 100%;
	}

	.blog_detail_bg:not(.mira-single-post) .col-md-9,
	.blog_detail_bg:not(.mira-single-post) .col-md-3 {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.single-post-content table {
		display: block;
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.single-post-content iframe,
	.single-post-content video,
	.single-post-content embed {
		max-width: 100%;
		height: auto;
	}

	.dt-related-insights__grid {
		grid-template-columns: 1fr;
	}

	.content-author-box,
	.dtm-author-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.content-author-box figcaption {
		width: 100%;
		padding-left: 0;
		padding-top: 12px;
	}

	.prev-next-sidebar {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.prev-next-sidebar a {
		width: 100%;
	}
}

/* ── Small phones ── */
@media (max-width: 479px) {
	.apm-r-head{padding-right: 30px !important;}
	.insights-home-hero {
		--ih-header-offset: 64px;
		padding: 0 !important;
	}

	.insights-home-hero--split .insights-home-hero__content {
		padding: 30px 14px 30px !important;
	}

	.insights-home-hero h1 {
		font-size: clamp(22px, 6.8vw, 28px);
	}

	.insights-home-hero__brand {
		font-size: clamp(17px, 5vw, 22px);
	}

	.insights-home-hero--split .insights-home-hero__image {
		max-height: 190px;
	}

	.blog-tab-head--pill .blog-insights-tab-link {
		font-size: 11px;
		padding: 8px 10px 7px;
	}

	.mira-archive-hero h1 {
		font-size: 28px;
	}

	.categories-list ul li {
		margin-right: 10px;
		margin-bottom: 10px;
	}

	.categories-list ul li a {
		font-size: 13px;
		padding: 8px 12px;
	}
}

/* ── Detail page: don't let legacy blog.css break TOC layout ── */
@media (min-width: 1200px) and (max-width: 1280px) {
	.mira-single-post .mira-single-columns.blog-detail-content-bg {
		flex-wrap: wrap;
	}

	.mira-single-post .mira-toc-sidebar.blog-left-box {
		width: 100%;
		flex: 0 0 100%;
		max-width: min(560px, 100%);
	}

	.mira-single-post .blog-content-des-bg {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
	}

	.mira-single-post .blog-right-content {
		width: 100%;
		flex: 0 0 auto;
		max-width: min(520px, 100%);
		margin-inline: auto;
	}
}

/* Tablet detail: tighten meta + content before mobile drawer kicks in */
@media (max-width: 1024px) and (min-width: 768px) {
	.mira-single-post .mira-post-hero__meta-bar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mira-single-post .blog_detail_box .single-post-content img {
		width: 100%;
		height: auto;
	}
}
