/* NSBM footer (1.3.2): call-to-action card overlapping a rounded navy panel.
   Loaded after nsbm-menu.css on every page with the new footer (inc/nsbm/assets.php). Every selector starts at
   .nsbm-ui.nsbm-chrome-foot, so it outranks the older footer rules in styles.css / nsbm-chrome.css, which still
   match the shared .site-footer class. Markup: template-parts/nsbm/footer.php. */

.nsbm-ui.nsbm-chrome-foot {
	--ft-navy: #002147;           /* NSBM navy, as on nsbm.ac.lk */
	--ft-card: #0a2d5a;
	--ft-ink: #fff;
	--ft-soft: rgb(255 255 255 / 0.72);
	--ft-faint: rgb(255 255 255 / 0.56);
	--ft-line: rgb(255 255 255 / 0.14);
	--ft-accent: var(--green-300, #70d8a0);
	--ft-overlap: clamp(64px, 8vw, 112px);
}

/* Reset the older footer looks (tinted band, glass photo background). */
.nsbm-ui.nsbm-chrome-foot .site-footer--card {
	position: relative;
	margin: 0;
	padding: clamp(32px, 5vw, 72px) 0 clamp(8px, 1.4vw, 16px);
	border: 0;
	background: transparent;
	color: var(--ft-ink);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.nsbm-ui.nsbm-chrome-foot .foot-wrap {
	width: min(calc(100% - clamp(16px, 2.4vw, 32px)), 1560px);
	margin-inline: auto;
}

/* ---------------------------------------------------------------------------
 * Call-to-action card
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-foot .foot-cta {
	position: relative;
	z-index: 2;
	isolation: isolate;
	display: flex;
	align-items: center;
	width: min(calc(100% - clamp(16px, 8vw, 192px)), 1240px);
	min-height: clamp(260px, 22vw, 320px);
	margin: 0 auto calc(var(--ft-overlap) * -1);
	overflow: hidden;
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: 24px;
	background:
		radial-gradient(55% 90% at 0% 100%, rgb(31 164 99 / 0.34), transparent 70%),
		linear-gradient(135deg, #0d3466 0%, var(--ft-card) 45%, #061a36 100%);
	box-shadow: 0 32px 64px -28px rgb(0 33 71 / 0.55), inset 0 1px 0 rgb(255 255 255 / 0.1);
	color: var(--ft-ink);
}

.nsbm-ui.nsbm-chrome-foot .foot-cta__media {
	position: absolute;
	inset: 0 0 0 auto;
	z-index: -1;
	width: 60%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 55%);
	opacity: 0.85;
}

/* Thin green arc on the photo edge, echoing the reference's glowing rim. */
.nsbm-ui.nsbm-chrome-foot .foot-cta::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: -40%;
	right: -12%;
	width: 62%;
	aspect-ratio: 1;
	border-radius: 50%;
	border: 1.5px solid transparent;
	background: linear-gradient(200deg, rgb(112 216 160 / 0.9), rgb(112 216 160 / 0) 45%) border-box;
	-webkit-mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
	mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}

.nsbm-ui.nsbm-chrome-foot .foot-cta__body {
	position: relative;
	max-width: 600px;
	padding: clamp(28px, 4vw, 56px);
}

.nsbm-ui.nsbm-chrome-foot .foot-cta__title {
	margin: 0 0 12px;
	color: #fff;
	font-family: var(--font-sans, inherit);
	font-size: clamp(1.75rem, 2.6vw, 2.5rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-transform: none;
}

.nsbm-ui.nsbm-chrome-foot .foot-cta__text {
	max-width: 46ch;
	margin: 0 0 24px;
	color: var(--ft-soft);
	font-size: 1rem;
}

.nsbm-ui.nsbm-chrome-foot .foot-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.nsbm-ui.nsbm-chrome-foot .foot-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 46px;
	padding: 0 20px;
	border-radius: 10px;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.nsbm-ui.nsbm-chrome-foot .foot-btn--primary {
	background: #fff;
	color: var(--ft-navy);
}

.nsbm-ui.nsbm-chrome-foot .foot-btn--primary:hover {
	background: var(--ft-accent);
	color: var(--ft-navy);
}

.nsbm-ui.nsbm-chrome-foot .foot-btn--ghost {
	border: 1px solid rgb(255 255 255 / 0.36);
	color: #fff;
}

.nsbm-ui.nsbm-chrome-foot .foot-btn--ghost:hover {
	border-color: #fff;
	background: rgb(255 255 255 / 0.08);
	color: #fff;
}

/* ---------------------------------------------------------------------------
 * Navy panel
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-foot .foot-panel {
	position: relative;
	z-index: 1;
	padding: clamp(40px, 5vw, 64px) clamp(20px, 5vw, 80px) 24px;
	border-radius: 28px;
	background: var(--ft-navy);
	color: var(--ft-ink);
}

.nsbm-ui.nsbm-chrome-foot .has-cta .foot-panel {
	padding-top: calc(var(--ft-overlap) + clamp(40px, 5vw, 64px));
}

.nsbm-ui.nsbm-chrome-foot .foot-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
}

@media (min-width: 1024px) {
	.nsbm-ui.nsbm-chrome-foot .foot-main {
		grid-template-columns: minmax(280px, 1fr) minmax(0, 1.6fr);
		gap: clamp(40px, 5vw, 96px);
	}
}

/* Brand column: the logo sits on white, as in the header. */
.nsbm-ui.nsbm-chrome-foot .foot-logo {
	display: inline-flex;
	padding: 10px 16px;
	border-radius: 14px;
	background: #fff;
}

.nsbm-ui.nsbm-chrome-foot .foot-logo img {
	display: block;
	width: auto;
	height: 52px;
}

.nsbm-ui.nsbm-chrome-foot .foot-address {
	display: block;
	margin: 20px 0 0;
	color: var(--ft-soft);
	font-style: normal;
	line-height: 1.6;
}

.nsbm-ui.nsbm-chrome-foot .foot-contact {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	margin: 24px 0 0;
}

.nsbm-ui.nsbm-chrome-foot .foot-contact dt {
	margin: 0 0 2px;
	color: var(--ft-faint);
	font-size: 0.8125rem;
	font-weight: 500;
}

.nsbm-ui.nsbm-chrome-foot .foot-contact dd {
	margin: 0;
}

.nsbm-ui.nsbm-chrome-foot .foot-contact a {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.nsbm-ui.nsbm-chrome-foot .foot-contact a:hover {
	color: var(--ft-accent);
}

.nsbm-ui.nsbm-chrome-foot .foot-social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.nsbm-ui.nsbm-chrome-foot .foot-social a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--ft-line);
	border-radius: 50%;
	color: #fff;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.nsbm-ui.nsbm-chrome-foot .foot-social a:hover {
	border-color: #fff;
	background: #fff;
	color: var(--ft-navy);
}

.nsbm-ui.nsbm-chrome-foot .foot-social svg {
	width: 18px;
	height: 18px;
}

/* Link columns */
.nsbm-ui.nsbm-chrome-foot .foot-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 32px clamp(24px, 3vw, 48px);
}

.nsbm-ui.nsbm-chrome-foot .foot-col__title {
	margin: 0 0 12px;
	color: var(--ft-faint);
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.4;
	text-transform: none;
}

.nsbm-ui.nsbm-chrome-foot .foot-col ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nsbm-ui.nsbm-chrome-foot .foot-col li a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	color: rgb(255 255 255 / 0.9);
	font-size: 0.9375rem;
	line-height: 1.35;
	text-decoration: none;
}

.nsbm-ui.nsbm-chrome-foot .foot-col li a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Bottom line */
.nsbm-ui.nsbm-chrome-foot .foot-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 24px;
	margin-top: clamp(40px, 5vw, 64px);
	padding-top: 20px;
	border-top: 1px solid var(--ft-line);
	color: var(--ft-faint);
	font-size: 0.8125rem;
	text-align: center;
}

.nsbm-ui.nsbm-chrome-foot .foot-bottom p {
	max-width: none;
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-size: inherit;
}

.nsbm-ui.nsbm-chrome-foot .foot-bottom a {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.nsbm-ui.nsbm-chrome-foot .site-footer--card a:focus-visible {
	outline: 2px solid var(--ft-accent);
	outline-offset: 2px;
	border-radius: 6px;
}

/* ---------------------------------------------------------------------------
 * Tablets and phones
 * ------------------------------------------------------------------------ */
@media (max-width: 767px) {
	.nsbm-ui.nsbm-chrome-foot {
		--ft-overlap: 48px;
	}

	.nsbm-ui.nsbm-chrome-foot .foot-wrap {
		width: calc(100% - 16px);
	}

	.nsbm-ui.nsbm-chrome-foot .foot-cta {
		flex-direction: column;
		align-items: stretch;
		width: calc(100% - 24px);
		min-height: 0;
		border-radius: 20px;
	}

	/* The photo becomes a strip on top of the card. */
	.nsbm-ui.nsbm-chrome-foot .foot-cta__media {
		position: relative;
		inset: auto;
		width: 100%;
		height: 150px;
		-webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 60%);
		mask-image: linear-gradient(0deg, transparent 0%, #000 60%);
	}

	.nsbm-ui.nsbm-chrome-foot .foot-cta::after {
		display: none;
	}

	.nsbm-ui.nsbm-chrome-foot .foot-cta__body {
		margin-top: -32px;
		padding: 0 22px 26px;
	}

	.nsbm-ui.nsbm-chrome-foot .foot-btn {
		flex: 1 1 auto;
		justify-content: center;
		min-height: 48px;
	}

	.nsbm-ui.nsbm-chrome-foot .foot-panel {
		border-radius: 20px;
	}

	.nsbm-ui.nsbm-chrome-foot .foot-cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 28px 20px;
	}

	.nsbm-ui.nsbm-chrome-foot .foot-col li a {
		min-height: 44px; /* Touch target. */
	}

	.nsbm-ui.nsbm-chrome-foot .foot-bottom {
		flex-direction: column;
	}
}

@media (max-width: 420px) {
	.nsbm-ui.nsbm-chrome-foot .foot-cols {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (forced-colors: active) {
	.nsbm-ui.nsbm-chrome-foot .foot-cta,
	.nsbm-ui.nsbm-chrome-foot .foot-panel {
		border: 1px solid CanvasText;
	}

	.nsbm-ui.nsbm-chrome-foot .foot-btn {
		border: 1px solid ButtonText;
	}
}

/* ---------------------------------------------------------------------------
 * 1.3.5: the navy panel runs the full width of the page (edge to edge, no side
 * corners, no white strip below); its content stays aligned with the page
 * container. The call-to-action card still overlaps its top edge.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-foot .site-footer--card {
	padding-bottom: 0;
}

.nsbm-ui.nsbm-chrome-foot .foot-wrap {
	width: 100%;
}

.nsbm-ui.nsbm-chrome-foot .foot-panel {
	padding-inline: 0;
	border-radius: 0;
}

.nsbm-ui.nsbm-chrome-foot .foot-main,
.nsbm-ui.nsbm-chrome-foot .foot-bottom {
	width: min(100% - 2 * clamp(20px, 4vw, 48px), var(--container, 1320px));
	margin-inline: auto;
}

@media (max-width: 767px) {
	.nsbm-ui.nsbm-chrome-foot .foot-wrap {
		width: 100%;
	}

	.nsbm-ui.nsbm-chrome-foot .foot-panel {
		border-radius: 0;
	}
}

/* Below 1180px the page keeps 72px free at the bottom for the fixed phone action bar (styles.css / nsbm-chrome.css).
   Let the navy panel run into that space, so it ends under the bar instead of above a white strip. */
@media (max-width: 1179px) {
	.nsbm-ui.nsbm-chrome-foot .site-footer--card {
		margin-bottom: calc(-72px - env(safe-area-inset-bottom));
	}

	.nsbm-ui.nsbm-chrome-foot .foot-panel {
		padding-bottom: calc(24px + 72px + env(safe-area-inset-bottom));
	}
}

/* 1.3.9: less space above the footer card (sections are tighter now too). */
.nsbm-ui.nsbm-chrome-foot .site-footer--card {
	padding-top: clamp(16px, 2.5vw, 40px);
}

/* ---------------------------------------------------------------------------
 * 1.3.13: bottom bar. A darker full-width strip under the navy panel: the legal
 * links on the left, separated by thin lines; copyright and credit on the right.
 * Links and labels from NSBM Site Settings → Footer.
 * ------------------------------------------------------------------------ */
.nsbm-ui.nsbm-chrome-foot .foot-panel {
	padding-bottom: clamp(40px, 5vw, 56px);
}

.nsbm-ui.nsbm-chrome-foot .foot-bar {
	padding: 22px 0;
	background: #050e1d;
	color: rgb(255 255 255 / 0.78);
}

.nsbm-ui.nsbm-chrome-foot .foot-bar .foot-bottom {
	justify-content: space-between;
	gap: 12px 32px;
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
	color: inherit;
	font-size: 0.875rem;
	line-height: 1.5;
	text-align: left;
}

.nsbm-ui.nsbm-chrome-foot .foot-legal ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nsbm-ui.nsbm-chrome-foot .foot-legal li {
	margin: 0;
	padding: 0 6px;
	line-height: 1.15;
}

.nsbm-ui.nsbm-chrome-foot .foot-legal li:first-child {
	padding-left: 0;
}

.nsbm-ui.nsbm-chrome-foot .foot-legal li + li {
	border-left: 1px solid rgb(255 255 255 / 0.5);
}

.nsbm-ui.nsbm-chrome-foot .foot-bar a {
	color: rgb(255 255 255 / 0.82);
	font-weight: 400;
	text-decoration: none;
	transition: color 0.15s;
}

.nsbm-ui.nsbm-chrome-foot .foot-bar a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.nsbm-ui.nsbm-chrome-foot .foot-bar .foot-copyright {
	color: inherit;
}

.nsbm-ui.nsbm-chrome-foot .foot-bar .foot-credit a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 1179px) {
	.nsbm-ui.nsbm-chrome-foot .foot-panel {
		padding-bottom: clamp(40px, 5vw, 56px);
	}

	.nsbm-ui.nsbm-chrome-foot .foot-bar {
		padding-bottom: calc(22px + 72px + env(safe-area-inset-bottom));
	}
}

@media (max-width: 767px) {
	.nsbm-ui.nsbm-chrome-foot .foot-bar .foot-bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* The credit is a plain part of the copyright line here, not the older pill (styles.css / nsbm-chrome.css). */
.nsbm-ui.nsbm-chrome-foot .foot-bar .foot-credit {
	display: inline;
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	font-size: inherit;
}

/* Separator lines about as tall as the text (older footer rules give links a 44px minimum height). */
.nsbm-ui.nsbm-chrome-foot .foot-legal a {
	display: inline-flex;
	align-items: center;
	min-height: 24px; /* WCAG 2.2 target size (minimum) */
	margin: 0;
	padding: 0;
}
