/**
 * Terralogiq — section styles
 *
 * Styles for sections added/adjusted outside the SCSS build. style.css is
 * generated by webpack from src/scss/app.scss, so it must not be hand-edited;
 * this file is enqueued separately from functions.php (same pattern as
 * terralogiq-table.css).
 */

/* ==========================================================================
   Footer partner banner
   ========================================================================== */

.footer-partner-img {
	/* !important beats `.terralogiq-footer-logo img { width: 45% }` in style.css */
	width: 100% !important;
	max-width: 100%;
	height: auto;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* ==========================================================================
   Trusted & Certified Partners graphic (section--home-carto)
   ========================================================================== */

/* style.css sets `.section--home-carto img { height: 8rem }`, which squashes
   this graphic. Scoped to a dedicated class so the .country-image flags in the
   same section are untouched. */
.section--home-carto img.trusted-partners-img {
	height: auto !important;
	width: 100% !important;
	max-width: 100%;
}

/* ==========================================================================
   #section-mobility anchor target
   ========================================================================== */

/* Offset for the fixed navbar (.navbar.fixed-top), otherwise the heading lands
   underneath it. 54px on mobile, 89px from the -sm breakpoint up, plus a little
   breathing room. */
#section-mobility {
	scroll-margin-top: 70px;
}

@media (min-width: 576px) {
	#section-mobility {
		scroll-margin-top: 105px;
	}
}

html {
	scroll-behavior: smooth;
}

/* ==========================================================================
   Global Standards & Industry Recognition carousel
   ========================================================================== */

.section--recognition {
	padding: 4rem 0 3rem;
}

.section--recognition .recognition-eyebrow {
	font-size: 16px;
	font-weight: 600 !important;
	color: #1a1a1a;
	text-align: center;
	margin-bottom: 0.75rem;
}

.section--recognition h2 {
	color: #0f4267 !important;
	font-size: 26px;
	font-weight: 500 !important;
	text-align: center;
	margin-bottom: 1rem;
}

.section--recognition .recognition-sub {
	font-size: 16px;
	font-weight: 400;
	text-align: center;
	max-width: 780px;
	margin: 0 auto 2.5rem;
	color: #1a1a1a;
	line-height: 1.9;
}

.recognition-carousel {
	position: relative;
	padding-bottom: 3rem;
	overflow: hidden;
}

/* Edge fade — same technique as .logo-carousel-wrapper elsewhere in the theme:
   a white gradient overlay each side so cards fade out at the edges. */
.recognition-carousel::before,
.recognition-carousel::after {
	content: "";
	position: absolute;
	top: 0;
	width: 80px;
	height: 100%;
	z-index: 2;
	pointer-events: none;
}

.recognition-carousel::before {
	left: 0;
	background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.recognition-carousel::after {
	right: 0;
	background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

/* Fixed 300px cards — with slidesPerView:'auto' the cards keep their width
   instead of stretching to fill the viewport on wide screens. */
.recognition-carousel .swiper-slide {
	width: 300px;
	height: auto;
	display: flex;
}

.recognition-card {
	background: #fff;
	border: 1px solid #4285f4;
	border-radius: 20px;
	padding: 22px 12px;
	text-align: center;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.recognition-card__logo {
	height: 62px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.75rem;
}

.recognition-card__logo img {
	max-height: 62px;
	max-width: 100%;
	object-fit: contain;
}

/* the theme sets `h3 { font-weight: 400 !important }` — only !important beats it */
.recognition-card .recognition-card__title {
	color: #0f4267;
	font-size: 22px;
	font-weight: 500 !important;
	line-height: 1.35;
	margin-bottom: 1rem;
}

.recognition-card__body {
	font-size: 16px;
	font-weight: 400;
	line-height: 1.9;
	color: #1a1a1a;
	margin: 0;
}

.recognition-card__body strong {
	font-weight: 700;
}

.recognition-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 2rem;
}

.recognition-dot {
	width: 26px;
	height: 4px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: #c4c4c4;
	cursor: pointer;
	transition: background 0.2s ease;
}

.recognition-dot.is-active {
	background: #0f4267;
}

@media (max-width: 767px) {
	.recognition-card .recognition-card__title {
		font-size: 20px;
	}

	.section--recognition {
		padding: 2.5rem 0 2rem;
	}

	.recognition-carousel::before,
	.recognition-carousel::after {
		width: 40px;
	}
}

/* ==========================================================================
   Single post — Suggested / Most Popular article grids
   ========================================================================== */

.related-articles {
	margin-bottom: 3rem;
}

/* 30px between the two sections */
.related-articles__section + .related-articles__section {
	margin-top: 30px;
}

/* Section heading is an h2 — style.css already sets 26px !important */
.related-articles__heading {
	text-align: center;
	margin: 0 0 16px; /* heading → cards */
}

/* 42px between cards, in both axes */
.related-articles__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 42px;
}

.article-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.article-card__media {
	display: block;
	width: 100%;
}

/* Fixed ratio keeps the three cards in a row aligned regardless of the
   source image's own proportions.
   `height: auto` is required, not cosmetic: WordPress emits width/height
   attributes on the <img>, and that presentational height wins whenever no
   author rule sets one — which pins the box to the file's own height and
   makes aspect-ratio a no-op. */
.article-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 12px;
}

/* Card title is an h3 — style.css already sets 22px !important. The weight
   needs !important of its own: header.php carries an inline <style> block with
   a site-wide `h3 { font-weight: 400 !important }` (header.php:74), which no
   amount of selector specificity in a stylesheet can beat. */
.article-card__title {
	margin: 16px 0 0; /* image → title */
	font-weight: 500 !important;
}

.article-card__title a {
	color: #0f4267;
	text-decoration: none;
}

.article-card__title a:hover {
	text-decoration: underline;
}

.article-card__date {
	margin: 10px 0 0; /* title → date */
	font-size: 16px;
	font-weight: 400;
}

.article-card__desc {
	margin: 10px 0 0;
	font-size: 16px;
	font-weight: 400;
}

.article-card__btn {
	margin-top: 20px; /* description → button */
}

/* Mobile: image and title only, centred. */
@media (max-width: 767px) {
	.related-articles__grid {
		grid-template-columns: 1fr;
	}

	.article-card {
		align-items: center;
		text-align: center;
	}

	.article-card__date,
	.article-card__desc {
		display: none;
	}

	/* !important beats `.btn { display: inline-block }` in style.css */
	.article-card__btn {
		display: none !important;
	}
}

/* ==========================================================================
   Blog post quote (Gutenberg .wp-block-quote)
   Figma: Website-Terralogiq node 7719:10353
   ========================================================================== */

.blog--article blockquote,
.blog--article .wp-block-quote,
.blog--article .wp-block-quote:not(.is-style-plain) {
	position: relative;
	border: none;
	border-left: none;
	box-shadow: none;
	background: none;
	padding: 36px 0 0;
	margin: 2.5rem 0;
	max-width: 100%;
	quotes: none;
	font-family: "Inter", sans-serif;
	font-weight: 500;
	font-size: 20px;
	line-height: 1.5;
	letter-spacing: 0;
	color: #202124;
}

.blog--article blockquote::before,
.blog--article .wp-block-quote::before {
	content: "";
	position: absolute;
	top: 0;
	left: 4px;
	z-index: 0;
	display: block;
	width: 76.4px;
	height: 52.329px;
	pointer-events: none;
	background-image: url("assets/images/blockquote-quote.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 76.4px 52.329px;
}

.blog--article blockquote::after,
.blog--article .wp-block-quote::after,
.blog--article blockquote blockquote::before,
.blog--article .wp-block-quote .wp-block-quote::before {
	content: none;
	width: 0;
	height: 0;
	background: none;
}

.blog--article blockquote p,
.blog--article .wp-block-quote p,
.blog--article .wp-block-quote .wp-block-paragraph {
	position: relative;
	z-index: 1;
	margin: 0;
	font-family: "Inter", sans-serif !important;
	font-weight: 500 !important;
	font-size: 20px !important;
	line-height: 1.5;
	letter-spacing: 0;
	color: #202124 !important;
}

.detail-article .blog--article blockquote p,
.detail-article .blog--article blockquote span,
.detail-article .blog--article .wp-block-quote p,
.detail-article .blog--article .wp-block-quote span,
.detail-article .blog--article .wp-block-quote .wp-block-paragraph {
	font-size: 20px !important;
	font-weight: 500 !important;
	color: #202124 !important;
}

.blog--article blockquote cite,
.blog--article .wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-family: "Inter", sans-serif;
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.5;
	color: #202124;
}

/* ==========================================================================
   Blog post accordion (Gutenberg .wp-block-accordion)
   Figma: Website-Terralogiq node 7719:13315
   ========================================================================== */

.wp-block-accordion {
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-sizing: border-box;
}

/* Duplicate items share one parent (gap above). A newly inserted
   accordion is a sibling block, so it needs the same 8px between groups. */
.wp-block-accordion + .wp-block-accordion {
	margin-block-start: 8px;
	margin-top: 8px;
}

.wp-block-accordion-item {
	position: relative;
	width: 100%;
}

.wp-block-accordion-heading,
.blog--article .wp-block-accordion-heading {
	margin: 0 !important;
	padding: 0;
	font-family: "Inter", sans-serif;
	font-size: 16px !important;
	font-weight: 700;
	line-height: 1.43;
	color: #0e426a !important;
}

.wp-block-accordion-heading__toggle,
.wp-block-accordion-heading__toggle:hover,
.wp-block-accordion-heading__toggle:focus {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 45px;
	margin: 0;
	padding: 10px 18px !important;
	overflow: hidden;
	border: none !important;
	border-radius: 5.511px;
	background-color: #edf0f6 !important;
	box-shadow: none !important;
	color: #0e426a !important;
	font-family: "Inter", sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.43;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.wp-block-accordion-heading__toggle-title,
.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
	flex: 1;
	font-family: "Inter", sans-serif;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.43;
	color: #0e426a !important;
	text-decoration: none;
}

.wp-block-accordion-heading__toggle-icon {
	display: none;
}

.wp-block-accordion-item:not(.is-open) > .wp-block-accordion-panel {
	display: none;
}

.wp-block-accordion-item.is-open > .wp-block-accordion-panel {
	display: block;
	box-sizing: border-box;
	margin-top: -35px;
	padding: 48px 18px 20px;
	background: #fff;
	border: 0.919px solid rgba(0, 0, 0, 0.3);
	border-radius: 12px;
}

.wp-block-accordion-panel p,
.wp-block-accordion-panel .wp-block-paragraph {
	margin: 0 0 1em;
	font-family: "Inter", sans-serif !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 2;
	color: #202124 !important;
}

.wp-block-accordion-panel p:last-child,
.wp-block-accordion-panel .wp-block-paragraph:last-child {
	margin-bottom: 0;
}

.detail-article .wp-block-accordion-heading__toggle-title,
.detail-article .wp-block-accordion-heading__toggle span {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: #0e426a !important;
}

.detail-article .wp-block-accordion-panel p,
.detail-article .wp-block-accordion-panel span {
	font-size: 16px !important;
	font-weight: 400 !important;
	color: #202124 !important;
}

/* ==========================================================================
   Blog table of contents (Easy TOC → Figma 7719:10341 / 7719:7451 / 7719:17628)
   ========================================================================== */

.blog--article h2,
.blog--article h3,
.blog--article h4,
.blog--article h5,
.blog--article h6 {
	scroll-margin-top: 105px;
}

.blog-post-layout {
	display: grid;
	grid-template-columns: 1fr;
}

.blog-toc-rail[hidden] {
	display: none !important;
}

/* Hide the plugin box while it still sits inside the article. */
.blog--article #ez-toc-container {
	display: none !important;
}

.blog-toc-fab[hidden] {
	display: none !important;
}

.blog-toc-fab {
	position: fixed;
	right: 16px;
	bottom: 24px;
	z-index: 1040;
	box-sizing: border-box;
	width: 71px;
	height: 71px;
	padding: 9.125px;
	border: none;
	border-radius: 57.488px;
	background: #0e426a;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(14, 66, 106, 0.28);
}

.blog-toc-fab img {
	display: block;
	width: 34.4px;
	height: 29.1px;
	margin: auto;
}

.blog-toc-slot #ez-toc-container,
.blog-toc-slot #ez-toc-container.ez-toc-grey,
.blog-toc-slot #ez-toc-container.ez-toc-light-blue,
.blog-toc-slot #ez-toc-container.ez-toc-white,
.blog-toc-slot #ez-toc-container.ez-toc-transparent {
	display: block !important;
	width: 100%;
	max-width: 220px;
	margin: 0;
	padding: 0;
	background: none !important;
	border: none !important;
	border-radius: 0;
	box-shadow: none !important;
}

.blog-toc-slot .ez-toc-title-container {
	display: block;
	width: 100%;
	padding: 12px 0;
	background: none;
}

.blog-toc-slot .ez-toc-title-toggle {
	display: none !important;
}

.blog-toc-slot p.ez-toc-title,
.detail-article .blog-toc-slot p.ez-toc-title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: "Inter", sans-serif !important;
	font-size: 20px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	color: #0e426a !important;
	text-align: left !important;
}

.blog-toc-slot #ez-toc-container nav,
.blog-toc-slot #ez-toc-container ul,
.blog-toc-slot #ez-toc-container li {
	background: none !important;
	border: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
	line-height: 1.3;
	list-style: none !important;
}

.blog-toc-slot #ez-toc-container nav ul li a::before,
.blog-toc-slot #ez-toc-container nav ul li a::after {
	content: none !important;
	display: none !important;
	counter-increment: none !important;
}

.blog-toc-slot #ez-toc-container a.ez-toc-link,
.detail-article .blog-toc-slot #ez-toc-container a.ez-toc-link {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	font-family: "Inter", sans-serif !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	line-height: 2;
	color: #0e426a !important;
	text-decoration: none !important;
	text-align: left;
}

.blog-toc-slot #ez-toc-container a.ez-toc-link:hover,
.blog-toc-slot #ez-toc-container a.ez-toc-link:visited,
.blog-toc-slot #ez-toc-container a.ez-toc-link:focus {
	color: #0e426a !important;
	text-decoration: none !important;
}

.blog-toc-row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	border-radius: 8px;
}

.blog-toc-slot #ez-toc-container nav > ul > li.has-children.is-open > .blog-toc-row {
	background: #edf0f6;
}

.blog-toc-chevron {
	flex: 0 0 12px;
	width: 12px;
	height: 12px;
	padding: 0;
	border: none;
	background-color: transparent;
	background-image: url("assets/images/toc-chevron.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
	transform: rotate(90deg);
	cursor: pointer;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul {
	display: none;
	padding: 0 0 4px 10px !important;
	list-style: none !important;
	counter-reset: toc-child;
}

.blog-toc-slot #ez-toc-container nav > ul > li.is-open > ul {
	display: block;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul > li {
	margin: 0 !important;
	padding: 4px 10px !important;
	list-style: none !important;
	counter-increment: toc-child;
	color: #0e426a;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul > li > .blog-toc-row {
	padding: 0;
	background: none;
	align-items: baseline;
	gap: 8px;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul > li > .blog-toc-row::before {
	content: counter(toc-child) ".";
	flex: 0 0 auto;
	min-width: 1.15em;
	font-family: "Inter", sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	color: #0e426a;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul a.ez-toc-link,
.detail-article .blog-toc-slot #ez-toc-container nav > ul > li > ul a.ez-toc-link {
	font-weight: 400 !important;
	line-height: 1.5 !important;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul ul {
	display: none;
	padding-left: 18px !important;
	list-style: none !important;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul li.is-open > ul {
	display: block;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul ul > li {
	padding: 4px 10px !important;
	list-style: none !important;
}

.blog-toc-slot #ez-toc-container nav > ul > li > ul ul > li > .blog-toc-row::before {
	content: "•";
	min-width: 0.9em;
	line-height: 1.5;
}

@media (min-width: 992px) {
	.blog-post-layout.has-toc {
		grid-template-columns: 220px minmax(0, 1fr);
		column-gap: 48px;
		align-items: start;
	}

	.blog-post-layout:not(.has-toc) .blog-post-main {
		max-width: 66.6667%;
		margin-left: auto;
		margin-right: auto;
	}

	.blog-toc-rail {
		position: sticky;
		top: 105px;
		width: 220px;
		max-height: calc(100vh - 120px);
		overflow: auto;
	}

	.blog-toc-fab {
		display: none !important;
	}
}

@media (max-width: 991px) {
	.blog-toc-rail:not([hidden]) {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 1050;
		align-items: center;
		justify-content: center;
		padding: 20px;
		background: rgba(14, 66, 106, 0.35);
		overflow: auto;
	}

	.blog-toc-rail.is-open {
		display: flex;
	}

	.blog-toc-panel {
		width: 335px;
		max-width: 100%;
		background: #edf0f6;
		border-radius: 6px;
		overflow: hidden;
	}

	.blog-toc-slot #ez-toc-container,
	.blog-toc-slot #ez-toc-container.ez-toc-grey {
		max-width: none;
		background: #edf0f6 !important;
	}

	.blog-toc-slot .ez-toc-title-container {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 12px 10px;
		background: #0e426a;
	}

	.blog-toc-slot p.ez-toc-title,
	.detail-article .blog-toc-slot p.ez-toc-title {
		color: #fff !important;
		text-align: center !important;
		width: 220px;
	}

	.blog-toc-slot #ez-toc-container nav {
		padding: 7px 0 12px !important;
	}

	.blog-toc-row {
		padding: 4px 10px;
		background: none !important;
		border-radius: 8px;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li.has-children.is-open > .blog-toc-row {
		background: none;
	}

	.blog-toc-chevron {
		display: none;
	}

	.blog-toc-slot #ez-toc-container nav > ul {
		list-style: none !important;
		padding: 0 10px !important;
		counter-reset: toc-top;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li {
		padding: 4px 0 !important;
		list-style: none !important;
		counter-increment: toc-top;
		color: #0e426a;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li > .blog-toc-row {
		padding: 0;
		align-items: flex-start;
		gap: 6px;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li > .blog-toc-row::before {
		content: counter(toc-top) ".";
		flex: 0 0 auto;
		min-width: 1.15em;
		font-family: "Inter", sans-serif;
		font-size: 12px;
		font-weight: 600;
		line-height: 2;
		color: #0e426a;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li > ul {
		display: block !important;
		padding: 0 0 0 18px !important;
		list-style: none !important;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li > ul > li {
		padding: 4px 0 !important;
		list-style: none !important;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li > ul > li > .blog-toc-row::before {
		content: "•";
		min-width: 0.9em;
		font-weight: 400;
		line-height: 2;
	}

	.blog-toc-slot #ez-toc-container a.ez-toc-link,
	.detail-article .blog-toc-slot #ez-toc-container a.ez-toc-link {
		font-weight: 600 !important;
		line-height: 2;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li > ul a.ez-toc-link {
		font-weight: 400 !important;
	}

	.blog-toc-slot #ez-toc-container nav > ul > li > ul ul {
		display: block !important;
		padding-left: 18px !important;
	}
}
