/* General styles for the container */
.imp-frontend-container {
    width: 100%;
    margin: 50px auto;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #2C2C2B;
}

/* Styles for the CPT list */
.imp-cpt-list {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Styles for CPT buttons */
.page .imp-frontend-container .imp-cpt-btn {
    padding: 8px 20px;
    background: #fff;
    border: 1px solid #A6A6A6;
    border-radius: 3px;
    cursor: pointer;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #2C2C2B;
}

/* Active state for CPT buttons */
.page .imp-frontend-container .imp-cpt-btn.active {
    border: 1px solid #EAAD17;
    background: #EAAD17;
    color: #fff;
}

/* Styles for the terms select container */
.imp-terms-select {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Styles for the terms select label */
.imp-terms-select span {
    cursor: pointer;
}

/* Styles for the terms select dropdown */
.imp-terms-select select {
    padding: 8px;
    font-size: 14px;
}

/* Styles for the map container */
.imp-map-container {
    display: flex;
    gap: 20px;
}

/* Styles for the map section */
.imp-map {
    flex: 0 0 50%;
}

/* Styles for the inner map container */
.imp-map-inner {
    display: flex;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
}

/* Styles for the SVG map */
.imp-map-svg {
    max-height: 560px;
    margin: 20px auto;
}

/* Ensure SVG dimensions are responsive */
.imp-map-inner svg {
    width: auto;
    max-height: 530px;
    max-width: 560px;
    height: auto;
}

/* Hover effect for SVG paths */
.imp-map-inner path:hover {
    opacity: 0.8;
    cursor: pointer;
}

/* Styles for the info section */
.imp-info {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 50%;
}

/* Styles for the info content container */
.imp-info-content {
    width: 100%;
    max-width: 560px;
    height: 100%;
    max-height: 560px;
    padding: 32px;
    margin-right: 50px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0px 5px 30px 0px rgba(0, 0, 0, 0.16);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Styles for the term header */
.imp-term-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #C0C0BF;
    padding-bottom:  19px;
    margin-right: 30px;
}

/* Styles for the term title wrapper */
.imp-term-title-wrapper {
    flex: 1;
}

/* Styles for the term title */
.imp-term-title {
    font-family: "Poppins", Sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #2E7C6C;
    margin: 0;
}

/* Styles for the post count in the term header */
.imp-post-count {
    font-size: 16px;
    font-weight: 500;
    color: #2C2C2B;
    border: 1px solid #A6A6A6;
    padding: 2px 9px;
    border-radius: 3px;
    margin-left: 7px;
}

/* Styles for the custom text under the term title */
.imp-term-custom-text {
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #2C2C2B;
    margin: 5px 0 0;
}

/* Styles for the term image wrapper */
.imp-term-image-wrapper {
    flex: 0 0 auto;
}

/* Styles for the term image */
.imp-term-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Styles for the posts list */
.imp-posts-list {
    padding-right: 30px;
    margin: 0;
}

/* Styles for first block */
.imp-posts-list .imp-post-item:first-child{
    padding-top:  10px;
}

/* Styles for each post item in the list */
.imp-post-item {
    border-bottom: 1px solid #C0C0BF;
    padding-top: 29px;
    padding-bottom: 24px;
}

/* Remove border for the last post item */
.imp-post-item:last-child {
    border-bottom: none;
}

/* Styles for meta labels (e.g., Website, IV Partner) */
.imp-meta-label {
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #EAAD17;
    display: block;
}

/* Styles for meta values and links */
.imp-meta-value,
.imp-meta-label a {
    font-family: "Poppins", Sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #2C2C2B;
}

/* Styles for links in meta labels */
.imp-meta-label a {
    color: #0073aa;
    text-decoration: none;
}

/* Hover effect for links in meta labels */
.imp-meta-label a:hover {
    text-decoration: underline;
}

/* Styles for the Learn More button wrapper */
.imp-learn-more-wrapper a {
    margin-top: 24px;
    padding: 10px 30px;
    color: #fff;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    line-height: 43px;
    font-weight: 600;
    border-radius: 3px;
    letter-spacing: 1px;
}

.imp-learn-more-wrapper a:hover{
    color: #fff;
}

.imp-learn-more-wrapper a svg{
    margin-left: 5px;
}

/* Styles for the Learn More button */
.imp-learn-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #EAAD17;
    color: #fff;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

/* Hover effect for the Learn More button */
.imp-learn-more:hover {
    background-color: #d99c15;
}

/* Styles for the legend container */
.imp-legend-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    margin-top: 48px;
}

/* Styles for each legend item */
.imp-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #2E333E;
    margin-left: 10%;
}

/* Styles for the legend color indicator */
.imp-legend span {
    width: 51px;
    height: 23px;
    display: inline-block;
}

/* Styles for the map header */
.imp-map-header {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 5;
    padding-bottom: 47px;
    margin-bottom: 57px;
    border-bottom: 1px solid #A6A6A6;
}

/* Styles for the taxonomy select label */
.imp-select-taxonomy {
    cursor: pointer;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #2E333E;
}

/* Styles for the taxonomy select wrapper */
.imp-select-taxonomy-wrapper {
    position: relative;
}

/* Styles for the term select dropdown wrapper */
.imp-term-select-wrapper {
    opacity: 1;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 5;
    width: 100%;
    padding: 16px;
    right: 0;
    top: 46px;
    background: #fff;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    overflow: hidden;
    min-width: 179px;
}

/* Hide the default term select dropdown */
.imp-term-select {
    display: none;
}

/* Active state for custom term select items */
.imp-custom-term-select-item.active {
    color: #EAAD17;
}

/* Styles for the info header */
.imp-info-header {
    font-family: "Poppins", Sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #2E7C6C;
    text-align: center;
    margin-bottom: 40px;
}

/* Styles for the info count circle */
.imp-info-count {
    background-color: #495C68;
    height: 162px;
    width: 162px;
    margin: auto;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-family: "Poppins", Sans-serif;
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 35px;
    position: relative;
    z-index: 1;
    animation: imp-pulse 2s infinite;
}

/* Pseudo-elements for the info count animation */
.imp-info-count::before,
.imp-info-count::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #495C68;
    opacity: 0.5;
    z-index: -1;
}

/* Animation for the first wave effect */
.imp-info-count::before {
    animation: imp-wave 2s infinite;
}

/* Animation for the second wave effect with a delay */
.imp-info-count::after {
    animation: imp-wave 2s infinite 0.5s;
}

/* Pulse animation for the info count */
@keyframes imp-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Wave animation for the info count */
@keyframes imp-wave {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Styles for the custom message in the info section */
.imp-info-custom-message {
    text-align: center;
    color: #2C2C2B;
    font-family: "Poppins", Sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 18px;
}

/* Styles for the info footer */
.imp-info-footer {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2E7C6C;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 26px;
    padding: 22px;
    border-radius: 5px;
}

/* Styles for the left part of the info footer */
.imp-info-footer-left {
    display: flex;
    padding-right: 29px;
}

/* Loading animation for map and info content */
.imp-map-content.loading::before,
.imp-info-content.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #495C68;
    border-radius: 50%;
    animation: imp-spin 1s linear infinite;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
    will-change: transform;
}

/* Overlay for loading state */
.imp-map-content.loading::after,
.imp-info-content.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Fade out overlay when not loading */
.imp-map-content::after,
.imp-info-content::after,
.imp-map-content.fading-out::after,
.imp-info-content.fading-out::after {
    opacity: 0;
}

/* Fade out spinner when not loading */
.imp-map-content::before,
.imp-info-content::before,
.imp-map-content.fading-out::before,
.imp-info-content.fading-out::before {
    opacity: 0;
}

/* Spinner animation */
@keyframes imp-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Ensure minimum height for map and info sections */
.imp-info-content,
.imp-map-content,
.imp-map,
.imp-info {
    position: relative;
    min-height: 100px;
}

/* Styles for custom term select items */
.imp-custom-term-select-item {
    padding-bottom: 16px;
    color: #2C2C2B;
    font-family: "Poppins", Sans-serif;
    font-size: 13px;
    font-weight: normal;
    cursor: pointer;
}

/* Remove padding for the last custom term select item */
.imp-custom-term-select .imp-custom-term-select-item:last-child {
    padding: 0;
}

/* Styles for the post image wrapper */
.imp-post-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #E4E4E4;
    border-radius: 3px;
    flex: 0 0 50%;
}

/* Styles for the post image */
.imp-post-image-wrapper .imp-post-image {
    width: 200px;
    height: 167px;
    object-fit: contain;
}

/* Styles for post meta data */
.imp-post-meta {
    padding: 0 18px;
    flex: 0 0 50%;
}

.imp-post-content {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 16px;
}

.imp-post-meta-style {
    margin-bottom: 15px;
}

.imp-post-meta .imp-post-meta-style:last-child {
    margin-bottom: 0;
}

.imp-post-meta-style a{
    color: #2C2C2B;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: normal;
    display: block;
}

.imp-load-terms-posts {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.imp-term-title {
    display: flex;
    align-items: center;
}

.imp-scrollbar {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0px;
}

.imp-scrollbar::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
    border-radius: 0px;
}

.imp-scrollbar::-webkit-scrollbar-track {
    background: #F8F8F8 !important;
}

.imp-scrollbar::-webkit-scrollbar-thumb {
    background: #f5a623;
    border-radius: 0px;
}

.imp-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #e69520;
}

.imp-scrollbar::-webkit-scrollbar-button {
    height: 0;
    width: 0;
    display: none !important;
}

.imp-cpt-list-left-arrow, 
.imp-cpt-list-right-arrow{
    cursor: pointer;
}

.imp-cpt-list-left-arrow, 
.imp-cpt-list-right-arrow,
.imp-map-container .imp-terms-select {
    display: none;
}

.imp-read-more{
    padding: 10px 0;
}

.imp-read-more a{
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #2E7C6C;
    display: block;
}

.imp-read-more a:hover{
    color: #EAAD17;
}


@media( max-width: 767px){

    .imp-cpt-list-left-arrow, 
    .imp-cpt-list-right-arrow,
    .imp-map-container .imp-terms-select{
        display: flex;
    }

    .imp-map-header .imp-terms-select{
        display: none;
    }

    .imp-map-container{
        flex-direction: column;
    }

    .imp-map-inner svg{
        width: 100%;
    }

    .imp-cpt-list{
        justify-content: center;
    }

    .imp-map-header {
        justify-content: center;
        border: none;
        margin-bottom: 0;
        padding-bottom: 30px;
    }

    .imp-cpt-list button.imp-cpt-btn:not(.active) {
        display: none;
    }

    .imp-legend{
        margin-left: 0px;
        font-size: 13px;
    }

    .imp-info-content {
        max-width: 100%;
        margin-right: 0;
    }

    .imp-map-inner svg{
        max-height: 472px;
    }

    .imp-legend-container{
        margin-top: 10px;
    }

    .imp-terms-select {
        justify-content: flex-end;
        margin-bottom: 30px;
    }

    .imp-info-content{
        padding: 22px;
        max-height: 100%;
    }

    .imp-info-footer {
        font-size: 13px;
        line-height: 18px;
        padding: 12px;
    }

    .imp-info-footer-left {
        display: flex;
        padding-right: 15px;
    }

    .imp-term-header{
        margin-right: 10px;
    }

    .imp-posts-list {
        padding-right: 10px;
    }

    .imp-scrollbar {
        height: 300px; 
        max-height: 100%; 
    }

    .imp-post-content {
        flex-direction: column;
    }

    .imp-post-image-wrapper .imp-post-image {
        width: 100%;
        height: 115px;
        object-fit: cover;
        border-radius: 0;
    }

    .imp-post-image-wrapper{
        margin-bottom: 22px;
    }

    .imp-term-title{
        font-size: 20px;
    }

    .imp-post-count {
        font-size: 13px;
    }

    .imp-term-custom-text {
        font-size: 12px;
    }

    .imp-posts-list .imp-post-item:first-child{
        padding-top: 0;
    }

    .imp-post-meta{
        padding: 0;
    }

    .imp-meta-label,
    .imp-post-meta-style a,
    .imp-meta-value, 
    .imp-meta-label a{
        font-size: 13px;
    }

    .imp-learn-more-wrapper a {
        padding: 5px 25px;
        font-size: 13px;
    }
}


@supports (-webkit-overflow-scrolling: touch) {
    .imp-scrollbar {
        -webkit-appearance: none;
        overflow-y: overlay;
    }
    .imp-scrollbar::-webkit-scrollbar {
        -webkit-appearance: none;
        width: 6px !important;
        opacity: 1 !important;
    }
}