* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body {
	width: 100%;
	height: 100%;
}

body {
	font-family: Calibri;
	background: linear-gradient(135deg, #252732 0%, #1a092c 100%);
	min-height: 100vh;
	padding: 1rem;
	color: #343a40;
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

.page-container {
	width: 100%;
	max-width: 900px;
}

@keyframes float {
	0%, 100% {
		transform: translateY(0) rotate(0deg);
	}
	50% {
		transform: translateY(-20px) rotate(10deg);
	}
}

.certificate-wrapper {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	position: relative;
}

.certificate-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #343a40, #6c757d, #343a40);
}

.certificate-header {
	background: linear-gradient(135deg, #2f54c6 0%, #0f2c4a 100%);
	color: white;
	padding: 2rem;
	position: relative;
	overflow: hidden;
}

.certificate-header::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
	animation: float 6s ease-in-out infinite;
}

.header-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	z-index: 2;
	gap: 2rem;
	flex-wrap: wrap;
}

.logo-section {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex: 1;
	min-width: 0;
}

.logo {
	width: 130px;
	height: 80px;
	flex-shrink: 0;
	border-radius: 12px;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.1);
	padding: 8px;
}

.title-section h1 {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 0.3rem;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	word-wrap: break-word;
}

.certificate-number {
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.85);
	font-weight: 600;
	word-wrap: break-word;
}

.status-badge {
	padding: 0.75rem 1.5rem;
	border-radius: 25px;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.8rem;
	letter-spacing: 1px;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	white-space: nowrap;
	flex-shrink: 0;
}

.status-active {
	background: linear-gradient(135deg, #28a745, #20c997);
	color: white;
}

.status-expired {
	background: linear-gradient(135deg, #dc3545, #fd7e14);
	color: white;
}

.status-inprogress {
	background: linear-gradient(135deg, #ffc107, #fd7e14);
	color: #333;
}

.certificate-body {
	padding: 2rem;
}

.info-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.info-card {
	background: #f8f9fa;
	border-radius: 12px;
	padding: 1.5rem;
	border-left: 4px solid #2f7ac5;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.info-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(52, 58, 64, 0.05), transparent);
	transition: left 0.5s ease;
}

.info-card:hover::before {
	left: 100%;
}

.info-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(52, 58, 64, 0.1);
}

.field-label {
	font-size: 1rem;
	font-weight: 600;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.field-value {
	font-size: 1.1rem;
	font-weight: 500;
	color: #343a40;
	line-height: 1.5;
	word-wrap: break-word;
	word-break: break-word;
}

.dates-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin-top: 1rem;
}

.certificate-footer {
	background: #f8f9fa;
	padding: 1.5rem;
	text-align: center;
	border-top: 1px solid #e9ecef;
	position: relative;
}

.footer-content {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	color: #6c757d;
	font-size: 0.9rem;
	flex-wrap: wrap;
}

.verification-seal {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: #343a40;
	color: white;
	padding: 0.5rem 1rem;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
}

/* Icons for different fields */
.icon-building::before {
	content: '\f1ad';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
}

.icon-certificate::before {
	content: '\f0a3';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
}

.icon-tasks::before {
	content: '\f0ae';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
}

.icon-calendar::before {
	content: '\f073';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
}

.icon-shield::before {
	content: '\f3ed';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
}

/* Tablet - Medium screens */
@media (max-width: 768px) {
	body {
		padding: 0.75rem;
	}

	.certificate-header {
		padding: 1.5rem;
	}

	.header-content {
		flex-direction: column;
		text-align: center;
		gap: 1.5rem;
	}

	.logo-section {
		justify-content: center;
		width: 100%;
		display: inline;
	}

	.title-section h1 {
		font-size: 1.8rem;
	}

	.certificate-number {
		font-size: 1rem;
	}

	.status-badge {
		align-self: center;
		padding: 0.6rem 1.2rem;
		font-size: 0.75rem;
	}

	.certificate-body {
		padding: 1.5rem;
	}

	.info-grid {
		gap: 1.2rem;
	}

	.info-card {
		padding: 1.2rem;
	}

	.field-label {
		font-size: 0.9rem;
	}

	.field-value {
		font-size: 1rem;
	}

	.dates-section {
		gap: 1.2rem;
	}

	.certificate-footer {
		padding: 1rem;
	}

	.footer-content {
		font-size: 0.85rem;
		gap: 0.75rem;
	}
}

/* Mobile - Small screens */
@media (max-width: 480px) {
	body {
		padding: 0.5rem;
	}

	.certificate-wrapper {
		border-radius: 12px;
	}

	.certificate-header {
		padding: 1.2rem;
	}

	.header-content {
		flex-direction: column;
		gap: 1rem;
	}

	.logo {
		width: 100px;
		height: 70px;
	}

	.title-section h1 {
		font-size: 1.4rem;
	}

	.certificate-number {
		font-size: 0.9rem;
	}

	.status-badge {
		padding: 0.5rem 1rem;
		font-size: 0.7rem;
	}

	.certificate-body {
		padding: 1rem;
	}

	.info-grid {
		gap: 1rem;
	}

	.info-card {
		padding: 1rem;
		border-left-width: 3px;
	}

	.field-label {
		font-size: 0.8rem;
		margin-bottom: 0.3rem;
	}

	.field-value {
		font-size: 0.95rem;
	}

	.dates-section {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.certificate-footer {
		padding: 0.8rem;
	}

	.footer-content {
		font-size: 0.8rem;
		gap: 0.5rem;
		flex-direction: column;
	}
	.logo-section {
		display: inline;
	}

}

/* Extra small screens */
@media (max-width: 360px) {
	.certificate-header {
		padding: 1rem;
	}

	.title-section h1 {
		font-size: 1.2rem;
	}

	.certificate-number {
		font-size: 0.8rem;
	}

	.logo {
		width: 90px;
		height: 60px;
	}

	.field-label {
		font-size: 0.75rem;
	}

	.field-value {
		font-size: 0.9rem;
	}

	.status-badge {
		font-size: 0.65rem;
		padding: 0.4rem 0.8rem;
	}
	.logo-section {
		display: inline;
	}

}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
	.info-card {
		min-height: auto;
	}

	.info-card:hover::before {
		left: -100%;
	}

	.info-card:hover {
		transform: none;
	}
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
	.certificate-header {
		padding: 1rem;
	}

	.title-section h1 {
		font-size: 1.5rem;
		margin-bottom: 0.2rem;
	}

	.certificate-number {
		font-size: 0.85rem;
	}

	.info-card {
		padding: 0.8rem;
	}
}

/* Print styles */
@media print {
	body {
		background: white;
		padding: 0;
	}

	.certificate-wrapper {
		box-shadow: none;
		max-width: 100%;
	}

	.info-card:hover {
		transform: none;
	}
}