/* Reklamni tekstualni blokovi — javni prikaz */

.ag-site .htb-block {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: stretch;
	gap: 0;
	margin: 0 0 clamp(36px, 6vw, 72px);
	padding: 0;
	overflow: hidden;
	border: 1px solid rgba(29, 29, 31, 0.05);
	border-radius: 28px;
	color: #1d1d1f;
	box-shadow: 0 12px 32px rgba(29, 29, 31, 0.035);
}

.ag-site .htb-tone-white {
	background: #fff;
}

.ag-site .htb-tone-green {
	background: #edf7f1;
}

.ag-site .htb-tone-blue {
	background: #eef4fc;
}

.ag-site .htb-tone-peach {
	background: #fff5e9;
}

.ag-site .htb-tone-purple {
	background: #f4effb;
}

.ag-site .htb-with-image {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ag-site .htb-copy {
	min-width: 0;
	align-self: center;
	padding: clamp(26px, 4vw, 64px);
}

.ag-site .htb-image-right .htb-picture {
	grid-column: 2;
	grid-row: 1;
}

.ag-site .htb-image-right .htb-copy {
	grid-column: 1;
	grid-row: 1;
}

.ag-site .htb-without-image .htb-copy {
	grid-column: 1;
}

.ag-site .htb-picture {
	min-width: 0;
	min-height: 360px;
	position: relative;
}

.ag-site .htb-picture img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.ag-site .htb-eyebrow {
	max-width: none;
	margin: 0 0 16px;
	color: #477760;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}

.ag-site .htb-copy h2 {
	max-width: 24ch;
	margin: 0 0 20px;
	color: #1d1d1f;
	font-size: clamp(28px, 3.5vw, 48px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.035em;
	word-break: normal;
	overflow-wrap: break-word;
}

.ag-site .htb-description {
	max-width: 54ch;
	margin: 0 0 26px;
	color: #62626a;
	font-size: clamp(16px, 1.5vw, 20px);
	line-height: 1.6;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.ag-site a.htb-button,
.ag-site a.htb-button:visited,
.ag-site a.htb-button:hover,
.ag-site a.htb-button:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-height: 44px;
	max-width: 100%;
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	background: #0071e3;
	color: #fff;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	transform: none;
	transition: background 180ms ease;
}

.ag-site a.htb-button:hover {
	background: #0065cc;
}

.ag-site a.htb-button:focus-visible {
	outline: 3px solid #0071e3;
	outline-offset: 4px;
}

.ag-site .htb-page-title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Admin */

.ag-site.htb-admin {
	background: #e8ecf2;
}

.ag-site .htb-shortcuts {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin-bottom: 28px;
}

.ag-site .htb-shortcuts a,
.ag-site .htb-shortcuts a:hover,
.ag-site .htb-edit-link,
.ag-site .htb-edit-link:hover {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	width: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: #0071e3;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	text-decoration: none;
	white-space: nowrap;
	transform: none;
}

.ag-site .htb-shortcuts svg,
.ag-site .htb-edit-link svg {
	flex: 0 0 19px;
	width: 19px;
	height: 19px;
}

.ag-site .htb-panel {
	margin-block: 24px;
	padding: clamp(20px, 3vw, 36px);
	border: 1px solid #e0e3e8;
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(30, 40, 60, 0.035);
	scroll-margin-top: 100px;
}

.ag-site .htb-panel > h2 {
	margin: 0 0 24px;
}

.ag-site .htb-list > summary {
	color: #477760;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
}

.ag-site .htb-list[open] > summary {
	margin-bottom: 24px;
}

.ag-site .htb-admin-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.ag-site .htb-list-item {
	min-width: 0;
	padding: 22px;
	border: 1px solid #e1e7ed;
	border-radius: 18px;
	background: #f7f9fc;
}

.ag-site .htb-list-item h2 {
	margin-top: 0;
	font-size: 18px;
	overflow-wrap: anywhere;
}

.ag-site .htb-editor {
	display: grid;
	gap: 24px;
	width: 100%;
	max-width: none;
}

.ag-site .htb-editor fieldset {
	display: grid;
	gap: 18px;
	min-width: 0;
	margin: 0;
	padding: 22px;
	border: 1px solid #dfe6ee;
	border-radius: 20px;
	background: #f7f9fc;
}

.ag-site .htb-editor legend {
	padding-inline: 8px;
	color: #477760;
	font-weight: 600;
}

.ag-site .htb-editor input:not([type="checkbox"]),
.ag-site .htb-editor select,
.ag-site .htb-editor textarea {
	width: 100%;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid #c8cdd5;
	border-radius: 12px;
	background: #fff;
	color: #1d1d1f;
	font: inherit;
}

.ag-site .htb-editor small {
	color: #6b7078;
}

.ag-site .htb-checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 400;
}

.ag-site .htb-checkbox input {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin: 0;
}

.ag-site button.htb-save,
.ag-site button.htb-save:hover,
.ag-site button.htb-save:focus {
	width: fit-content;
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	background: #0071e3;
	color: #fff;
	font-size: 14px;
	font-weight: 400;
	white-space: nowrap;
}

.ag-site button.htb-save:hover {
	background: #0065cc;
}

.ag-site .htb-notice {
	max-width: none;
	padding: 18px 22px;
	border-radius: 18px;
	background: #e9f5ee;
	color: #35664e;
}

.ag-site .htb-error {
	background: #fff0f0;
	color: #963e3e;
}

@media (max-width: 700px) {
	.ag-site .htb-with-image,
	.ag-site .htb-admin-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ag-site .htb-block {
		border-radius: 22px;
	}

	.ag-site .htb-block .htb-picture {
		grid-column: 1;
		grid-row: 1;
		min-height: 0;
		aspect-ratio: 4 / 3;
	}

	.ag-site .htb-with-image .htb-copy {
		grid-column: 1;
		grid-row: 2;
	}

	.ag-site .htb-copy {
		padding: 26px 20px;
	}

	.ag-site .htb-copy h2 {
		font-size: clamp(27px, 7vw, 36px);
	}

	.ag-site .htb-description {
		font-size: 16px;
	}

	.ag-site .htb-editor fieldset {
		padding: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ag-site a.htb-button {
		transition: none;
	}
}