/* ==========================================================================
1. GLOBAL VISIBILITY LOGIC (DO NOT CHANGE)
========================================================================== */
body.revamp-loc-langley .dh-cloverdale, body.revamp-loc-langley .dh-cloverdale-mob, body.revamp-loc-langley .revamp-addr-cloverdale { display: none !important; }
body.revamp-loc-cloverdale .dh-langley, body.revamp-loc-cloverdale .dh-langley-mob, body.revamp-loc-cloverdale .revamp-addr-langley { display: none !important; }
@media (min-width: 769px) { .dh-langley-mob, .dh-cloverdale-mob { display: none !important; } }
@media (max-width: 768px) { .dh-langley, .dh-cloverdale { display: none !important; } }

/* ==========================================================================
2. POPUP & FIXED PILL UI
========================================================================== */
.revamp-popup-overlay { position: fixed; bottom: 20px; right: 20px; z-index: 10000; display:flex; justify-content:flex-end; align-items:flex-end; }
.revamp-popup-box { background: #fff; padding: 25px; width: 350px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); text-align: center; position: relative; }
.revamp-close-btn { position: absolute; top: 5px; right: 10px; border: none; background: none; font-size: 20px; cursor: pointer; color: #999; line-height: normal;}
.revamp-popup-box h2 { color: #004d58; font-size: 22px; margin-bottom: 10px; }
.revamp-btn-group { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }
.revamp-choice-btn { padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; color: #fff; font-weight:600; }
.revamp-choice-btn[data-loc="langley"] { background: #004d58; }
.revamp-choice-btn[data-loc="cloverdale"] { background: #d9a75b; color: #004d58; }

/* Fixed Bar */
#revamp-fixed-bar { position: fixed; bottom: 20px; right: 20px; z-index: 9999; background: #03544D; padding: 12px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.revamp-label-text { color: #fff; font-size: 12px; display: block; font-weight: bold; margin-bottom: 5px; }
.revamp-switcher-inline .revamp-label-text { color: #333; } 
.revamp-custom-dropdown { position: relative; display: inline-block; min-width: 120px; }
.revamp-trigger-btn { 
	width: 100% !important; 
	padding: 6px 8px !important;  
	border-radius: 4px !important; 
	border: 1px solid #ccc !important; 
	background: #fff !important; 
	font-weight: 600 !important; 
	color: #333 !important; 
	cursor: pointer !important; 
	text-align: left !important; 
	display: flex !important; 
	justify-content: space-between !important; 
	align-items: center !important; 
	font-size: 12px !important; 

}
.revamp-options-list { display: none; position: absolute; bottom: 100%; left: 0; right: 0; background: #fff; border: 1px solid #ccc; border-radius: 4px; margin: 0 0 5px 0; padding: 0; list-style: none; box-shadow: 0 -4px 15px rgba(0,0,0,0.15); z-index: 10001; }
.revamp-options-list.show-menu { display: block; }
.revamp-options-list li { padding: 10px; border-bottom: 1px solid #eee; cursor: pointer; color: #333; font-weight: 500; font-size: 13px; }
.revamp-options-list li:hover { background: #f5f5f5; color: #004d58; }

@media (max-width: 768px) {
	#revamp-fixed-bar { background: transparent !important; box-shadow: none !important; padding: 0 !important; bottom: 20px; right: 20px; }
	#revamp-fixed-bar .revamp-label-text { display: none !important; }
	.revamp-custom-dropdown.fixed-version { min-width: auto; }
	.revamp-custom-dropdown.fixed-version .revamp-trigger-btn { border-radius: 50px; padding: 10px 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); border: none; font-size: 14px; color: #004d58; }
	.revamp-custom-dropdown.fixed-version .revamp-options-list { width: 160px; right: 0; left: auto; margin-bottom: 10px; }
}

/* ==========================================================================
3. MAP & ADDRESS (2-Column)
========================================================================== */
.revamp-map-iframe { width: 100%; height: 400px; border: 0; border-radius: 8px; margin-bottom: 15px; background: #eee; }
.revamp-address-box { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; flex-wrap: wrap; gap: 20px; }
.revamp-addr-left { text-align: left; flex: 1; min-width: 200px; }
.revamp-addr-left h3 { color: #004d58; margin: 0 0 5px 0; font-weight: 700; font-size: 1.5rem; }
.revamp-addr-left p { margin: 0; font-size: 1.1rem; color: #333; }
.revamp-addr-right { text-align: right; display: flex; flex-direction: column; gap: 5px; min-width: 200px; }
.revamp-addr-right a { font-size: 18px; color: #03544d; text-decoration: none; font-weight: 600; }
@media (max-width: 600px) { .revamp-address-box { flex-direction: column; align-items: flex-start; } .revamp-addr-right { text-align: left; } }

/* ==========================================================================
4. CAREERS / JOB BOARD (Updated from Snippet)
========================================================================== */
.revamp-careers-container {
	max-width: 1200px;
	margin: 0 auto;
}

.job-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 30px;
	justify-content: center;
}

.job-filters select {
	padding: 10px 5px !important;
	border: 1px solid #ccc;
	border-radius: 5px;
	background-color: #fff;
	min-width: 200px;
	width: auto;
}

.job-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 25px;
	min-height: 200px;
	justify-content: start;
}

a.job-card-link, a.job-card-link:hover {
	text-decoration: none;
	color: inherit;
	display: block; /* Ensure anchor wraps correctly */
}

.job-card {
	min-height: 240px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 25px;
	box-shadow: 0 4px 15px rgba(0,0,0,.05);
	transition: transform .2s ease, box-shadow .2s ease;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.job-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0,0,0,.1);
}

.job-card .job-title {
	margin: 0 0 15px 0;
	color: #004d58;
	font-size: 1.2rem; /* Added for better heading sizing */
}

.job-card .job-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 20px;
	color: #555;
	font-size: .95em;
}

.job-card .job-card-apply-btn {
	color: #004d58;
	font-weight: 700;
	margin-top: auto;
}

/* Loaders */
.job-loader-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(255,255,255,.7);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10;
	border-radius: 8px;
}

.job-loader {
	border: 5px solid #f3f3f3;
	border-top: 5px solid #004d58;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.no-jobs-message {
	text-align: center;
	padding: 40px;
	background-color: #f8f9fa;
	border-radius: 8px;
	grid-column: 1/-1;
	display: none; /* Hidden by default controlled by JS */
}
/* End Careers Styles */


/* ============================================
5. TEAM GRID & POPUP (Refined)
============================================ */
.rw-filters { display:flex; gap:10px; justify-content:center; margin-bottom:20px; flex-wrap:wrap; }
.rw-filters select { 
	padding:8px !important; 
	border:1px solid #03544D; 
	border-radius:4px; 
	min-width: 200px; 
	width: auto;
}
.rw-team-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap:20px; }
.rw-team-item { border:1px solid #03544D; padding:15px; text-align:center; cursor:pointer; transition:0.3s; background:#fff; border-radius: 8px; }
.rw-team-item:hover { box-shadow:0 4px 10px rgba(0,0,0,0.1); transform: translateY(-2px); }
.rw-team-inner { display: flex; flex-direction: column; height: -webkit-fill-available; justify-content: space-between; gap: 10px; }

.rw-team-inner .top, 
.rw-team-inner .bottom { 
	display: flex; 
	flex-direction: column; 
	gap: 10px; 
}

.rw-team-image-wrapper img { 
	display: block; 
	width: auto; 
	height: 160px !important; 
	object-fit: contain; 
	margin: 0 auto 0px; 
	margin-bottom: 0;
}
.rw-team-item h5 { font-family: "Poppins", sans-serif; font-weight: 400; color: #242323; font-size: 18px; margin:0 !important; }
.rw-team-item .rw-designation { font-weight:300; color:#a2a2a2; font-size:16px !important; line-height:24px; margin:0px; }
.rw-book-btn { display:block; margin-top:0; background:#03544D; color:#fff; padding:12px 24px; text-decoration:none; border-radius:24px; font-size:14px; }
.rw-book-btn:hover { color:white; }

.rw-no-results {
	text-align:center;
}

/* TEAM POPUP (Slide In / Out) */
/* Revise the rw-popup-overlay to be a full-screen, transparent backdrop */
.rw-popup-overlay {
	position: fixed;
	top: 0;
	right: 0;
	width: 100vw; /* <-- CHANGE 1: Full width */
	height: 100vh;
	background: rgba(0,0,0,0.5); /* <-- CHANGE 2: Add semi-transparent background */
	z-index: 9999;
	/* Hide the entire overlay initially */
	opacity: 0; 
	visibility: hidden; 
	transition: opacity 0.45s ease, visibility 0.45s ease; 
}

/* This outer overlay now controls visibility */
.rw-popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* New CSS for the inner content container to slide in */
.rw-popup-inner {
	position: absolute; /* Relative to the full-screen overlay */
	top: 0;
	right: 0;
	width: 70vw; /* Maintain your desired inner panel width */
	height: 100%;
	background: #fff; /* Give the content panel a solid white background */
	box-shadow: -5px 0 15px rgba(0,0,0,0.2);
	overflow-y: auto;
	padding: 40px 60px;

	/* Apply the sliding animation to the inner panel instead of the overlay */
	transform: translateX(100%);
	transition: transform 0.45s ease; 
	will-change: transform;
}

/* When the overlay is active, slide the inner content panel in */
.rw-popup-overlay.active .rw-popup-inner {
	transform: translateX(0);
}

/* Adjust mobile responsiveness for the inner panel */
@media(max-width:768px){



}


.rw-popup-close {
	position:absolute;
	top:10px;
	right:10px;
	font-size:30px;
	cursor:pointer;
	line-height:1;
}

/* ROW STRUCTURE */
.rw-popup-row { width: 100%; margin-bottom: 0px; }
.rw-popup-row-image img { display: block; width: auto; max-height: 275px; object-fit: contain; margin: 0 auto; }
.rw-popup-row-content { display: flex; flex-wrap: nowrap; width:100%; }
.rw-popup-left { flex: 0 0 30%; max-width:30%; padding-right:25px; }
.rw-popup-right { flex: 0 0 70%; max-width:70%; padding-left:25px; }
.rw-popup-left ul { 
	padding-left:20px; 
	margin-bottom:20px !important; 
	list-style: disc; 
	font-size: 14px;
}
.rw-popup-left ul li {
	margin-bottom: 4px;
}

.rw-popup-left h4 { margin:0 0 10px 0; color:#333; }
.rw-popup-left a.rw-book-btn { 
	display:block; 
	text-align:center; 
	margin-top:20px; 
	font-size:14px !important; 
	padding:15px 30px; 
	max-width:150px; 
	background:#03544D; 
	color:#fff; 
	border-radius:24px; 
	text-decoration:none; 

}
.rw-popup-left a.rw-book-btn:hover { color:#fff; }

.fun-fact-box { 
	background:#f2f8ff; 
	padding:15px; 
	margin-top:20px; 
	border:1px solid #cce0ff; 
	border-radius:6px; 
	font-size: 16px;
}

.rw-popup-bio p {
	margin: 0;
	font-size: 14px !important;
	margin-bottom: 16px;
}

/* MOBILE RESPONSIVENESS */
@media(max-width:768px){
	.rw-popup-overlay { 
		width:100vw; 
		height: 100vh;
		padding:30px 20px; 
		transform: translateX(100%); 
	}
	.rw-popup-overlay.active {
		transform: translateX(0) !important;
	}

	.rw-popup-inner { 
		width: 100vw; /* full width panel */
		padding: 30px 20px; 
		transform: translateX(100%); /* keep slide-in on inner panel */
	}

	.rw-popup-row-content { 
		flex-direction: column; 
		gap:10px; 
	}

	.rw-popup-left, 
	.rw-popup-right { 
		flex: 0 0 100%; 
		max-width: 100%; 
		padding: 0; 
	}

	.rw-popup-left a.rw-book-btn {
		padding: 12px 18px;
	}

}


/* =============================================
FINAL — CLEAN CONTROL FOR BOOK NOW TITLE
============================================= */

/* Default: hidden everywhere */
.rw-title-book-now,
.rw-popup-designation {
	display: none !important;
	gap: 5px;
}

/* Desktop (≥ 769px): show ONLY on RIGHT side */
@media (min-width: 769px) {
	.rw-popup-right .rw-title-book-now,
	.rw-popup-right .rw-popup-designation {
		display: flex !important;
	}
}

/* Mobile (≤ 768px): show ONLY on LEFT side */
@media (max-width: 768px) {

	.rw-popup-left .rw-title-book-now {
		margin: 20px 0;
	}

	.rw-popup-left .rw-title-book-now,
	.rw-popup-left .rw-popup-designation {
		display: flex !important;
	}
}


/* Loader */
.rw-loader { 
	border: 5px solid #f3f3f3; 
	border-top: 5px solid #004d58; 
	border-radius: 50%; 
	width: 50px; 
	height: 50px; 
	animation: rw-spin 1s linear infinite; 
	margin: 50px auto; 
}

@keyframes rw-spin { 
	0% { 
		transform: rotate(0deg); 
	} 
	100% { 
		transform: rotate(360deg); 
	} 
}

/* ==========================================================================
6. SINGLE JOB PAGE
========================================================================== */
.job-single-layout { display: grid; gap: 30px; }
@media(min-width: 800px) { .job-single-layout { grid-template-columns: 2fr 1fr; } }
.job-desc { background: #fff; padding: 0px; border-radius: 8px; }
.job-header-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
	color: #555;
	font-size: .9em;
}
.job-details-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 25px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eee;
}
.job-form-wrapper { background: #f8f9fa; padding: 25px; border-radius: 8px; border:1px solid #eee; position:sticky; top:140px; }
.job-form-wrapper input, .job-form-wrapper textarea { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; }
.job-form-wrapper .submit-btn { width: 100%; padding: 12px; background: #004d58; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }
.job-form-wrapper .submit-btn:hover { background: #003a42; }
.job-expired-box { text-align:center; padding:30px; background:#f0f0f0; font-weight:bold; color:#777; }

@media only screen and (max-width: 768px) {
	.rw-filters select {
		min-width: 100% !important;
	}
}

/* Container Layout */
/* Container Layout */
.location-selection-container {
	text-align: center;
	padding: 40px 20px;
	max-width: 1240px;
	margin: 0 auto;
	font-family: "Poppins", Sans-serif;
}

.location-title {
	color: #03544D;
	margin-bottom: 40px;
	font-size: 32px;
	font-weight: 600;
}

.location-grid {
	display: flex;
	gap: 20px;
	justify-content: center;
	flex-wrap: wrap; /* Important for future growth */
}

/* The Cards - Scaled for 3 per row */
.location-card {
	flex: 0 1 calc(33.333% - 20px); /* Forces 3 per row on desktop */
	min-width: 300px;
	max-width: 400px;
	background-color: #03544D;
	padding: 40px 30px;
	border-radius: 15px;
	color: #ffffff;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-shadow: 0px 4px 15px rgba(0,0,0,0.1);
}

.location-card:hover {
	transform: translateY(-8px);
	background-color: #02433D;
	box-shadow: 0px 15px 40px rgba(3, 84, 77, 0.3);
}

/* Typography inside cards */
.location-card h3 {
	color: #ffffff;
	font-size: 26px;
	margin-top: 0;
	margin-bottom: 15px;
}

.location-card .address {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.5;
	margin-bottom: 15px;
	min-height: 50px;
}

.location-card .phone {
	font-size: 18px;
	font-weight: 500;
	margin-bottom: 25px;
}

.location-card .phone a {
	color: #ffffff;
	text-decoration: none;
}

/* The Button */
.location-btn {
	margin-top: auto; /* Keeps button at the bottom of the card */
	display: inline-block;
	background: #ffffff;
	color: #03544D;
	padding: 14px 30px;
	text-decoration: none !important;
	border-radius: 50px;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 1px;
	transition: all 0.3s ease;
}

.location-btn:hover {
	box-shadow: 0px 5px 15px rgba(0,0,0,0.2);
}

/* Tablet: 2 per row */
@media (max-width: 1024px) {
	.location-card { flex: 0 1 calc(50% - 20px); }
}

/* Mobile Responsiveness: 1 per row */
@media (max-width: 768px) {
	.location-grid { flex-direction: column; align-items: center; }
	.location-card { 
		width: 100%; 
		max-width: 100%; 
		flex: 1 1 auto;
		padding: 40px 20px;
	}
	.location-title { font-size: 28px; }
}

.revamp-footer-locations {
	color: #03544d;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

p.footer-addr-text {
	margin-bottom: 5px;
}

/* Popup Dropdown Specifics */
.revamp-popup-dropdown-container {
	margin-top: 20px;
	width: 100%;
	display: flex;
	justify-content: center;
}

.revamp-custom-dropdown.popup-version {
	width: auto;
}

.revamp-custom-dropdown.popup-version .revamp-trigger-btn {
	background: #03544D !important; /* Primary Color */
	color: #fff !important;
	border: none !important;
	border-radius: 50px !important;
	padding: 12px 20px !important;
	text-align: center !important;
	justify-content: center !important;
	font-size: 15px !important;
}

.revamp-custom-dropdown.popup-version .revamp-options-list {
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.revamp-popup-box h2 {
	font-family: "Poppins", sans-serif;
	font-weight: 600;
	color: #03544D;
}

a.revamp-phone-target {
	color: #3A3A3A;
}


/* Hide targets by default to prevent Langley flicker */
.revamp-phone-target, .revamp-text-target {
	visibility: hidden;
}
/* Show them only when the location is confirmed by the system */
body.revamp-loc-langley .revamp-phone-target,
body.revamp-loc-cloverdale .revamp-phone-target,
body.revamp-loc-langley .revamp-text-target,
body.revamp-loc-cloverdale .revamp-text-target {
	visibility: visible;
}