.map-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr ;
    width: 100%;
    height: 100%;
    gap: 20px;
    margin-bottom: 30px;
    height: 400px;   

}
.map-container_2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    width: 100%;
    height: 100%;
    gap: 20px;
    height: 400px;   

}

.map-container_3 {
    display: grid;
    grid-template-columns: 1fr 2fr ; 
    width: 100%;
    height: 100%;
    gap: 20px;
    transition: grid-template-columns 0.3s ease;
}


#map_institutions, #map_analytics {
    border-radius: 10px;
    background: #056B5F !important; 
    overflow: hidden;
}

.dark-mode #map_institutions, 
.dark-mode #map_analytics {
    border-radius: 10px;
    background: #035349 !important; 
    overflow: hidden;
}

.wlo-count{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10;
    position: absolute;
    bottom: 50px;
    right: 50px;
    background-color: white;
    color: #0f172a;
    padding: 5px 30px;
    border-radius: 10px;
    text-align: center;
    font-size: 10px;
    box-shadow: 0 6px 6px rgba(255, 255, 255, 0.479);
}
.wlo-count i {
    display: inline-flex;
    margin-right: 10px; 
    font-size: 18px;

}
.wlo-count .text {
    display: flex;
    flex-direction: column;
}
.wlo-count .count {
    font-size: 16px;
    font-weight: bolder;
}

.chart-wrapper {
    max-width: 500px;
    width: 100%;
    background: #F1F1F1;      
    padding: 16px;
    border-radius: 12px;
}

.chart-wrapper_2 {
    max-width: 300px;
    width: 100%;
    display: flex;
    justify-content: center; 
    align-items: center;     
    background: #F1F1F1;      
    padding: 16px;
    border-radius: 12px;
    height: 300px;
}

.dark-mode .chart-wrapper_2{
    background: #222726;   
    color: white;   
}

.dark-mode .chart-wrapper{
    background: #222726;   
    color: white;   
}

.dark-mode .institution-card-wrapper{
    background: #222726;   
    color: white;   
}


.dark-mode  .institution-content{
    background: #222726;   
    color: white;   
}

.institution-content{
    border-radius: 12px;
    position: relative;
    width: 100%;
    padding: 20px;
    border-radius: 12px;
    background: #F1F1F1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #0f172a ;
}

.inst-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #c5c5c5;
    padding-bottom: 5px;
    align-items: center;
}

.close-btn {
    min-width: 8%;
    background: none;
    border: 1px solid #555;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    width: 30px;  
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;   
}

.institutions-list {
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
}


.institution-card-wrapper{
    width: 100%;
    padding: 20px;
    border-radius: 12px;
    background: #F1F1F1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.institution-card {
    position: relative;
    border-bottom: 1px solid #dadada;
    cursor: pointer;
}

.institution-card:last-child {
    border-bottom: none;
}


.institution-title {
    position: relative;
    padding-left: 20px; 
    font-weight:500;
}

.institution-location {
    font-size: 12px;
    padding-bottom: 5px;
    padding-left: 30px; 
    color: #8f8f8f;
}

.institution-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 10px; 
}

.institution-icon::before {
    position: absolute;
    left: -30px;        
    top: 50%;
    transform: translateY(-80%);
    font-size: 18px;

}

.loader-wrapper {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    background: rgba(255,255,255,0.5); 
    z-index: 10;
    overflow: hidden;
}

.loader-wrapper::before {
    content: '';
    position: absolute;
    /* top: -100%; */
    left: 0;
    width: 100%;
    height: 200%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.8) 100%);
    animation: shine 2s linear infinite;
}

.loader-glass {
    position: relative;

}

.loader-glass::before {
    position: absolute;
}

@keyframes shine {
    0% { top: -100%; }
    100% { top: 100%; }
}

.loader-glass-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 35px;
    height: 35px;
    margin: -17.5px 0 0 -17.5px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #056B5F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


.gov-tooltip {
    background: white;
    border-radius: 8px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
    padding: 6px 10px;
    color: #0f172a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.institutions-list::-webkit-scrollbar {
    width: 8px;
}

.institutions-list::-webkit-scrollbar-track {
    background: #f0f0f0; 
    border-radius: 10px;
}

.institutions-list::-webkit-scrollbar-thumb {
    background: #056B5F; 
    border-radius: 10px;
    transition: background 0.3s ease;
}

.institutions-list::-webkit-scrollbar-thumb:hover {
    background: #34d399; 
}

.institutions-list {
    scrollbar-width: thin;
    scrollbar-color: #056B5F #f0f0f0; 
}


.institutions-filters {
    margin: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.institutions-filters label {
    font-weight: bold;
    margin-top: 10px;
}

.filter-select {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}


.institutions-filters {
    display: flex;
    flex-direction: row;
    gap: 20px; 
    align-items: center;
    justify-content: start;
}

.dark-mode .filter-item  {
    background: #222726;   
    color: white;   
}

.dark-mode .filter-select  {
    background: #222726;   
    color: white;   
}

.filter-item {
    display: flex;
    align-items: center; 
    justify-content: center; 
    text-align: center;
    font-weight: normal;
    gap: 5px; 
    background-color: white;
    border-radius: 50px;
    padding: 4px 10px;
}

.filter-item label {
    display: flex;
    padding-bottom: 5px;
    font-weight: normal;
    align-items: center; 
    justify-content: center;
}

.filter-item select {
    cursor: pointer;
    border: none !important;
    background: transparent;
}

.inst-detail strong, 
.inst-detail span {
    color: black;
}

.dark-mode .inst-detail strong, 
.dark-mode .inst-detail span,
.dark-mode .inst-name {
    color: white !important;
}

.dark-mode .inst-detail a {
    color: #4EB7AF;
    text-decoration: underline;
}

.dark-mode .inst-detail img {
    filter: brightness(0) invert(1);
}

/* =======================
   Tabs
======================= */
.tabs-container {
    width: 100%;
    display: flex;
    align-items: center;
     justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 22px;
    border-radius: 25px;
    border: 1px solid black;
    background: transparent;
    color: black;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: black;
    color: #fff;
}

.tab-btn:hover {
    background: rgba(5, 107, 95, 0.1);
    color: #000000;  
}

.dark-mode .tab-btn {
    border-color: #ffffff; 
    color: #ffffff;       
    background: transparent;
}

.dark-mode .tab-btn.active {
    background: #ffffff;   
    color: #000000;        
}

.dark-mode .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff; 
    
}

.tab-btn img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
    transition: filter 0.3s ease;
    filter: brightness(0%) invert(0); 
}

.tab-btn.active img {
    filter: brightness(0%) invert(1);
}

.tab-btn.active:hover img {
    filter: brightness(0) invert(0); 
}

.dark-mode .tab-btn img {
    filter: brightness(0%) invert(1);
}

.dark-mode .tab-btn.active img {
    filter: brightness(0%) invert(0);
}


.dark-mode .tab-btn.active:hover img {
    filter: brightness(0) invert(1);
}

/* =======================
   Tab Content
======================= */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
    height: max-content;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ======================= */

.inst-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.inst-modal.show {
    display: flex;
}

.inst-modal-content {
    background: #fff;
    padding: 25px;
    width: 400px;
    border-radius: 12px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}

/* ----------------------------------------------------------------------------------------------------- */

@media (min-width: 600px) {
    .institutions-list {
        height: 400px;
        display: flex;
        flex-direction: column;
    }
    
    .institutions-list h3 {
        flex-shrink: 0;
        padding: 10px;
    }
    
    .institution-card-wrapper {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }

}
@media (max-width: 1000px) {

    .map-container_2,
    .map-container_3 {
        display: grid; 
        grid-template-columns: 1fr 1fr !important;
        justify-items: center; 
        align-items: center;   
        height: 100%;
        margin: auto;
    }
}

@media (max-width: 768px) {
    .map-container,
    .map-container_2,
    .map-container_3 {
        display: grid; 
        grid-template-columns: 1fr !important;
        justify-items: center; 
        align-items: center;   
        height: 100%;
        margin: auto;
    }

    .chart-wrapper{
        max-width: 300px;
    }

    .institutions-filters {
        display: flex;       
        flex-direction: column;
        justify-content: center; 
        align-items: center;     
        gap: 10px;               
    }
    .institution-card-wrapper {
        flex: 1;
        overflow-y: auto;
        max-height: 400px;
    }

    #map_institutions, #map_analytics {
        width: 100%;   
        max-width: 300px; 
        height: 300px;
        min-height: 300px;
    }

    .wlo-count{
        bottom: 10px;
        right: 10px;
    }
}

