* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: sans-serif;
	text-align: center;
}

input {
	border-radius: 0;
}

:focus {
	outline: 2px solid #7a92d499;
}

body {
	background: #dfe7e7;
}

.visually-hidden {
	position: absolute;
	clip: rect(0 0 0 0);
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
}

.header {
	position: fixed;
	z-index: 2;
	width: 100%;
	height: 60px;
	padding: 15px 30px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	background-color: #7a92d4;
	box-shadow: 0 0 4px #666;
}

.header__popup {
	display: none;
	width: 30px;
	height: 18px;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
}

.header__title {
	color: #0e1f16;
	font-size: 2.4rem;
	letter-spacing: 0.15rem;
}

.header__social {
	width: 350px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	list-style-type: none;
	font-size: 1.2rem;
}

.header__social__link {
	text-decoration: none;
	color: #0c1b14;
}

.header__social__link:hover {
	color: #f1f1f1;
}

.navbar {
	z-index: 1;
	position: fixed;
	margin-top: 60px;
	width: 220px;
	height: 100%;
	padding: 30px 20px;
	background-color: #f7f3bf;
	box-shadow: 0 0 4px #999;
	transition: left 0.4s;
}

.search__input {
	height: 32px;
	width: 100%;
	padding-left: 35px;
	text-align: left;
	font-size: 0.9rem;
	background: #fff no-repeat 10px / 18px url(./img/search.png);
	border: 2px solid #777;
	box-shadow: 4px 4px 0 -1px #666;
}

.gender {
	margin-top: 15px;
	padding-bottom: 6px;
	border: 2px solid #777;
}

.gender__title {
	margin: auto;
	padding: 0 10px;
	font-size: 1.4rem;
}

.gender__label {
	display: block;
	width: 80px;
	margin: 8px auto;
	font-size: 1.2rem;
	cursor: pointer;
	transition: all 0.1s;
	background-color: #f1f1f1;
	border: 2px solid #888;
	box-shadow: 3px 3px 0 -1px #666;
}

.gender__input:checked + .gender__label {
	transform: translate(2px, 2px);
	box-shadow: 1px 1px 0 -1px #666;
}

.gender__input:focus + .gender__label {
	outline: 2px solid #7a92d499;
}

.sort {
	margin-top: 15px;
	border: 2px solid #888;
}

.sort__title {
	margin: auto;
	padding: 0 10px;
	font-size: 1.4rem;
}

.sort__type {
	width: 150px;
	margin: 15px auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.sort__subtitle {
	width: 64px;
	text-align: left;
	font-size: 1.3rem;
}

.sort__label {
	display: block;
	width: 34px;
	height: 34px;
	font-size: 1.2rem;
	cursor: pointer;
	transition: all 0.1s;
	border: 2px solid #888;
	box-shadow: 3px 3px 0 -1px #666;
}

.sort__label--up {
	background: #f1f1f1 url(./img/up_arrow.webp) center center / cover;
}

.sort__label--down {
	background: #f1f1f1 url(./img/down_arrow.webp) center center / cover;
}

.divider {
	display: block;
	margin: 12px 0;
	width: 100%;
	height: 2px;
	background-color: #888;
}

.sort__input:checked + .sort__label {
	transform: translate(2px, 2px);
	box-shadow: 1px 1px 0 -1px #666;
}

.sort__input:focus + .sort__label {
	outline: 2px solid #7a92d499;
}

.reset__btn {
	display: block;
	width: 150px;
	height: 40px;
	margin: 20px auto;
	font-size: 1.3rem;
	background-color: #f1f1f1;
	border: 2px solid #888;
	box-shadow: 4px 4px 0 -1px #666;
	transition: all 0.1s;
	cursor: pointer;
}

.reset__btn:active {
	transform: translate(4px, 4px);
	box-shadow: 0 0 0 -1px #7a92d4;
}

.main {
	min-height: 100vh;
	margin-left: 220px;
	padding: 100px 12px;
	display: flex;
	flex-flow: row wrap;
	justify-content: center;
}

.card {
	position: relative;
	width: 220px;
	min-height: 250px;
	margin: 40px 15px;
	padding: 15px;
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: #ddd;
	box-shadow: 6px 6px 0 -1px #7a92d4;
	border: 2px solid #777;
}

.card__img {
	position: absolute;
	top: -50px;
	width: 120px;
	height: auto;
	border: 2px solid #777;
	box-shadow: 0 6px 6px -4px #000;
}

.card__name {
	margin-top: 70px;
	font-size: 1.3rem;
}

.card__age {
	margin-top: 10px;
	font-size: 1.2rem;
}

.card__location {
	margin-top: 8px;
	font-size: 1.1rem;
	line-height: 1.5rem;
}

.card__contacts {
	width: 110px;
	height: auto;
	margin-top: 6px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
}

.card__link {
	width: 40px;
	height: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
	text-decoration: none;
}

.card__link:hover {
	animation: 1500ms ease 0s normal none 1 running shake;
}

.card__mail__img {
	height: 20px;
}

.card__phone__img {
	height: 26px;
}

.error {
	margin: 60px auto;
	text-align: center;
	font-size: 2rem;
	line-height: 3rem;
}

@media screen and (max-width: 880px) {
	.header__popup {
		display: flex;
	}

	.popup__top-line {
		display: block;
		width: 30px;
		height: 3px;
		background-color: #000;
		transition: all 0.4s;
	}

	.popup__mid-line {
		display: block;
		width: 20px;
		height: 3px;
		background-color: #000;
		transition: all 0.4s;
	}

	.popup__bottom-line {
		display: block;
		width: 30px;
		height: 3px;
		background-color: #000;
		transition: all 0.4s;
	}

	.popup-active .popup__top-line {
		transform: translateY(8px) rotate(45deg);
	}

	.popup-active .popup__mid-line {
		width: 0;
	}

	.popup-active .popup__bottom-line {
		transform: translateY(-7px) rotate(-45deg);
	}

	.header__title {
		position: relative;
		font-size: 2rem;
	}

	.header__social {
		display: none;
	}

	.navbar {
		left: -860px;
	}

	.navbar-active {
		left: 0;
	}

	.main {
		margin: 0;
		justify-content: center;
	}

	.card__link:hover {
		background: none;
	}
}

@keyframes shake {
	0% {
		transform: rotateZ(0deg);
	}
	10% {
		transform: rotateZ(-30deg);
	}
	20% {
		transform: rotateZ(15deg);
	}
	30% {
		transform: rotateZ(-10deg);
	}
	40% {
		transform: rotateZ(7.5deg);
	}
	50% {
		transform: rotateZ(-6deg);
	}
	60% {
		transform: rotateZ(5deg);
	}
	70% {
		transform: rotateZ(-4.28571deg);
	}
	80% {
		transform: rotateZ(3.75deg);
	}
	90% {
		transform: rotateZ(-3.33333deg);
	}
	100% {
		transform: rotateZ(0deg);
	}
}
