/* ==========================================================================
   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: 300px; 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; }
.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: 15px; 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: 150px; }
.revamp-trigger-btn { width: 100%; padding: 8px 12px; border-radius: 4px; border: 1px solid #ccc; background: #fff; font-weight: 600; color: #333; cursor: pointer; text-align: left; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.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 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    min-width: 200px;
}

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

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; border:1px solid #03544D; border-radius:4px; min-width: 200px; }
.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; }

/* 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; }
.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; 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: 16px !important;
}

/* 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; 
    }
       
}


/* =============================================
   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,
    .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;
	}
}

.rw-popup-left ul {
	font-size: 16px;
}