/* Home page. Prefix hm-. Tokens from base.css. */

.hm-intro {
	background: var(--lg-mint);
	padding: 36px 0 28px;
}

.hm-intro__title {
	margin: 0 0 8px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 800;
	color: var(--lg-text);
}

.hm-intro__text {
	margin: 0 0 18px;
	color: var(--lg-text-2);
	font-size: 16px;
}

.hm-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.hm-chips__label {
	font-size: 14px;
	font-weight: 700;
	color: var(--lg-text);
}

.hm-chips__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-chip,
.hm-chip:visited {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid var(--lg-border);
	border-radius: 999px;
	background: #fff;
	color: var(--lg-text-2);
	font-size: 14px;
	text-decoration: none;
}

.hm-chip:hover {
	border-color: var(--lg-brand);
	color: var(--lg-green-dark);
}

.hm {
	padding-top: 8px;
	padding-bottom: 48px;
}

.hm-sec {
	margin-top: 40px;
}

.hm-sec__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.hm-sec__title {
	margin: 0;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 800;
	color: var(--lg-text);
}

.hm-tabs > .hm-sec__title,
.hm-sec > .hm-sec__title {
	margin-bottom: 16px;
}

.hm-sec__link,
.hm-sec__link:visited {
	flex: none;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--lg-green);
	font-size: 15px;
	font-weight: 700;
	text-underline-offset: 3px;
}

.hm-sec__link:hover {
	color: var(--lg-green-dark);
}

.hm-show-m {
	display: none;
}

/* Categories */

.hm-cats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-cat,
.hm-cat:visited {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 100%;
	min-height: 64px;
	padding: 12px 14px;
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-sm);
	background: #fff;
	color: var(--lg-text);
	text-decoration: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.hm-cat:hover {
	border-color: var(--lg-brand);
	box-shadow: 0 4px 14px rgba(29, 43, 38, .06);
}

.hm-cat__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--lg-mint);
	color: var(--lg-green);
}

.hm-cat--all .hm-cat__icon {
	background: var(--lg-peach);
	color: var(--lg-orange);
}

.hm-cat__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* Whole words ("Građevinarstvo"), hyphenated by the page language (sr-Latn) only when one does not fit. */
.hm-cat__name {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	word-break: normal;
	overflow-wrap: break-word;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.hm-cat__count {
	font-size: 13px;
	color: var(--lg-muted);
}

/* Listing grids */

.hm-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.hm-more {
	margin: 24px 0 0;
	text-align: center;
}

.hm-empty {
	padding: 32px 20px;
	border: 1px dashed var(--lg-input);
	border-radius: var(--lg-radius);
	background: #fff;
	text-align: center;
	color: var(--lg-text-2);
}

.hm-empty p {
	margin: 0 0 16px;
}

/* Tabs: the tab list appears with JavaScript, without it every panel shows */

.hm-tabs__list {
	display: flex;
	gap: 4px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--lg-border);
	overflow-x: auto;
}

.hm-tabs__list[hidden] {
	display: none;
}

.hm-tabs__tab {
	flex: none;
	min-height: 44px;
	padding: 10px 14px;
	border: 0;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	background: none;
	color: var(--lg-text-2);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.hm-tabs__tab:hover {
	color: var(--lg-green-dark);
}

.hm-tabs__tab[aria-selected="true"] {
	border-bottom-color: var(--lg-green);
	color: var(--lg-green);
	font-weight: 700;
}

.hm-tabs__panel + .hm-tabs__panel {
	margin-top: 28px;
}

.hm-tabs.is-ready .hm-tabs__panel + .hm-tabs__panel {
	margin-top: 0;
}

.hm-tabs.is-ready .hm-tabs__heading {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.hm-tabs__heading {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
}

.hm-tabs__panel:focus-visible {
	outline-offset: 6px;
	border-radius: 4px;
}

.hm-tabs__all {
	margin: 18px 0 0;
}

.hm-tabs__all a,
.hm-tabs__all a:visited {
	color: var(--lg-green);
	font-weight: 700;
	text-underline-offset: 3px;
}

/* Firms */

.hm-firms__head {
	align-items: flex-end;
}

.hm-firms__text {
	margin: 6px 0 0;
	color: var(--lg-muted);
	font-size: 16px;
	line-height: 1.5;
}

.hm-firms__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-firms__list > li {
	display: flex;
	min-width: 0;
}

.hm-firm,
.hm-firm:visited {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--lg-border);
	border-radius: 16px;
	background: #fff;
	color: var(--lg-text);
	text-decoration: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.hm-firm:hover {
	border-color: var(--lg-input);
	box-shadow: 0 6px 18px rgba(29, 43, 38, .08);
	color: var(--lg-text);
}

.hm-firm__cover {
	display: block;
	height: 96px;
	background: linear-gradient(135deg, #e9f4f0, #cfe6de);
}

.hm-firm--1 .hm-firm__cover { background: linear-gradient(135deg, #fdf0e7, #f6d9c4); }
.hm-firm--2 .hm-firm__cover { background: linear-gradient(135deg, #e6ecf2, #cbd6e2); }
.hm-firm--3 .hm-firm__cover { background: linear-gradient(135deg, #eef0e6, #d9dec8); }

.hm-firm__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hm-firm__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	margin-top: -32px;
	padding: 0 20px 20px;
}

.hm-firm__logo {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border: 1px solid var(--lg-border);
	border-radius: 14px;
	background: #fff;
	color: var(--lg-green-dark);
	font-size: 20px;
	font-weight: 800;
}

.hm-firm__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hm-firm__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
}

.hm-firm__name {
	font-size: 17px;
	font-weight: 800;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.hm-firm__badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--lg-mint);
	color: var(--lg-green-dark);
	font-size: 12px;
	font-weight: 700;
}

.hm-firm__meta {
	color: var(--lg-muted);
	font-size: 14px;
	line-height: 1.4;
}

.hm-firm__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--lg-border);
	font-size: 14px;
}

.hm-firm__count {
	font-weight: 700;
}

.hm-firm__more {
	color: var(--lg-green);
	font-weight: 700;
}

.hm-firm:hover .hm-firm__more {
	text-decoration: underline;
}

.hm-firms__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 20px;
	margin-top: 20px;
	padding: 20px 24px;
	border: 1px solid var(--lg-border);
	border-radius: 16px;
	background: #fff;
}

.hm-firms__cta-icon {
	display: flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	height: 44px;
	border-radius: 12px;
	background: #fdf0e7;
	color: var(--lg-orange);
}

.hm-firms__cta-text {
	flex: 1 1 320px;
	min-width: 0;
}

.hm-firms__cta-text h3 {
	margin: 0 0 2px;
	font-size: 16px;
	font-weight: 800;
}

.hm-firms__cta-text p {
	margin: 0;
	color: var(--lg-muted);
	font-size: 15px;
	line-height: 1.5;
}

.hm-firms__btn,
.hm-firms__btn:visited {
	background: var(--lg-green);
	color: #fff;
}

.hm-firms__btn:hover {
	background: var(--lg-green-dark);
	color: #fff;
}

/* Frequently asked questions */

.hm-faq {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 24px 48px;
	align-items: start;
}

.hm-faq__intro {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hm-faq__intro p {
	margin: 0;
	color: var(--lg-muted);
	font-size: 16px;
	line-height: 1.6;
}

.hm-faq__intro a {
	color: var(--lg-green);
	overflow-wrap: anywhere;
}

.hm-faq__intro a[href^="tel:"] {
	white-space: nowrap;
}

.hm-faq__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-weight: 700;
	text-decoration: none;
}

.hm-faq__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hm-faq__item {
	padding: 0 22px;
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius);
	background: #fff;
}

.hm-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 44px;
	padding: 18px 0;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.hm-faq__question::-webkit-details-marker {
	display: none;
}

.hm-faq__question svg {
	flex: 0 0 20px;
	color: var(--lg-green);
	transition: transform .2s ease;
}

.hm-faq__item[open] .hm-faq__question svg {
	transform: rotate(180deg);
}

.hm-faq__answer {
	margin: 0;
	padding: 0 0 20px;
	color: var(--lg-muted);
	font-size: 16px;
	line-height: 1.65;
}

.hm-faq__answer a {
	color: var(--lg-green);
}

/* Why loglasi.rs */

.hm-why {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hm-why__item {
	padding: 24px;
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius);
	background: #fff;
}

.hm-why__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: var(--lg-mint);
	color: var(--lg-green);
}

.hm-why__title {
	margin: 18px 0 8px;
	font-size: 18px;
	font-weight: 700;
}

.hm-why__item p {
	margin: 0;
	color: var(--lg-text-2);
	font-size: 15px;
	line-height: 1.6;
}

/* About */

.hm-about {
	margin-top: 40px;
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-sm);
	background: #fff;
}

.hm-about__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
	padding: 14px 20px;
	color: var(--lg-green);
	cursor: pointer;
	list-style: none;
}

.hm-about__summary::-webkit-details-marker {
	display: none;
}

.hm-about__title {
	margin: 0;
	color: var(--lg-text);
	font-size: 17px;
	font-weight: 700;
}

.hm-about[open] .hm-about__summary .lc-icon {
	transform: rotate(180deg);
}

.hm-about__text {
	padding: 0 20px 20px;
	color: var(--lg-text-2);
	line-height: 1.7;
}

.hm-about__text p {
	margin: 0 0 12px;
}

.hm-about__text p:last-child {
	margin-bottom: 0;
}

/* Smaller screens */

@media (max-width: 1100px) {
	.hm-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hm-firms__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.hm-intro {
		padding: 24px 0 20px;
	}

	.hm-intro__title {
		font-size: 24px;
	}

	.hm-intro__text {
		font-size: 15px;
	}

	.hm-chips {
		flex-wrap: nowrap;
		margin-right: calc(var(--lg-gutter) * -1);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.hm-chips::-webkit-scrollbar {
		display: none;
	}

	.hm-chips__list {
		flex-wrap: nowrap;
		padding-right: var(--lg-gutter);
	}

	.hm-chips__label {
		flex: none;
	}

	.hm-chip {
		white-space: nowrap;
	}

	.hm-sec {
		margin-top: 32px;
	}

	.hm-sec__title {
		font-size: 20px;
	}

	.hm-hide-m {
		display: none !important;
	}

	.hm-show-m {
		display: inline;
	}

	/* Phone: icon tiles, four in a row (kupujemprodajem, OLX), like "Sve kategorije". */
	.hm-cats {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 14px 6px;
	}

	.hm-cat,
	.hm-cat:visited {
		flex-direction: column;
		gap: 6px;
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
		text-align: center;
	}

	.hm-cat__icon {
		width: 100%;
		max-width: 76px;
		height: auto;
		aspect-ratio: 1;
		border: 1px solid var(--lg-border);
		border-radius: 16px;
		background: var(--lg-mint);
	}

	.hm-cat__icon svg {
		width: 28px;
		height: 28px;
	}

	.hm-cat__text {
		align-items: center;
	}

	.hm-cat__name {
		font-size: 13px;
		line-height: 1.25;
		overflow-wrap: anywhere;
	}

	.hm-cat__count {
		display: none;
	}

	.hm-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.hm-more .lg-btn {
		width: 100%;
	}

	.hm-tabs {
		display: none;
	}

	/* Firm cards scroll sideways on phones. */
	.hm-firms__list {
		display: flex;
		gap: 12px;
		margin-right: calc(var(--lg-gutter) * -1);
		margin-left: calc(var(--lg-gutter) * -1);
		padding: 0 var(--lg-gutter) 4px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 var(--lg-gutter);
		-webkit-overflow-scrolling: touch;
	}

	.hm-firms__list > li {
		flex: 0 0 78%;
		max-width: 300px;
		scroll-snap-align: start;
	}

	.hm-firms__cta {
		padding: 18px;
	}

	.hm-firms__btn {
		width: 100%;
		justify-content: center;
	}

	/* One compact list instead of six tall cards: icon on the left, text on the right. */
	.hm-why {
		grid-template-columns: 1fr;
		gap: 0;
		border: 1px solid var(--lg-border);
		border-radius: var(--lg-radius);
		background: #fff;
	}

	.hm-faq {
		grid-template-columns: 1fr;
	}

	.hm-faq__item {
		padding: 0 16px;
	}

	.hm-faq__question {
		font-size: 16px;
	}

	.hm-why__item {
		display: grid;
		grid-template-columns: 40px minmax(0, 1fr);
		column-gap: 14px;
		padding: 16px;
		border: 0;
		border-radius: 0;
		background: none;
	}

	.hm-why__item + .hm-why__item {
		border-top: 1px solid var(--lg-border);
	}

	.hm-why__icon {
		grid-row: span 2;
		width: 40px;
		height: 40px;
		border-radius: 10px;
	}

	.hm-why__icon svg {
		width: 20px;
		height: 20px;
	}

	.hm-why__title {
		margin: 0 0 2px;
		font-size: 16px;
	}

	.hm-why__item p {
		font-size: 14px;
		line-height: 1.5;
	}
}

/* Premium XL + početna: two wide cards per row, one column on phones (card: listing-card.css .lc--xl). */

.hm-premium__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

@media (max-width: 767.98px) {
	.hm-premium__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}
}



/* The open question stands out; the whole row is the button. */
.hm-faq__item {
	transition: border-color .15s ease, box-shadow .15s ease;
}

.hm-faq__item:hover {
	border-color: #c9d6cf;
}

.hm-faq__item[open] {
	border-color: var(--lg-green);
	box-shadow: 0 4px 16px rgba(16, 24, 20, .06);
}

.hm-faq__question {
	cursor: pointer;
}

.hm-faq__item[open] .hm-faq__question {
	color: var(--lg-green);
}

/* Main categories: 6 tiles in one row, 3 x 2 on phones (same as the apps) */
.hm-main { margin: 20px 0 8px; }
.hm-main__list {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.hm-main__tile,
.hm-main__tile:visited {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 100%;
	min-height: 132px;
	padding: 16px 8px;
	border: 1px solid var(--lg-border);
	border-radius: 16px;
	background: #fff;
	color: var(--lg-text);
	text-align: center;
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hm-main__tile:hover { border-color: var(--lg-green); box-shadow: 0 6px 18px rgba(23, 60, 49, .08); transform: translateY(-1px); }
.hm-main__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 18px;
	background: var(--lg-mint);
	color: var(--lg-green);
}
.hm-main__name { font-size: 16px; font-weight: 800; line-height: 1.25; }
.hm-main__count { color: var(--lg-muted); font-size: 13px; }

/* Tile colours (same names in the API and the apps). Besplatne stvari is red and stands out on purpose. */
.hm-main__tile--blue .hm-main__icon { background: #e8f0fb; color: #2563a8; }
.hm-main__tile--orange .hm-main__icon { background: #fdf0e6; color: #b8501a; }
.hm-main__tile--violet .hm-main__icon { background: #f1edfb; color: #6b4fbb; }
.hm-main__tile--teal .hm-main__icon { background: #e6f5f3; color: #1f7a6d; }
.hm-main__tile--gray .hm-main__icon { background: #f1f4f2; color: #3f4a45; }
.hm-main__tile--red,
.hm-main__tile--red:visited { border-color: #f4b4b4; background: #fdecec; }
.hm-main__tile--red .hm-main__icon { background: #e5383b; color: #fff; box-shadow: 0 6px 14px rgba(229, 56, 59, .28); }
.hm-main__tile--red .hm-main__name { color: #b4232a; }
.hm-main__tile--red:hover { border-color: #e5383b; box-shadow: 0 8px 22px rgba(229, 56, 59, .16); }
.hm-main__tagline { margin-bottom: -4px; color: #b4232a; font-size: 12px; font-weight: 700; letter-spacing: .02em; }

/* Popularno: round icons in a grid (4 per row on phones), no sideways scrolling */
.hm-pop__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	gap: 16px 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.hm-pop__item,
.hm-pop__item:visited {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: var(--lg-text);
	text-align: center;
	text-decoration: none;
}
.hm-pop__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border: 1.5px solid #cfe3da;
	border-radius: 50%;
	background: #fff;
	color: var(--lg-green);
	transition: border-color .15s, background .15s;
}
.hm-pop__item:hover .hm-pop__icon { border-color: var(--lg-green); background: var(--lg-mint); }
/* Each popular category in the colour of its group (lg-tone--*) */
.hm-pop__icon[class*="lg-tone--"] { border-color: var(--tone-line); background: var(--tone-bg); color: var(--tone); }
.hm-pop__item:hover .hm-pop__icon[class*="lg-tone--"] { border-color: var(--tone); background: var(--tone-bg); }
.hm-pop__name { font-size: 14px; line-height: 1.3; }

@media (max-width: 767.98px) {
	.hm-main { margin-top: 14px; }
	.hm-main__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.hm-main__tile { min-height: 112px; padding: 12px 4px; border-radius: 14px; }
	.hm-main__icon { width: 48px; height: 48px; border-radius: 14px; }
	.hm-main__icon svg { width: 28px; height: 28px; }
	.hm-main__name { font-size: 14px; }
	.hm-main__count { font-size: 12px; }
	.hm-pop__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
	.hm-pop__icon { width: 56px; height: 56px; }
	.hm-pop__name { font-size: 13px; overflow-wrap: break-word; hyphens: auto; }
}
@media (max-width: 767.98px) {
	.hm-intro { padding: 18px 0 14px; }
	.hm-intro__title { font-size: 22px; }
	.hm-intro__text { margin-bottom: 0; font-size: 15px; }
}
@media (max-width: 767.98px) {
	.hm-main__tile { gap: 4px; }
	.hm-main__name { font-size: 13.5px; }
	.hm-main__tagline { font-size: 11px; white-space: nowrap; margin-bottom: -2px; }
}
