/* ==========================================================================
   SP Cabins - site-wide additions: sticky header + fixed social tabs
   ========================================================================== */

/* ---------- Sticky header ---------- */
header { transition: background-color .35s ease, box-shadow .35s ease; }
header .logo img { transition: width .35s ease; }
.menutop li a { transition: color .3s ease, padding .35s ease; }

header.sp-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	/* no backdrop-filter and no lasting transform: either one turns the header into the
	   containing block for position:fixed children, which trapped the mobile menu panel */
	background: rgba(246, 244, 238, .98);
	box-shadow: 0 10px 30px -14px rgba(28, 36, 18, .35);
	animation: spHeaderIn .5s cubic-bezier(.2, .7, .2, 1);
}
@keyframes spHeaderIn {
	from { transform: translateY(-100%); }
	to   { transform: translateY(0); }
}
.admin-bar header.sp-sticky { top: 32px; }
header.sp-sticky .logo img { width: 78px; }
/* top level only: the dropdown links keep their own padding */
header.sp-sticky .menutop > li > a { padding-top: 24px; padding-bottom: 24px; }
header.sp-sticky .menutop li.menu-item-has-children:after { top: 26px; }

/* home: header sits transparent over the video, so switch to dark text once it sticks */
.home header.sp-sticky .menutop > li > a { color: var(--primary); }
.home header.sp-sticky .menutop > li > a:hover,
.home header.sp-sticky .menutop > li.current-menu-item > a { color: var(--secondary); }
.home header.sp-sticky .menutop li.menu-item-has-children:after { color: var(--primary); }

@media (max-width: 991px) {
	/* col-3 + col-10 add up to 13 columns and the old CSS reorders them, which pushed the
	   menu button onto its own row above the logo: keep logo and button on one line */
	header .row { flex-wrap: nowrap; align-items: center; }
	header .row > .col-3 { order: 1; flex: 0 0 auto; width: auto !important; }
	header .row > .col-10 { order: 2; flex: 1 1 auto; width: auto; }
	header.sp-sticky { padding: 6px 0; }
	header.sp-sticky .logo img { width: 64px; }
}
@media (max-width: 782px) {
	.admin-bar header.sp-sticky { top: 46px; }
}
@media (max-width: 600px) {
	/* the admin bar scrolls away on small screens */
	.admin-bar header.sp-sticky { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
	header.sp-sticky { animation: none; }
}


/* ---------- Fixed social tabs ---------- */
.sp-social {
	position: fixed;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 998;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.sp-social a {
	--sp-w: 48px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 168px;
	height: 48px;
	margin-left: calc(var(--sp-w) - 168px);
	color: #fff !important;
	text-decoration: none;
	border-radius: 0 10px 10px 0;
	box-shadow: 4px 4px 14px -6px rgba(0, 0, 0, .35);
	transition: margin-left .45s cubic-bezier(.2, .7, .2, 1), filter .3s ease;
	animation: spSocialIn .6s cubic-bezier(.2, .7, .2, 1) both;
	animation-delay: calc(.4s + var(--sp-i) * .1s);
}
.sp-social a:hover,
.sp-social a:focus-visible { margin-left: 0; filter: brightness(1.06); }
.sp-social-label {
	flex: 1;
	padding-left: 18px;
	font-family: "Schibsted Grotesk", sans-serif;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .02em;
	color: #fff;
	opacity: 0;
	transform: translateX(-12px);
	transition: opacity .3s ease .05s, transform .45s cubic-bezier(.2, .7, .2, 1);
	white-space: nowrap;
}
.sp-social a:hover .sp-social-label,
.sp-social a:focus-visible .sp-social-label { opacity: 1; transform: none; }
.sp-social-ico {
	width: var(--sp-w);
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	color: #fff;
	transition: transform .35s ease;
}
.sp-social a:hover .sp-social-ico { transform: scale(1.12); }
@keyframes spSocialIn {
	from { transform: translateX(-100%); opacity: 0; }
	to   { transform: none; opacity: 1; }
}

.sp-social-fb { background: #3b5998; }
.sp-social-li { background: #0a66c2; }
.sp-social-yt { background: #ff0000; }
.sp-social-ig { background: linear-gradient(45deg, #f9ce34 0%, #ee2a7b 55%, #6228d7 100%); }

@media (max-width: 767px) {
	.sp-social a { --sp-w: 40px; height: 40px; }
	.sp-social-ico { font-size: 16px; }
}
/* touch screens: no hover, keep the compact icon-only tabs */
@media (hover: none) {
	.sp-social a:hover { margin-left: calc(var(--sp-w) - 168px); }
	.sp-social a:hover .sp-social-label { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.sp-social a { animation: none; transition: none; }
}

footer .copyright .sp-legal { margin: 6px 0 0; font-size: 12.5px; opacity: .8; }
/* five working-process steps in one row (home page) */
@media (min-width: 992px) { .counter ul li { width: 20%; } }

/* footer legal line: each ID stays on one line, wraps between IDs */
footer .copyright .sp-legal span { display: inline-block; white-space: nowrap; margin: 0 8px; }
/* mobile polish */
@media (max-width: 767px) {
	.qualitysrvc .sectionheader .heading { font-size: 22px; line-height: 1.45; text-transform: none; }
	.sp-team .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sp-team .sp-member:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 50%; margin: 0 auto; }
}

/* ---------- Home: Our Branches section ---------- */
.partners {
	position: relative;
	background:
		linear-gradient(135deg, rgba(24, 33, 15, .93), rgba(52, 72, 34, .88)),
		url(../images/servicesbg.webp) center / cover no-repeat;
	padding: 80px 0 90px;
	overflow: hidden;
}
.partners:before {
	content: '';
	position: absolute;
	right: -120px;
	top: -120px;
	width: 380px;
	height: 380px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(215, 38, 49, .35), rgba(215, 38, 49, 0) 70%);
	pointer-events: none;
}
.partners .container { position: relative; z-index: 1; }
.partners .sectionheader .heading,
.partners .sectionheader h2 { color: #fff; }
.partners .sectionheader .subheading { color: #fff; }
.partners ul { gap: 14px; margin: 0 auto; max-width: 1050px; }
.partners ul li {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	background: rgba(255, 255, 255, .09);
	border: 1px solid rgba(255, 255, 255, .26);
	backdrop-filter: blur(3px);
	padding: 14px 24px;
}
.partners ul li i { color: #ff6b73; font-size: 14px; }
.partners ul li:hover { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.partners ul li:hover i { color: #fff; }
@media (max-width: 767px) {
	.partners { padding: 56px 0 62px; }
	.partners ul li { padding: 12px 18px; font-size: 14.5px; }
	.partners .sectionheader h2.heading { color: #fff; }
}

/* ==========================================================================
   Mobile navigation (replaces the Responsive Menu plugin)
   ========================================================================== */
.sp-burger { display: none; }
.sp-mnav, .sp-mnav-overlay { display: none; }

@media (max-width: 991px) {
	.sp-burger {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 5px;
		width: 46px;
		height: 46px;
		padding: 0;
		border: 0;
		border-radius: 10px;
		background: var(--primary);
		cursor: pointer;
		transition: background .3s ease, transform .3s ease;
		-webkit-tap-highlight-color: transparent;
	}
	.sp-burger span {
		display: block;
		width: 22px;
		height: 2px;
		border-radius: 2px;
		background: #fff;
		transition: width .3s ease;
	}
	.sp-burger span:nth-child(2) { width: 16px; align-self: flex-end; margin-right: 12px; }
	.sp-burger:hover span:nth-child(2), .sp-burger:focus-visible span:nth-child(2) { width: 22px; margin-right: 12px; }
	.sp-burger:active { transform: scale(.94); }

	.sp-mnav-overlay {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 100000;
		background: rgba(14, 20, 8, .55);
		opacity: 0;
		visibility: hidden;
		transition: opacity .45s ease, visibility 0s linear .45s;
	}
	.sp-mnav-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .45s ease; }

	.sp-mnav {
		display: flex;
		flex-direction: column;
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 100001;
		width: min(360px, 88vw);
		background: #fff;
		box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .45);
		transform: translateX(105%);
		visibility: hidden;
		transition: transform .55s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .55s;
		will-change: transform;
		overscroll-behavior: contain;
	}
	.sp-mnav.is-open { transform: translateX(0); visibility: visible; transition: transform .55s cubic-bezier(.22, 1, .36, 1); }

	/* top: logo + close */
	.sp-mnav-top {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 16px 20px;
		border-bottom: 1px solid #ece8dc;
		background: #f6f4ee;
	}
	.sp-mnav-logo img { display: block; width: 78px; height: auto; border-radius: 50%; }
	.sp-mnav-close {
		position: relative;
		width: 46px;
		height: 46px;
		border: 0;
		border-radius: 10px;
		background: var(--secondary);
		cursor: pointer;
		transition: transform .45s cubic-bezier(.22, 1, .36, 1), background .3s;
		-webkit-tap-highlight-color: transparent;
	}
	.sp-mnav-close span {
		position: absolute;
		left: 50%;
		top: 50%;
		width: 22px;
		height: 2px;
		margin: -1px 0 0 -11px;
		border-radius: 2px;
		background: #fff;
	}
	.sp-mnav-close span:first-child { transform: rotate(45deg); }
	.sp-mnav-close span:last-child { transform: rotate(-45deg); }
	.sp-mnav.is-open .sp-mnav-close { animation: spMnavSpin .6s cubic-bezier(.22, 1, .36, 1) .15s both; }
	.sp-mnav-close:hover { background: var(--primary); }

	/* middle: menu */
	.sp-mnav-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 0 12px; -webkit-overflow-scrolling: touch; }
	.sp-mnav-list, .sp-mnav-list ul { list-style: none; margin: 0; padding: 0; }
	.sp-mnav-list > li { position: relative; border-bottom: 1px solid #f0ede4; }
	.sp-mnav-list a {
		display: block;
		padding: 15px 64px 15px 24px;
		font-size: 17px;
		font-weight: 500;
		line-height: 1.3;
		color: var(--primary);
		text-decoration: none;
		transition: background .25s ease, color .25s ease, padding-left .3s ease;
	}
	.sp-mnav-list a:hover, .sp-mnav-list a:focus-visible { background: #f6f4ee; padding-left: 30px; }
	.sp-mnav-list li.current-menu-item > a,
	.sp-mnav-list li.current-menu-ancestor > a { color: var(--secondary); box-shadow: inset 4px 0 0 var(--secondary); background: #fdf3f3; }
	.sp-mnav-list .sub-menu { overflow: hidden; background: #faf9f5; transition: max-height .5s cubic-bezier(.22, 1, .36, 1); }
	.sp-mnav-list .sub-menu a { padding: 12px 24px 12px 40px; font-size: 15.5px; font-weight: 400; position: relative; }
	.sp-mnav-list .sub-menu a:before { content: ''; position: absolute; left: 24px; top: 50%; width: 7px; height: 2px; background: var(--secondary); transform: translateY(-50%); }
	.sp-mnav-list .sub-menu .sub-menu a { padding-left: 56px; }
	.sp-mnav-list .sub-menu .sub-menu a:before { left: 40px; }
	.sp-mnav-toggle {
		position: absolute;
		top: 0;
		right: 0;
		width: 56px;
		height: 52px;
		border: 0;
		background: transparent;
		color: var(--primary);
		font-size: 14px;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	.sp-mnav-toggle i { transition: transform .4s cubic-bezier(.22, 1, .36, 1); }
	li.is-open > .sp-mnav-toggle i { transform: rotate(180deg); }
	li.is-open > .sp-mnav-toggle { color: var(--secondary); }

	/* entrance: items rise in one after another */
	.sp-mnav.is-open .sp-mnav-list > li { animation: spMnavItem .55s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 55ms + 160ms); }
	.sp-mnav.is-open .sp-mnav-social { animation: spMnavItem .55s cubic-bezier(.22, 1, .36, 1) .55s both; }

	/* bottom: social icons */
	.sp-mnav-social { padding: 18px 24px 24px; border-top: 1px solid #ece8dc; background: #f6f4ee; }
	.sp-mnav-follow { display: block; margin-bottom: 12px; font-size: 12.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--primary); }
	.sp-mnav-icons { display: flex; flex-wrap: wrap; gap: 12px; }
	.sp-mnav-icons a {
		width: 44px;
		height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		background: var(--primary);
		color: #fff;
		font-size: 18px;
		text-decoration: none;
		transition: transform .3s ease, box-shadow .3s ease;
	}
	.sp-mnav-icons a:hover { transform: translateY(-3px); box-shadow: 0 10px 18px -8px rgba(0, 0, 0, .5); }
	.sp-mnav-icons .is-fb { background: #3b5998; }
	.sp-mnav-icons .is-li { background: #0a66c2; }
	.sp-mnav-icons .is-yt { background: #ff0000; }
	.sp-mnav-icons .is-ig { background: linear-gradient(45deg, #f9ce34 0%, #ee2a7b 55%, #6228d7 100%); }

	.sp-mnav-lock, .sp-mnav-lock body { overflow: hidden; }
	/* the fixed social tabs would sit on top of the open panel's overlay */
	.sp-mnav-lock .sp-social { opacity: 0; pointer-events: none; }
}
@keyframes spMnavItem { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spMnavSpin { from { transform: rotate(-90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.sp-mnav, .sp-mnav-overlay, .sp-mnav-list .sub-menu { transition: none; }
	.sp-mnav.is-open .sp-mnav-list > li, .sp-mnav.is-open .sp-mnav-social, .sp-mnav.is-open .sp-mnav-close { animation: none; }
}

/* ==========================================================================
   v1.3.1: company profile button, WhatsApp tab, banner image, footer QR
   ========================================================================== */
.sp-profile-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: center;
	margin-left: 14px;
	padding: 11px 20px;
	border-radius: 50px;
	background: var(--secondary);
	color: #fff !important;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	border: 2px solid var(--secondary);
	transition: background .3s ease, color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.sp-profile-btn i { font-size: 14px; transition: transform .3s ease; }
.sp-profile-btn:hover { background: transparent; color: var(--secondary) !important; transform: translateY(-2px); box-shadow: 0 12px 22px -12px rgba(222, 39, 48, .7); }
.home header:not(.sp-sticky) .sp-profile-btn:hover { background: #fff; border-color: #fff; }
.sp-profile-btn:hover i { transform: translateY(2px); }
@media (max-width: 991px) { header .sp-profile-btn { display: none; } }
@media (min-width: 992px) and (max-width: 1199px) { .sp-profile-btn { margin-left: 6px; padding: 10px 14px; font-size: 13.5px; } }

.sp-mnav-profile { padding: 14px 24px 0; }
.sp-mnav-profile .sp-profile-btn { display: flex; justify-content: center; width: 100%; margin: 0; padding: 14px 20px; font-size: 15.5px; }
@media (min-width: 992px) { .sp-mnav-profile { display: none; } }

.sp-social-wa { background: #25d366; }
.sp-mnav-icons .is-wa { background: #25d366; }

.mainslider .sp-banner-img { display: block; width: 100%; height: 100vh; min-height: 560px; object-fit: cover; }
@media (max-width: 767px) { .mainslider .sp-banner-img { height: 82vh; } }

/* footer: location QR card */
.sp-qr-card {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 22px;
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .22);
	color: #fff;
	text-decoration: none;
	transition: background .3s ease, transform .3s ease, border-color .3s ease;
}
.sp-qr-card:hover { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .45); transform: translateY(-3px); color: #fff; }
.sp-qr-card img { flex: 0 0 96px; width: 96px; height: 96px; padding: 6px; border-radius: 10px; background: #fff; display: block; }
.sp-qr-card strong { display: block; margin-bottom: 4px; font-size: 16px; color: #fff; }
.sp-qr-card small { display: block; font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, .75); }

/* home About: the photo is as tall as the text beside it */
@media (min-width: 992px) {
	.about .row.align-items-center { align-items: stretch !important; }
	.about .row > .col-lg-6:first-child { display: flex; }
	.about .row > .col-lg-6:first-child figure { width: 100%; height: 100%; min-height: 420px; margin: 0; border-radius: 15px; }
	.about .row > .col-lg-6:first-child figure img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
	.about .row > .col-lg-6:last-child { display: flex; align-items: center; }
}
