/* Life gallery — Autonemo */

.autonemo-gallery-page {
	padding-bottom: 64px;
}

.autonemo-gallery-page > section.section-padding {
	padding-top: clamp(48px, 6vw, 72px);
	padding-bottom: clamp(48px, 6vw, 72px);
}

.autonemo-gallery-hero.section-padding {
	padding-top: clamp(12px, 2vw, 24px);
	padding-bottom: clamp(32px, 4vw, 48px);
}

.autonemo-gallery-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.75fr);
	gap: 32px;
	align-items: center;
}

.autonemo-gallery-eyebrow {
	display: inline-block;
	margin: 0 0 10px;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--autonemo-red, #e2231a);
	background: rgba(226, 35, 26, 0.08);
	border: 1px solid rgba(226, 35, 26, 0.18);
}

.autonemo-gallery-hero h1 {
	margin: 0 0 12px;
	font-size: clamp(1.65rem, 3.4vw, 2.35rem);
	line-height: 1.15;
	color: var(--autonemo-black, #1a1a1a);
}

.autonemo-gallery-hero__lead {
	margin: 0 0 20px;
	max-width: 560px;
	font-size: 1rem;
	line-height: 1.6;
	color: rgba(26, 26, 26, 0.72);
}

.autonemo-gallery-hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.autonemo-gallery-hero__stats li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 16px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid rgba(26, 26, 26, 0.08);
	box-shadow: 0 4px 16px rgba(11, 12, 12, 0.05);
}

.autonemo-gallery-hero__stats strong {
	font-size: 1.25rem;
	line-height: 1.1;
	color: var(--autonemo-red, #e2231a);
}

.autonemo-gallery-hero__stats span {
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: rgba(26, 26, 26, 0.55);
}

.autonemo-gallery-hero__collage {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto auto;
	gap: 12px;
	max-width: 280px;
	margin-left: auto;
}

.autonemo-gallery-hero__tile {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
	font-size: 1.75rem;
	color: #fff;
	box-shadow: 0 12px 32px rgba(11, 12, 12, 0.12);
}

.autonemo-gallery-hero__tile--a {
	grid-row: span 2;
	min-height: 200px;
	background: linear-gradient(145deg, #1a1a1a, #e2231a);
}

.autonemo-gallery-hero__tile--b {
	min-height: 94px;
	background: linear-gradient(135deg, #e2231a, #ff6b5a);
}

.autonemo-gallery-hero__tile--c {
	min-height: 94px;
	background: linear-gradient(135deg, #2d2d2d, #5a5a5a);
}

/* Filters */
.autonemo-gallery-main {
	padding-top: 0;
}

.autonemo-gallery-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-bottom: 28px;
}

.autonemo-gallery-filter {
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid rgba(26, 26, 26, 0.12);
	background: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	color: rgba(26, 26, 26, 0.75);
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.autonemo-gallery-filter:hover,
.autonemo-gallery-filter:focus-visible {
	border-color: rgba(226, 35, 26, 0.35);
	color: var(--autonemo-red, #e2231a);
	outline: none;
}

.autonemo-gallery-filter.is-active {
	background: var(--autonemo-red, #e2231a);
	border-color: var(--autonemo-red, #e2231a);
	color: #fff;
}

/* Balanced mosaic — mixed sizes, one consistent card style */
.autonemo-gallery-mosaic {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 190px;
	gap: 14px;
	align-items: stretch;
}

.autonemo-gallery-item {
	grid-column: span 1;
	grid-row: span 1;
	border-radius: 14px;
	overflow: hidden;
	background: #f0f0f0;
	border: 1px solid rgba(26, 26, 26, 0.07);
	box-shadow: 0 6px 20px rgba(11, 12, 12, 0.06);
	opacity: 1;
	transition: opacity 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.autonemo-gallery-item--size-wide {
	grid-column: span 2;
	grid-row: span 1;
}

.autonemo-gallery-item--size-tall {
	grid-column: span 1;
	grid-row: span 2;
}

.autonemo-gallery-item--size-lg {
	grid-column: span 2;
	grid-row: span 2;
}

.autonemo-gallery-item.is-hidden {
	display: none;
}

.autonemo-gallery-item:hover,
.autonemo-gallery-item:focus-within {
	box-shadow: 0 14px 32px rgba(226, 35, 26, 0.14);
	transform: translateY(-2px);
}

.autonemo-gallery-item__link {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	text-decoration: none;
	color: #fff;
	background: #1a1a1a;
}

.autonemo-gallery-item__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Portrait / long photos — show full image inside tall tile */
.autonemo-gallery-item--portrait .autonemo-gallery-item__link {
	background: #f2f2f2;
}

.autonemo-gallery-item--portrait .autonemo-gallery-item__img {
	object-fit: contain;
	object-position: center center;
}

.autonemo-gallery-item--portrait.autonemo-gallery-item--size-tall {
	grid-row: span 2;
}

.autonemo-gallery-item--portrait .autonemo-gallery-item__link:hover .autonemo-gallery-item__img,
.autonemo-gallery-item--portrait .autonemo-gallery-item__link:focus-visible .autonemo-gallery-item__img {
	transform: none;
}

.autonemo-gallery-item:not(.autonemo-gallery-item--portrait) .autonemo-gallery-item__link:hover .autonemo-gallery-item__img,
.autonemo-gallery-item:not(.autonemo-gallery-item--portrait) .autonemo-gallery-item__link:focus-visible .autonemo-gallery-item__img {
	transform: scale(1.05);
}

.autonemo-gallery-item__zoom {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--autonemo-red, #e2231a);
	font-size: 0.85rem;
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 0.25s ease, transform 0.25s ease;
	z-index: 2;
}

.autonemo-gallery-item__link:hover .autonemo-gallery-item__zoom,
.autonemo-gallery-item__link:focus-visible .autonemo-gallery-item__zoom {
	opacity: 1;
	transform: scale(1);
}

.autonemo-gallery-main__note {
	margin: 24px 0 0;
	text-align: center;
	font-size: 0.8rem;
	color: rgba(26, 26, 26, 0.55);
}

/* Empty */
.autonemo-gallery-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 24px;
	border-radius: 20px;
	background: linear-gradient(135deg, #fafafa, #fff);
	border: 1px dashed rgba(26, 26, 26, 0.14);
}

.autonemo-gallery-empty__icon {
	font-size: 2.5rem;
	color: var(--autonemo-red, #e2231a);
	margin-bottom: 12px;
	opacity: 0.7;
}

.autonemo-gallery-empty h3 {
	margin: 0 0 8px;
	font-size: 1.2rem;
}

.autonemo-gallery-empty p {
	margin: 0 auto 16px;
	max-width: 420px;
	font-size: 0.9rem;
	line-height: 1.55;
	color: rgba(26, 26, 26, 0.65);
}

/* CTA */
.autonemo-gallery-cta {
	background: linear-gradient(135deg, rgba(226, 35, 26, 0.06) 0%, #fafafa 100%);
	border-top: 1px solid rgba(26, 26, 26, 0.06);
}

.autonemo-gallery-cta__inner {
	text-align: center;
	max-width: 560px;
	margin: 0 auto;
}

.autonemo-gallery-cta h2 {
	margin: 0 0 8px;
	font-size: clamp(1.2rem, 2.4vw, 1.5rem);
}

.autonemo-gallery-cta p {
	margin: 0 0 18px;
	color: rgba(26, 26, 26, 0.7);
}

.fancybox-container.autonemo-gallery-fancybox .fancybox-caption {
	font-size: 0.95rem;
	text-align: center;
}

@media (max-width: 991px) {
	.autonemo-gallery-hero__inner {
		grid-template-columns: 1fr;
	}

	.autonemo-gallery-hero__visual {
		display: none;
	}

	.autonemo-gallery-mosaic {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 170px;
	}

	.autonemo-gallery-item--size-lg,
	.autonemo-gallery-item--size-wide {
		grid-column: span 2;
		grid-row: span 1;
	}

	.autonemo-gallery-item--size-tall {
		grid-column: span 1;
		grid-row: span 2;
	}
}

@media (max-width: 575px) {
	.autonemo-gallery-mosaic {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 150px;
		gap: 10px;
	}

	.autonemo-gallery-item,
	.autonemo-gallery-item--size-wide,
	.autonemo-gallery-item--size-tall,
	.autonemo-gallery-item--size-lg {
		grid-column: span 1;
		grid-row: span 1;
	}

	.autonemo-gallery-item--size-wide {
		grid-column: span 2;
	}
}
