﻿.scholarships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.scholarship-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.scholarship-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.compact-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.compact-logo {
    width: 100px;
    height: 100px;
    border-radius: 10%;
    overflow: hidden;
    border: 3px solid #f0f0f0;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-info {
    width: 100%;
    margin-bottom: 20px;
}

.compact-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.compact-provider {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.compact-provider i {
    color: #2c5aa0;
    font-size: 0.9rem;
}

.compact-deadline {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 10px;
    background: #f8fafc;
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto;
}

.compact-deadline i {
    color: #dc2626;
}

.compact-deadline .urgent {
    color: #dc2626;
    font-weight: 600;
}

.urgent-badge {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 5px;
}

.compact-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.compact-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.compact-btn.details-btn {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
    color: white;
}

.compact-btn.details-btn:hover {
    background: linear-gradient(135deg, #25518f 0%, #3a6cb4 100%);
    transform: translateY(-2px);
}

.compact-btn.location-btn {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.compact-btn.location-btn:hover:not(.disabled) {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.compact-btn.location-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

.compact-btn i {
    font-size: 0.9rem;
}

/* Modal Styles - Updated without map */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 1001;
    display: none;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh;
}

.modal-header {
    flex-shrink: 0;
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
    color: white;
    padding: 25px;
    position: relative;
    z-index: 1002;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    max-height: 3.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    padding-right: 40px;
}

.modal-provider {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 1003;
    backdrop-filter: blur(5px);
}

.close-modal:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.modal-content-wrapper {
    height: 100%;
}

.modal-info-full {
    padding: 30px;
}

.modal-info-full::-webkit-scrollbar {
    width: 6px;
}

.modal-info-full::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-info-full::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.modal-info-full::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.modal-details {
    margin-bottom: 30px;
}

.detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
}

.detail-value {
    color: #111827;
    word-break: break-word;
}

.eligibility-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.eligibility-box h4 {
    margin-top: 0;
    color: #4f46e5;
    margin-bottom: 15px;
}

.eligibility-box h4 i {
    margin-right: 8px;
}

.eligibility-box p {
    margin: 0;
    line-height: 1.6;
    color: #4b5563;
}

.benefits-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.benefits-box h4 {
    margin-top: 0;
    color: #0369a1;
    margin-bottom: 15px;
}

.benefits-box h4 i {
    margin-right: 8px;
}

.modal-footer {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    flex-shrink: 0;
}

.close-btn {
    padding: 12px 30px;
    background: #e5e7eb;
    color: #4b5563;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.close-btn:hover {
    background: #d1d5db;
}

/* Responsive */
@media (max-width: 768px) {
    .compact-actions {
        flex-direction: column;
    }
    
    .compact-btn {
        width: 100%;
    }
    
    .modal-container {
        width: 95%;
        max-width: 95%;
    }
    
    .modal-info-full {
        padding: 20px;
    }
    
    .detail-row {
        grid-template-columns: 120px 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .compact-logo {
        width: 80px;
        height: 80px;
    }
    
    .compact-title {
        font-size: 1.1rem;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .detail-label {
        margin-bottom: 2px;
    }
    
    .modal-footer {
        padding: 15px 20px;
    }
    
    .close-btn {
        width: 100%;
    }
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.probability-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    display: inline-block;
    color: white;
}

.probability-70 { background: linear-gradient(135deg, #4CAF50, #2E7D32); }
.probability-50 { background: linear-gradient(135deg, #FF9800, #EF6C00); }
.probability-30 { background: linear-gradient(135deg, #F44336, #C62828); }

.scholarship-card.not-eligible {
    opacity: 0.7;
    filter: grayscale(0.3);
}

.deadline-warning {
    color: #f44336;
    font-weight: bold;
    font-size: 0.9em;
}

.eligibility-warning {
    background: #ffebee;
    padding: 8px 12px;
    border-radius: 5px;
    margin-top: 10px;
    border-left: 3px solid #f44336;
    font-size: 0.9em;
}

.eligibility-warning i {
    color: #f44336;
    margin-right: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
