/* eComCPA single blog post
   -------------------------------------------------- */

html body .site-main.ecc-post {
	/* Beat Hello Elementor's `body:not(...) .site-main { max-width: 1140px }`. */
	max-width: none;
	width: 100%;
	margin: 0;
	padding-inline: 0;
}

.ecc-post {
	/* Tokens come from blog.css, which is enqueued as a dependency. */
	--ecc-ink: #11223a;
	--ecc-muted: #4d5a69;
	background: #fff;
	font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ecc-post * {
	box-sizing: border-box;
}

/* Banner
   -------------------------------------------------- */

.ecc-post__banner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 32px 24px 0;
}

.ecc-post__banner-img {
	display: block;
	width: 100%;
	height: clamp(260px, 38vw, 460px);
	border-radius: 0;
	object-fit: cover;
	background: var(--ecc-bg);
}

/* Post header
   -------------------------------------------------- */

.ecc-post__header {
	margin: 0 0 40px;
	padding: 0 0 28px;
	border-bottom: 1px solid var(--ecc-line);
}

.ecc-post__eyebrow {
	display: inline-block;
	margin-bottom: 16px;
	color: var(--ecc-green-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.ecc-post__title {
	margin: 0;
	color: var(--ecc-navy);
	font-family: "Circular Std", "Roboto", sans-serif;
	font-weight: 600;
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.ecc-post__meta {
	margin-top: 16px;
	color: var(--ecc-muted);
	font-size: 14px;
	letter-spacing: 0.02em;
}

.ecc-post__dot {
	margin: 0 8px;
}

/* Layout
   -------------------------------------------------- */

.ecc-post__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 64px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 72px 24px 88px;
	align-items: start;
}

.ecc-post__main {
	min-width: 0;
}

/* Table of contents
   -------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Keeps a jumped-to heading clear of the top of the window. */
.ecc-post__content h2,
.ecc-post__content h3 {
	scroll-margin-top: 28px;
}

.ecc-toc {
	margin: 0 0 44px;
	padding: 26px 28px 28px;
	border: 1px solid var(--ecc-line);
	border-left: 3px solid var(--ecc-green);
	border-radius: 0;
	background: var(--ecc-bg);
}

.ecc-toc__title {
	margin: 0 0 16px;
	color: var(--ecc-navy);
	font-family: "Circular Std", "Roboto", sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ecc-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ecc-toc;
}

.ecc-toc__list li {
	counter-increment: ecc-toc;
	margin: 0;
}

.ecc-toc__list li + li {
	margin-top: 2px;
}

.ecc-toc__list a {
	display: flex;
	gap: 12px;
	padding: 7px 0;
	color: var(--ecc-muted);
	font-size: 15.5px;
	line-height: 1.55;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ecc-toc__list a::before {
	content: counter(ecc-toc) ".";
	flex: none;
	min-width: 20px;
	color: var(--ecc-green);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.ecc-toc__list a:hover {
	color: var(--ecc-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Article typography
   -------------------------------------------------- */

.ecc-post__content {
	color: var(--ecc-muted);
	font-size: 17px;
	line-height: 1.8;
}

.ecc-post__content > *:first-child {
	margin-top: 0;
}

.ecc-post__content p {
	margin: 0 0 24px;
}

.ecc-post__content h2,
.ecc-post__content h3,
.ecc-post__content h4 {
	color: var(--ecc-navy);
	font-family: "Circular Std", "Roboto", sans-serif;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.005em;
}

.ecc-post__content h2 {
	margin: 48px 0 18px;
	font-size: 28px;
}

.ecc-post__content h3 {
	margin: 38px 0 14px;
	font-size: 21px;
}

.ecc-post__content h4 {
	margin: 30px 0 12px;
	font-size: 18px;
}

.ecc-post__content a {
	color: var(--ecc-green-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.ecc-post__content a:hover {
	color: var(--ecc-navy);
}

.ecc-post__content strong {
	color: var(--ecc-ink);
	font-weight: 600;
}

.ecc-post__content ul,
.ecc-post__content ol {
	margin: 0 0 24px;
	padding-left: 22px;
}

.ecc-post__content li {
	margin-bottom: 10px;
}

.ecc-post__content li::marker {
	color: var(--ecc-green);
}

.ecc-post__content img,
.ecc-post__content iframe,
.ecc-post__content video {
	max-width: 100%;
	height: auto;
	border-radius: 0;
}

.ecc-post__content figure {
	margin: 32px 0;
}

.ecc-post__content figcaption {
	margin-top: 10px;
	color: var(--ecc-faint);
	font-size: 14px;
	text-align: center;
}

.ecc-post__content blockquote {
	margin: 34px 0;
	padding: 4px 0 4px 26px;
	border-left: 3px solid var(--ecc-green);
	color: var(--ecc-ink);
	font-size: 20px;
	line-height: 1.6;
	font-style: italic;
}

.ecc-post__content blockquote p:last-child {
	margin-bottom: 0;
}

.ecc-post__content table {
	width: 100%;
	margin: 0 0 28px;
	border-collapse: collapse;
	font-size: 15px;
}

.ecc-post__content th,
.ecc-post__content td {
	padding: 12px 14px;
	border: 1px solid var(--ecc-line);
	text-align: left;
}

.ecc-post__content th {
	background: var(--ecc-bg);
	color: var(--ecc-navy);
	font-weight: 600;
}

.ecc-post__content code {
	padding: 2px 6px;
	border-radius: 0;
	background: var(--ecc-bg);
	font-size: 0.92em;
}

.ecc-post__content pre {
	margin: 0 0 28px;
	padding: 18px 20px;
	border-radius: 0;
	background: var(--ecc-navy);
	color: #e7eef7;
	overflow-x: auto;
}

.ecc-post__content hr {
	margin: 44px 0;
	border: 0;
	border-top: 1px solid var(--ecc-line);
}

/* Tags and share
   -------------------------------------------------- */

.ecc-post__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 44px;
}

.ecc-post__tags a {
	padding: 6px 14px;
	border-radius: 0;
	background: var(--ecc-bg);
	color: var(--ecc-muted);
	font-size: 13px;
	text-decoration: none;
	transition: all 0.2s ease;
}

.ecc-post__tags a:hover {
	background: rgba(63, 166, 132, 0.12);
	color: var(--ecc-green-dark);
}

.ecc-post__share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--ecc-line);
}

.ecc-post__share-label {
	color: var(--ecc-navy);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ecc-post__share-list {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ecc-post__share-list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid var(--ecc-line);
	border-radius: 50%;
	color: var(--ecc-navy);
	transition: all 0.25s ease;
}

.ecc-post__share-list a:hover {
	background: var(--ecc-navy);
	border-color: var(--ecc-navy);
	color: #fff;
}

.ecc-post__page-links {
	margin-top: 28px;
	font-size: 15px;
}

/* Sidebar
   -------------------------------------------------- */

.ecc-post__sidebar {
	position: sticky;
	top: 24px;
	min-width: 0;
}

.ecc-widget + .ecc-widget {
	margin-top: 36px;
}

.ecc-widget__title {
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ecc-line);
	color: var(--ecc-navy);
	font-family: "Circular Std", "Roboto", sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* Author */

.ecc-widget--author {
	padding: 26px 24px 28px;
	border: 1px solid var(--ecc-line);
	border-radius: 0;
	background: var(--ecc-bg);
}

.ecc-widget--author .ecc-widget__title {
	border-bottom-color: #dde3ec;
}

.ecc-author {
	text-align: center;
}

.ecc-author__initials,
.ecc-author__photo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 92px;
	height: 92px;
	margin: 4px auto 16px;
	border-radius: 50%;
	object-fit: cover;
}

.ecc-author__initials {
	background: linear-gradient(135deg, #062D60 0%, #0a4a9e 100%);
	color: #fff;
	font-family: "Circular Std", "Roboto", sans-serif;
	font-size: 26px;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.ecc-author__name {
	margin: 0;
	color: var(--ecc-navy);
	font-family: "Circular Std", "Roboto", sans-serif;
	font-size: 17px;
	font-weight: 600;
}

.ecc-author__role {
	margin: 2px 0 14px;
	color: var(--ecc-faint);
	font-size: 13px;
	letter-spacing: 0.02em;
}

.ecc-author__bio {
	margin: 0;
	color: var(--ecc-muted);
	font-size: 14px;
	line-height: 1.7;
	text-align: left;
}

/* Latest posts */

.ecc-latest {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ecc-latest__item {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--ecc-line);
}

.ecc-latest__item:first-child {
	padding-top: 0;
}

.ecc-latest__item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.ecc-latest__thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 0;
	overflow: hidden;
	background: var(--ecc-bg);
}

.ecc-latest__thumb img,
.ecc-latest__fallback {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ecc-latest__fallback {
	background: linear-gradient(135deg, #062D60 0%, #0a4a9e 100%);
}

.ecc-latest__text {
	min-width: 0;
}

.ecc-latest__title {
	display: block;
	color: var(--ecc-navy);
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.45;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ecc-latest__title:hover {
	color: var(--ecc-green-dark);
}

.ecc-latest__date {
	display: block;
	margin-top: 5px;
	color: var(--ecc-faint);
	font-size: 12.5px;
}

/* Categories */

.ecc-cats {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ecc-cats a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--ecc-line);
	color: var(--ecc-muted);
	font-size: 15px;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ecc-cats li:last-child a {
	border-bottom: 0;
}

.ecc-cats a:hover {
	color: var(--ecc-green-dark);
}

.ecc-cats__count {
	flex: none;
	min-width: 26px;
	padding: 2px 8px;
	border-radius: 0;
	background: var(--ecc-bg);
	color: var(--ecc-faint);
	font-size: 12px;
	text-align: center;
}

/* Related posts
   -------------------------------------------------- */

.ecc-related {
	background: var(--ecc-bg);
	border-top: 1px solid var(--ecc-line);
	padding: 72px 24px 88px;
}

.ecc-related__inner {
	max-width: 1180px;
	margin: 0 auto;
}

.ecc-related__title {
	margin: 0 0 34px;
	color: var(--ecc-navy);
	font-family: "Circular Std", "Roboto", sans-serif;
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 600;
	letter-spacing: -0.01em;
}

.ecc-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

/* The grid is fixed here, not masonry, so crop the covers to one ratio. */
.ecc-related__grid .ecc-card__media {
	aspect-ratio: 16 / 10;
}

.ecc-related__grid .ecc-card__img {
	height: 100%;
	object-fit: cover;
}

/* Responsive
   -------------------------------------------------- */

@media (max-width: 1024px) {
	.ecc-post__banner {
		padding: 24px 24px 0;
	}

	.ecc-post__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 56px;
		padding: 56px 24px 72px;
	}

	.ecc-post__sidebar {
		position: static;
	}

	.ecc-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

@media (max-width: 767px) {
	.ecc-post__banner {
		padding: 20px 20px 0;
	}

	.ecc-post__banner-img {
		height: 220px;
		border-radius: 0;
	}

	.ecc-post__header {
		margin-bottom: 32px;
		padding-bottom: 22px;
	}

	.ecc-post__layout {
		padding: 44px 20px 60px;
		gap: 48px;
	}

	.ecc-toc {
		padding: 22px 20px 24px;
		margin-bottom: 36px;
	}

	.ecc-post__content {
		font-size: 16px;
	}

	.ecc-post__content h2 {
		font-size: 24px;
		margin-top: 38px;
	}

	.ecc-post__content h3 {
		font-size: 19px;
	}

	.ecc-related {
		padding: 52px 20px 64px;
	}

	.ecc-related__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* WhatsApp enquiry widget
   -------------------------------------------------- */

/* Shares the author box's shell so the two sidebar panels read as a set. */
.ecc-widget--whatsapp {
	padding: 26px 24px 28px;
	border: 1px solid var(--ecc-line);
	border-radius: 0;
	background: var(--ecc-bg);
}

.ecc-widget--whatsapp .ecc-widget__title {
	border-bottom-color: #dde3ec;
}

.ecc-wa {
	margin: 0;
}

/* Two classes, so these beat Hello Elementor's `input[type=text]` base rule
   and the inputs and the textarea carry the same border. */
.ecc-wa .ecc-wa__field {
	display: block;
	width: 100%;
	margin-bottom: 14px;
	padding: 12px 14px;
	border: 1px solid var(--ecc-line);
	border-radius: 0;
	background: #fff;
	color: var(--ecc-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	outline: none;
	box-shadow: none;
	transition: border-color 0.2s ease;
}

.ecc-wa .ecc-wa__field:focus {
	border-color: var(--ecc-green);
	box-shadow: none;
}

.ecc-wa .ecc-wa__field::placeholder {
	color: var(--ecc-faint);
	opacity: 1;
}

.ecc-wa .ecc-wa__message {
	height: 120px;
	resize: vertical;
}

.ecc-wa .ecc-wa__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin-top: 4px;
	padding: 15px 18px;
	border: none;
	border-radius: 0;
	background: var(--ecc-green);
	color: #fff;
	font-family: "Circular Std", "Roboto", sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.25s ease;
}

.ecc-wa .ecc-wa__btn:hover,
.ecc-wa .ecc-wa__btn:focus {
	background: var(--ecc-green-dark);
	color: #fff;
}

.ecc-wa .ecc-wa__btn:focus-visible {
	outline: 2px solid var(--ecc-black);
	outline-offset: 3px;
}

.ecc-wa .ecc-wa__btn svg {
	flex: 0 0 auto;
}
