/*
 * Card styling (.vbn-cat-classic-card, -image, -body, -icon, -title,
 * -count, -browse) is intentionally NOT redefined here — this widget
 * reuses the exact same classes as the locked ViaLocal Popular
 * Categories (Classic) widget (see assets/css/widget-classic.css) so
 * cards render visually identical, as requested. Only the wrapper,
 * grid/carousel layout, and icon-only mode are unique to this widget.
 */

.vbn-region-cards {
	--vbn-cat-navy: #1e2a4c;
	--vbn-cat-orange: #ff431e;
	width: 100%;
	max-width: 1340px;
	margin: 0 auto;
}

.vbn-region-grid {
	display: grid;
	grid-template-columns: repeat(var(--vbn-region-columns, 4), 1fr);
	gap: 24px;
}

.vbn-region-carousel .slick-slide {
	padding: 0 10px;
	box-sizing: border-box;
}
.vbn-region-carousel .slick-list {
	margin: 0 -10px;
}
.vbn-region-carousel .slick-track {
	display: flex;
	align-items: stretch;
}
.vbn-region-slide {
	height: 100%;
}
.vbn-region-carousel .vbn-region-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--vbn-cat-navy);
	font-size: 13px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
	cursor: pointer;
	z-index: 3;
}
.vbn-region-carousel .vbn-region-arrow:hover {
	background: var(--vbn-cat-orange);
	color: #fff;
}
.vbn-region-carousel .vbn-region-arrow.slick-disabled {
	opacity: .35;
	cursor: default;
	pointer-events: none;
}
.vbn-region-carousel .vbn-region-prev {
	left: -18px;
}
.vbn-region-carousel .vbn-region-next {
	right: -18px;
}

/* Icon-only mode: no image strip, so the card becomes a single centered
   column instead of the image+body side-by-side layout. */
.vbn-region-icon-only .vbn-cat-classic-card {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: auto;
	padding: 28px 16px;
}
.vbn-region-icon-only .vbn-cat-classic-body {
	padding: 0;
}

/* Hover effects, opt-in only — the locked Classic widget itself has no
   hover animation, so this widget adds its own scoped version rather
   than touching Classic's CSS. */
.vbn-region-hover-on .vbn-cat-classic-card {
	transition: transform .25s ease, box-shadow .25s ease;
}
.vbn-region-hover-on .vbn-cat-classic-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(20, 20, 40, .18);
}
.vbn-region-hover-on .vbn-cat-classic-image img {
	transition: transform .35s ease;
}
.vbn-region-hover-on .vbn-cat-classic-card:hover .vbn-cat-classic-image img {
	transform: scale(1.06);
}

.vbn-region-viewall-wrap {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}
.vbn-region-viewall {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	border: 1px solid var(--vbn-cat-orange);
	border-radius: 26px;
	color: var(--vbn-cat-orange);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: background .2s ease, color .2s ease;
}
.vbn-region-viewall:hover {
	background: var(--vbn-cat-orange);
	color: #fff;
}

/* Vibrant layout — full-bleed photo, straight-edge split into a white
   body, overlapping icon circle. Single fixed accent color (--vbn-cat-orange,
   the same orange used throughout this plugin) — no per-card color
   variance, no colored panel background, outline-style icon and button
   only, per explicit request. */
.vbn-region-vibrant-card {
	display: block;
	overflow: hidden;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 28px rgba(20, 20, 40, .14), 0 2px 8px rgba(20, 20, 40, .08);
	text-decoration: none;
}
.vbn-region-vibrant-photo {
	position: relative;
	width: 100%;
	height: 190px;
	overflow: hidden;
	background: #f3f4f6;
}
.vbn-region-vibrant-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* Gradient scrim over real photos only — blends the photo into the
   white card body below instead of a hard cut line. Not shown behind
   the icon fallback (no img present), since there's no seam to soften
   there. */
.vbn-region-vibrant-photo:has(img):after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 60%;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .32));
	pointer-events: none;
}
/* Shown instead of a photo when the term has no image set — keeps the
   photo area's fixed height so the card never collapses to the tiny,
   title-overlapping box seen when .vbn-region-vibrant-photo was empty. */
.vbn-region-vibrant-photo-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--vbn-cat-orange);
	font-size: 34px;
	opacity: .35;
}
.vbn-region-vibrant-photo-fallback svg {
	width: 34px;
	height: 34px;
	fill: currentColor;
}
.vbn-region-vibrant-body {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 34px 20px 24px;
	background: #fff;
	color: var(--vbn-cat-navy);
}
.vbn-region-vibrant-icon {
	position: absolute;
	top: -28px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--vbn-cat-orange);
	color: var(--vbn-cat-orange);
	font-size: 20px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}
.vbn-region-vibrant-icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}
.vbn-region-vibrant-title {
	margin: 8px 0 10px;
	font-size: 20px;
	font-weight: 700;
	color: var(--vbn-cat-navy);
}
.vbn-region-vibrant-rule {
	display: block;
	width: 32px;
	height: 2px;
	margin-bottom: 12px;
	background: var(--vbn-cat-orange);
}
.vbn-region-vibrant-count {
	display: block;
	margin-bottom: 18px;
	font-size: 13px;
	color: var(--vbn-cat-navy);
	opacity: .65;
}
.vbn-region-vibrant-browse {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	border: 1.5px solid var(--vbn-cat-orange);
	border-radius: 24px;
	color: var(--vbn-cat-orange);
	font-size: 14px;
	font-weight: 700;
	transition: background .2s ease, color .2s ease;
}
.vbn-region-vibrant-card:hover .vbn-region-vibrant-browse {
	background: var(--vbn-cat-orange);
	color: #fff;
}
.vbn-region-hover-on .vbn-region-vibrant-card {
	transition: transform .25s ease, box-shadow .25s ease;
}
.vbn-region-hover-on .vbn-region-vibrant-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(20, 20, 40, .18);
}
.vbn-region-hover-on .vbn-region-vibrant-photo img {
	transition: transform .35s ease;
}
.vbn-region-hover-on .vbn-region-vibrant-card:hover .vbn-region-vibrant-photo img {
	transform: scale(1.06);
}

@media (max-width: 600px) {
	.vbn-region-vibrant-photo {
		height: 150px;
	}
}

@media (max-width: 1024px) {
	.vbn-region-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.vbn-region-grid {
		grid-template-columns: 1fr;
	}
	.vbn-region-carousel .vbn-region-prev {
		left: -6px;
	}
	.vbn-region-carousel .vbn-region-next {
		right: -6px;
	}
}
