@import '../core/colors';

.featured-module {
	margin: 60px 0;
	padding: 20px 10px;	
	.module-title-style1 {
		text-align: center;
		width: 100%;
		display: block;
		margin-bottom: 35px;
		
		h2 {
			padding-bottom: 25px;
			margin-bottom: 0;
			border-bottom: solid 2px @background-darker;
			font-size: 24px;
		}
		span {
			position: relative;
			background: @secondary;
			color: @secondary-text; 
			&:after {
				content: "";
				width: 80%;
				position: absolute;
				height: 2px;
				background: @primary;
				left: 10%;
				top: 56px;
			}
		}
	}
	.module-title-style2 { 
		text-align: center;
		width: 100%;
		display: block;
		margin-bottom: 35px;
		h2 {
			margin-bottom: 0;
			position: relative;
			line-height: 16px;
			transform: skewX(-15deg);

			&:after {
				content: "";
				width: 100%;
				position: absolute;
				height: 2px;
				background: @background-darker;
				top: 50%;
				left: 0;
				z-index: 0;
			}
		}
		span {
			position: relative;
			background: @secondary;
			color: @secondary-text; 
			padding: 8px 9px;
			font-size: 16px;
			text-transform: uppercase;
			letter-spacing: 1px;
			display: inline-block;
			z-index: 1;
		}
	}
	
	//fix spacing when multiple modules on page
	&:nth-of-type(n+2) {
		margin-top: 30px;
	}
	&:nth-of-type(n+3) {
		margin-top: 0px;
	}
	&:first-child {
		margin-top: 25px;
	}
	@media screen and (max-width: 767px) {
		padding: 10px 0px;	
	}
}

.featured-module-style1 {
	a {
		text-decoration: none;
		h2 {
			transition: 0.2s all ease;
		}
	}
	img {
		width: 100%;
		transition: 0.2s all ease;
		aspect-ratio:1.3;
		object-fit: cover;
	}
	.featured-post {
		position: relative;
		@media screen and (max-width: 767px) {
			margin-bottom: 15px;
		}
		&:hover {
			img {
				filter: brightness(0.5);
			}
			a h2 {
				color: @primary;
			}
		}
		.category-ribbon {
			position: absolute;
			background: @primary;
			color: @primary-text;
			text-transform: uppercase;
			padding: 5px 8px;
			font-size: 11px;
			line-height: 11px;
			z-index: 99;
		}
	}
	.entry-title {
		font-size: 18px;
		text-decoration: none;
		line-height: 1.5em;
		margin-top: 10px;
		color: @text-dark;
		font-size: 16px;
		font-weight: 700;
		line-height: 1.4em;
	}
	.footer-meta {
		font-size: 12px;
		text-transform: uppercase;
		color: @text-light;
	}
	
} 

 .featured-module-style2 {
	.big {
		position: relative;
		margin-bottom: 15px;
		position: relative;
		.category-ribbon {
			position: absolute;
			top: 7px;
			left: 7px;
			background: @primary;
			color: @primary-text;
			text-transform: uppercase;
			padding: 5px 8px;
			border-radius: 2px;
			font-size: 10px;
			line-height: 11px;
			z-index: 1;
			text-decoration: none;
		}
		a {
			display: block;
			color: #fff;
		}
		.box-shadow {
			background: linear-gradient(90deg,(@primary), transparent, transparent);
			position: absolute;
			bottom: 0; 
			top: 0;
			left: 0;
			right: 0;
			z-index: 5;
			transition: 1s all ease;
		}
		img {
			transition: 0.4s all ease;
			width: 100%;
		}
		.footer-meta {
			position: absolute;
			bottom: 0;
			z-index: 6;
			padding: 5px 10px;
			font-size: 11px;
			text-transform: uppercase;
			letter-spacing: 1px;
			opacity: 0.6;
		}
		.entry-title {
			position: absolute;
			bottom: 15px;
			z-index: 6;
			padding: 10px 10px;
			font-size: 21px;
			line-height: 27px;
		}
		&:hover {
			img {filter: brightness(0.8);}
		}
		.entry-excerpt{
			color: @text-content;
		}
	}
	.small { 
		margin: 20px 0px;
		display: flex;
		.featured-image {
			max-width: 150px;
			position: relative;
		}
		a {
			text-decoration: none;
			display: block;
			overflow: auto;
			color: @text-dark;
		}
		img {
			max-width: 140px;
			height: auto;
			margin-right: 10px;
			transition: 0.4s all ease;
			aspect-ratio: 3/2;
			object-fit: cover;
		}
		h2 {
			font-size: 19px;
			display: inline-block;
			transition: 0.4s all ease;
			position: relative;
			padding-bottom: 5px;
			font-weight: 700;
			&::before{
				content: "";
				position: absolute;
				width: 100%;
				top: 0;
				bottom: 0;
				background-image: linear-gradient(@secondary-dark, @secondary-dark);
				background-size: 0 2px;
				background-repeat: no-repeat;
				background-position: left bottom;
				transition: background-size .3s ease-in;
				/* Change the transition timing above
				   to determine how long the animation takes.
				   Change the the timing function to adjust
				   the style of the animation. */
			}
			&:hover::before{
				background-size: 100% 2px;
			}
			&:hover{
				color: @secondary-dark;
			}
		}
		.footer-meta {
			font-size: 11px;
			text-transform: uppercase;
			letter-spacing: 1px;
			opacity: 0.8;
			color: @text-light;
			display: flex;
			align-items: center;
			a {
				display: block;
			}
			.category-text {
				color: @primary-text;
				font-weight: 700;
				letter-spacing: 0;
				background: @primary;
				padding: 2px 5px;
				border-radius: 2px;
				margin-right: 5px;
				line-height: 11px;
			}
		}
		&:hover {
			img {filter: brightness(0.8);}
		}
	}
	.bigger {
		position: relative;
		height: 100%;
		width: 100%;
		background-repeat: no-repeat;
		background-size: cover;
		background-position: center;
		min-height: 400px;
		padding-bottom: 20px;

		.post-info{
			position:absolute;
			bottom: 40px;
			left: 20px;
			padding: 15px;
			background: @background-plain;
			opacity: .9;
			width: 90%;
			margin: auto;
		}
		
		.category-ribbon {
			position: absolute;
			bottom: 40px;
			left: 40px;
			background: @primary;
			color: @primary-text;
			text-transform: uppercase;
			padding: 5px 8px;
			font-size: 11px;
			line-height: 11px;
			z-index: 1;
		}
		a {
			text-decoration: none;
		}
		a h2 {
			font-size: 26px;
			font-weight: 700;
			color: @text-dark;
			padding-bottom: 5px;
			transition: 0.4s all ease;
		}
		.entry-excerpt{
			p,a{color: @text-content;
				&:hover{
					color: @text-content;
				}
			}}

			figure {
				position: relative;
				width: 100%;
			}
			figure::before {
				position: absolute;
				top: 50%;
				left: 50%;
				z-index: 2;
				display: block;
				content: '';
				width: 0;
				height: 0;
				background: rgba(255,255,255,.2);
				border-radius: 100%;
				-webkit-transform: translate(-50%, -50%);
				transform: translate(-50%, -50%);
				opacity: 0;
			}
			figure:hover::before {
				-webkit-animation: circle .75s;
				animation: circle .75s;
			}
			@-webkit-keyframes circle {
				0% {
					opacity: 1;
				}
				40% {
					opacity: 1;
				}
				100% {
					width: 200%;
					height: 200%;
					opacity: 0;
				}
			}
			@keyframes circle {
				0% {
					opacity: 1;
				}
				40% {
					opacity: 1;
				}
				100% {
					width: 200%;
					height: 200%;
					opacity: 0;
				}
			}
		img {
			transition: 0.4s all ease;
			width: 100%;
			aspect-ratio: 1;
			object-fit: cover;
		}
		h2 {
			margin-top: 10px;
			position: relative;
			&::before{
				content: "";
				position: absolute;
				width: 100%;
				top: 0;
				bottom: 0;
				background-image: linear-gradient(@secondary-dark, @secondary-dark);
				background-size: 0 2px;
				background-repeat: no-repeat;
				background-position: left bottom;
				transition: background-size .3s ease-in;
				/* Change the transition timing above
				   to determine how long the animation takes.
				   Change the the timing function to adjust
				   the style of the animation. */
			}
			&:hover::before{
				background-size: 100% 2px;
			}
			&:hover{
				color: @secondary-dark;
			}
		}
		.read-more{
			display: none;
		}
	
		.footer-meta {
			font-size: 12px;
			text-transform: uppercase;
			letter-spacing: 1px;
			opacity: 0.6;
			color: @text-light;
			margin-bottom: 16px;
		}
		&:hover {
			img {filter: brightness(0.8);}
			a h2 {opacity: 0.8;}
		}
		
	}
	@media screen and (max-width: 767px) {
		.bigger {
			margin-bottom: 10px;
			a h2 {
				font-size: 26px;
			}
		}
		.big {
			a h2 {
				font-size: 15px;
				line-height: 20px;
			}
		}
		.small {
			img {
				max-width: 110px;
			}
			.featured-image {
				max-width: 122px;
			}
			h2 {
				font-size: 14px;
			}
			.footer-meta {
				font-size: 9px;
			}
		}
	}
}
