.item-image {
	width: 50%;
}

.readmore {
	.btn {
		margin-top: 20px;
		background-color: @primary-color;
		padding: 10px 20px 10px 10px;
		border-radius: 30px;
		color: @secondary-color;
		text-decoration: none;
		font-weight: bolder;
		text-transform: uppercase;

		svg {
			top: 5px;
			position: relative;
			padding-right: 10px;
			fill: @secondary-color;
			stroke: @secondary-color;
		}

		&.inverted {
			background-color: @background-color;
			color: @text-color;

			svg {
				fill: @primary-color;
				stroke: @primary-color;
			}
		}
	}
}

.category-desc {
	margin: 0;
	position: relative;
	text-shadow: @text-shadow;
	img {
		width: 100%;
	}
	h1 {
		position: absolute;
		top: 0;
		margin-left: 30px;
		color: white;
		text-transform: uppercase;
		@media screen and (max-width:1200px) {
			margin-top: 0;
		}
	}
	div {
		margin: 0;
	}
	p {
		position: absolute;
		width: 50%;
		top: 100px;
		color: white;
		margin-left: 30px;
		font-size: 2em;
		font-weight: bold;
	}
}

.blog-featured {
	margin-left: 0;
	margin-right: 0;
	.items-row {
		margin-left: 0;
		margin-right: 0;
		display: flex;
		.item {
			margin: 20px 0;
			.gil-rounded();
			background-image: url('/templates/tpl_gle/images/news.svg');
			background-size: contain;
			background-repeat: no-repeat;
			background-position: left center;
			padding: 30px 20px 30px 160px;
			box-sizing: border-box;
			.item-image {
				display: none;
			}
		}
	}
	@media screen and (max-width: 1200px) {
		.items-row {
			display: block;
			.item {
				margin: 40px 0;
			}
		}
	}
	h2.item-title {
		margin-bottom: 0;
		margin-top: 20px;
		font-size: 1.65em;
	}
	p {
		margin-bottom: 2em;
		font-size: 1em;
	}
	p.readmore {
		font-size: 1em;
	}
}

.blog {
	h2 a {
		color: @text-color;
		text-decoration: none;
	}

	.items-leading {
		@media screen and (min-width: 1200px) {
			margin: 60px;
		}
	}

	.items-row {
		@media screen and (min-width: 1201px) {
			margin: 20px 60px;

			.item-content {
				margin: 0;
				width: 60%;
				padding: 0 20px;
			}

			.item-image {
				margin: 0;
				width: 40%;
				padding: 0 	20px;
				text-align: center;
				display: flex;
				align-items: center;
				justify-content: center;

				img {
					max-width: 100%;
				}
			}

			.item {
				display: flex;
				flex: stretch;
			}
		}
	}

	.page-header {
		margin: 0;
	}

	.readmore {
		margin-top: 40px;
	}

	&.contact {
		.items-row {
			display: flex;
			margin-top: 20px;
			margin-bottom: 0;

			.span6, .item {
				margin-top: 0;
				margin-bottom: 0;
			}

			.item-content {
				width: 100%;
				margin: 0 0 40px;

				div {
					.gil-margin-remove-left();
					.gil-margin-remove-right();
					.gil-margin-remove-bottom();
				}

				.page-header {
					margin: 0;
				}

				h2 {
					margin-top: 0;
					margin-bottom: 0;
				}

				h3 {
					margin-top: 10px;
					margin-bottom: 0;
				}
			}
		}
	}

	&.photoblog {
		.items-row {
			margin-top: 40px;

			.item-content {
				div:not(.page-header) {
					--max-lines: 2	;
					position: relative;
					height: calc(30px * var(--max-lines));
					overflow: hidden;
					padding-right: 1rem; /* space for ellipsis */
					text-align: justify;
					margin: 0;

					&:before {
						position: absolute;
						content: "...";
						bottom: 0;
						right: 0;
					}

					&:after {
						content: "";
						position: absolute;
						right: 0;
						width: 1rem;
						height: 1rem;
						background: white;
					}
				}

				h2 {
					.gil-margin-remove-top();
				}
			}
		}
	}
}

@media screen and (min-width: 1201px) {
	.blog {
		margin: 0 0 60px;
	}
}

@media screen and (max-width: 1200px) {
	.category-desc {
		h1 {
			font-size: 2em;
		}
		p {
			display: none;
		}
	}

	.items-row {
		margin-left: 0;
		.item-image img {
			width: 100%;
		}
		div {
			margin-left: 0;
			margin-right: 0;
			width: 100%;
		}
	}

	.items-leading {
		margin-left: 0;
		margin-right: 0;
		div {
			margin-left: 0;
			margin-right: 0;
		}
	}
}

@media screen and (max-width: 1200px) {
	.blog {
		margin-left: 0;
		margin-right: 0;
	}

	.blog.contact{
		.items-row {
			display: block;
			.span6 {
				margin-bottom: 60px;
			}
			.item-content {
				margin: 0;
				h2, h3, div {
					margin-left: 0;
					margin-right: 0;
				}
			}
		}
	}

	.blog.photoblog {
		.items-row {
			.item-content {
				div:not(.page-header) {
					height: calc(24px * var(--max-lines));
				}
			}
		}
	}
}

div.inverted {
	position: relative;
	&:after {
		border-top-right-radius: 20px;
		border-bottom-right-radius: 20px;
		content: '';
		position: absolute;
		top: 0;
		right: 0;
		left: 0;
		bottom: 5px;
		background-image: url('/templates/tpl_gle/images/footer.svg');
		background-size: contain;
		background-repeat: no-repeat;
		background-position: right center;
	}
}
