.d-container-wrapper {
	border: 1px solid var(--color-border-gray);
	border-width: 0 0 1px;
}

/* Footer is actually the last child of body */
.d-container-wrapper:nth-last-child(2) {
	border: 0;
}

.d-container-wrapper a {
	font-family: inherit;
	transition: color 0.2s;
}

.d-container-wrapper a:hover {
	color: var(--color-primary);
}

.color-primary {
	color: var(--color-btn-bg-primary);
}

.img-wrapper {
	position: relative;
	background: #EEE;
	overflow: hidden;
}

.img-wrapper img {
	transition: transform 2s;
}

.img-wrapper img:hover {
	transform: scale(1.1);
}

.img-wrapper img {
	object-fit: cover;
	width: 100%;
	height: 100%;
}

.img-wrapper.private::after {
	content: "🔒 Private";
	position: absolute;
	top: 0;
	left: 0;
	background: #000;
	color: #FFF;
	padding: 5px;
}

.img-wrapper.private.small::after {
	content: "🔒";
}

.author {
	font-size: 0.9em;
	margin: 0;
	color: #AAA;
}

.author span {
	font-weight: 600;
}

/* Latest form */

.latest-container-wrapper {
	background: #FFF;
}

.latest {
	margin-bottom: 120px;
}

.latest .d-heading {
	margin: 20px 0;
}

.latest .img-wrapper {
	position: relative;
}

.latest .img-wrapper::before {
	content: 'Featured';
	position: absolute;
	font-size: 3em;
	bottom: 80px;
	left: 0;
	background: #FFF;
	color: #FFF;
	padding: 40px 40px 0px 0;
	z-index: 1;
}

.latest .img-wrapper::after {
	content: 'Featured';
	position: absolute;
	font-size: 3em;
	bottom: 80px;
	left: 0;
	background-image: linear-gradient( 135deg, #f1a3ff 10%, #1904E5 100%);
	-webkit-background-clip: text;
  	-webkit-text-fill-color: transparent;
	padding: 40px 40px 0px 0;
	z-index: 2;
}

.latest .img-wrapper {
	height: 500px;
}

.latest .text-container {
	position: relative;
	max-width: 60%;
	background: #FFF;
	padding: 40px 40px 0 0;
	margin-top: -80px;
	z-index: 2;
}

.latest .title {
	margin: 20px 0;
}

.latest .content {
	font-size: 1.3em;
	line-height: 1.6em;
}

/* Recent posts */

.recent {
	display: grid;
	grid-template-columns: 0.8fr 1fr;
	gap: 80px;
}

.recent .left .card {
	margin: 0 0 80px;
}

.recent .left .img-wrapper {
	height: 300px;
	margin: 0 0 40px;
}

.recent .text-container > * {
	margin: 0 0 20px;
}

.recent .text-container > *:nth-last-child(1) {
	margin: 0;
}

.recent .right {
	height: max-content;
	border-width: 0 0 0 1px;
}

.recent .right .card {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 30px;
	border: 1px solid var(--color-border-gray);
	border-width: 1px 0 0;
	padding: 40px 0;
}

.recent .right .card:first-child {
	border: 0;
}

.recent .right .card:last-child {
	padding-bottom: 0;
}

.recent .right .card .img-wrapper {
	width: 100px;
	height: 100px;
}

/* Newsletter form */

.newsletter {
	max-width: 600px;
}

.newsletter .d-heading {
	font-family: 'Playfair Display', serif;
}

.newsletter form .grid {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-column-gap: 20px;
}

.newsletter form input {
	display: block;
	width: 100%;
	border-width: 1px;
	border-style: solid;
	border-color: #DDD;
	box-sizing: border-box;
	padding: 20px 0;
	text-indent: 20px;
}

.newsletter form input::placeholder {
	color: #BBB;
}

/* Random section */

.random-container-wrapper .overflow {
	overflow-x: auto;
}

.random-container-wrapper > .d-heading {
	width: 100%;
	max-width: 1200px;
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
}

.random {
	display: flex;
	min-width: max-content;
	justify-content: space-between;	
	padding: 0 40px;
}

.random .card {
	flex: 1;
	max-width: 300px;
	margin: 0 20px 0 0;
}

.random .card:nth-last-child(1) {
	margin: 0;
}

.random .card > * {
	margin: 0 0 20px;
}

.random .card > *:nth-last-child(1) {
	margin: 0;
}

.random .card .title {
	font-weight: 600;
}

.random .card .img-wrapper {
	height: 180px;
}

/* More section */

.more .card .d-heading {
	font-weight: 600;
}

.more .grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-column-gap: 30px;
	grid-row-gap: 40px;
}

.more .item {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-column-gap: 20px;
}

.more .item:nth-last-child(1) {
	margin: 0;
}

.more .index {
	color: #AAA;
}

.more .title {
	font-weight: 600;
	margin: 0;
}

.more .title a {
	font-weight: 600;
	transition: color 0.2s;
}

.more .title a:hover {
	color: var(--color-primary);
}

.more .img-wrapper {
	width: 100px;
	height: 100px;
}

.more .content {
	margin: 10px 0;
}

a.view-more-archive {
	display: block;
	width: max-content;
	color: var(--color-text-gray);
	margin: 40px auto 0;
}

/* Filter section */

.filter {
	max-width: 800px;
}

.filter > .grid {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-column-gap: 40px;
	grid-row-gap: 40px;
}

.filter form input {
	display: block;
	width: 100%;
	border: 1px solid var(--color-border-gray);
	box-sizing: border-box;
	padding: 10px 0;
	margin: 0 0 10px;
	text-indent: 10px;
}

.filter form input::placeholder {
	color: #BBB;
}

.filter form button {
	font-weight: 600;
	width: 100%;
}

.tags-container {
	max-width: 300px;
}

.tags-container a {
	display: inline-block;
	border: 1px solid var(--color-border-gray);
	padding: 10px;
	margin: 0 3px 8px 0;
	transition: background 0.2s;
}

.tags-container a:hover {
	background: #EEE;
}

@media only screen and (max-width: 1150px) {
	.recent {
	    gap: 40px;
	}
	.recent .left .card {
	    margin: 0 0 40px;
	}
	.recent .left .img-wrapper {
    	height: 250px;
    }
    .recent .right .card .img-wrapper {
	    width: 80px;
	    height: 80px;
	}
	.more .grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.more .grid .item:nth-child(1n+16) {
		display: none;
	}
}

@media only screen and (max-width: 950px) {
	.latest .img-wrapper {
	    height: 400px;
	}
	.latest .text-container {
	    max-width: 70%;
	}
	.latest .content {
		font-size: 1.2em;
	}
	.recent {
		grid-template-columns: 1fr;
	}
	.recent .left {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 40px;
	}
	.recent .left .card {
	    margin: 0;
	}
	.recent .left .img-wrapper {
    	height: 200px;
    }
}

@media only screen and (max-width: 850px) {
	.more .grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.more .grid .item:nth-child(1n+11) {
		display: none;
	}
}

@media only screen and (max-width: 800px) {
	.latest .text-container {
	    max-width: 80%;
	    padding: 40px 30px 0 0;
	    margin-top: -60px;
	}
	.latest .content {
		font-size: 1.1em;
	}
	.latest .img-wrapper::before {
		font-size: 2.5em;
		bottom: 60px;
		padding: 30px 30px 0px 0;
	}
	.latest .img-wrapper::after {
		font-size: 2.5em;
		bottom: 60px;
		padding: 30px 30px 0px 0;
	}
	.recent {
		gap: 0;
	}
	.recent .left {
		grid-template-columns: 1fr;
		margin: auto;
	}
	.recent .donate-container {
		grid-row: 1;
	}
	.recent .left .card {
		display: grid;
		grid-template-columns: auto 1fr;
		gap: 30px;
		border: 1px solid var(--color-border-gray);
		border-width: 1px 0 0;
		padding: 40px 0;
		margin: 0 20px 0 0;
	}
	.recent .left .card:first-child {
		border: 0;
	}
	.recent .left .card:last-child {
		padding-bottom: 0;
	}
	.recent .left .card .img-wrapper {
		width: 80px;
		height: 80px;
		margin: 0;
	}
	.recent .right .card:first-child {
	    border: 1px solid var(--color-border-gray);
    	border-width: 1px 0 0;
	}
}

@media only screen and (max-width: 700px) {
	.latest .img-wrapper {
		height: 350px;
	}
	.filter {
		max-width: 500px;
	}
	.filter > .grid {
    	grid-template-columns: 1fr;
    }
    .filter .tags-container {
		max-width: none;
	}
}

@media only screen and (max-width: 600px) {
	.latest {
		margin-bottom: 80px;
	}
	.latest .img-wrapper {
		max-height: 280px;
	}
	.latest .img-wrapper::before {
		font-size: 2em;
		bottom: 0;
		padding: 20px 20px 0px 0;
	}
	.latest .img-wrapper::after {
		font-size: 2em;
		bottom: 0;
		padding: 20px 20px 0px 0;
	}
	.latest .text-container {
		max-width: 100%;
		margin: 0;
		padding: 40px 0 0;
	}
	.recent .left .card, .recent .right .card {
		gap: 20px;
	}
	.random {
		padding: 0 30px;
	}
	.newsletter .message {
		font-size: 1.8em;
	}
	.more .grid {
		grid-template-columns: 1fr;
	}
	.more .grid .item:nth-child(1n+6) {
		display: none;
	}
}

@media only screen and (max-width: 500px) {
	.latest .img-wrapper {
		max-height: 240px;
	}
	.recent .left .card .img-wrapper, .recent .right .card .img-wrapper {
	    width: 60px;
	    height: 60px;
	}
	.random {
		padding: 0 20px;
	}
}

@media only screen and (max-width: 450px) {
	.latest .img-wrapper {
		max-height: 200px;
	}
	.newsletter form .grid {
		grid-template-columns: 1fr;
	}
	.newsletter form button {
		width: 100%;
		padding: 10px;
		transition: color, background, 0.2s;
	}
	.newsletter form button::before, .newsletter form button::after {
		content: none !important;
	}
	.newsletter form button:hover {
		background: #000;
	}
}
