/*
 * Mobile carousel (see assets/scripts/mobile-carousel.js).
 * Below 768px: horizontal row of 299px cards separated by a vertical line,
 * the next card peeking in; slides overflow the container up to the screen
 * edges (same idea as .overflow-slider on the home news slider).
 */
@media (max-width: 767px) {
	/* The carousel stays in its container; slides overflow to the screen
	   edges (body has overflow-x: clip, so no horizontal scroll) */
	.js-mobile-carousel {
		overflow: visible !important;
	}

	.mobile-carousel__track {
		display: flex !important;
		border: 0 !important;
	}

	/* Borders on the slides (contiguous), so they travel with the cards */
	.mobile-carousel__slide {
		flex-shrink: 0;
		width: 299px !important;
		border: 0 !important;
		border-top: .5px solid var(--wp--preset--color--gray-light) !important;
		border-bottom: .5px solid var(--wp--preset--color--gray-light) !important;
		border-right: 1px solid var(--wp--preset--color--gray-light) !important;
	}

	/* Valors / Projectes cards: number, image, title, text stacked */
	.mobile-carousel__slide.projects-grid__item {
		display: block;

		.projects-grid-pagination {
			border-bottom: 0;
			padding: 1.5rem 1rem 1rem;
		}

		.projects-grid__item__body {
			padding: 1rem 1rem 1.5rem;
		}
	}

	.mobile-carousel__slide:first-child.projects-grid__item {
		.projects-grid-pagination,
		.projects-grid__item__body {
			padding-left: 0;
		}
	}
}
