/**
 * CSS Scroll-Snap Carousel Styles
 *
 * Replaces Owl Carousel with native CSS scroll-snap
 * for better performance and no jQuery dependency.
 *
 * @package AMPA
 * @since 2.0.0
 */

/* ==========================================================================
   BASE CAROUSEL STYLES
   ========================================================================== */

.carousel {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	scroll-behavior: smooth;
	gap: var(--carousel-gap, 20px);
}

.carousel::-webkit-scrollbar {
	display: none; /* Chrome, Safari */
}

.carousel__item {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

/* Inspire: center-snap so the valley always aligns */
.inspire.carousel {
	scroll-snap-type: x mandatory !important;
}

.inspire.carousel > .carousel__item {
	scroll-snap-align: center;
}

/* ==========================================================================
   CAROUSEL WRAPPER (with navigation)
   ========================================================================== */

.carousel-wrapper {
	position: relative;
	margin-top: 57px;
}

/* Inspiratie has tighter spacing — heading margin handles gap */
.inspirate .carousel-wrapper {
	margin-top: 0;
}

/* ==========================================================================
   TOP CONTENT WITH NAVIGATION
   The .top-cnt already has flex from style.css, we just ensure proper alignment
   ========================================================================== */

.top-cnt .carousel-nav {
	margin-left: auto;
}

/* Hide legacy counter divs */
.top-cnt .counter,
.top-cnt .procount {
	display: none;
}

/* ==========================================================================
   NAVIGATION BUTTONS
   ========================================================================== */

.carousel-nav,
.carousel__nav {
	display: flex;
	gap: 10px;
	align-items: center;
}

.carousel__nav-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #DFE0E6;
	cursor: pointer;
	transition: color 0.2s ease;
}

.carousel__nav-btn:hover {
	color: #E65013;
}

.carousel__nav-btn:focus {
	outline: 2px solid #E65013;
	outline-offset: 2px;
}

.carousel__nav-btn:focus:not(:focus-visible) {
	outline: none;
}

.carousel__nav-btn:focus-visible {
	outline: 2px solid #E65013;
	outline-offset: 2px;
}

.carousel__nav-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.carousel__nav-btn:disabled:hover {
	color: #DFE0E6;
}

.carousel__nav-btn svg {
	width: 7px;
	height: 13px;
	flex-shrink: 0;
}

/* ==========================================================================
   PROJECT/ARTICLE CAROUSEL (.pro-flx, .art-flx)
   ========================================================================== */

.pro-flx.carousel,
.art-flx.carousel {
	--carousel-gap: 30px;
}

.pro-flx.carousel > .carousel__item,
.art-flx.carousel > .carousel__item {
	width: calc(33.333% - 20px);
	min-width: 280px;
}

/* Item styling - clean look like staging */
.pro-flx .itm,
.art-flx .itm {
	background: transparent;
	border-radius: 0;
	overflow: visible;
}

.pro-flx .itm .img,
.art-flx .itm .img {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4/3;
	border-radius: 10px;
}

.pro-flx .itm .img img,
.art-flx .itm .img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
}

/* Category label - overlaid on image with border */
.pro-flx .itm .img .text,
.art-flx .itm .img .text,
#projecten-carousel .itm .img .text,
#artikelen-carousel .itm .img .text,
.project .art-flx .itm .img .text,
.project.article .art-flx .itm .img .text {
	position: absolute !important;
	bottom: 15px !important;
	left: 15px !important;
	background: #fff !important;
	color: #005b9d !important;
	padding: 5px 15px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	font-family: 'Montserrat-SemiBold', sans-serif !important;
	border-radius: 50px !important;
	border: 1px solid #e0e0e0 !important;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
	z-index: 10 !important;
}

/* Title styling - bold blue */
.pro-flx .itm .cnt,
.art-flx .itm .cnt,
#projecten-carousel .itm .cnt,
#artikelen-carousel .itm .cnt {
	padding: 20px 5px 10px 5px;
}

.pro-flx .itm .cnt p,
.art-flx .itm .cnt p,
#projecten-carousel .itm .cnt p,
#artikelen-carousel .itm .cnt p,
.project .art-flx .itm .cnt p,
.project.article .art-flx .itm .cnt p {
	margin: 0 !important;
	font-weight: 700 !important;
	color: #005b9d !important;
	font-size: 18px !important;
	line-height: 1.4 !important;
	font-family: 'Montserrat-SemiBold', sans-serif !important;
}

@media (max-width: 1200px) {
	.pro-flx.carousel > .carousel__item,
	.art-flx.carousel > .carousel__item {
		width: calc(50% - 15px);
		min-width: 260px;
	}
}

@media (max-width: 768px) {
	.pro-flx.carousel,
	.art-flx.carousel {
		--carousel-gap: 15px;
	}

	.pro-flx.carousel > .carousel__item,
	.art-flx.carousel > .carousel__item {
		width: calc(75% - 10px);
		min-width: 240px;
	}
}

@media (max-width: 480px) {
	.pro-flx.carousel > .carousel__item,
	.art-flx.carousel > .carousel__item {
		width: calc(90% - 10px);
		min-width: 200px;
	}
}


/* ==========================================================================
   PRODUCT LISTING CAROUSEL (.pro-list .inr-flx)
   Desktop: grid layout (no scroll). Mobile: swipeable carousel.
   ========================================================================== */

/* Desktop: disable carousel scroll, keep grid layout */
@media (min-width: 992px) {
	.pro-list .inr-flx.carousel {
		overflow: visible;
		scroll-snap-type: none;
		flex-wrap: nowrap;
		--carousel-gap: 17px;
	}

	.pro-list .inr-flx.carousel > .pro.carousel__item {
		width: calc(25% - 13px);
		margin-right: 0;
		flex: 0 0 auto;
	}

	/* Hide nav buttons on desktop (grid, no scroll) */
	.pro-list .carousel__nav-btn {
		display: none;
	}
}

/* Tablet: swipeable carousel, 2 visible */
@media (max-width: 991px) {
	.pro-list .inr-flx.carousel {
		--carousel-gap: 15px;
	}

	.pro-list .inr-flx.carousel > .carousel__item {
		width: calc(50% - 10px);
		min-width: 280px;
		flex: 0 0 auto;
	}
}

/* Mobile: single card swipe */
@media (max-width: 600px) {
	.pro-list .inr-flx.carousel > .carousel__item {
		width: 85%;
	}
}

/* ==========================================================================
   JUSTIFIED GALLERY — Inspiratie
   ========================================================================== */

.justified-gallery {
	position: relative;
}

.justified-gallery__item {
	position: absolute;
	overflow: hidden;
	border-radius: 8px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.justified-gallery--ready .justified-gallery__item {
	opacity: 1;
}

.justified-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.justified-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

.justified-gallery__item:hover img {
	transform: scale(1.05);
}

.justified-gallery__overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 40px 16px 14px;
	background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%);
	color: #fff;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.justified-gallery__item:hover .justified-gallery__overlay {
	opacity: 1;
}

.justified-gallery__title {
	font: 14px / 1.3 'Montserrat-SemiBold', sans-serif;
	margin: 0 0 2px;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.justified-gallery__caption {
	font: 12px / 1.4 'OpenSans-Regular', sans-serif;
	margin: 0;
	color: #fff;
	opacity: 0.9;
	text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Pagination */
.justified-gallery__pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 24px;
}

.jg-page-btn {
	width: 40px;
	height: 40px;
	border: 1px solid #dfe0e6;
	border-radius: 50%;
	background: #fff;
	font: 15px / 1 'OpenSans-Regular', sans-serif;
	color: #333;
	cursor: pointer;
	transition: all 0.2s;
}

.jg-page-btn:hover {
	border-color: #005b9d;
	color: #005b9d;
}

.jg-page-btn--active {
	background: #005b9d;
	border-color: #005b9d;
	color: #fff;
}

.jg-page-btn--active:hover {
	background: #004a82;
	color: #fff;
}

.jg-page-btn:disabled {
	opacity: 0.3;
	cursor: default;
}

.jg-page-prev,
.jg-page-next {
	font-size: 22px;
	font-weight: bold;
}

/* Album overview grid */
.album-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.album-grid__item {
	text-decoration: none;
	color: inherit;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-grid__item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.album-grid__cover {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.album-grid__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.album-grid__item:hover .album-grid__cover img {
	transform: scale(1.05);
}

.album-grid__info {
	padding: 16px 20px;
}

.album-grid__title {
	font: 18px / 1.3 'Montserrat-SemiBold', sans-serif;
	color: #005b9d;
	margin: 0 0 4px;
}

.album-grid__count {
	font: 14px / 1.4 'OpenSans-Regular', sans-serif;
	color: #666;
}

@media (max-width: 768px) {
	.album-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.justified-gallery__overlay {
		opacity: 1;
	}

	.jg-page-btn {
		width: 36px;
		height: 36px;
		font-size: 13px;
	}
}

/* ==========================================================================
   SECTION SPECIFIC STYLES — Inspiratie
   ========================================================================== */

.inspirate {
	padding: 60px 0;
}

.inspirate .inspiratie-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.inspirate .top-cnt {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 30px;
}

/* "Bekijk alle foto's" link */
.inspiratie-view-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 30px auto 0;
	padding: 12px 28px;
	font: 16px / 1.5 'Montserrat-SemiBold', sans-serif;
	color: #005b9d;
	background: transparent;
	border: 2px solid #005b9d;
	border-radius: 30px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	text-decoration: none;
}

.inspiratie-inner > .inspiratie-view-all {
	display: block;
	width: fit-content;
	margin: 30px auto 0;
}

.inspiratie-view-all:hover {
	background: #005b9d;
	color: #fff;
}

.inspiratie-view-all svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* GLightbox navigation */
.gprev,
.gnext,
.gclose {
	background: #fff !important;
}

@media (max-width: 768px) {
	.inspirate {
		padding: 40px 0;
	}

	.inspirate .top-cnt {
		margin-bottom: 20px;
	}

	.inspiratie-view-all {
		font-size: 14px;
		padding: 10px 22px;
	}
}

/* ==========================================================================
   REVIEW SECTION - Custom Reviews Carousel
   ========================================================================== */

.review .carousel-wrapper {
	margin-top: 40px;
}

.review .top-cnt h6 {
	margin: 0;
}

/* Custom review cards */
.reviews-carousel.carousel {
	--carousel-gap: 17px;
}

.reviews-carousel.carousel > .carousel__item {
	width: calc(33.333% - 12px);
	min-width: 300px;
}

.review-card {
	background: #f2f4fa;
	border-radius: 30px;
	padding: 40px;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.review-card__stars {
	display: flex;
	gap: 2px;
	margin-bottom: 15px;
}

.review-card__stars svg {
	width: 18px;
	height: 18px;
	fill: #FBBC04;
}

.review-card__content {
	font: 14px/24px 'OpenSans-Regular', sans-serif;
	color: #828899;
	flex: 1;
	margin-bottom: 20px;
}

.review-card__author {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font: 12px/20px 'Montserrat-Regular', sans-serif;
	color: #828899;
}

.review-card__name {
	font-weight: 600;
	color: #000;
}

.review-card__date {
	color: #828899;
}

@media (max-width: 1100px) {
	.reviews-carousel.carousel > .carousel__item {
		width: calc(50% - 10px);
		min-width: 280px;
	}
}

@media (max-width: 700px) {
	.reviews-carousel.carousel > .carousel__item {
		width: calc(85% - 10px);
		min-width: 260px;
	}

	.review-card {
		padding: 25px;
		border-radius: 20px;
	}
}

/* ==========================================================================
   MOBILE NAVIGATION
   ========================================================================== */

@media (max-width: 768px) {
	.carousel__nav-btn {
		width: 38px;
		height: 38px;
	}

	.carousel__nav-btn svg {
		width: 8px;
		height: 14px;
	}

	.top-cnt {
		margin-bottom: 20px;
	}
}

/* ==========================================================================
   LEGACY OWL CAROUSEL OVERRIDES
   Hide Owl elements when using CSS carousel
   ========================================================================== */

.carousel .owl-nav,
.carousel .owl-dots,
.owl-carousel:not(.owl-loaded) .owl-nav,
.owl-carousel:not(.owl-loaded) .owl-dots {
	display: none !important;
}

/* Make old owl-carousel containers work with scroll-snap */
.owl-carousel:not(.owl-loaded) {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.owl-carousel:not(.owl-loaded)::-webkit-scrollbar {
	display: none;
}

.owl-carousel:not(.owl-loaded) > * {
	flex: 0 0 auto;
	scroll-snap-align: start;
}
