/* Modern clean design variables */
:root {
    --primary-blue: #3b82f6;
    --primary-indigo: #6366f1;
    --primary-purple: #8b5cf6;
    --accent-orange: #f97316;
    --accent-pink: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
}

/* Modern gradient backgrounds */
.modern-gradient-bg {
    background: linear-gradient(135deg, var(--glass-bg) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
}

/* Enhanced glass morphism */
.glass-premium {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.gov-accent {
    color: var(--accent);
}

.card-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
}

.fade-in {
    animation: fadeIn .35s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* small accessible focus ring */
:focus {
    outline: 3px solid rgba(14, 165, 233, 0.15);
    outline-offset: 2px;
}

/* responsive container */
.maxw {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Floating button animation */
#floatingTestBtn {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

#quickTestBtn:hover {
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

/* Suggestion cards hover effect */
.suggestion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Custom toggle switch for Eligible Only filter */
#eligibleOnly:checked + .toggle-bg {
    background-color: #10b981;
}

#eligibleOnly:checked + .toggle-bg .toggle-dot {
    transform: translateX(20px);
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#eligibleOnly:focus + .toggle-bg {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

/* Toggle switch hover effects */
.toggle-bg:hover {
    background-color: #e5e7eb;
}

#eligibleOnly:checked + .toggle-bg:hover {
    background-color: #059669;
}

/* Enhanced Apply button hover effects */
.sch-card a[class*="bg-"] {
    transition: all 0.2s ease;
}

.sch-card a[class*="bg-"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Statistics cards hover effects */
.scholarship-stat-card {
    transition: all 0.3s ease;
}

.scholarship-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Catalogue cards hover effects */
#catalogue > div {
    transition: all 0.2s ease;
}

#catalogue > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Comparison modal styles */
#comparisonModal {
    backdrop-filter: blur(4px);
}

#comparisonModal > div {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom scrollbar for catalogue */
#catalogue {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

#catalogue::-webkit-scrollbar {
    width: 8px;
}

#catalogue::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#catalogue::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#catalogue::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Favorite button animation */
.favorite-btn {
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

/* Compare checkbox custom styling */
.compare-checkbox {
    accent-color: #3b82f6;
    transform: scale(1.1);
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modern header enhancements */
.header-glass {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Advanced button styling */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-premium:hover::before {
    left: 100%;
}

/* Enhanced card animations */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Statistics card premium styling */
.stat-card-premium {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-card-premium:hover {
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.9) 100%);
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Modern form styling */
.form-premium {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

/* Loading animation improvements */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.5s infinite;
}

/* Enhanced form styling */
#studentForm {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* Form input enhancements */
#studentForm input,
#studentForm select {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

#studentForm input:focus,
#studentForm select:focus {
    background: rgba(255,255,255,1);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

#studentForm input:hover,
#studentForm select:hover {
    border-color: #64748b;
    transform: translateY(-1px);
}

/* Form labels */
#studentForm label span {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

/* Button animations */
#checkBtn {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

#checkBtn:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

#resetBtn {
    transition: all 0.3s ease;
}

#resetBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Statistics section enhancements */
.scholarship-stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.scholarship-stat-card:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #studentForm .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #scholarshipStats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    #scholarshipStats {
        grid-template-columns: 1fr;
    }
    
    .flex-wrap {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Legend card sticky positioning */
@media (min-width: 1280px) {
    .sticky {
        position: sticky;
        top: 1rem;
    }
}

/* Enhanced grid spacing */
.results-grid {
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .results-grid {
        gap: 2rem;
    }
}
