/* Kaunortvic — Homepage bento. Author: Kauno raj. turizmo centras */

/* The bento sits inside an Elementor flex container; make the shortcode widget
   fill the available width instead of shrinking to content width. The :has()
   rule covers any placement; the fixed IDs are the homepage section widgets
   (deterministic fallback for browsers without :has support). */
.elementor-widget-shortcode:has(.kau-bento),
.elementor-element-ba0e101,
.elementor-element-ba0e102,
.elementor-element-ba0e103,
.elementor-element-ba0e104 {
	width: 100%;
}

.kau-bento {
	--kau-teal: #166660;
	--kau-panel: rgba(202, 240, 248, 0.8);
	--kau-radius: 20px;
	--kau-gap: 20px;
	--kau-ink: #1d1d1d;
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
}

/* 4 columns x 2 rows. Aspect keeps the grid height proportional as it scales. */
.kau-bento__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: var(--kau-gap);
	aspect-ratio: 2 / 1;
}

/* Slot placement: 1 = big (left, 2x2), 2 + 3 = small (top right), 4 = wide (bottom right). */
.kau-bento__grid > :nth-child(1) { grid-area: 1 / 1 / 3 / 3; }
.kau-bento__grid > :nth-child(2) { grid-area: 1 / 3 / 2 / 4; }
.kau-bento__grid > :nth-child(3) { grid-area: 1 / 4 / 2 / 5; }
.kau-bento__grid > :nth-child(4) { grid-area: 2 / 3 / 3 / 5; }

.kau-bento__tile {
	position: relative;
	display: block;
	min-height: 0;
	border-radius: var(--kau-radius);
	overflow: hidden;
	text-decoration: none;
	background: #cfe9ee;
}

.kau-bento__media {
	position: absolute;
	inset: 0;
}

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

.kau-bento__tile--noimg .kau-bento__media {
	background: linear-gradient(135deg, #cfe9ee, #a7d8e0);
}

.kau-bento__panel {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 10px 10px 18px;
	background: var(--kau-panel);
	border-radius: var(--kau-radius);
}

.kau-bento__title {
	font: 300 18px/1.25 "Inter", sans-serif;
	color: var(--kau-ink);
}

.kau-bento__tile--big .kau-bento__title {
	font-size: 20px;
}

.kau-bento__arrow-ico {
	flex: 0 0 auto;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: var(--kau-teal);
	color: #fff;
	display: grid;
	place-items: center;
	transition: transform 0.2s ease;
}

.kau-bento__arrow-ico svg {
	width: 22px;
	height: 22px;
}

.kau-bento__tile:hover .kau-bento__arrow-ico {
	transform: translateX(3px);
}

/* Prev / next pagination */
.kau-bento__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 24px;
}

.kau-bento__arrow {
	width: 50px;
	height: 50px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--kau-teal);
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: opacity 0.2s ease;
}

.kau-bento__arrow svg {
	width: 22px;
	height: 22px;
}

.kau-bento__prev svg {
	transform: rotate(180deg);
}

.kau-bento__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.kau-bento__count {
	font: 300 16px/1 "Inter", sans-serif;
	color: var(--kau-ink);
	min-width: 44px;
	text-align: center;
}

/* Tablet: keep the bento but a touch taller */
@media (max-width: 1024px) {
	.kau-bento__grid { aspect-ratio: 3 / 2; }
}

/* Mobile: stack every tile into a single column */
@media (max-width: 767px) {
	.kau-bento__grid {
		grid-template-columns: 1fr;
		grid-template-rows: none;
		aspect-ratio: auto;
	}
	.kau-bento__grid > :nth-child(n) {
		grid-area: auto;
		aspect-ratio: 16 / 10;
	}
}
