/* Wrapper for both service list and selected image */
.services-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
}

/* services Container takes 50% of the width and has a fixed height with a scrollbar */
.services-container {
    width: 50%;
    margin: 0;
    background-color: #e4e9ee;
    border-radius: 20px;
    padding: 20px;
    height: 480px;
    overflow-y: auto;
}

/* Optional: Customize scrollbar appearance (for modern browsers) */
.services-container::-webkit-scrollbar {
    width: 8px;
}
.services-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
}
.services-container::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

.service-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 15px;
    padding: 10px;
    cursor: pointer;
}
.service-item:hover {
    box-shadow: 0 0 5px #00000020;
}
.service-item.active-service {
    background-color: #15827f;
}
.service-item.active-service h2 {
    color: #fff;
}
.service-item.active-service h3 {
    color: #e4e9ee;
}
.service-image img {
    width: 70px;
    height: 70px;
    border-radius: 15px;
}
.service-details {
    padding: 0 20px;
}
.service-details h2 {
    font-size: 24px;
    margin: 0 0 10px;
}
.service-details h3 {
    font-size: 18px;
    color: #666;
    margin: 0;
}
.service-category-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px 0;
}
.service-category-item {
    background-color: #e4e9ee;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #063568;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease;
}
.service-category-item:hover {
    box-shadow: 0 0 4px #00000040;
    cursor: pointer;
}
.service-category-item {
    flex: 1 0 150px;
    box-sizing: border-box;
}
.service-category-item.active-category {
    background-color: #15827f;
    color: #fff;
}
.service-category-item.with-icon::before {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
}
/* “Feasibility and Needs Assessment” slug */
#feasibility-and-needs-assessment::before {
    background-image: url('/wp-content/uploads/svgs/cardio.svg');
}
#feasibility-and-needs-assessment.active-category::before {
    background-image: url('/wp-content/uploads/svgs/cardio_active.svg');
}

#planning::before {
    background-image: url('/wp-content/uploads/svgs/building.svg');
}
#planning.active-category::before {
    background-image: url('/wp-content/uploads/svgs/building_active.svg');
}
#design::before {
    background-image: url('/wp-content/uploads/svgs/worker.svg');
}
#design.active-category::before {
    background-image: url('/wp-content/uploads/svgs/worker_active.svg');
}
#bidding-and-tendering::before {
    background-image: url('/wp-content/uploads/svgs/outline.svg');
}
#bidding-and-tendering.active-category::before {
    background-image: url('/wp-content/uploads/svgs/outline_active.svg');
}
#construction-and-execution::before {
    background-image: url('/wp-content/uploads/svgs/factory_worker.svg');
}
#construction-and-execution.active-category::before {
    background-image: url('/wp-content/uploads/svgs/factory_worker_active.svg');
}
#testing-and-commissioning::before {
    background-image: url('/wp-content/uploads/svgs/crowd.svg');
}
#testing-and-commissioning.active-category::before {
    background-image: url('/wp-content/uploads/svgs/crowd_active.svg');
}
#facility-management::before {
    background-image: url('/wp-content/uploads/svgs/building.svg');
}
#facility-management.active-category::before {
    background-image: url('/wp-content/uploads/svgs/building_active.svg');
}
#project-management::before {
    background-image: url('/wp-content/uploads/svgs/worker.svg');
}
#project-management.active-category::before {
    background-image: url('/wp-content/uploads/svgs/worker_active.svg');
}
#biomedical-engineering::before {
    background-image: url('/wp-content/uploads/svgs/outline.svg');
}
#biomedical-engineering.active-category::before {
    background-image: url('/wp-content/uploads/svgs/outline_active.svg');
}
.service-category-item.with-icon {
    padding-top: 20px;
    justify-content: flex-start;
    flex-direction: column;
}
.services-wrapper ::-webkit-scrollbar {
    width: 15px;
}
.services-wrapper ::-webkit-scrollbar-thumb {
    background-color: #15827f;
    border-radius: 10px;
    transition: background-color 1s;
}
.services-wrapper ::-webkit-scrollbar-thumb:hover {
    background-color: #15827fdd;
}
.services-lvl1-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    /*max-width: 800px;*/
}
.service-lvl1 {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    background-color: #e5ebf3;
    color: #1a2652;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}
.service-lvl1.active {
    background-color: #007a73;
    color: white;
}
.category-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}
.featured-image-container {
    width: 50%;
    display: flex;
    overflow-y: auto;
    height: 480px;
    background-color: #e4e9ed;
    border-radius: 20px;
    padding: 30px;
}
.category-image {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
#selected-featured-text {
    width: 100%;
    height: 100%;
}
.featured-image-container:has(img){
    padding: 0;
}
.featured-image-container:has(h2),
.featured-image-container:has(p),
.featured-image-container:has(figure) {
    padding: 20px 0 20px 20px !important;
}
.featured-image-container img {
    border-radius: unset !important;
}

/*
.text-container {
	margin: 20px;
}

*/








@media (max-width: 1200px) {
    .category-group {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        display: flex;
        gap: 20px;
        padding: 10px 20px;
        justify-content: flex-start;
    }

    .category-group::-webkit-scrollbar {
        display: none;
    }

    .service-category-item {
        scroll-snap-align: start;
    }

    .service-category-item.with-icon::before {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 1200px) {
    .service-category-item { flex: 0 0 18%; min-width: 18%; }
}

@media (max-width: 1050px) {
    .service-category-item { flex: 0 0 23%; min-width: 23%; }
}

@media (max-width: 900px) {
    .service-category-item { flex: 0 0 31%; min-width: 31%; }
}

@media (max-width: 750px) {
    .service-category-item { flex: 0 0 47%; min-width: 47%; }
}

@media (max-width: 600px) {
    .service-category-item { flex: 0 0 85%; min-width: 85%; }
}








@media (max-width: 1200px) {
    .services-wrapper {
        flex-direction: column;
    }

    .services-container,
    .featured-image-container {
        width: 100%;
        height: auto;
    }

    .featured-image-container {
        margin-top: 20px;
        padding: 20px;
    }
}







@media (min-width: 1200px) {

/* 1) The outer container now just holds a solid background + padding. */
.featured-image-container {
    width: 50%;
    display: flex;
    flex-direction: column;      /* so inner wrapper can expand vertically */
    height: 480px;               /* keep the same fixed height */
    background-color: #e4e9ed;   /* solid background so padding is always opaque */
    border-radius: 20px;
    padding: 30px;               /* this padding WILL remain blank */
	padding-right: 10px;
    box-sizing: border-box;      /* ensure height includes padding, if needed */
    /* REMOVE overflow from here! */
}

/* 2) The new inner wrapper scrolls if its contents exceed the height */
.featured-image-inner {
    flex: 1;                     /* grow to fill remaining height inside .featured-image-container */
    overflow-y: auto;            /* ONLY this area scrolls */
}

/* 3) If you have img or text inside #selected-featured-text, you can style it as before */
#selected-featured-text {
    /* For example, make sure it fills the inner area */
    width: 100%;
    /* height is implicitly 100% of .featured-image-inner because of flex:1 above */
}
}



















/*popup for mobile*/
@media (max-width: 1200px) {
  .mobile-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }

  .mobile-popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    max-height: 80vh;
    width: 90%;
    overflow-y: auto;
    position: relative;
  }

.mobile-popup-close {
    position: sticky;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    color: #15827f;
    padding: 10px;
    z-index: 10;
    text-align: right;
    display: block;
    margin-left: auto;
    background-color: #fff;
}
}

.facility-management, .biomedical-engineering, .project-management {
	background-color: unset;
	cursor: unset;
}
.facility-management:hover, .biomedical-engineering:hover, .project-management:hover {
	box-shadow: unset;
}
.facility-management.active-service, .biomedical-engineering.active-service, .project-management.active-service {
	background-color: unset;
}

.trigger-project-implementation{
	cursor: pointer;
}
.trigger-project-implementation a {
	color: white !important;
	text-decoration: none;
}
.trigger-project-implementation a:hover {
	color: white !important;
	text-decoration: none;
}

.service-full-content p , .service-full-content ul , .service-full-content ol {
	margin-bottom: 5px !important;
}