/**
 * College Kampus Plugin Frontend Styles
 * Version: 1.0.0
 */

/* Global Styles */
.college-kampus-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
}

/* Search and Filter Section */
.ck-search-filters {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ck-search-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ck-search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.ck-search-input:focus {
    outline: none;
    border-color: #0066cc;
}

.ck-search-btn {
    padding: 12px 30px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.ck-search-btn:hover {
    background: #0052a3;
}

.ck-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.ck-filter-group {
    display: flex;
    flex-direction: column;
}

.ck-filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.ck-filter-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.ck-filter-select:focus {
    outline: none;
    border-color: #0066cc;
}

/* College Grid */
.ck-colleges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* College Card */
.ck-college-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ck-college-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.ck-college-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ck-college-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ck-college-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ck-college-header {
    margin-bottom: 15px;
}

.ck-college-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.ck-college-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
}

.ck-college-title a:hover {
    color: #0066cc;
}

.ck-college-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
}

.ck-college-location svg {
    width: 16px;
    height: 16px;
}

/* Badges */
.ck-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.ck-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ck-badge-ownership {
    background: #e3f2fd;
    color: #1976d2;
}

.ck-badge-grade {
    background: #fff3e0;
    color: #e65100;
}

.ck-badge-nirf {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Rating */
.ck-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.ck-stars {
    display: flex;
    gap: 2px;
}

.ck-star {
    color: #ffc107;
    font-size: 18px;
}

.ck-star.empty {
    color: #ddd;
}

.ck-rating-text {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* College Details */
.ck-college-details {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
}

.ck-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.ck-detail-label {
    color: #666;
    font-weight: 500;
}

.ck-detail-value {
    color: #222;
    font-weight: 600;
}

.ck-detail-value.highlight {
    color: #0066cc;
}

/* View More Button */
.ck-view-more {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    transition: background 0.3s;
}

.ck-view-more:hover {
    background: #0052a3;
    color: white;
}

/* Pagination */
.ck-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.ck-pagination button,
.ck-pagination span {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.ck-pagination button:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.ck-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ck-pagination button:disabled:hover {
    background: white;
    color: #333;
    border-color: #e0e0e0;
}

.ck-pagination .current {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Top Colleges Table */
.ck-top-colleges-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.ck-table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

.ck-table-header h2 {
    margin: 0;
    font-size: 24px;
}

.ck-table {
    width: 100%;
    border-collapse: collapse;
}

.ck-table thead {
    background: #f8f9fa;
}

.ck-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.ck-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.ck-table tr:hover {
    background: #f8f9fa;
}

.ck-table .rank-col {
    width: 60px;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    color: #0066cc;
}

.ck-table .college-name {
    font-weight: 600;
    color: #222;
}

.ck-table .college-name a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
}

.ck-table .college-name a:hover {
    color: #0066cc;
}

.ck-table .location-col {
    color: #666;
    font-size: 14px;
}

/* Loading Spinner */
.ck-loading {
    text-align: center;
    padding: 40px;
}

.ck-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* No Results */
.ck-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

/* Result Count */
.ck-results-count {
    margin-bottom: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 6px;
    color: #1976d2;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .ck-colleges-grid {
        grid-template-columns: 1fr;
    }
    
    .ck-search-bar {
        flex-direction: column;
    }
    
    .ck-search-input {
        min-width: 100%;
    }
    
    .ck-filters {
        grid-template-columns: 1fr;
    }
    
    .ck-table {
        font-size: 14px;
    }
    
    .ck-table th,
    .ck-table td {
        padding: 10px;
    }
}

/* Single College Page */
.ck-single-college {
    max-width: 1200px;
    margin: 0 auto;
}

.ck-single-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.ck-single-header h1 {
    margin: 0 0 10px 0;
    font-size: 36px;
}

.ck-single-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ck-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ck-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.ck-info-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.ck-info-box h3 {
    margin: 0 0 15px 0;
    color: #0066cc;
    font-size: 20px;
}

.ck-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ck-info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

.ck-info-list li:last-child {
    border-bottom: none;
}

.ck-info-label {
    color: #666;
    font-weight: 500;
}

.ck-info-value {
    color: #222;
    font-weight: 600;
}
