body {
	max-width: 100%;
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	grid-gap: 1em 1em;
	font-size: 1.2em;
	font-family: Courier New, sans-serif;
	line-height: 1.6;
	color: black;
}

amp-next-page {
	grid-column: span 12;
}

.header, .main, .footer {
	grid-column: 4 / span 6;
}

.header {
	margin-top: 1em;
	&__menu {
		margin: 0;
		padding: 0;
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		overflow: auto;
		border: 1px solid #333;
		a {
			font-size: 1.2em;
			white-space: nowrap;
			border-bottom: none;
			&:hover {
				color: $main-color;
			}
		}
		&__logo {
			line-height: 0;
			svg {
				width: 75px;
				height: 75px;
				min-width: 75px;
				min-height: 75px;
			}
		}
		&__list {
			display: flex;
			flex-grow: 1;
			flex-wrap: nowrap;
			align-items: center;
			justify-content: space-around;
			li {
				padding: 0 1em;
				display: inline;
			}
		}
		&__dropdown-input,
		&__dropdown-label,
		&__dropdown-list {
			display: none;
		}
		&__dropdown-input:checked {
			& ~ .header__menu__dropdown-list {
				display: flex;
			}
			& ~ .header__menu__dropdown-label .header__menu__dropdown-icon {
				background: transparent;
			}
			& ~ .header__menu__dropdown-label .header__menu__dropdown-icon:before {
				top: 0;
				transform: rotate(-45deg);
			}
			& ~ .header__menu__dropdown-label .header__menu__dropdown-icon:after {
				top: 0;
				transform: rotate(45deg);
			}
		}
		&__dropdown-label {
			cursor: pointer;
			padding: 1em;
		}
		&__dropdown-icon {
			background: #333;
			display: block;
			height: 2px;
			position: relative;
			transition: background .2s ease-out;
			width: 36px;
			&:before,
			&:after {
				background: #333;
				content: '';
				display: block;
				height: 100%;
				position: absolute;
				transition: all .2s ease-out;
				width: 100%;
			}
			&:before {
				top: 15px;
			}
			&:after {
				top: -15px;
			}
		}
		&__dropdown-list {
			width: 100%;
			flex-direction: column;
			align-items: center;
			border-top: 1px solid #333;
			li {
				padding: .5em;
			}
		}
	}
	&__search {
		font-family: Courier New, sans-serif;
		color: black;
		width: 100%;
		margin: 0 auto 0 auto;
		&__input {
			padding: .5em 1em;
			font-family: Courier New, sans-serif;
			font-size: 1.2em;
			width: 100%;
			height: 75px;
			border-radius: 0;
			border: 1px solid black;
			border-top: none;
			&:focus {
				outline: none;
			}
		}
		.search-item {
			&__link {
				border-bottom: none;
			}
		}
	}
}

.main {
	min-width: 0;
	min-height: 80vh;
	.pagination {
		margin: 3em auto 2em auto;
		display: flex;
		justify-content: space-between;
	}
}

.footer {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-bottom: 1em;
}

h1 {
	font-size: 3.5rem;
}
h2 {
	font-size: 2.5rem;
}
h3 {
	font-size: 2rem;
}
h4 {
	font-size: 1.5rem;
}

a {
	color: inherit;
	text-decoration:none;
	transition: background 0.3s;
	border-bottom: 2px dashed #37474f;
	&:hover {
		border-color: $main-color;
	}
}

.button {
	padding: .5em .75em;
	font-size: 1.2em;
	text-align: center;
	border: 1px solid black;
	box-shadow: 7px 7px 0 0 #333;
	&:hover {
		color: $main-color;
		border: 1px solid black;
		transform: translate(4px, 4px);
		box-shadow: 3px 3px 0 0 #333;
	}
}

li {
	margin-top: 0.25em;
}

pre, code {
	font-family: "Lucida Console", Monaco, monospace;
	font-size: 12pt;
	background-color: #F1F1F1;
}

blockquote {
	margin: inherit auto;
	margin-left: 1em;
	padding: 1em;
	border-left: 5px solid #999;
	&:before {
		display: none;
	}
	&:not(:first-of-type) {
		margin-top: .5em;
	}
	p {
		color: #555;
		font-size: 1.25em;
		font-family: 'Times New Roman', serif;
	}
}

.figure {
	width: 100%;
	max-width: 100%;
	&--with-caption {
		display: flex;
		border-top: 6px solid #333;
	}
	&__image {
		&--with-caption {
			min-width: 70%;
		}
	}
	&__caption {
		background-color: #333;
		color: white;
		font-weight: 700;
		padding: .5em 1em;
		height: min-content;
		word-wrap: break-word;
	}
}

.post-it {
	width: 100%;
	padding: 1.5em;
	&--tip {
		background-color: lemonchiffon;
	}
	&--info {
		background-color: azure;
	}
	&--danger {
		background-color: #ffcccb;
	}
	&--success {
		background-color: #d0f0c0;
	}
	&__title {
		font-weight: 700;
		font-size: 1.5em;
	}
	&__content {
		margin-top: 1em;
	}
}

.product {
	width: 100%;
	display: flex;
	justify-content: space-between;
	padding: 1.5em;
	border: 1px solid #333;
	&__image {
		margin: auto;
		width: 100%;
		min-width: 250px;
		max-width: 400px;
	}
	&__content {
		margin-left: 2em;
		align-self: center;
		display:flex;
		flex-direction: column;
	}
	&__title {
		font-weight: 700;
		font-size: 1.5rem;
	}
	&__description {
		margin-top: 1em;
	}
	&__cta {
		margin-top: 1em;
	}
}

.social-share {
	display: flex;
	align-self: center;
	align-items: center;
	&__button {
		margin: 0 .5em;
		border-radius: 50%;
		background-size: 60%;
	}
}

#tags {
	margin: 0;
	padding: 0;
	li {
		display: inline;
	}
}

.content {
	width: 100%;
	& > * {
		margin-top: 1.5em;
	}
	& > h1 {
		margin-top: 0.5em;
	}
	pre {
		overflow: auto;
		padding: .5em;
	}
	code {
		padding: 0.1em;
	}
	table {
		display: block;
		overflow-x: auto;
		border-collapse: collapse;
		td, th {
			border: 1px solid #ddd;
		}
		td {
			padding: .5em 1em;
		}
		th {
			padding: 1em 2em;
			background-color: #333;
			color: white;
		}
		tr:nth-child(even) {
			background-color: #F1F1F1;
		}
		tr:hover {
			background-color: #ddd;
		}
	}
	.highlight {
		.chroma {
			background-color: #F1F1F1;
		}
	}
	.under-title {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		font-size: 1rem;
		&__info,
		&__social-share {
			align-self: center;
		}
	}
	.ad {
		display: flex;
		margin: 1rem auto;
		align-content: center;
		width: min-content;
		height: min-content;
		min-width: 320px;
		min-height: 320px;
		border: 1px solid #333;
		&__fallback {
			display: flex;
			align-items: center;
			p {
				margin:auto;
			}
		}
	}
	.author {
		display:flex;
		flex-direction: column;
		align-items: center;
		background-color: #F1F1F1;
		padding: 1.5rem;
		& > *:not(:first-child) {
			margin-top: 1rem;
		}
		&__name {
			font-weight: 700;
			font-size: 1.5em;
		}
		&__image {
			border-radius: 100px;
		}
		&__bio,
		&__cta {
			text-align: center;
		}
		&__cta {
			font-size: 1.25em;
		}
	}
}

.summary {
	&:not(:first-of-type) {
		h2 {
			margin-top: 2.5em;
		}
	}
	& > * {
		margin-top: 1.25em;
	}

	&__title {
		text-align: center;
	}
	.button {
		display: block;
		margin: inherit 1em;
	}
}

@media (max-width: 1200px) {
	body {
		grid-gap: 0;
	}
	.main,
	.header,
	.footer {
		grid-column: 1 / span 12;
	}
	.main,
	.footer {
		margin: .5em .75em .5em .75em;
	}
	.footer {
		flex-direction: column;
		align-items: center;
		margin-bottom: 1em;
	}
	.header {
		margin: 0;
		&__menu {
			border: none;
			border-bottom: 1px solid #333;
			flex-wrap: wrap;
			justify-content: space-between;
			&__list {
				display: none;
			}
			&__dropdown-label {
				display: block;
			}
		}
		&__search {
			&__input {
				border: none;
				border-bottom: 1px solid #333;
			}
		}
	}
	h1 {
		font-size: 2.5rem;
	}
	h2 {
		font-size: 2rem;
	}
	h3 {
		font-size: 1.66rem;
	}
	h4 {
		font-size: 1.25rem;
	}
	.post-it {
		margin-left: 0;
		margin-right: 0;
	}
}

@media (max-width: 600px) {
	.under-title__social-share {
		width: 100%;
		margin-top: 1.5em;
		justify-content: space-between;
	}
	.figure {
		flex-direction: column-reverse;
		&--with-caption {
			border-top: none;
		}
		&__caption {
			position: relative;
			max-width: 100%;
		}
	}
	.product {
		flex-wrap: wrap;
		&__content {
			margin-left: unset;
			text-align: center;
		}
		&__title {
			margin-top: 1em;
		}
	}
}