/* --- Page Wrapper & Layout --- */
.dept-page-wrapper {
    background: #f8fafc;
    padding: 60px 0;
}

.dept-layout {
    display: flex;
    gap: 50px; 
    align-items: flex-start;
    max-width: 1400px; 
    margin: 0 auto;
    padding: 0 40px; /* Desktop side spacing */
}

/* --- Sidebar Styling --- */
.dept-sidebar {
    flex: 0 0 300px;
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    z-index: 10;
}

.sidebar-menu {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.sidebar-menu h3 {
    background: #004a99;
    color: #fff;
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 700;
}

.sidebar-menu ul { list-style: none; }
.sidebar-menu ul li { border-bottom: 1px solid #f1f5f9; }

.sidebar-menu ul li a {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.sidebar-menu ul li:hover a, 
.sidebar-menu ul li.active a {
    background: #f0f7ff;
    color: #004a99;
    padding-left: 25px;
}

.sidebar-help {
    margin-top: 30px;
    background: #004a99;
    color: white;
    padding: 25px;
    border-radius: 12px;
}

/* --- Main Content Area --- */
.dept-main-content {
    flex: 1;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* IMAGE FIX: Controlled Size */
.dept-featured-img img {
    width: 100%;
    height: 380px; /* Fixed height for standard look */
    object-fit: cover; /* Prevents stretching */
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
}

.dept-article h1 { font-size: 2.4rem; color: #004a99; margin-bottom: 10px; }
.title-line { width: 60px; height: 4px; background: #d32f2f; border: none; margin-bottom: 25px; }

.dept-description { font-size: 1.1rem; color: #475569; line-height: 1.8; margin-bottom: 20px; font-weight: 500; }

.dept-detailed-content h4 { color: #1e293b; margin-top: 25px; margin-bottom: 10px; }
.dept-detailed-content p { color: #64748b; line-height: 1.7; margin-bottom: 15px; text-align: justify; }

/* --- Doctors Grid Section --- */
.dept-doctors-section {
    margin: 40px 0;
    padding: 30px;
    background: #fcfdfe;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.dept-doctors-section h3 {
    font-size: 1.5rem;
    color: #004a99;
    margin-bottom: 25px;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.doctor-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
}

.doctor-card:hover {
    transform: translateY(-5px);
    border-color: #004a99;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.doc-icon { font-size: 45px; margin-bottom: 10px; display: block; }
.doctor-card h4 { font-size: 1.1rem; color: #1e293b; margin-bottom: 5px; }
.doc-edu { font-size: 13px; color: #004a99; font-weight: 700; margin-bottom: 5px; }
.doc-exp { font-size: 12px; color: #64748b; margin-bottom: 15px; }

.btn-sm {
    display: inline-block;
    padding: 8px 18px;
    background: #004a99;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

/* --- Services Box --- */
.dept-services-box {
    background: #f8fafc;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.dept-services-box ul { list-style: none; }
.dept-services-box ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 12px;
    color: #334155;
}

.dept-services-box ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #d32f2f;
    font-weight: bold;
}

/* --- Responsive Rules --- */
@media (max-width: 992px) {
    .dept-sidebar { display: none !important; } 
    .dept-layout { flex-direction: column; padding: 0 20px; }
    .dept-main-content { padding: 25px; }
    .dept-featured-img img { height: 250px; } /* Mobile height lower */
    .dept-article h1 { font-size: 1.8rem; }
}