.grent-gallery {
	--gg-accent: #303195;
	--gg-accent-dark: #020075;
	--gg-text: #1c1c28;
	--gg-muted: #6b6f86;
	--gg-line: #e8eaf2;
	--gg-bg: #f5f6fb;
	color: var(--gg-text);
	margin: 0 0 48px;
}

.grent-gallery *,
.grent-gallery *::before,
.grent-gallery *::after {
	box-sizing: border-box;
}

.grent-gallery__hero {
	position: relative;
	border-radius: 2px;
	overflow: hidden;
	margin: 0 0 28px;
	aspect-ratio: 21 / 8;
	min-height: 220px;
	background: #0d0f2b center/cover no-repeat;
}

.grent-gallery__hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 12%;
	display: block;
}

/* Top filters — Figma node 17-2 */
.grent-gallery__tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 4px;
	margin: 0 0 28px;
	padding: 0;
	border: 0;
	background: transparent;
}

.grent-gallery .grent-gallery__tab {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: auto;
	height: auto;
	margin: 0;
	padding: 20px 14px;
	border: 1px solid #ececec;
	border-radius: 0;
	box-shadow: none;
	background: #fff;
	font: 500 11px/14.29px "Montserrat", Arial, sans-serif;
	font-weight: 500 !important;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: #333333;
	cursor: pointer;
	position: relative;
	white-space: nowrap;
	flex: 0 0 auto;
	outline: none;
}

.grent-gallery .grent-gallery__tab:hover {
	color: #333333;
	background: #fff;
	border-color: #ececec;
}

.grent-gallery .grent-gallery__tab.is-active,
.grent-gallery .grent-gallery__tab.is-active:hover {
	color: #ffffff;
	background: #303195;
	border-color: #303195;
}

.grent-gallery .grent-gallery__tab.is-active::after {
	content: none;
	display: none;
}

.grent-gallery__section-title {
	margin: 0 0 20px;
	padding: 0;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: #1c1c28;
	border: 0;
	text-transform: none;
}

.grent-gallery__panel {
	display: none;
	animation: gg-fade .3s ease;
}

.grent-gallery__panel.is-active {
	display: block;
}

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

.grent-gallery__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 28px;
}

.grent-gallery__cat-btn {
	appearance: none;
	border: 1px solid var(--gg-line);
	background: #fff;
	color: var(--gg-text);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: 4px;
	cursor: pointer;
	transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.grent-gallery__cat-btn:hover,
.grent-gallery__cat-btn.is-active {
	border-color: var(--gg-accent);
	color: var(--gg-accent);
	background: rgba(48, 49, 149, .06);
}

.grent-gallery__cat-block {
	display: none;
	margin: 0 0 40px;
	scroll-margin-top: 24px;
}

.grent-gallery__cat-block.is-active {
	display: block;
}

.grent-gallery__block-title {
	margin: 0 0 20px;
	padding: 0 0 10px;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--gg-accent-dark);
	border-bottom: 2px solid var(--gg-accent);
}

.grent-gallery__project {
	margin: 0 0 28px;
}

.grent-gallery__project-title {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--gg-text);
}

.grent-gallery__photos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.grent-gallery__photo {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 2px;
	background: var(--gg-bg);
}

.grent-gallery__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}

.grent-gallery__photo:hover img {
	transform: scale(1.04);
}

.grent-gallery__empty {
	padding: 28px 16px;
	color: var(--gg-muted);
	background: var(--gg-bg);
	border-radius: 4px;
	text-align: center;
}

@media (max-width: 991px) {
	.grent-gallery__hero { aspect-ratio: 16 / 8; }
	.grent-gallery__photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grent-gallery__section-title { font-size: 24px; }

	.grent-gallery__tabs {
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 0;
		width: 100%;
		border: 1px solid #ececec;
		box-sizing: border-box;
	}

	.grent-gallery .grent-gallery__tab {
		width: 100%;
		max-width: 100%;
		flex: none;
		white-space: normal;
		text-align: center;
		padding: 14px 12px;
		min-height: 52px;
		border: 0;
		border-bottom: 1px solid #ececec;
		line-height: 1.25;
	}

	.grent-gallery .grent-gallery__tab:last-child {
		border-bottom: 0;
	}

	.grent-gallery .grent-gallery__tab.is-active,
	.grent-gallery .grent-gallery__tab.is-active:hover {
		border-color: #ececec;
		border-bottom-color: #ececec;
	}

	.grent-gallery .grent-gallery__tab:last-child.is-active,
	.grent-gallery .grent-gallery__tab:last-child.is-active:hover {
		border-bottom: 0;
	}
}

@media (max-width: 767px) {
	.grent-gallery {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding: 0;
		box-sizing: border-box;
		overflow-x: hidden;
	}

	.grent-gallery__hero {
		border-radius: 0;
		margin-bottom: 0;
	}

	.grent-gallery__tabs {
		width: 100%;
		margin: 0 0 20px;
		border-left: 0;
		border-right: 0;
	}

	.grent-gallery__section-title,
	.grent-gallery__cats,
	.grent-gallery__cat-block,
	.grent-gallery__project,
	.grent-gallery__empty {
		padding-left: 15px;
		padding-right: 15px;
		box-sizing: border-box;
	}

	.grent-gallery__cats {
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 8px;
		width: 100%;
	}

	.grent-gallery__cat-btn {
		width: 100%;
		max-width: 100%;
		display: block;
		white-space: normal;
		text-align: center;
		border-radius: 4px;
		box-sizing: border-box;
	}
}

@media (max-width: 600px) {
	.grent-gallery__hero { aspect-ratio: 16 / 10; min-height: 160px; }
	.grent-gallery__block-title { font-size: 20px; }
	.grent-gallery__project-title { font-size: 15px; }
	.grent-gallery__photos { gap: 8px; }
}
