:root {
	--primary-color: #2c3e50;
	--secondary-color: #3498db;
	--accent-color: #e74c3c;
	--light-color: #ecf0f1;
	--dark-color: #34495e;
	--success-color: #2ecc71;
	--warning-color: #f39c12;
	--danger-color: #e74c3c;
	--info-color: #3498db;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
	background-color: #f5f7fa;
	color: #333;
	line-height: 1.6;
}

header {
	background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
	color: white;
	padding: 2rem 0;
	text-align: center;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

h1 {
	font-size: 2.5rem;
	margin-bottom: 0.5rem;
}

.subtitle {
	font-size: 1.2rem;
	opacity: 0.9;
	margin-bottom: 1.5rem;
}

.controls {
	background-color: white;
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	margin: 2rem auto;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

.search-box {
	flex: 1;
	min-width: 250px;
	position: relative;
}

.search-box input {
	width: 100%;
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
}

.search-box i {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #777;
}

.filter-group {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

select {
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: white;
	font-size: 1rem;
	min-width: 150px;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 2rem;
	margin: 2rem 0;
}

.card {
	background-color: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-img {
	width: 100%;
	height: 280px;
	background-color: #f8f9fa;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
}

/* Untuk foto dengan rasio 3:4 - portrait */
.card-img.ratio-3-4 {
	background-color: #f8f9fa;
}

.card-img.ratio-3-4 img {
	object-fit: contain;
	width: auto;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
}

/* Untuk foto dengan rasio 1:1 - square */
.card-img.ratio-1-1 {
	background-color: #f8f9fa;
	padding: 15px;
}

.card-img.ratio-1-1 img {
	object-fit: contain;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	border-radius: 4px;
}

/* Untuk foto dengan rasio lain - default */
.card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.card-body {
	padding: 1.5rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.card-title {
	font-size: 1.3rem;
	margin-bottom: 0.5rem;
	color: var(--primary-color);
}

.card-nip {
	color: #777;
	font-size: 0.9rem;
	margin-bottom: 0.5rem;
	font-family: 'Courier New', monospace;
	word-break: break-all;
}

.card-details {
	margin-top: auto;
}

.detail-item {
	display: flex;
	margin-bottom: 0.5rem;
}

.detail-label {
	font-weight: 600;
	min-width: 80px;
	color: var(--dark-color);
}

.status-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
}

.status-aktif {
	background-color: rgba(46, 204, 113, 0.2);
	color: var(--success-color);
}

.status-mutasi {
	background-color: rgba(52, 152, 219, 0.2);
	color: var(--info-color);
}

.status-pensiun {
	background-color: rgba(243, 156, 18, 0.2);
	color: var(--warning-color);
}

.status-almarhum, .status-almarhumah {
	background-color: rgba(231, 76, 60, 0.2);
	color: var(--danger-color);
}

.status-tugas-belajar {
	background-color: rgba(155, 89, 182, 0.2);
	color: #9b59b6;
}

.empty-state {
	text-align: center;
	padding: 3rem;
	color: #777;
}

.empty-state i {
	font-size: 4rem;
	margin-bottom: 1rem;
	color: #ddd;
}

footer {
	background-color: var(--primary-color);
	color: white;
	text-align: center;
	padding: 1.5rem 0;
	margin-top: 3rem;
}

.loading {
	text-align: center;
	padding: 2rem;
	font-size: 1.2rem;
	color: var(--secondary-color);
}

.progress-bar {
	width: 100%;
	height: 4px;
	background-color: #e0e0e0;
	border-radius: 2px;
	margin-top: 10px;
	overflow: hidden;
}

.progress {
	height: 100%;
	background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
	width: 0%;
	transition: width 0.3s ease;
}

@media (max-width: 768px) {
	.gallery {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	}
	
	.controls {
		flex-direction: column;
		align-items: stretch;
	}
	
	.filter-group {
		width: 100%;
	}
}

@media (max-width: 576px) {
	.gallery {
		grid-template-columns: 1fr;
	}
	
	h1 {
		font-size: 2rem;
	}
	
	.card-img {
		height: 240px;
	}
}