/* HOBBYTEC Core — Bento ponuka [hbtc_bento]
 * Atypický grid obrázkových dlaždíc, číslovanie, reveal na scroll, hover zoom.
 * Font Gilroy. Farby zvýraznení (.hbtc-hl--*) sú zdieľané s cascade.css.
 */

.hbtc-bento {
	font-family: "Gilroy-Regular", system-ui, sans-serif;
	width: 100%;
	max-width: 1600px;
	margin-left: auto;
	margin-right: auto;
	padding: 16px;
	border-radius: 34px;
	background: #1b1b1b;
}
.hbtc-bento *,
.hbtc-bento *::before,
.hbtc-bento *::after { box-sizing: border-box; }

.hbtc-bento__grid {
	display: grid;
	gap: 16px;
}

/* ── Atypický layout pre 4 dlaždice ──────────────── */
.is-bento4 .hbtc-bento__grid {
	grid-template-columns: 1.5fr 1fr 1fr;
	grid-template-rows: repeat(2, minmax(288px, 1fr));
}
.is-bento4 .hbtc-bento__tile:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
.is-bento4 .hbtc-bento__tile:nth-child(2) { grid-column: 2 / span 2; grid-row: 1; }
.is-bento4 .hbtc-bento__tile:nth-child(3) { grid-column: 2; grid-row: 2; }
.is-bento4 .hbtc-bento__tile:nth-child(4) { grid-column: 3; grid-row: 2; }

/* ── Fallback (iný počet) ────────────────────────── */
.is-bentoflex .hbtc-bento__grid {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	grid-auto-rows: minmax(288px, 1fr);
}

/* ── Dlaždica ────────────────────────────────────── */
.hbtc-bento__tile {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 288px;
	padding: 26px;
	border-radius: 20px;
	overflow: hidden;
	text-decoration: none;
	isolation: isolate;
	/* reveal */
	opacity: 0;
	transform: translateY(26px);
	transition: opacity .6s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
	transition-delay: calc(var(--i, 0) * .1s);
	will-change: transform, opacity;
}
.hbtc-bento.is-visible .hbtc-bento__tile {
	opacity: 1;
	transform: none;
}

.hbtc-bento__media {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-size: cover;
	background-position: center;
	background-color: #2a2a2a !important;
	transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}
.hbtc-bento__tile:hover .hbtc-bento__media { transform: scale(1.06); }

.hbtc-bento__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .05) 100%) !important;
	transition: background .3s ease;
}
.hbtc-bento__tile:hover .hbtc-bento__overlay {
	background: linear-gradient(to top, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .45) 50%, rgba(0, 0, 0, .12) 100%) !important;
}

/* Výrazný zelený hover overlay (cez celú dlaždicu) */
.hbtc-bento__tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(120, 185, 86, .64) !important;
	opacity: 0;
	transition: opacity .35s ease;
	pointer-events: none;
}
.hbtc-bento__tile:hover::after { opacity: 1; }

/* ── Číslo ───────────────────────────────────────── */
.hbtc-bento__num {
	position: absolute;
	top: 22px;
	left: 26px;
	z-index: 2;
	font-family: "Gilroy-ExtraBold", system-ui, sans-serif;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .04em;
	color: rgba(255, 255, 255, .65) !important;
}

/* ── Obsah ───────────────────────────────────────── */
.hbtc-bento__body { position: relative; z-index: 2; }
.hbtc-bento__title {
	display: block;
	margin: 0 0 8px !important;
	font-family: "Gilroy-ExtraBold", system-ui, sans-serif;
	font-weight: 800;
	font-size: clamp(26px, 2.4vw, 40px);
	line-height: 1.02;
	color: #ffffff !important;
}
.hbtc-bento__text {
	display: block;
	margin: 0 !important;
	max-width: 42ch;
	font-family: "Gilroy-Medium", system-ui, sans-serif;
	font-weight: 500;
	font-size: clamp(14px, 1.1vw, 16px);
	line-height: 1.45;
	color: rgba(255, 255, 255, .82) !important;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
	.is-bento4 .hbtc-bento__grid {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto;
	}
	.is-bento4 .hbtc-bento__tile:nth-child(1) { grid-column: 1 / span 2; grid-row: auto; min-height: 320px; }
	.is-bento4 .hbtc-bento__tile:nth-child(2) { grid-column: 1 / span 2; grid-row: auto; }
	.is-bento4 .hbtc-bento__tile:nth-child(3) { grid-column: 1; grid-row: auto; }
	.is-bento4 .hbtc-bento__tile:nth-child(4) { grid-column: 2; grid-row: auto; }
}
@media (max-width: 560px) {
	.hbtc-bento { padding: 12px; border-radius: 26px; }
	.hbtc-bento__grid { gap: 12px; }
	.is-bento4 .hbtc-bento__grid { grid-template-columns: 1fr; }
	.is-bento4 .hbtc-bento__tile { grid-column: 1 !important; min-height: 264px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.hbtc-bento__tile { opacity: 1 !important; transform: none !important; transition: none !important; }
	.hbtc-bento__tile:hover .hbtc-bento__media { transform: none; }
}
