/* 

  HOME PAGE CUSTOM STYLES

  1. Cover section
  2. Categories list section
  3. Posts list section
	4. Media queries

*/

/* 1. Cover section */

/* 1.1. Default => ./cover/default.css */
/* 1.2. Spring sale 2023 => ./cover/spring-sale-2023.css */

/* HINT: Loaded in /wp-content/themes/gridlove/core/enqueue.php */

/* 2. Content */

.all-cats {
	display: flex;
	justify-content: center;
	max-width: inherit;
	margin: 50px 0 30px;
}

.all-cats__toggler {
	display: none;
	margin-bottom: 14px;
	padding: 6px 0;

	position: relative;

	font-family: 'Catamaran', sans-serif;
	font-size: 20px;
	font-weight: 800;
	line-height: 30px;

	border-bottom: 1px solid;
  border-image: linear-gradient(to right, #0095FF 75px, #ccc 75px, #ccc) 1;

	user-select: none;
}

.all-cats__toggler::before {
	content: '';
	display: block;
	width: 12px;
	height: 6px;

	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%) rotate(-90deg);

	background-image: url(../../../img/custom/svg/arrow-down.svg);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;

	transition: transform .15s ease;
}

.all-cats.active .all-cats__toggler::before {
	transform: translateY(-50%) rotate(0);
}

.all-cats__list {
	display: inline-flex;
	flex-wrap: nowrap;
	align-items: center;
	margin-right: 0 !important;
	margin-bottom: 0 !important;
	padding: 0;
	padding-bottom: 20px;
	list-style: none;
	overflow-y: hidden;
	overflow-x: auto;
}

.all-cats__list::-webkit-scrollbar {
	display: none;
}

.all-cats__item {
	display: flex;
	align-items: center;
}

.all-cats__item:not(:last-child) {
	margin-right: 17px;
}

a.all-cats__link {
	height: 20px;
	padding: 0 12px;
	font-family: "Roboto", sans-serif;
	font-size: 10px;
	font-weight: bold;
	line-height: 18px;
	text-transform: uppercase;
	white-space: nowrap;
	color: #009cff;
	background-color: rgba(255, 255, 255, 0);
	border: 1px solid #009cff;
	border-radius: 14px;
	transition: all .2s ease-in-out;
}

a.all-cats__link:hover {
	color: #fff !important;
	background-color: #111 !important;
	border: 1px solid #111 !important;
}

.all-cats__counter {
	display: none;
	height: 30px;
	min-width: 30px;
	padding: 0 5px;
	font-family: 'Lato', sans-serif;
	font-size: 12px;
	line-height: 30px;
	text-align: center;
	color: #fff;
	background-color: #009cff;
	border-radius: 15px;
}

.home-desc-wrapper {
	padding: 0 !important;
}

.home-page-desc {
  display: none;
  margin: 50px 0 30px;

  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.47em;
}

.alm-reveal {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

.gridlove-site-content {
  margin-top: 36px;
	margin-bottom: 0;
	padding-bottom: 20px;
}

.gridlove-module-layout-combo {
  margin-top: 0;
}

.gridlove-post {
	background-color: #0f0f2b;

	/* Smooth scaling (chrome) */
	backface-visibility: hidden;
	will-change: transform;
	transition: transform .2s ease, box-shadow .2s ease;
}

.gridlove-post:hover {
	transform: scale(1.04);
	box-shadow: 0 7px 9px 0 rgba(0, 0, 0, .15) !important;
}

.gridlove-post-d .entry-image {
	width: 100%;
	height: inherit;
}

.gridlove-post-d .entry-image a {
	display: block;
	width: 100%;
	height: inherit;
}

.gridlove-post-d .entry-image a::after {
  content: '';
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;

  background: rgba(0, 0, 0, 0.4) !important;

  will-change: background;
  -webkit-transition: all 0.2s ease-in-out;
  -moz-transition: all 0.2s ease-in-out;
  -ms-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
}

.gridlove-post-d .entry-image img {
	overflow: hidden;
	text-indent: -9999px;
}

.gridlove-post-d:hover .entry-image a::after {
  background: transparent !important;
}

.gridlove-post .gridlove-cat,
.gridlove-cover-single .gridlove-cat {
	background: rgba(255, 255, 255, 0);
	border: 1px solid #fff;
}

.gridlove-post .gridlove-cat {
	opacity: .5;
}

.gridlove-post:hover .gridlove-cat {
	opacity: 1 !important;
}

.more-posts {
	display: block;
	width: 218px;
	margin: 20px auto 30px;
	padding: 10px 18px;

	font-size: 20px;
	font-weight: bold;
	line-height: 1.5em;
	text-transform: uppercase;
	color: #fff;

	background-color: #4BAEE3;
	background-position: center center;
	background-repeat: no-repeat;
	border: none;
	border-radius: 6px;
	opacity: 1 !important;

	cursor: pointer;
	transition: background-color .2s ease-in-out;
}

.more-posts:hover {
	color: #fff;
	background-color: #68CBFF;
}

.more-posts:active {
	color: #fff;
	background-color: #0D73B4;
}

.more-posts.loading {
	position: relative;
	color: transparent;

	background-color: transparent !important;
	background-image: url(../../../img/custom/gif/spinner.gif);

	cursor: none;
	user-select: none;
	pointer-events: none;
}

.more-posts.done {
	display: none;
}

/* 4. Media queries */

@media screen and (max-width: 1024px) {

	.home-page-desc {
		display: block;
	}

}

@media screen and (max-width: 640px) {

	/* Content */

	.all-cats {
		margin: 0 0 30px;
	}

}

@media screen and (max-width: 579px) {

	/* Content */

	.all-cats {
		display: block;
		overflow: hidden;
		transition: height .15s ease;
	}

	.all-cats__toggler {
		display: block;
		cursor: pointer;
	}

	.all-cats__list {
		display: block;
		width: 100%;
		opacity: 0;
		transition: opacity .15s ease;
	}

	.all-cats.active .all-cats__list {
		opacity: 1;
	}

	.all-cats__item {
		display: flex;
		justify-content: space-between;
		padding: 5px 0;
	}

	.all-cats__item:not(:last-child) {
		margin-right: 0;
		border-bottom: 1px solid #EFEFEF;
	}

	a.all-cats__link {
		display: flex;
		width: 100%;
		height: auto;
		padding: 0;

		justify-content: space-between;
		align-items: center;

		font-size: 13px;
		font-weight: 700;
		line-height: 18px;
		color: #5E5E5E !important;

		background-color: rgba(255, 255, 255, 0) !important;
		border: none !important;
	}

	a.all-cats__link:hover {
		color: #5E5E5E !important;
		background-color: unset !important;
		border: none !important;
	}

	.all-cats__counter {
		display: block;
	}

}

@media screen and (max-width: 480px) {

	/* Content */

	.gridlove-site-content {
		padding: 0;
	}

	.gridlove-content {
		padding: 0;
	}

	.gridlove-related {
		padding: 0 24px;
	}

	.gridlove-post {
		transition: unset;
	}
	
	.gridlove-post:hover {
		transform: scale(1);
		box-shadow: 0px 2px 6px rgb(0, 0, 0, .16);
	}

}

@media screen and (min-width: 1024px) {

	/* Post cards */

	.alm-reveal .posts-item:nth-child(0n + 1),
	.alm-reveal .posts-item:nth-child(6n + 1),
	.alm-reveal .posts-item:nth-child(6n) {
		-webkit-box-flex: 0;
		-webkit-flex: 0 0 41.666667%;
		-ms-flex: 0 0 41.666667%;
		flex: 0 0 41.666667%;
		max-width: 41.666667%;
	}

	.alm-reveal .posts-item:nth-child(0n + 2),
	.alm-reveal .posts-item:nth-child(0n + 4),
	.alm-reveal .posts-item:nth-child(6n + 2),
	.alm-reveal .posts-item:nth-child(6n + 4) {
		-webkit-box-flex: 0;
		-webkit-flex: 0 0 25%;
		-ms-flex: 0 0 25%;
		flex: 0 0 25%;
		max-width: 25%;
	}

	.alm-reveal .posts-item:nth-child(0n + 3),
	.alm-reveal .posts-item:nth-child(0n + 5),
	.alm-reveal .posts-item:nth-child(6n + 3),
	.alm-reveal .posts-item:nth-child(6n + 5) {
		-webkit-box-flex: 0;
		-webkit-flex: 0 0 33.333333%;
		-ms-flex: 0 0 33.333333%;
		flex: 0 0 33.333333%;
		max-width: 33.333333%;
	}

}
