/**
 * Department listing cards — layout in listing-common.css
 */

.dap-dept-list-card {
	display: flex;
	flex-direction: column;
	background: var(--dap-surface);
	border: 1px solid var(--dap-border);
	border-radius: var(--dap-radius-lg);
	overflow: hidden;
	box-shadow: var(--dap-shadow-sm);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
	height: 100%;
}

.dap-dept-list-card:hover {
	box-shadow: var(--dap-shadow-md);
	transform: translateY(-4px);
}

.dap-dept-list-card-media {
	position: relative;
	display: block;
	text-decoration: none;
}

.dap-dept-list-card-image {
	aspect-ratio: 16 / 10;
	background: linear-gradient(160deg, #e8f4fc 0%, #f8fafc 100%);
	overflow: hidden;
}

.dap-dept-list-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.dap-dept-list-card:hover .dap-dept-list-photo {
	transform: scale(1.04);
}

.dap-dept-list-photo-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
}

.dap-dept-list-photo-placeholder svg {
	width: 52px;
	height: 52px;
}

.dap-dept-list-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	box-shadow: var(--dap-shadow-sm);
}

.dap-dept-list-badge-active {
	background: #dcfce7;
	color: #166534;
}

.dap-dept-list-badge-inactive {
	background: #f1f5f9;
	color: #64748b;
}

.dap-dept-list-count {
	position: absolute;
	bottom: 12px;
	right: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.94);
	color: var(--dap-navy);
	box-shadow: var(--dap-shadow-sm);
	backdrop-filter: blur(4px);
}

.dap-dept-list-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px 20px 22px;
}

.dap-dept-list-card-title {
	margin: 0 0 8px;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
}

.dap-dept-list-card-title a {
	color: var(--dap-navy);
	text-decoration: none;
}

.dap-dept-list-card-title a:hover {
	color: var(--dap-accent-dark);
}

.dap-dept-list-card-desc {
	margin: 0 0 16px;
	flex: 1;
	font-size: 14px;
	color: var(--dap-muted);
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.dap-dept-list-card-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding: 11px 16px;
	background: linear-gradient(135deg, var(--dap-accent) 0%, var(--dap-accent-dark) 100%);
	color: #fff !important;
	border-radius: var(--dap-radius-sm);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	width: fit-content;
}

.dap-dept-list-card-link svg {
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.dap-dept-list-card-link:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
	color: #fff !important;
}

.dap-dept-list-card-link:hover svg {
	transform: translateX(3px);
}

@media (max-width: 767px) {
	.dap-dept-list-card {
		height: auto !important;
		min-height: 100%;
	}

	.dap-dept-list-card-image {
		aspect-ratio: auto;
		height: 180px;
	}

	.dap-dept-list-card-link {
		width: 100%;
		justify-content: center;
	}
}
