/* Medical Colleges Page Styles */

/* 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;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles - Same as original */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h3 {
    color: #2c5aa0;
    font-size: 24px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #2c5aa0;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2c5aa0;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}
/* Dropdown container */
.nav-menu .dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* Dropdown content (hidden by default) */
.nav-menu .dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    z-index: 1000;
    top: 100%;
    left: 0;
    border-radius: 4px;
    overflow: hidden;
}

/* Dropdown links */
.nav-menu .dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background 0.2s;
}

.nav-menu .dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Show the dropdown on hover */
.nav-menu .dropdown:hover .dropdown-content {
    display: block;
}

/* Optional: Style the caret icon */
.nav-menu .dropdown > span i {
    margin-left: 6px;
}

/* Medical Colleges Section */
.medical-colleges-section {
    padding: 120px 0 60px;
    background: #f8f9fa;
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 42px;
    color: #2c5aa0;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-subtitle {
    font-size: 20px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Colleges Grid */
.colleges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.college-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.college-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.college-image {
    position: relative;
    overflow: hidden;
}

.college-image img {
    width: 100%;
    height: 220px;
    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.02);
}

.college-info {
    padding: 25px;
}

.college-info h3 {
    font-size: 22px;
    color: #2c5aa0;
    margin-bottom: 15px;
    font-weight: bold;
}

.college-info p {
    color: #666;
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.college-info p i {
    margin-right: 8px;
    width: 16px;
    color: #2c5aa0;
}

.college-tags {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.tag {
    background: #e3f2fd;
    color: #2c5aa0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.view-details {
    color: #2c5aa0;
    font-weight: 600;
    margin-top: 20px;
    display: inline-block;
    transition: color 0.3s ease;
}

.view-details i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.college-card:hover .view-details {
    color: #1e3d6f;
}

.college-card:hover .view-details i {
    transform: translateX(5px);
}

/* Back to Main Button */
.back-to-main {
    text-align: center;
    margin-top: 40px;
}

.btn {
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-secondary {
    background: transparent;
    color: #2c5aa0;
    border: 2px solid #2c5aa0;
}

.btn-secondary:hover {
    background: #2c5aa0;
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary i {
    margin-right: 8px;
}

/* WhatsApp Popup - Same as original */
.whatsapp-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: #25d366;
    padding: 15px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: bounce 2s infinite;
}

.whatsapp-popup a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.whatsapp-popup i {
    font-size: 24px;
    margin-right: 10px;
}

.popup-text {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Footer - Same as original */
.footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 18px;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1e3d6f;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a {
        padding: 15px;
        display: block;
        border-bottom: 1px solid #eee;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-subtitle {
        font-size: 18px;
    }
    
    .colleges-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .college-card {
        margin: 0 10px;
    }
    
    .medical-colleges-section {
        padding: 100px 0 40px;
    }
    
    .whatsapp-popup {
        bottom: 20px;
        right: 20px;
        padding: 12px;
    }
    
    .popup-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .colleges-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .college-info {
        padding: 20px;
    }
    
    .college-info h3 {
        font-size: 20px;
    }
    
    .college-image img {
        height: 180px;
        object-fit: contain;
        background-color: #f8f9fa;
    }
}

/* Animation for college cards */
.college-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.college-card.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}