/* GS Logo popup (style 01): header alignment and the Quote section under
   About (includes/gs-logo-popup.php). */

/* ── Header: title, Visit Website and the X on one centre line ──
   The title kept 4px of space below it for a category line the site hides,
   and the button sat 4px low, so the title looked 5px too high. */
.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-header .gs-p1-title {
	margin-bottom: 0 !important;
}
.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-header .gs-p1-header-actions {
	padding-top: 0 !important;
}
/* Desktop: the header is always 48px of content with equal 26px padding
   above and below, button or not. The 48px X sits at top: 26px, so the
   name, Visit website and the X are centred between the popup's top edge
   and the header's bottom line, for every company. */
@media (min-width: 641px) {
	.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-header {
		padding-top: 26px !important;
		padding-bottom: 26px !important;
	}
	.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-header .gs-p1-header-brand {
		min-height: 48px;
	}
}
/* The X is a 48px circle, the same height as the Visit website pill. */
.gs-logo-popup-style-01.gs-logo-detail .gs-logo-detail__dialog > button.gs-logo-detail__close {
	top: 26px !important;
	width: 48px !important;
	height: 48px !important;
	min-width: 48px !important;
	min-height: 48px !important;
}
@media (max-width: 640px) {
	/* Phones: the title sits above a full-width button; line the X up with the title. */
	.gs-logo-popup-style-01.gs-logo-detail .gs-logo-detail__dialog > button.gs-logo-detail__close {
		top: 12px !important;
		width: 40px !important;
		height: 40px !important;
		min-width: 40px !important;
		min-height: 40px !important;
	}
}

/* ── Header lifted above the scrolling area (assets/js/gs-logo-popup.js) ──
   The plugin kept the header inside the scrolling area as position: sticky,
   and in some browsers (e.g. logged in, with the admin bar) it sat 32px too
   low and slid over the content. The script moves it into a wrapper above
   the scrolling area, so it is a plain block at the top of the popup. */
.gs-logo-popup-style-01 .gs-logo-detail__dialog > .gcs-p1-head {
	flex: 0 0 auto;
	position: relative;
	z-index: 2;
}
.gs-logo-popup-style-01 .gs-logo-detail__dialog > .gcs-p1-head > .gs-p1-header {
	position: static !important;
	top: auto !important;
	margin: 0 !important;
	transform: none !important;
}

/* ── Scrolling: the page behind stays still ──
   At the top or bottom of the popup, further scrolling made the browser
   "bounce" the content and then scroll the page behind. Turn the bounce off
   and keep the page still while a popup is open. */
.gs-logo-popup-style-01 .gs-logo-detail__body {
	overscroll-behavior: none;
}
html:has(.gs-logo-detail.is-open),
html:has(.gs-logo-detail.is-open) body {
	overflow: hidden !important;
}
html:has(.gs-logo-detail.is-open) {
	scrollbar-gutter: stable; /* no sideways jump where scrollbars take space */
}

/* ── Brand: World Majlis colours and shapes ──
   The plugin draws almost everything from four colour variables, which
   default to dark greens. Point them at the site's palette: link blue
   #2475B0 (4.95:1 on white, passes AA for the button text), button blue
   #308CC7, text #353535, and a light tint of that blue for card surfaces.
   The higher-specificity selector beats the plugin's own definitions. */
.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile {
	--gs-primary: #2475B0;
	--gs-secondary: #308CC7;
	--gs-text: #353535;
	--gs-bg: #F3F8FC;
	--p1-surface: #F3F8FC; /* cards: the site blue #308CC7 at 6% on white */
	--p1-body: #4A4A4A;   /* about / card text, 8.9:1 */
	--p1-muted: #6B6B6B;  /* labels and URLs, 5.3:1 */
	--p1-border-soft: color-mix(in srgb, #2475B0 16%, transparent);
}

/* Rounder corners, like the site's cards (dialog 24px, inner cards 16px). */
.gs-logo-detail.gs-logo-popup-style-01 .gs-logo-detail__dialog {
	border-radius: 24px;
}
.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile :is(.gs-p1-vm-card, .gs-p1-info-box, .gs-p1-deck, .gs-p1-social-link, .gs-p1-media-card, .gs-p1-gallery-item, .gs-p1-gallery-item img) {
	border-radius: 16px;
}

/* Vision / Mission in sentence case, as headings are across the site. The
   company name shows exactly as typed, so brand spellings survive. */
.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile :is(.gs-p1-title, .gs-p1-vm-title) {
	text-transform: none !important;
}

/* Visit Website: the site's pill button, with the white circle and navy
   arrow on the right (compact, 48px tall, to fit the header). */
.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-btn.gs-p1-btn--primary {
	display: inline-flex;
	align-items: center;
	justify-content: space-between; /* full-width on phones: arrow at the far right */
	gap: 16px;
	height: 48px;
	padding: 4px 4px 4px 22px !important;
	background: #2475B0 !important;
	border: 0 !important;
	border-radius: 20px !important;
	color: #fff !important;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	transition: background-color .2s ease-out;
}
.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-btn.gs-p1-btn--primary:is(:hover, :focus-visible) {
	background: #0A1A3E !important;
}
.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-btn.gs-p1-btn--primary .gs-p1-icon {
	display: none;
}
.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-btn.gs-p1-btn--primary::after {
	content: "";
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1A3E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8.5 7H17v8.5'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
	transition: transform .3s ease;
}
/* Same as the site's buttons: on hover the arrow turns 45deg, from ↗ to →. */
.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-btn.gs-p1-btn--primary:is(:hover, :focus-visible)::after {
	transform: rotate(45deg);
}

/* Close button: a circle like the site's icon buttons; navy on hover and
   keyboard focus instead of the plugin's green. */
.gs-logo-popup-style-01.gs-logo-detail .gs-logo-detail__dialog > button.gs-logo-detail__close[type="button"] {
	border-radius: 50% !important;
	transition: border-color .2s ease-out, background-color .2s ease-out;
}
.gs-logo-popup-style-01.gs-logo-detail .gs-logo-detail__dialog > button.gs-logo-detail__close[type="button"]:is(:hover, :focus-visible, :active) {
	background: #fff !important;
	border-color: #0A1A3E !important;
}
.gs-logo-popup-style-01.gs-logo-detail .gs-logo-detail__dialog > button.gs-logo-detail__close[type="button"] .gs-logo-detail__close-icon {
	color: #0A1A3E !important;
}

@media (prefers-reduced-motion: reduce) {
	.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-btn.gs-p1-btn--primary,
	.gs-logo-detail.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-btn.gs-p1-btn--primary::after,
	.gs-logo-popup-style-01.gs-logo-detail .gs-logo-detail__dialog > button.gs-logo-detail__close[type="button"] {
		transition: none;
	}
}

/* ── Phones: name at the top, Visit website at the bottom ──
   The lifted header's two parts join the popup's column (display: contents)
   so the name sits above the scrolling content and the button below it.
   Neither scrolls, and nothing relies on sticky positioning. */
@media (max-width: 640px) {
	.gs-logo-popup-style-01 .gs-logo-detail__dialog > .gcs-p1-head,
	.gs-logo-popup-style-01 .gs-logo-detail__dialog > .gcs-p1-head > .gs-p1-header {
		display: contents;
	}
	.gs-logo-popup-style-01 .gs-logo-detail__dialog > .gcs-p1-head .gs-p1-header-brand {
		order: 0;
		flex: 0 0 auto;
		justify-content: center;
		padding: 20px 64px; /* equal above and below, so the X (top: 12px) lines up */
		background: #fff;
		border-bottom: 1px solid var(--p1-border);
	}
	.gs-logo-popup-style-01 .gs-logo-detail__dialog > .gs-logo-detail__body {
		order: 1;
	}
	.gs-logo-popup-style-01 .gs-logo-detail__dialog > .gcs-p1-head .gs-p1-header-actions {
		order: 2;
		flex: 0 0 auto;
		width: auto !important;
		padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
		background: #fff;
		border-top: 1px solid var(--p1-border);
		box-shadow: 0 -6px 16px rgba(10, 26, 62, .06);
	}
	.gs-logo-popup-style-01 .gs-logo-detail__dialog > .gcs-p1-head .gs-p1-btn.gs-p1-btn--primary {
		width: 100%;
		margin-right: 0 !important;
	}
	/* The floating accessibility button would sit on top of the button's
	   arrow; hide it while a partner popup is open (it returns on close). */
	html:has(.gs-logo-detail.gs-logo-popup-style-01.is-open) #ea11y-root {
		visibility: hidden;
	}
}

/* ── Quote: a navy card like the site's "Urban Intelligence Blueprints"
   block: the same navy gradient with a cyan glow, 24px corners, the heading
   in a pill and the quote in large white type. ── */

.gcs-logo-quote {
	margin-top: 28px;
}

.gcs-logo-quote .gcs-logo-quote__card {
	position: relative;
	margin: 0;
	padding: 26px 32px 30px;
	background:
		radial-gradient(80% 110% at 0% 100%, rgba(5, 178, 207, .16) 0%, rgba(5, 178, 207, 0) 62%),
		linear-gradient(120deg, #0A1A3D 0%, #0C1F4C 100%);
	border: 0;
	border-radius: 24px;
	color: #fff;
}

/* The heading, as the site's pill: white text, cyan outline. */
.gcs-logo-quote .gcs-logo-quote__heading {
	display: inline-flex;
	align-items: center;
	margin: 0 0 22px !important;
	padding: 7px 14px;
	border: 1px solid rgba(5, 178, 207, .6);
	border-radius: 999px;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	letter-spacing: .02em !important;
	line-height: 1.3 !important;
	text-transform: none !important;
}

/* Large quote mark in the top-right corner. */
.gcs-logo-quote .gcs-logo-quote__mark {
	position: absolute;
	top: 22px;
	right: 26px;
	left: auto;
	display: block;
	width: 40px;
	height: 40px;
	margin: 0;
	color: #05B2CF;
}
/* No heading: keep the first line of the quote clear of the mark. */
.gcs-logo-quote .gcs-logo-quote__card > .gcs-logo-quote__mark:first-child + .gcs-logo-quote__text {
	margin-right: 52px !important;
}

/* Reset the theme's default blockquote look (borders, icons, italics). */
.gcs-logo-quote .gcs-logo-quote__text {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	font-family: inherit !important;
	font-style: normal !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	quotes: none;
}
.gcs-logo-quote .gcs-logo-quote__text::before,
.gcs-logo-quote .gcs-logo-quote__text::after {
	content: none !important;
	display: none !important;
}

/* White, large and tight like the site's headings. The long selector beats
   the site's ".gs-p1-copy p:last-child { color: black }" rule. */
.gcs-logo-quote .gcs-logo-quote__text p,
.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-copy .gcs-logo-quote .gcs-logo-quote__text p {
	margin: 0 0 12px;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em !important;
	line-height: 1.5;
	text-transform: none !important;
	text-wrap: pretty;
}
.gcs-logo-quote .gcs-logo-quote__text p:last-child {
	margin-bottom: 0;
}

@media (max-width: 640px) {
	.gcs-logo-quote .gcs-logo-quote__card {
		padding: 22px 20px 24px;
		border-radius: 20px;
	}
	.gcs-logo-quote .gcs-logo-quote__mark {
		top: 20px;
		right: 18px;
		width: 32px;
		height: 32px;
	}
	.gcs-logo-quote .gcs-logo-quote__text p,
	.gs-logo-popup-style-01 .gs-p1-profile .gs-p1-copy .gcs-logo-quote .gcs-logo-quote__text p {
		font-size: 18px;
	}
}
