/* Department Page Styles */
.department-page {
    min-height: 70vh;
}

/* Page Header */
.page-header {
    background-color: #014903;  /* Match main navigation color */
    color: white;
    padding: 0.3rem 1rem;  /* Even slimmer padding */
    margin: 0 0 1rem 0;  /* Reduced bottom margin */
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Department Title - Applied to all department pages */
.page-header h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;  /* Slightly smaller font */
    font-weight: 500;    /* Lighter weight */
    line-height: 1.2;    /* Tighter line height */
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin: 0 auto;
    padding: 0.3rem 10px;  /* Reduced padding */
    text-align: center;
    max-width: 1200px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Ensure consistent styling across all department pages */
.department-page .page-header h1 {
    font-size: 1.1rem !important;
    font-weight: 500 !important;  /* Lighter weight */
    text-transform: uppercase !important;
    margin: 0 auto !important;
    padding: 0.3rem 10px !important;  /* Reduced padding */
    text-align: center !important;
    line-height: 1.2 !important;  /* Tighter line height */
    letter-spacing: 0.3px !important;
}

.department-slogan {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;  /* Slightly smaller font */
    margin: 0.2rem auto 0;  /* Reduced margin */
    max-width: 800px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.2px;  /* Tighter letter spacing */
    text-align: center;
    display: block;
    width: 100%;
    line-height: 1.3;  /* Tighter line height */
    padding: 0 1rem;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Ensure consistent slogan styling across all pages */
.department-page .page-header .department-slogan {
    font-size: 0.9rem !important;  /* Slightly smaller font */
    font-weight: 400 !important;
    margin: 0.2rem auto 0 !important;  /* Reduced margin */
    padding: 0 1rem !important;
    line-height: 1.3 !important;  /* Tighter line height */
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: white;
}

/* Department Content */
.department-content {
    line-height: 1.8;
}

.department-content h2 {
    color: #1a237e;
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8eaf6;
}

.department-content h3 {
    color: #303f9f;
    margin: 2rem 0 1rem;
}

.department-content ul {
    padding-left: 1.5rem;
}

.department-content li {
    margin-bottom: 0.5rem;
}

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.program-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.program-card h4 {
    color: #1a237e;
    margin-bottom: 0.75rem;
}

/* Sidebar */
.department-sidebar {
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.department-sidebar .card-title {
    color: #1a237e;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e8eaf6;
}

.department-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.department-sidebar li {
    margin-bottom: 0.75rem;
}

.department-sidebar a {
    color: #3f51b5;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.department-sidebar a:hover {
    color: #1a237e;
    padding-left: 8px;
}

.department-sidebar address {
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.6;
}

.department-sidebar i {
    width: 20px;
    color: #5c6bc0;
    margin-right: 8px;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .department-content {
        margin-bottom: 2rem;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .department-sidebar {
        display: none;
    }
    
    .department-content {
        width: 100%;
    }
    
    .page-header {
        background: none !important;
        color: #000 !important;
        padding: 1rem 0 !important;
    }
    
    .breadcrumb-item a {
        color: #000 !important;
    }
    
    .program-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
