/* Department office pages (page_type 2, body.dept-page): shared head (views/office/dept_head.php)
   and body layout in content_subcontent / content_subcontent_e. Tokens match office-about.css. */

.dept-page {
	--dept-navy: var(--sci-navy);
	--dept-navy-rgb: var(--sci-navy-rgb);
	--dept-gold: var(--sci-gold);
	--dept-accent: var(--sci-focus);
	--dept-blue: rgb(var(--bs-link-hover-color-rgb));
	--dept-surface: #eef2f7;
	--dept-muted-bg: #f3f5f8;
	--dept-line: #e3e8ef;
	--dept-muted: #5c6b7a;
	--dept-text-soft: #4a5868;
	--dept-radius-sm: .25rem;
	--dept-radius: .375rem;
	--dept-radius-lg: 10px;
	--dept-shadow: 0 8px 24px rgba(0, 0, 0, .1);
	--dept-gap: 12px;
	--dept-section-gap: 2rem;
	--dept-max: 1160px;
}

.dept-head,
.dept-body {
	max-width: calc(var(--dept-max) + 1.5rem);
}

.dept-head {
	padding-top: 1rem;
}

.dept-breadcrumb .breadcrumb {
	--bs-breadcrumb-margin-bottom: .5rem;
	--bs-breadcrumb-divider-color: var(--dept-muted);
	--bs-breadcrumb-item-active-color: var(--dept-muted);
	flex-wrap: nowrap;
	font-size: .875rem;
}

.dept-breadcrumb .breadcrumb-item {
	display: flex;
	flex: none;
	align-items: center;
	white-space: nowrap;
}

.dept-breadcrumb .breadcrumb-item.active {
	flex: 0 1 auto;
	min-width: 0;
}

.dept-breadcrumb-title {
	overflow: hidden;
	text-overflow: ellipsis;
}

.dept-breadcrumb a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.dept-hero {
	padding: 1.5rem 1.25rem;
	border-radius: var(--dept-radius-lg);
	background: linear-gradient(120deg, var(--dept-navy) 0%, var(--dept-navy) 35%, var(--dept-blue) 100%);
	color: #fff;
}

.dept-hero-title {
	margin: 0;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.3;
}

@media (min-width: 768px) {
	.dept-hero {
		padding: 2rem 2.5rem;
	}
}

@media (min-width: 992px) {
	.dept-hero-title {
		font-size: 2rem;
	}
}

.dept-tabs {
	margin-top: .75rem;
	border-bottom: 1px solid var(--dept-line);
}

.dept-tabs ul {
	position: relative;
	display: flex;
	gap: .25rem;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: thin;
}

.dept-tabs li {
	flex: none;
}

.dept-tabs a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: .5rem .875rem;
	border-bottom: 3px solid transparent;
	border-radius: var(--dept-radius-sm) var(--dept-radius-sm) 0 0;
	color: var(--dept-navy);
	font-size: .875rem;
	white-space: nowrap;
}

.dept-tabs a:hover {
	background: var(--dept-surface);
	color: var(--dept-navy);
	text-decoration: none;
}

.dept-tabs a.active {
	border-bottom-color: var(--dept-accent);
	font-weight: 500;
}

.dept-tabs a:focus-visible {
	outline-offset: -3px;
}

@media (min-width: 768px) {
	.dept-tabs a {
		padding: .5rem 1rem;
		font-size: .9375rem;
	}
}

.dept-body {
	padding-top: 1.5rem;
	padding-bottom: 2.5rem;
}

.dept-subtitle {
	margin: 0 0 1rem;
	font-size: 1.25rem;
	font-weight: 500;
	color: var(--dept-navy);
}

.dept-heading {
	position: relative;
	margin: 0 0 1rem;
	padding-bottom: .5rem;
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--dept-navy);
}

.dept-heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 2.5rem;
	height: 3px;
	background: var(--dept-accent);
	border-radius: 2px;
}

.dept-heading-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin-bottom: 1rem;
}

.dept-heading-row .dept-heading {
	margin: 0;
	margin-right: auto;
	padding-bottom: .5rem;
}

.dept-content {
	overflow-wrap: break-word;
	line-height: 1.7;
}

.dept-content img,
.dept-content video {
	max-width: 100%;
	height: auto;
}

.dept-content iframe,
.dept-content table {
	max-width: 100%;
}

.dept-section {
	margin-top: var(--dept-section-gap);
}

.dept-docs {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dept-doc {
	display: flex;
	align-items: center;
	gap: .875rem;
	min-width: 0;
	min-height: 56px;
	padding: .75rem 1rem;
	border: 1px solid var(--dept-line);
	border-radius: var(--dept-radius-lg);
	background: #fff;
	color: var(--dept-navy);
	transition: border-color .2s ease, box-shadow .2s ease;
}

li.dept-doc {
	list-style: none;
}

a.dept-doc:hover {
	border-color: rgba(var(--dept-navy-rgb), .35);
	box-shadow: var(--dept-shadow);
	text-decoration: none;
}

a.dept-doc:hover .dept-doc-name {
	text-decoration: underline;
}

.dept-doc-icon {
	flex: none;
	width: 1.5rem;
	font-size: 1.5rem;
	text-align: center;
}

.dept-doc-name {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.dept-doc-type {
	flex: none;
	padding: .125rem .5rem;
	border: 1px solid var(--dept-navy);
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .03em;
	line-height: 1.5;
}

.dept-doc-type-pdf {
	border-color: #c53030;
	color: #c53030;
}

.dept-doc-ext {
	flex: none;
	font-size: 1rem;
	opacity: .55;
}

.dept-doc-actions {
	display: inline-flex;
	flex: none;
	gap: .25rem;
	margin-left: .25rem;
}

.dept-panel {
	margin-bottom: 1.25rem;
	padding: 1rem 1.125rem;
	border: 1px solid var(--dept-line);
	border-radius: var(--dept-radius-lg);
	background: #fff;
}

.dept-panel-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin: 0 0 .75rem;
	font-size: 1rem;
	font-weight: 500;
	color: var(--dept-navy);
}

.dept-panel-title .btn {
	margin-left: auto;
}

.dept-panel-link {
	display: flex;
	align-items: center;
	gap: .625rem;
	min-height: 44px;
	margin-bottom: .75rem;
	padding: .625rem .875rem;
	border-radius: var(--dept-radius);
	background: var(--dept-surface);
	color: var(--dept-navy);
	font-weight: 500;
}

.dept-panel-link:hover {
	background: rgba(var(--dept-navy-rgb), .08);
	color: var(--dept-navy);
	text-decoration: none;
}

.dept-links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dept-links li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .35rem;
	padding: .55rem 0;
	border-bottom: 1px solid var(--dept-line);
}

.dept-links li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.dept-links a {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--dept-navy);
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.dept-page .staff-list {
	display: grid;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dept-page .staff-card {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	column-gap: 1rem;
	align-content: start;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--dept-line);
}

.dept-page .staff-card:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.dept-page .staff-card > :not(.staff-photo) {
	grid-column: 2;
}

.dept-page .staff-photo {
	grid-row: 1 / span 4;
	width: 88px;
	height: 88px;
	margin: 0;
	background: var(--dept-muted-bg);
	box-shadow: 0 0 0 1px var(--dept-line);
}

.dept-page .staff-name {
	margin-top: .375rem;
	font-weight: 500;
	color: var(--dept-navy);
}

.dept-page .staff-info {
	font-size: .875rem;
	color: var(--dept-muted);
}

.dept-aside-note {
	margin-top: var(--dept-section-gap);
	padding: 1rem 1.125rem;
	border-left: 3px solid var(--dept-accent);
	background: var(--dept-muted-bg);
	border-radius: 0 var(--dept-radius) var(--dept-radius) 0;
}

.dept-edit-save {
	margin-top: .75rem;
}
