/**
 * Collections Hub — עמוד מאוחד עם טאבים לפי שנה + תת-קולקציות.
 */

.natella-collections-hub {
	padding-block-end: var(--natella-gap-2xl);
}

.natella-collections-hub__header {
	text-align: center;
	margin-block: max(2rem, var(--natella-gap-2xl)) max(1.75rem, var(--natella-gap-xl));
}

.natella-collections-hub__title {
	font-family: var(--natella-font-heading);
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 500;
	line-height: 1.1;
	margin: 0 0 0.5rem;
}

.natella-collections-hub__intro {
	max-width: 42rem;
	margin-inline: auto;
	color: var(--natella-color-muted);
	line-height: 1.7;
}

/* ——— Tabs ——— */
.natella-collections-hub__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-block: max(1.5rem, var(--natella-gap-xl)) max(2rem, var(--natella-gap-2xl));
	padding-block-end: 1.25rem;
	border-block-end: 1px solid var(--natella-color-border);
}

.natella-collections-hub__tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1.15rem;
	min-height: 2.5rem;
	font-family: var(--natella-font-heading);
	font-size: clamp(0.95rem, 1.1vw, 1.1rem);
	font-weight: 500;
	line-height: 1.2;
	color: var(--natella-color-text);
	background: transparent;
	border: 1px solid var(--natella-color-border);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.natella-collections-hub__tab:hover,
.natella-collections-hub__tab:focus-visible {
	background: rgba(0, 0, 0, 0.035);
	border-color: var(--natella-color-text);
	outline: none;
}

.natella-collections-hub__tab:focus-visible {
	box-shadow: 0 0 0 2px var(--natella-color-primary, #333);
}

.natella-collections-hub__tab.is-active {
	background: var(--natella-color-text);
	color: var(--natella-color-bg, #fff);
	border-color: var(--natella-color-text);
	font-weight: 600;
}

.natella-collections-hub__name {
	display: block;
	text-align: center;
	font-family: var(--natella-font-heading);
	font-size: clamp(1rem, 1.4vw, 1.25rem);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--natella-color-text);
	margin-block: calc(-1 * max(0.75rem, var(--natella-gap-lg))) max(1.25rem, var(--natella-gap-lg));
}

.natella-collections-hub__name[hidden] {
	display: none;
}

.natella-collections-hub__subtabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
	margin-block: calc(-1 * max(0.75rem, var(--natella-gap-lg))) max(1.25rem, var(--natella-gap-lg));
}

.natella-collections-hub__subtabs[hidden] {
	display: none;
}

.natella-collections-hub__subtab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.95rem;
	min-height: 2rem;
	font-family: var(--natella-font-heading);
	font-size: clamp(0.85rem, 1vw, 0.98rem);
	font-weight: 500;
	line-height: 1.2;
	color: var(--natella-color-text);
	background: transparent;
	border: 1px solid var(--natella-color-border);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.natella-collections-hub__subtab:hover {
	background: rgba(0, 0, 0, 0.035);
	border-color: var(--natella-color-text);
}

.natella-collections-hub__subtab.is-active {
	background: var(--natella-color-text);
	color: var(--natella-color-bg, #fff);
	border-color: var(--natella-color-text);
	font-weight: 600;
}

/* ——— Panels ——— */
.natella-collections-hub__panels {
	position: relative;
}

.natella-collections-hub__panel {
	display: none;
	animation: natella-ch-fade 0.25s ease-out;
}

.natella-collections-hub__panel.is-active {
	display: block;
}

@keyframes natella-ch-fade {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Gallery grid */
.natella-collections-hub__gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

@media (min-width: 46.875em) {
	.natella-collections-hub__gallery {
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
	}
}

@media (min-width: 61.875em) {
	.natella-collections-hub__gallery {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 75em) {
	.natella-collections-hub__gallery {
		grid-template-columns: repeat(5, 1fr);
	}
}

.natella-collections-hub__gallery-item {
	margin: 0;
	overflow: hidden;
}

.natella-collections-hub__gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 3 / 4;
	transition: transform 0.3s ease;
}

.natella-collections-hub__gallery-item:hover img {
	transform: scale(1.03);
}

@media (max-width: 46.8125em) {
	.natella-collections-hub__tabs,
	.natella-collections-hub__subtabs {
		justify-content: flex-start;
		overflow-x: auto;
		flex-wrap: nowrap;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
	}

	.natella-collections-hub__tab,
	.natella-collections-hub__subtab {
		flex: 0 0 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.natella-collections-hub__panel {
		animation: none;
	}

	:is(.natella-rte, .natella-collections-hub__panel-body) :is(.gallery-item, .wp-block-image, figure.wp-block-image) img {
		transition: none;
	}

	:is(.natella-rte, .natella-collections-hub__panel-body) :is(.gallery-item, .wp-block-image, figure.wp-block-image):hover img {
		transform: none;
	}
}
