/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.6;
}

/* Container */
.container {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 0;
    padding: 1.5rem;
    box-shadow: none;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    top: 0;
    border-right: 1px solid #e2e8f0;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    color: #1e3a8a;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

/* Form Elements */
.search-input, .dropdown, .range-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus, .dropdown:focus, .range-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dropdown {
    margin-top: 0.5rem;
    cursor: pointer;
}

/* Range Sliders */
.range-slider-container {
    margin-top: 1rem;
}

.range-slider {
    position: relative;
    height: 40px;
    margin-bottom: 1rem;
    padding: 0 10px;
}

.slider-track {
    position: absolute;
    width: calc(100% - 20px);
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.slider-range {
    position: absolute;
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.range-slider input[type="range"] {
    position: absolute;
    width: calc(100% - 20px);
    height: 6px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 2;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 2;
}

.range-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.range-input {
    padding: 0.5rem;
    font-size: 0.9rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.range-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Single Range Slider for Fees */
.single-range-slider {
    position: relative;
    margin-bottom: 1rem;
    padding: 0 10px;
}

.single-range-slider input[type="range"] {
    width: calc(100% - 20px);
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    margin-left: 10px;
}

.single-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.single-range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.single-range-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.single-range-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.fees-display {
    text-align: center;
    font-weight: 600;
    color: #1e3a8a;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.package-display {
    text-align: center;
    font-weight: 600;
    color: #1e3a8a;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.package-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    padding: 0.5rem;
    border-radius: 0;
    border: 1px solid #bbf7d0;
}

.package-symbol {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 1.1rem;
}

.package-input {
    width: 80px;
    padding: 0.25rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a8a;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
}

.package-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.package-unit {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 1.1rem;
}

.fees-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 0.5rem;
    border-radius: 0;
    border: 1px solid #bae6fd;
}

.fees-symbol {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 1.1rem;
}

.fees-input {
    width: 100px;
    padding: 0.25rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a8a;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
}

.fees-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fees-unit {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 1.1rem;
}

.total-fees-display {
    text-align: center;
    font-weight: 600;
    color: #1e3a8a;
    margin-top: 0.5rem;
    font-size: 1rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 0.5rem;
    border-radius: 0;
    border: 1px solid #fbbf24;
}

/* Fee Inputs */
.fee-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.fee-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fee-input-group label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.fee-input-group input {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.fee-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Reset Button */
.reset-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Content Area */
.content {
    background: #f8fafc;
    border-radius: 0;
    padding: 2rem;
    box-shadow: none;
    height: 100vh;
    overflow-y: auto;
    border: none;
}

.results-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.results-header h2 {
    color: #1e3a8a;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#resultsCount {
    color: #64748b;
    font-size: 1rem;
}

/* College Grid */
.college-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* College Card */
.college-card {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.college-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.college-card:hover::before {
    opacity: 1;
}

.college-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.college-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: transform 0.3s ease;
}

.college-card:hover .college-image {
    transform: scale(1.05);
}

.college-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.college-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.college-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.college-location::before {
    content: '📍';
    font-size: 0.8rem;
}

.college-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
    flex: 1;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 0.75rem;
}

.detail-label {
    color: #64748b;
    font-weight: 500;
}

.detail-value {
    color: #1e3a8a;
    font-weight: 600;
}

.college-link {
    display: inline-block;
    width: 100%;
    padding: 0.6rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.college-link::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;
}

.college-link:hover::before {
    left: 100%;
}

.college-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 300px 1fr;
        gap: 1.5rem;
    }
    
    .college-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar {
        position: static;
        order: 2;
    }
    
    .content {
        order: 1;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .college-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .filter-section {
        margin-bottom: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Quick Filter Links */
.quick-filters {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.filter-links-section {
    margin-bottom: 1.5rem;
}

.filter-links-section:last-child {
    margin-bottom: 0;
}

.filter-links-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-links-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    text-decoration: none;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.filter-link:hover {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.filter-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.filter-link.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.filter-link .count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 0.25rem;
    font-weight: 600;
}

.filter-link:hover .count {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design for Quick Filters */
@media (max-width: 768px) {
    .quick-filters {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .filter-links-section h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .filter-link {
        padding: 0.375rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .filter-links {
        gap: 0.375rem;
    }
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
