@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap');

:root {
	--bg: #f1f4f5;
	--white: #fff;
	--dark: #42414d;
	--blue: #136bf5;
	--accent: #fff6e1;
	--shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

ul {
	list-style: none;
}

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

hr {
	margin: 2rem auto;
	opacity: 0.5;
}

body {
	font-family: 'Noto Sans', sans-serif;
	background-color: var(--bg);
	line-height: 1.5;
}

/* UTILITIES */

.container {
	width: 80%;
	margin: auto;
	padding: 0 1rem;
}

@media (max-width: 900px) {
	.container {
		width: 100%;
	}
}

.section {
	min-height: calc(100vh - 5rem);
	max-width: 100vw;
	display: flex;
	justify-content: center;
	align-items: center;
}

.section-title {
	text-align: center;
	position: relative;
	font-size: 1.6rem;
	height: 3.5rem;
	margin: 2rem 0;
}

.section-title::after {
	content: '';
	width: 40px;
	height: 2px;
	position: absolute;
	bottom: 0;
	left: 50%;
	background-color: var(--dark);
	transform: translateX(-50%);
	border-radius: 5px;
}

.form {
	width: 100%;
	max-width: 20rem;
	margin: 1rem 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.form-big {
	max-width: none;
}

.form input,
.form textarea {
	font-family: inherit;
	width: 100%;
	background-color: var(--bg);
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 15px;
	font-size: 1rem;
}

.form textarea {
	resize: vertical;
	min-height: 20rem;
}

.form input::placeholder,
.form textarea::placeholder {
	opacity: 0.3;
}

.form input:focus,
.form textarea:focus {
	background-color: var(--accent);
	outline: none;
}

.pass {
	position: relative;
}

.fa-eye {
	position: absolute;
	top: 50%;
	right: 0.5rem;
	transform: translateY(-50%);
	cursor: pointer;
	opacity: 0.5;
}

.fa-eye-slash {
	display: none;
	position: absolute;
	top: 50%;
	right: 0.5rem;
	transform: translateY(-50%);
	cursor: pointer;
	opacity: 0.5;
}

.color-link a {
	color: var(--blue);
}

.field-error {
	outline: 2px solid red;
}

.btn {
	background-color: #136bf5;
	padding: 0.5rem 1rem;
	color: var(--white);
	border-radius: 5px;
	transition: opacity 0.5s ease;
	box-shadow: var(--shadow);
	border: none;
	cursor: pointer;
	text-transform: uppercase;
	font-weight: bold;
}

.btn:hover {
	opacity: 0.8;
}

.simple-card {
	background-color: var(--white);
	border-radius: 15px;
	padding: 5rem;
	text-align: center;
	display: grid;
	gap: 2rem;
}

.simple-card .btn {
	width: 10rem;
	margin: auto;
}

/* NAV */

nav {
	background-color: var(--white);
	font-weight: bold;
}

nav .container {
	height: 5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	flex: 1;
}

.logo a {
	width: max-content;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 1rem;
}

.logo img {
	height: 3rem;
	width: 3rem;
	object-fit: cover;
	object-position: center;
}

.menu-wrapper {
	flex: 1;
}

.menu {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	text-transform: uppercase;
}

.auth {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	text-transform: uppercase;
	flex: 1;
}

.auth li {
	margin-left: 1rem;
}

nav ul a {
	transition: opacity 0.5s ease;
}

nav ul a:hover:not(.btn) {
	opacity: 0.5;
}

.user {
	position: relative;
	flex: 1;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 1rem;
	text-transform: uppercase;
}

.user-display {
	cursor: default;
	transition: opacity 0.5s ease;
	height: 5rem;
	display: flex;
	align-items: center;
}

@media (max-width: 400px) {
	.user-display {
		display: none;
	}
}

.user-display:hover {
	opacity: 0.5;
}

.fa-user,
.fa-calendar-days {
	margin-right: 0.5rem;
}

.user-panel {
	padding: 1rem;
	background-color: var(--white);
	box-shadow: var(--shadow);
	position: absolute;
	top: 0;
	right: 6.3rem;
	transform: translateY(5rem);
	border-radius: 0 0 5px 5px;
	display: none;
	z-index: 2;
	min-width: max-content;
}

.user-panel li {
	padding: 0.5rem 0;
}

.user-panel i {
	padding-right: 0.5rem;
}

@media (min-width: 900px) {
	.user-display:hover ~ .user-panel {
		display: block;
	}

	.user-panel:hover {
		display: block;
	}
}

.mobile {
	display: none;
}

/* MOBILE MENU */

.toggler {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 3;
	cursor: pointer;
	width: 3rem;
	height: 3rem;
	opacity: 0;
	display: none;
}

.hamburger {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	width: 3rem;
	height: 3rem;
	padding: 0.6rem;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--dark);
	opacity: 0.5;
	display: none;
}

.inner-ham {
	position: relative;
	width: 100%;
	height: 0.2rem;
	background-color: #fff;
	border-radius: 5px;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all 0.5s ease;
}

.inner-ham::before,
.inner-ham::after {
	content: '';
	position: absolute;
	z-index: 2;
	width: 100%;
	height: 0.2rem;
	background-color: inherit;
	border-radius: 5px;
}

.inner-ham::before {
	top: -0.6rem;
}

.inner-ham::after {
	top: 0.6rem;
}

.toggler:checked + .hamburger .inner-ham {
	transform: rotate(135deg);
}

.toggler:checked + .hamburger .inner-ham::before,
.toggler:checked + .hamburger .inner-ham::after {
	top: 0;
	transform: rotate(90deg);
}

.toggler:checked:hover + .hamburger .inner-ham {
	transform: rotate(225deg);
}

.toggler:checked ~ .container .menu-wrapper {
	visibility: visible;
}

.toggler:checked ~ .container .menu {
	animation: grow 1s ease;
}

@keyframes grow {
	from {
		opacity: 0;
		transform: scale(0);
	}
	to {
		opacity: 0.8;
		transform: scale(1);
	}
}

@media (max-width: 900px) {
	.toggler {
		display: initial;
	}

	.hamburger {
		display: flex;
	}

	.logo {
		margin-left: 2.5rem;
		flex: none;
	}

	.logo h1 {
		display: none;
	}

	.menu-wrapper {
		position: fixed;
		top: 0;
		left: 0;
		margin: 0;
		width: 100vw;
		height: 100vh;
		visibility: hidden;
		overflow: hidden;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 1;
	}

	.menu {
		display: flex;
		flex: none;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 1rem;
		font-size: 2rem;
		color: #fff;
		width: 200vw;
		height: 200vh;
		background-color: var(--dark);
		border-radius: 50%;
		opacity: 0.8;
		z-index: 2;
	}

	.user-display:hover {
		opacity: 1;
	}

	.mobile {
		display: list-item;
	}
}

/* SIGNUP & LOGIN */

.card-large {
	width: 80%;
	margin: 5rem auto;
	background-color: var(--white);
	padding: 5rem;
	border-radius: 15px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
	justify-items: center;
	align-items: center;
	gap: 5rem;
}

.text-cell {
	width: 90%;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.text-cell img {
	height: 5rem;
	width: 5rem;
	margin-bottom: 2rem;
}

.form-cell {
	width: 90%;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.form-cell h1 {
	font-size: xx-large;
}

@media (max-width: 650px) {
	.card-large {
		padding: 5rem 0;
		margin: 5rem 0;
		width: 90%;
	}
}

/* BLOG POST LAYOUT */

.post-grid {
	display: grid;
	grid-template-columns: minmax(300px, 60%);
	gap: 2rem;
	margin-bottom: 5rem;
	justify-content: center;
}

.post-grid-item {
	background-color: var(--white);
	border-radius: 15px;
	padding: 3rem;
	transition: box-shadow 0.5s ease;
}

@media (max-width: 400px) {
	.post-grid-item {
		padding: 1rem;
	}
}

.post-grid-item h1 {
	margin-bottom: 1rem;
}

.post-grid-item small {
	opacity: 0.5;
}

.post-grid-item:hover {
	box-shadow: var(--shadow);
}

.sample {
	margin: 1rem 0;
}

.more {
	opacity: 0.5;
}

/* CREATE */

.card-small {
	width: 60%;
	margin: 5rem auto;
	background-color: var(--white);
	padding: 5rem;
	border-radius: 15px;
	text-align: center;
}

@media (max-width: 800px) {
	.card-small {
		padding: 5rem 1rem;
		width: 90%;
	}
}

.card-small .section-title {
	margin-top: 0;
}

/* DETAILS */

.details-card {
	width: 60%;
	margin: 5rem auto;
	background-color: var(--white);
	padding: 5rem;
	border-radius: 15px;
}

@media (max-width: 800px) {
	.details-card {
		padding: 5rem 1rem;
		width: 90%;
	}
}

.details-card h1 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.details-card p {
	font-size: 1.2rem;
	white-space: pre-wrap;
}

.details-card small {
	opacity: 0.5;
}

.btn-group {
	margin-left: 1rem;
	display: inline-flex;
	justify-content: start;
	align-items: center;
}

.btn-group i {
	margin-right: 1rem;
}

.btn-group-error {
	color: red;
}

.edit,
.delete {
	font-size: 1.2rem;
	opacity: 0.5;
	transition: opacity 0.5s ease;
	cursor: pointer;
}

.edit:hover,
.delete:hover {
	opacity: 1;
}

/* ABOUT */

.about {
	text-align: center;
	font-size: 1.1rem;
}

.double-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	margin: 3rem 0;
}

/* 404 */

.not-found-outer {
	height: 100vh;
	width: 100vw;
	display: flex;
	justify-content: center;
	align-items: center;
}

.not-found-inner {
	text-align: center;
	border-left: 0.3rem var(--dark) solid;
	padding: 0.5rem 1rem;
}

.not-found-inner a {
	text-decoration: underline;
	transition: opacity 0.5s ease;
}

.not-found-inner a:hover {
	opacity: 0.5;
}
