:root {
    --primary-blue: #0A3663;
    --accent-gold: #D4AF37;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f4f7f6;
    --bg-white: #ffffff;
    --danger-red: #d9534f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.top-bar {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 5px 5%;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.top-bar-links a {
    color: var(--text-light);
    margin-left: 15px;
    transition: color 0.3s;
}

.top-bar-links a:hover {
    color: var(--accent-gold);
}

.main-header {
    background-color: var(--bg-white);
    padding: 15px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.college-title h1 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    font-weight: 700;
}

.college-title p {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.navbar {
    background-color: var(--primary-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5%;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--text-light);
    padding: 15px 20px;
    display: block;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-links li a:hover {
    background-color: var(--accent-gold);
    color: var(--primary-blue);
}

.menu-toggle {
    display: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 15px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-blue);
    min-width: 260px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--text-light) !important;
    padding: 12px 20px !important;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dropdown-content a:hover {
    background-color: var(--accent-gold) !important;
    color: var(--primary-blue) !important;
    padding-left: 25px !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .college-title h1 {
        font-size: 1.2rem;
    }
    
    .nav-container {
        padding: 0;
        flex-direction: column;
    }
    
    .menu-toggle {
        display: block;
        text-align: right;
        width: 100%;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--primary-blue);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        display: none;
        padding-left: 20px;
    }
    
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

.dept-banner { 
    background: linear-gradient(rgba(10, 54, 99, 0.8), rgba(10, 54, 99, 0.9)), url('https://images.unsplash.com/photo-1532094349884-543bc11b234d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover; 
    padding: 60px 20px; 
    text-align: center; 
    color: white; 
    border-bottom: 5px solid var(--accent-gold); 
}
.dept-banner h2 { 
    font-size: 2.5rem; 
    color: var(--accent-gold); 
    margin-bottom: 10px; 
}
.dept-banner p { 
    font-size: 1.2rem; 
    font-weight: 300; 
}

.content-container { 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 20px; 
    display: grid; 
    grid-template-columns: 75%; 
    justify-content: center;
    gap: 30px; 
}
.card { 
    background: white; 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    margin-bottom: 30px; 
}
.section-title { 
    color: var(--primary-blue); 
    margin-bottom: 20px; 
    border-bottom: 3px solid var(--accent-gold); 
    display: inline-block; 
    padding-bottom: 5px; 
    font-size: 1.5rem; 
}

.hod-section { 
    display: flex; 
    gap: 30px; 
    align-items: flex-start; 
    background: #eef4f9; 
    padding: 30px; 
    border-radius: 8px; 
    border-left: 5px solid var(--primary-blue); 
}
.hod-image { 
    width: 150px; 
    height: 150px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 4px solid white; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    flex-shrink: 0; 
}
.hod-content h3 { 
    color: var(--primary-blue); 
    font-size: 1.4rem; 
    margin-bottom: 5px; 
}
.hod-content h4 { 
    color: var(--danger-red); 
    font-size: 1rem; 
    margin-bottom: 15px; 
    font-weight: bold; 
}

.staff-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px; 
}
.staff-card { 
    text-align: center; 
    border: 1px solid #eee; 
    padding: 20px 10px; 
    border-radius: 6px; 
    background: #fff; 
    transition: 0.3s; 
}
.staff-card:hover { 
    border-color: var(--primary-blue); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
}
.staff-card img { 
    width: 100px; 
    height: 100px; 
    border-radius: 50%; 
    object-fit: cover; 
    margin-bottom: 15px; 
    border: 2px solid var(--accent-gold); 
}
.staff-card h4 { 
    color: var(--primary-blue); 
    font-size: 1.1rem; 
    margin-bottom: 5px; 
}
.staff-card .designation { 
    color: var(--danger-red); 
    font-size: 0.85rem; 
    font-weight: bold; 
    margin-bottom: 10px; 
}
.staff-card .bio { 
    font-size: 0.85rem; 
    color: #666; 
    line-height: 1.4; 
    border-top: 1px dashed #ccc; 
    padding-top: 10px; 
}

.text-content p { 
    margin-bottom: 15px; 
    text-align: justify; 
    color: #444; 
    font-size: 1.05rem; 
}

.lab-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px; 
}
.lab-card { 
    border: 1px solid #eee; 
    border-radius: 6px; 
    overflow: hidden; 
}
.lab-card img { 
    width: 100%; 
    height: 160px; 
    object-fit: cover; 
}
.lab-card h4 { 
    padding: 15px; 
    background: var(--primary-blue); 
    color: white; 
    margin: 0; 
    font-size: 1rem; 
    text-align: center; 
}
.lab-card p { 
    padding: 15px; 
    font-size: 0.9rem; 
    color: #555; 
    text-align: center; 
    margin: 0; 
}

footer { 
    background-color: var(--primary-blue); 
    color: var(--text-light); 
    padding: 50px 5% 20px; 
    margin-top: 40px; 
    text-align: left; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 30px; 
    margin-bottom: 30px; 
}

.footer-col h4 { 
    color: var(--accent-gold); 
    margin-bottom: 20px; 
    font-size: 1.2rem; 
    border-bottom: 2px solid var(--accent-gold); 
    display: inline-block; 
    padding-bottom: 5px; 
}

.footer-col ul { 
    list-style: none; 
    padding-left: 0; 
    margin: 0;
}

.footer-col ul li { 
    margin-bottom: 10px; 
}

.footer-col ul li a { 
    color: #ddd; 
    transition: color 0.3s; 
    display: inline-block; 
}

.footer-col ul li a:hover { 
    color: var(--accent-gold); 
    padding-left: 5px; 
}

.footer-bottom { 
    text-align: center; 
    padding-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    font-size: 0.9rem; 
    color: #bbb; 
}

@media (max-width: 992px) { 
    .content-container { grid-template-columns: 1fr; } 
    .hod-section { flex-direction: column; align-items: center; text-align: center; } 
}
@media (max-width: 768px) {
    .main-header { flex-direction: row; /* Keep them side-by-side */
        justify-content: space-between; 
        padding: 10px 15px; }
    .logo-section { flex-direction: row; /* Ensure logo and text stay horizontal */
        gap: 12px; 
        align-items: center; }
    .college-title h1 { font-size: 1.4rem; }
    .logo-img { height: 50px; }
    .nav-container { padding: 0; flex-direction: column; align-items: stretch; }
    .menu-toggle { display: block; text-align: right; padding: 15px 20px; }
    .nav-links { display: none; flex-direction: column; width: 100%; }
    .nav-links.active { display: flex; }
    .nav-links li > a { border-top: 1px solid rgba(255,255,255,0.1); width: 100%; }
}
/* Responsive Fixes for Small Viewports (360px and below) */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .content-container {
        padding: 0 10px !important;
        margin: 20px auto !important;
        width: 100% !important;
    }

    .grid-layout {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .card {
        padding: 15px !important;
        margin-bottom: 20px !important;
    }

    .page-banner {
        padding: 40px 15px !important;
    }

    .page-banner h2 {
        font-size: 1.8rem !important;
    }

    .page-banner p {
        font-size: 0.95rem !important;
    }

    /* Fix staff and resource grids on tiny screens */
    .staff-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .resource-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Header adjustments */
    .main-header {
        padding: 10px 15px !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 10px !important;
    }

    .logo-section {
        flex-direction: column !important;
        gap: 5px !important;
    }

    .college-title h1 {
        font-size: 1.2rem !important;
        text-align: center !important;
    }

    .college-title p {
        text-align: center !important;
        font-size: 0.8rem !important;
    }
}