.US-dental-school-container{
    width: 100%;
    height: auto;
}
.map-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}
.map-image {
    width: 100%;
    height: auto;
    margin: 5%;
}
.popup {
    display: none;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.95); /* Set background to white with 50% transparency */
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 10;
    max-width: 35vw; /* Add a max-width to control popup size */
    border-radius: 15px; /* Adjust border radius for smoother rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Add a subtle shadow for depth */
    font-family: Arial, sans-serif; /* Set a clean font */
    font-size: 1rem; /* Adjust font size for readability */
    color: #333; /* Darken text color for contrast */
    word-wrap: break-word; /* Ensure long words break to fit within the popup */
    overflow: hidden; /* Prevent overflow */
}

.map-dot {
    position: absolute;
    width: 2.6vw; /* Increased size for better visibility of the number */
    height: 2.6vw;
    min-width: 1rem; /* Ensures the dots are also responsive to viewport width */
    min-height: 1rem;
    max-width: 1.1vh; /* Ensures the dots are also responsive to viewport width */
    max-height: 1.1vh;
    cursor: pointer;
}

.map-dot circle {
    fill: orange; /* Background color of the dot */
    transition: fill 0.3s; /* Smooth transition for hover effect */
}

.map-dot text {
    fill: white; /* Color of the text */
    font-size: 4rem; /* Responsive font size */
    text-anchor: middle; /* Center text horizontally */
    dominant-baseline: auto; /* Center text vertically */
    font-weight: bold;
}

.map-dot:hover circle {
    fill: #FF5F1F; /* Neon Orange */
}

.map-dot.clicked circle {
    fill: #FF5F1F; /* Copper */
}

.school-list {
    display: grid;
    grid-template-rows: repeat(17, 1fr);
    grid-auto-flow: column; /* Ensure items fill columns first */
    gap: 1%;
    margin-top: 4%;
    height: 100%;
}

.school-item {
    display: flex;
    align-items: center;
    cursor: pointer; /* Ensure cursor indicates clickable items */
}

.school-id {
    color: orange;
    font-weight: bold;
    margin-right: 3%;
    transition: color 0.3s; /* Smooth transition for color change */
}

.school-item:hover {
    background-color: rgba(255, 95, 31, 0.1);
    border-radius: 8px;
}

.school-item:hover .school-id {
    color: #FF5F1F; /* Neon Orange */
}

.school-id.active {
    color: #FF5F1F; /* Neon Orange */
}

.school-name {
    color: black;
    font-size: 1rem;
}

.view-more-details {
    display: flex;
    align-items: center;   /* Vertical centering */
    justify-content: center; /* Horizontal centering */
    margin: auto;

}

.modal {
    display: none; /* Hidden by default */
    position: fixed;
    display: flex;
    align-items: center;   /* Vertical centering */
    justify-content: center; /* Horizontal centering */
    z-index: 999; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Add a subtle shadow for depth */
}

.modal-content {
    border-radius: 25px; /* Adjust border radius for smoother rounded corners */
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-height: 90vh;
    position: relative;
    overflow: auto; /* Allows scrolling */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.scrollable-div::-webkit-scrollbar {
    display: none;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


/* Container for the columns */
.popup-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 5%; /* Space between columns */
    border-radius: 15px;
}

/* Individual columns */
.popup-column {
    flex: 1; /* Grow columns to fill available space equally */
    min-width: 250px; /* Minimum width to maintain readability */
}

/* Ensure headings have consistent styling */
.popup-column h4 {
    margin-top: 0;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .popup-columns {
        flex-direction: column;
    }
    .map-dot {
        width: 2vw;
        height: 2vw;
        min-height: 1vh;
        min-width: 1vw;
    }
}


@media (max-width: 1048px) {
    .map-container {
        width: 80%;
        
    }
    .map-dot {
        width: 2vw;
        height: 2vw;
        min-height: 1.5vh;
        min-width: 1.5vw;
    }
    .map-dot text {
        font-size: 3.8rem; /* Responsive font size */
    }
    .popup {
        width: 50%;
        max-width: 80%; /* Add a max-width to control popup size */
    }
    .school-list {
        margin: 0 5%;
        grid-template-rows: repeat(25, 1fr);
    }
    .school-name {
    font-size: 0.9rem;
    }
}

/* --- Added Animation Code Below --- */

/* Keyframes for the popup animation */
@keyframes popupFadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animation when modal has 'show' class */
.modal.show .modal-content {
    animation: popupFadeInScale 0.5s ease-out forwards;
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .modal.show .modal-content {
        animation: none;
    }
}
