.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 900px;
    height: 80%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
    z-index: 10000;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

#map {
    height: calc(100% - 60px);
    width: 100%;
    border-radius: 8px;
    margin-top: 15px;
    z-index: 1;
}

/* Ensure map tiles load properly */
.leaflet-tile-pane {
    z-index: 1;
}

.leaflet-control-container {
    z-index: 2;
}
/* Scholarship Card with Image Layout */
.scholarship-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.scholarship-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.scholarship-card-inner {
    display: flex;
    flex-wrap: wrap;
}

/* Image Section */
.scholarship-image-section {
    width: 200px;
    min-width: 200px;
    position: relative;
    background: linear-gradient(135deg, #f5f7fb, #e9eef5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-right: 1px solid #e5e7eb;
}

.scholarship-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Details Section */
.scholarship-details-section {
    flex: 1;
    padding: 25px;
    min-width: 300px;
}

.scholarship-header {
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 12px;
}

.scholarship-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    margin-right: 10px;
    line-height: 1.3;
}

.scholarship-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 0.95rem;
}

.detail-label {
    font-weight: 600;
    color: var(--gray);
    min-width: 70px;
}

.scholarship-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

/* Position probability badge on image */
.scholarship-image-section .probability-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    padding: 4px 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scholarship-image-section {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .scholarship-image {
        max-width: 150px;
        height: 120px;
    }
    
    .scholarship-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .scholarship-details-section {
        padding: 20px;
    }
    
    .scholarship-name {
        font-size: 1.2rem;
    }
}