/* mdms-college.css */

/* Image Optimization - Prevent Blurriness */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
}

/* Ensure images maintain quality on different screen densities */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* High DPI display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

.mdms-colleges-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    color: #2c5aa0;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.colleges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.college-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.college-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.college-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.college-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition: transform 0.3s ease;
    background-color: #f8f9fa;
}

.college-card:hover .college-image img {
    transform: scale(1.1);
}

.college-info {
    padding: 20px;
}

.college-info h3 {
    font-size: 1.3rem;
    color: #2c5aa0;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.college-info p {
    color: #666;
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.college-info p i {
    color: #2c5aa0;
    width: 16px;
}

.view-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #2c5aa0;
    font-weight: 600;
    margin-top: 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-details i {
    transition: transform 0.3s ease;
}

.college-card:hover .view-details {
    color: #1a4a8a;
}

.college-card:hover .view-details i {
    transform: translateX(5px);
}

/* Back to Main Button */
.back-to-main {
    text-align: center;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mdms-colleges-section {
        padding: 100px 0 60px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .colleges-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .college-card {
        margin-bottom: 20px;
    }
    
    .college-info h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .college-info {
        padding: 15px;
    }
    
    .college-info h3 {
        font-size: 1.1rem;
    }
    
    .college-info p {
        font-size: 0.9rem;
    }
}

/* Animation for cards */
.college-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.college-card:nth-child(1) { animation-delay: 0.1s; }
.college-card:nth-child(2) { animation-delay: 0.2s; }
.college-card:nth-child(3) { animation-delay: 0.3s; }
.college-card:nth-child(4) { animation-delay: 0.4s; }
.college-card:nth-child(5) { animation-delay: 0.5s; }
.college-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for images */
.college-image img {
    background: #f0f0f0;
}

.college-image img:not([src]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
} 