/* ArtGalleri — detalj javnog rada */

body.ag-site.ag-public-artwork {
	background: #f5f5f7;
	color: #1d1d1f;
}

.ag-public-artwork #content {
	padding-block: 34px 64px;
}

.ag-public-artwork #content * {
	min-width: 0;
	box-sizing: border-box;
}

.ag-public-artwork #ag-artwork-photo,
.ag-public-artwork #ag-artwork-info,
.ag-public-artwork #ag-description-title {
	scroll-margin-top: 100px;
}

/* Pomoćna navigacija */

.ag-public-artwork .ag-artwork-shortcuts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 26px;
	margin-bottom: 28px;
}

.ag-public-artwork .ag-artwork-shortcuts a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #515156;
	font-size: 14px;
	text-decoration: none;
}

.ag-public-artwork .ag-artwork-shortcuts .ag-icon {
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	padding: 7px;
	border-radius: 10px;
	background: #edf7f0;
	color: #44835c;
}

.ag-public-artwork .ag-artwork-shortcuts a:nth-child(2) .ag-icon {
	background: #eef2fc;
	color: #647fc0;
}

.ag-public-artwork .ag-artwork-shortcuts a:nth-child(3) .ag-icon {
	background: #fff2e3;
	color: #b97630;
}

/* Fotografija i podaci */

.ag-public-artwork .ag-artwork-detail {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	align-items: start;
	gap: 28px;
}

.ag-public-artwork .ag-artwork-stage {
	display: block;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid #e7e7ec;
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 8px 26px rgb(0 0 0 / 4%);
}

.ag-public-artwork a.ag-artwork-photo-link {
	display: block;
	margin: 0;
	padding: 0;
	background: #fff;
	text-decoration: none;
	transform: none;
}

.ag-public-artwork .ag-artwork-photo-link img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	object-fit: contain;
	transform: none;
}

.ag-public-artwork .ag-artwork-stage figcaption {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 18px;
	border-top: 1px solid #ededf0;
	color: #6e6e73;
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
}

.ag-public-artwork .ag-artwork-stage figcaption .ag-icon {
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
	color: #647fc0;
}

.ag-public-artwork .ag-artwork-info {
	padding: clamp(22px, 3vw, 34px);
	border: 1px solid #e7e7ec;
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 8px 26px rgb(0 0 0 / 4%);
}

.ag-public-artwork .ag-artwork-category {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	margin: 0 0 16px;
	padding: 8px 12px;
	border-radius: 12px;
	background: #eef2fc;
	color: #526fae;
	font-size: 13px;
}

.ag-public-artwork .ag-artwork-category .ag-icon {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
}

.ag-public-artwork .ag-artwork-info h1 {
	max-width: none;
	margin: 0 0 24px;
	font-size: clamp(32px, 3.8vw, 48px);
	line-height: 1.1;
	letter-spacing: -0.04em;
	overflow-wrap: anywhere;
}

/* Autor */

.ag-public-artwork a.ag-artwork-artist {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border: 1px solid #dceade;
	border-radius: 18px;
	background: #eff8f2;
	color: #1d1d1f;
	text-decoration: none;
}

.ag-public-artwork .ag-artwork-artist-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border-radius: 12px;
	background: #dcefe3;
	color: #44835c;
}

.ag-public-artwork .ag-artwork-artist-icon .ag-icon {
	width: 22px;
	height: 22px;
}

.ag-public-artwork .ag-artwork-artist-name {
	display: grid;
	flex: 1;
	gap: 4px;
	overflow-wrap: anywhere;
}

.ag-public-artwork .ag-artwork-artist-name > span {
	color: #5d7566;
	font-size: 12px;
}

.ag-public-artwork .ag-artwork-artist-name strong {
	font-size: 16px;
	line-height: 1.4;
}

.ag-public-artwork .ag-artwork-artist > .ag-icon {
	width: 19px;
	height: 19px;
	flex: 0 0 19px;
	color: #44835c;
}

/* Podaci o radu */

.ag-public-artwork .ag-artwork-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 22px 0;
}

.ag-public-artwork .ag-artwork-facts > div {
	display: block;
	padding: 17px;
	border: 1px solid #e1e7f2;
	border-radius: 16px;
	background: #eef4fc;
}

.ag-public-artwork .ag-artwork-facts > div:nth-child(4n + 2) {
	background: #fff5e9;
	border-color: #f0dfc8;
}

.ag-public-artwork .ag-artwork-facts > div:nth-child(4n + 3) {
	background: #eff8f2;
	border-color: #d6eadd;
}

.ag-public-artwork .ag-artwork-facts > div:nth-child(4n + 4) {
	background: #fceff0;
	border-color: #f1dfe1;
}

.ag-public-artwork .ag-artwork-facts dt {
	margin: 0 0 7px;
	color: #64646b;
	font-size: 12px;
	font-weight: 400;
}

.ag-public-artwork .ag-artwork-facts dd {
	margin: 0;
	color: #1d1d1f;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.ag-public-artwork a.ag-artwork-gallery-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	max-width: 100%;
	min-height: 44px;
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	background: #0071e3;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}

.ag-public-artwork .ag-artwork-gallery-button .ag-icon {
	width: 19px;
	height: 19px;
	flex: 0 0 19px;
}

/* Opis */

.ag-public-artwork .ag-artwork-description {
	margin-top: 28px;
	padding: clamp(22px, 3vw, 32px);
	border: 1px solid #f0dfc8;
	border-radius: 24px;
	background: #fff5e9;
}

.ag-public-artwork .ag-artwork-description h2 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	font-size: 25px;
	letter-spacing: -0.025em;
}

.ag-public-artwork .ag-artwork-description h2 .ag-icon {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	color: #b97630;
}

.ag-public-artwork .ag-artwork-description p {
	max-width: 80ch;
	margin: 0;
	color: #60574c;
	font-size: 15px;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

.ag-public-artwork #content a:focus-visible {
	outline: 3px solid #0071e3;
	outline-offset: 4px;
}

.ag-public-artwork #content .ag-artwork-photo-link:focus-visible {
	outline-offset: -4px;
}

@media (hover: hover) {
	.ag-public-artwork .ag-artwork-shortcuts a:hover {
		color: #0071e3;
		background: transparent;
		text-decoration: none;
		transform: none;
	}

	.ag-public-artwork a.ag-artwork-artist:hover {
		background: #e5f2e9;
		text-decoration: none;
		transform: none;
	}

	.ag-public-artwork a.ag-artwork-gallery-button:hover {
		background: #0077ed;
		color: #fff;
		text-decoration: none;
	}
}

@media (max-width: 1000px) {
	.ag-public-artwork .ag-artwork-detail {
		grid-template-columns: minmax(0, 1fr);
	}

	.ag-public-artwork .ag-artwork-facts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	body.ag-site.ag-public-artwork {
		padding-bottom: calc(88px + env(safe-area-inset-bottom));
	}

	.ag-public-artwork #content {
		padding-top: 22px;
	}

	.ag-public-artwork .ag-artwork-shortcuts {
		display: none;
	}

	.ag-public-artwork .ag-artwork-detail {
		gap: 20px;
	}

	.ag-public-artwork .ag-artwork-info {
		padding: 22px;
	}

	.ag-public-artwork .ag-artwork-info h1 {
		font-size: 34px;
	}

	.ag-public-artwork .ag-artwork-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ag-public-artwork .ag-artwork-facts > div {
		padding: 14px;
	}

	.ag-public-artwork .ag-artwork-gallery-button {
		width: 100%;
	}

	.ag-public-artwork .ag-bottom-nav {
		display: flex;
		position: fixed;
		inset: auto 0 0;
		z-index: 100;
		justify-content: space-around;
		gap: 4px;
		padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
		border-top: 1px solid #e2e2e7;
		background: rgb(250 250 252 / 96%);
		backdrop-filter: blur(18px);
		-webkit-backdrop-filter: blur(18px);
	}

	.ag-public-artwork .ag-bottom-link {
		display: flex;
		flex: 1;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		min-height: 48px;
		padding: 4px;
		color: #606068;
		background: transparent;
		text-decoration: none;
	}

	.ag-public-artwork .ag-bottom-link .ag-icon {
		width: 22px;
		height: 22px;
	}

	.ag-public-artwork .ag-bottom-label {
		font-size: 10px;
		line-height: 1.3;
		white-space: nowrap;
	}

	.ag-public-artwork .ag-bottom-link[aria-current="page"] {
		color: #0071e3;
	}
}
/* Veliki pregled rada */

.ag-public-artwork button.ag-artwork-enlarge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	margin: 0;
	padding: 4px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #647fc0;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.ag-public-artwork button.ag-artwork-enlarge:hover {
	background: transparent;
	color: #0071e3;
}

.ag-public-artwork .ag-artwork-photo-link {
	cursor: zoom-in;
}

html.ag-lightbox-open,
html.ag-lightbox-open body {
	overflow: hidden;
}

.ag-public-artwork dialog.ag-artwork-lightbox {
	position: fixed;
	inset: 0;
	width: min(1400px, calc(100% - 40px));
	max-width: none;
	height: calc(100vh - 40px);
	height: calc(100dvh - 40px);
	max-height: none;
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 1px solid rgb(255 255 255 / 15%);
	border-radius: 24px;
	background: #171719;
	color: #fff;
	box-shadow: 0 24px 100px rgb(0 0 0 / 40%);
}

.ag-artwork-lightbox::backdrop {
	background: rgb(10 10 14 / 85%);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.ag-artwork-lightbox .ag-lightbox-panel {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	height: 100%;
	min-height: 0;
}

.ag-artwork-lightbox .ag-lightbox-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 20px;
}

.ag-artwork-lightbox .ag-lightbox-header h2 {
	min-width: 0;
	margin: 0;
	color: #f5f5f7;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.ag-artwork-lightbox button.ag-lightbox-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 1px solid rgb(255 255 255 / 18%);
	border-radius: 50%;
	background: #303034;
	color: #fff;
	cursor: pointer;
}

.ag-artwork-lightbox .ag-lightbox-close svg {
	width: 22px;
	height: 22px;
}

.ag-artwork-lightbox .ag-lightbox-close:hover {
	background: #45454a;
}

.ag-artwork-lightbox .ag-lightbox-image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	padding: 0 20px;
}

.ag-artwork-lightbox .ag-lightbox-image img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	border-radius: 0;
	object-fit: contain;
}

.ag-artwork-lightbox .ag-lightbox-author {
	max-width: none;
	margin: 0;
	padding: 14px 20px;
	color: #c5c5cc;
	font-size: 13px;
	text-align: center;
}

.ag-artwork-lightbox button:focus-visible,
.ag-public-artwork button.ag-artwork-enlarge:focus-visible {
	outline: 3px solid #2997ff;
	outline-offset: 3px;
}

@media (max-width: 760px) {
	.ag-public-artwork dialog.ag-artwork-lightbox {
		width: calc(100% - 16px);
		height: calc(100vh - 16px);
		height: calc(100dvh - 16px);
		border-radius: 18px;
	}

	.ag-artwork-lightbox .ag-lightbox-header {
		padding: 12px;
	}

	.ag-artwork-lightbox .ag-lightbox-image {
		padding-inline: 8px;
	}

	.ag-artwork-lightbox .ag-lightbox-author {
		padding-bottom: max(14px, env(safe-area-inset-bottom));
	}
}