/* ======= GLOBAL RESET ======= */
body {
	margin: 0;
	padding: 0;
	font-family: 'Mulish', sans-serif;
	font-weight: normal;
	background: linear-gradient(
				135deg,
				rgba(31, 31, 31, 0.75) 0%,
				rgba(4, 48, 145, 0.6) 40%,
				rgba(164, 22, 26, 0.6) 80%,
				rgba(31, 31, 31, 0.85) 100%
			),
		url('./img/bg.jpg') center center / cover no-repeat fixed;
	width: 100%;
	min-height: 100vh;
	overflow-x: hidden;
	position: relative;
}

body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url('https://www.transparenttextures.com/patterns/axiom-pattern.png');
	background-repeat: repeat;
	opacity: 0.2;
	z-index: -1;
	pointer-events: none;
}

a {
	text-decoration: none;
	color: inherit;
}

#bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -2;
	overflow: hidden;
}

#snow-canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 12000;
	opacity: 0.8;
}

#bg canvas {
	margin: 0;
	padding: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	z-index: -1;
}

/* ======= WRAPPER ======= */
#wrap {
	max-width: 1200px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	margin: 0 auto;
	text-align: center;
	z-index: 9999;
	position: relative;
	padding: 0 20px;
}

/* ======= TYPING TEXT ======= */
.typing h1 {
	color: #fff;
	font-size: 22px;
	text-transform: uppercase;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	border-right: 2px solid #fff; /* cursor effect */
	display: inline-block;
	animation: blink 0.7s infinite;
}

@keyframes blink {
	0%,
	100% {
		border-color: transparent;
	}
	50% {
		border-color: white;
	}
}

/* ======= HEADER ======= */
.header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 20px 0;
	justify-content: center;
}

.header .top {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	width: calc(100% - 50px);
	background: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(10px);
	padding: 15px 30px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.header .logo img {
	width: 50px;
	/* filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); */
}

.header .menu {
	display: flex;
	flex-direction: row;
	gap: 10px;
}

.header .menu a {
	color: #fff;
	font-weight: 600;
	text-transform: uppercase;
	padding: 8px 18px;
	font-size: 14px;
	transition: all 0.3s;
	border-radius: 8px;
	position: relative;
}

.header .menu a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #043091, #a4161a);
	transition: width 0.3s;
}

.header .menu a:hover {
	color: #a4161a;
	background: rgba(164, 22, 26, 0.1);
}

.header .menu a:hover::after {
	width: 80%;
}

.header .welcome {
	width: 100%;
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 80px 0 60px;
}

.header .welcome h1 {
	color: #fff;
	font-size: 32px;
	text-transform: uppercase;
	margin: 0;
	line-height: 1.2;
	letter-spacing: 10px;
	font-weight: 300;
	text-shadow: 0 0 20px rgba(4, 48, 145, 0.6), 0 0 40px rgba(164, 22, 26, 0.4);
}
/* ======= BOX WRAP ======= */
.box_wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	padding-bottom: 60px;
}

/* ======= BOX GRID ======= */
.boxOne_button {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 40px;
	width: 100%;
	justify-content: center;
	align-items: stretch;
}

/* Card hover effect - Зөвхөн тухайн card дээр хөдлөхөд дээш хөөрнө */
.boxOne:hover {
	transform: translateY(-10px);
	transition: transform 0.3s ease;
}

/* ======= BOX (Flip Card) ======= */
.boxOne {
	perspective: 1000px;
	width: 350px;
	max-width: 350px;
	height: 100%;
	border-radius: 22px;
	background: rgba(23, 16, 25, 0.85);
	backdrop-filter: blur(10px);
	border: 2px solid rgba(255, 255, 255, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-around;
	padding-bottom: 14px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.boxOne:nth-child(1) {
	border-color: rgba(4, 48, 145, 0.4);
}

.boxOne:nth-child(1):hover {
	border-color: rgba(4, 48, 145, 0.8);
	box-shadow: 0 15px 50px rgba(4, 48, 145, 0.5);
}

.boxOne:nth-child(2) {
	border-color: rgba(164, 22, 26, 0.4);
}

.boxOne:nth-child(2):hover {
	border-color: rgba(164, 22, 26, 0.8);
	box-shadow: 0 15px 50px rgba(164, 22, 26, 0.5);
}

.boxOne:nth-child(3) {
	border-color: rgba(31, 31, 31, 0.6);
}

.boxOne:nth-child(3):hover {
	border-color: rgba(255, 255, 255, 0.3);
	box-shadow: 0 15px 50px rgba(31, 31, 31, 0.7);
}

.card-inner {
	position: relative;
	width: 100%;
	height: 300px;
	transform-style: preserve-3d;
	transition: transform 0.8s;
}

.boxOne:hover .card-inner {
	transform: rotateY(180deg);
}

.card-front,
.card-back {
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	border-radius: 22px;
	top: 0;
	left: 0;
}

.card-front img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 22px;
}

.card-back {
	background: linear-gradient(
		135deg,
		rgba(4, 48, 145, 0.9) 0%,
		rgba(164, 22, 26, 0.9) 100%
	);
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
	transform: rotateY(180deg);
	backdrop-filter: blur(10px);
	left: -20px;
}

.boxOne:nth-child(2) .card-back {
	background: linear-gradient(
		135deg,
		rgba(164, 22, 26, 0.9) 0%,
		rgba(31, 31, 31, 0.95) 100%
	);
}

.boxOne:nth-child(3) .card-back {
	background: linear-gradient(
		135deg,
		rgba(31, 31, 31, 0.95) 0%,
		rgba(4, 48, 145, 0.9) 100%
	);
}

.card-back p {
	font-size: 16px;
	line-height: 1.6;
	text-align: center;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ======= BOX CONTENT ======= */
.boxOne h2 {
	color: #fff;
	font-weight: 400;
	font-size: 16px;
	font-family: 'Mulish', sans-serif;
	height: 62px;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0;
}

.boxOne a {
	color: #fff;
	text-transform: uppercase;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 16px;
	padding: 8px 24px;
	display: flex;
	justify-content: center;
	align-items: center;
	width: fit-content;
	transition: all 0.3s ease;
	background: rgba(255, 255, 255, 0.05);
}

.boxOne:nth-child(1) a:hover {
	background: rgba(4, 48, 145, 0.4);
	border-color: rgba(4, 48, 145, 0.8);
	box-shadow: 0 5px 15px rgba(4, 48, 145, 0.5);
}

.boxOne:nth-child(2) a:hover {
	background: rgba(164, 22, 26, 0.4);
	border-color: rgba(164, 22, 26, 0.8);
	box-shadow: 0 5px 15px rgba(164, 22, 26, 0.5);
}

.boxOne:nth-child(3) a:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.6);
	box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* ======= RESPONSIVE ======= */
@media (max-width: 1200px) {
	.boxOne {
		width: 320px;
		max-width: 320px;
	}

	.boxOne_button {
		gap: 20px;
	}
}

@media (max-width: 980px) {
	.boxOne_button {
		flex-wrap: wrap;
		gap: 20px;
		justify-content: center;
	}

	.boxOne {
		width: 100%;
		max-width: 300px;
		height: auto;
		/* Hover дээр center-ээс гарахгүй */
		transform-origin: center;
	}

	.boxOne:hover {
		transform: translateY(-5px);
	}

	.card-inner {
		height: 250px;
	}

	.header .top {
		flex-direction: column;
		gap: 15px;
		padding: 15px 20px;
	}

	.header .logo img {
		width: 120px;
	}

	.header .menu {
		flex-wrap: wrap;
		justify-content: center;
	}

	.header .menu a {
		font-size: 12px;
		padding: 6px 14px;
	}

	.header .welcome {
		padding: 40px 0 30px;
	}

	.header .welcome h1 {
		font-size: 20px;
		letter-spacing: 4px;
	}

	.boxOne h2 {
		font-size: 15px;
		height: 60px;
		margin-bottom: 10px;
		padding: 0 15px;
	}
}

@media (max-width: 600px) {
	.header .welcome {
		padding-top: 20px;
	}
	.header .welcome h1 {
		font-size: 20px;
		letter-spacing: 2px;
	}

	.boxOne {
		max-width: 360px;
	}

	.card-inner {
		height: 220px;
	}

	.boxOne h2 {
		font-size: 14px;
		height: 70px;
	}

	.card-back p {
		font-size: 14px;
	}
}
