/*
 * Service detail pages — layout & section primitives.
 *
 * Typography baselines (font-family, body size/weight/line-height, link styles)
 * come from global.css. This file handles layout, spacing, backgrounds, and
 * section-specific sizing only. Color values reference the tokens declared in
 * global.css `:root` — no raw hex values here.
 */

/* --- Overlay header (matches homepage placement) ------------- */
.page-template-page-services .site-header {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 10;
}

.page-template-page-services .site-main {
	margin-top: 0;
	overflow-x: clip;
}

/* --- Hero ----------------------------------------------------- */
.service-hero {
	position: relative;
	min-height: 480px;
	padding: 200px 0 96px;
	background-color: var(--color-ink);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	color: #fff;
	overflow: hidden;
}

.service-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.25) 100%);
	pointer-events: none;
}

/* Align hero content edges with the header pill (1176px content area + 24px gutters). */
.service-hero > .container {
	max-width: 1224px;
	padding-right: 24px;
	padding-left: 24px;
}

.service-hero__inner {
	position: relative;
}

.service-hero__title {
	max-width: 720px;
	margin: 0 0 24px;
	font-size: 56px;
	line-height: 1.1;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #fff;
}

.service-hero__text {
	max-width: 540px;
	margin: 0 0 32px;
	font-size: 17px;
	line-height: 28px;
	color: #fff;
}

/* --- Content row --------------------------------------------- */
.service-content {
	padding: 64px 0 96px;
}

.service-content__row {
	row-gap: 32px;
}

/* --- Sidebar (left-column service nav) -----------------------
 * Typography baselines from Figma nodes 64:6162 (header) and 64:6168
 * (items): Tahoma Bold, 20/32 with 1px tracking for the header, 12/18
 * with 1px tracking for items, all uppercase. Active state is red
 * text on the same white background — no fill swap.
 */
.service-sidebar {
	border: 1px solid #c3c3c3;
	border-radius: var(--radius-md);
	background: #fff;
	overflow: hidden;
}

.service-sidebar__header {
	padding: 16px 24px;
	background: var(--color-brand-red);
}

.service-sidebar__title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 20px;
	font-weight: 700;
	line-height: 32px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #fff;
}

.service-sidebar__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.service-sidebar__item {
	border-bottom: 1px solid #c3c3c3;
}

.service-sidebar__item:last-child {
	border-bottom: 0;
}

.service-sidebar__link {
	display: block;
	padding: 16px 24px;
	font-family: var(--font-heading);
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--color-ink);
	text-decoration: none;
	transition: color 160ms ease;
}

.service-sidebar__link:hover,
.service-sidebar__link:focus {
	color: var(--color-brand-red);
}

.service-sidebar__item.is-active .service-sidebar__link {
	color: var(--color-brand-red);
}

.service-sidebar__link--static {
	cursor: default;
}

/* --- Section primitives -------------------------------------- */
.service-section {
	margin-bottom: 72px;
}

.service-section:last-child {
	margin-bottom: 0;
}

.service-section__title {
	margin: 0 0 24px;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 28px;
	line-height: 39px;
	letter-spacing: 2px;
	color: var(--color-ink);
	text-transform: uppercase;
}

.service-section__lead {
	margin: 0 0 32px;
	color: var(--color-text-muted);
}

.service-section .cta {
	margin-top: 32px;
}

/* --- Intro --------------------------------------------------- */
.service-intro__media {
	margin: 32px 0 0;
}

.service-intro__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-md);
}

.service-intro__pdf {
	margin: 32px 0 0;
}

/* --- Uz Agent Plus (title + intro outside, red panel with 4 stacked cards)
 * Figma anchors: title 65:2 (Tahoma 28/39, +2px, uppercase, #0a0a0a),
 * card title 65:6 (Tahoma 22/24, +1px, uppercase, white), card body 65:4
 * (Myriad 16/26, white), panel bg 65:96 (#bb2548, radius 10px), CTA 65:99
 * uses the existing .cta--light variant.
 */
.service-uz__title {
	margin: 0 0 16px;
	font-family: var(--font-heading);
	font-size: 28px;
	font-weight: 700;
	line-height: 39px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--color-ink);
}

.service-uz__lead {
	margin: 0 0 32px;
	color: var(--color-text-muted);
}

.service-uz__panel {
	padding: 48px 48px 40px;
	border-radius: var(--radius-md);
	background: var(--color-brand-red);
	color: #fff;
}

.service-uz__cards {
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 32px;
}

.service-uz__card {
	margin: 0;
	padding: 0;
}

.service-uz__card-title {
	margin: 0 0 8px;
	font-family: var(--font-heading);
	font-size: 22px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #fff;
}

.service-uz__card-body {
	margin: 0;
	color: #fff;
}

/* --- Proces (4 process steps with thumbnails) --------------- */
.service-proces__steps {
	margin: 0;
	padding: 0;
	list-style: none;
}

.service-proces__step {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 28px;
	padding: 20px 0;
	border-bottom: 1px solid var(--color-bg-muted);
}

.service-proces__step:first-child {
	padding-top: 0;
}

.service-proces__step:last-child {
	border-bottom: 0;
}

.service-proces__media {
	border-radius: var(--radius-md);
	overflow: hidden;
}

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

.service-proces__title {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 28px;
	color: var(--color-ink);
}

.service-proces__text {
	margin: 0;
	color: var(--color-text-muted);
}

.service-proces__footnote {
	margin: 24px 0 0;
	font-style: italic;
	color: #424242;
}

/* --- Zašto izabrati (title outside, red panel with 5 reasons + centered CTA)
 * Figma anchors: title 65:155 (Tahoma 28/39, +2px, uppercase, #0a0a0a),
 * panel bg 74:602 (#bb2548, radius 10px), item title 66:162 (Tahoma 18/24,
 * +1px, uppercase, white), item body 66:161 (Myriad 16/26, white). Icons
 * are white circles with a red check inside.
 */
.service-zasto__title {
	margin: 0 0 16px;
	font-family: var(--font-heading);
	font-size: 28px;
	font-weight: 700;
	line-height: 39px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--color-ink);
}

.service-zasto__lead {
	margin: 0 0 32px;
	color: var(--color-text-muted);
}

.service-zasto__panel {
	padding: 48px;
	border-radius: var(--radius-md);
	background: var(--color-brand-red);
	color: #fff;
}

.service-zasto__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 24px;
}

.service-zasto__item {
	display: grid;
	grid-template-columns: 35px 1fr;
	gap: 18px;
	align-items: start;
}

.service-zasto__icon {
	display: block;
	width: 35px;
	height: 35px;
	flex: 0 0 35px;
}

.service-zasto__copy {
	min-width: 0;
}

.service-zasto__item-title {
	margin: 0 0 6px;
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #fff;
}

.service-zasto__item-body {
	margin: 0;
	color: #fff;
}

.service-zasto__panel .cta {
	margin-top: 32px;
}

.service-zasto__note {
	margin: 24px 0 0;
	font-style: italic;
	color: var(--color-text-muted);
}

.service-uz__note {
	margin: 24px 0 0;
	font-style: italic;
	color: var(--color-text-muted);
}

/* --- Ključni elementi (title + lead + image outside; red panel with
 * 5 stacked cards + CTA inside).
 * Figma anchors: title 66:189 (Tahoma 28/39, +2px, uppercase, #0a0a0a),
 * panel bg 74:603 (#bb2548, radius 10px), card title 66:195 (Tahoma 22/24,
 * +1px, uppercase, white), card body 66:194 (Myriad 16/26, white), CTA
 * uses .cta--light at the bottom of the panel.
 */
.service-kljucni__title {
	margin: 0 0 16px;
	font-family: var(--font-heading);
	font-size: 28px;
	font-weight: 700;
	line-height: 39px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--color-ink);
}

.service-kljucni__lead {
	margin: 0 0 24px;
	color: var(--color-text-muted);
}

.service-kljucni__media {
	margin: 0 0 32px;
}

.service-kljucni__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-md);
}

.service-kljucni__panel {
	padding: 48px;
	border-radius: var(--radius-md);
	background: var(--color-brand-red);
	color: #fff;
}

.service-kljucni__list {
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 24px;
}

.service-kljucni__item {
	padding-bottom: 0;
}

.service-kljucni__item-title {
	margin: 0 0 8px;
	font-family: var(--font-heading);
	font-size: 22px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #fff;
}

.service-kljucni__item-body {
	margin: 0;
	color: #fff;
}

.service-kljucni__panel .cta {
	margin-top: 0;
}

/* --- Dodatne usluge (bordered cards, no red panel) ----------- */
.service-dodatne__title {
	margin: 0 0 16px;
	font-family: var(--font-heading);
	font-size: 28px;
	font-weight: 700;
	line-height: 39px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--color-ink);
}

.service-dodatne__lead {
	margin: 0 0 32px;
	color: var(--color-text-muted);
}

.service-dodatne__cards {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.service-dodatne__card {
	padding: 24px 28px;
	border: 1px solid #c3c3c3;
	border-radius: var(--radius-md);
	background: transparent;
}

.service-dodatne__card-title {
	margin: 0 0 8px;
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--color-ink);
}

.service-dodatne__card-body {
	margin: 0;
	color: var(--color-text-muted);
}

/* --- FAQ (native <details> accordion) -----------------------
 * Figma anchors: title 66:210 (Tahoma 28/39, +2px, uppercase, #0a0a0a),
 * question 66:213 (Tahoma 18/24, +1px, uppercase, #0a0a0a), answer 66:212
 * (Myriad 16/26, #424242). Borders #C3C3C3. Indicator is a black "+"
 * that rotates 45° to an "×" when open. Open/close uses the modern
 * ::details-content pseudo + interpolate-size for a smooth slide;
 * browsers without support fall back to instant open/close.
 */
.service-faq__title {
	margin: 0 0 24px;
	font-family: var(--font-heading);
	font-size: 28px;
	font-weight: 700;
	line-height: 39px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--color-ink);
}

.service-faq__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.service-faq__item {
	border-bottom: 1px solid #c3c3c3;
}

.service-faq__item:first-child {
	border-top: 1px solid #c3c3c3;
}

.service-faq__details {
	padding: 0;
	interpolate-size: allow-keywords;
}

.service-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 22px 0;
	cursor: pointer;
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--color-ink);
	list-style: none;
}

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

.service-faq__indicator {
	position: relative;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	transition: transform 280ms ease;
}

.service-faq__indicator::before,
.service-faq__indicator::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	background: #0a0a0a;
	transform: translate(-50%, -50%);
}

.service-faq__indicator::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.service-faq__details[open] .service-faq__indicator {
	transform: rotate(45deg);
}

.service-faq__answer {
	padding: 0 56px 24px 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 26px;
	color: #424242;
}

.service-faq__answer > div {
	margin: 0;
}

/* Smooth slide-open: modern browsers (Chrome 131+, Safari 18.2+).
 * Older browsers ignore these properties and open/close instantly. */
.service-faq__details::details-content {
	block-size: 0;
	overflow: clip;
	opacity: 0;
	transition:
		block-size 320ms ease,
		opacity 240ms ease,
		content-visibility 320ms allow-discrete;
}

.service-faq__details[open]::details-content {
	block-size: auto;
	opacity: 1;
}

/*
 * --- Naše poslovnice (inner pages) ---------------------------
 *
 * Lives inside .service-content__main (col-lg-8). Two-up grid on desktop
 * matches Figma frame `64:5557` y=7316–7700: Beograd + Novi Sad share row 1,
 * Niš sits alone on row 2 left. Submit-button → branch-title gap = 43px in
 * Figma; previous .service-section adds 72px margin-bottom by default, so we
 * pull the section up by 29px to land at the intended 43px.
 */
.service-poslovnice {
	margin-top: -29px;
}

.service-poslovnice__title {
	margin: 0 0 24px;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 28px;
	line-height: 39px;
	letter-spacing: 2px;
	color: var(--color-ink);
	text-transform: uppercase;
}

.service-poslovnice__branches {
	--bs-gutter-x: 16px;
	--bs-gutter-y: 49px;
}

.service-poslovnice__branch {
	display: flex;
	flex-direction: column;
}

.service-poslovnice__branch-title {
	margin: 0 0 12px;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 18px;
	line-height: 30px;
	letter-spacing: 1px;
	color: var(--color-ink);
	text-transform: uppercase;
}

.service-poslovnice__contact {
	margin: 0 0 20px;
}

.service-poslovnice__contact dd {
	display: flex;
	flex-direction: column;
	margin: 0;
	color: #6a6a6a;
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 18px;
	line-height: 26px;
}

.service-poslovnice__phone-link,
.service-poslovnice__email-link {
	color: #6a6a6a;
	text-decoration: none;
	transition: color 180ms ease;
}

.service-poslovnice__phone-link:hover,
.service-poslovnice__phone-link:focus,
.service-poslovnice__email-link:hover,
.service-poslovnice__email-link:focus {
	color: var(--color-brand-red);
}

.service-poslovnice__link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 12px;
	margin-top: auto;
	color: var(--color-ink);
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.5px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 180ms ease;
}

.service-poslovnice__link:hover,
.service-poslovnice__link:focus {
	color: var(--color-brand-red);
	text-decoration: none;
}

.service-poslovnice__link-icon {
	position: relative;
	display: block;
	width: 15px;
	height: 15px;
	flex: 0 0 15px;
}

.service-poslovnice__link-icon::before,
.service-poslovnice__link-icon::after {
	position: absolute;
	background: currentColor;
	content: "";
}

.service-poslovnice__link-icon::before {
	top: 50%;
	left: 0;
	width: 15px;
	height: 1.5px;
	transform: translateY(-50%);
}

.service-poslovnice__link-icon::after {
	top: 0;
	left: 50%;
	width: 1.5px;
	height: 15px;
	transform: translateX(-50%);
}

/* --- Responsive --------------------------------------------- */
@media screen and (max-width: 991px) {
	/*
	 * Bootstrap's default container gutter (12px each side) is too tight on
	 * tablets — text hits the screen edges. Scope the override to the service
	 * sections only; the header/footer containers manage their own padding.
	 */
	.service-hero > .container,
	.container.service-content {
		padding-right: 24px;
		padding-left: 24px;
	}

	/* Match the 708px header pill width — content edges align with the pill. */
	.service-hero > .container {
		max-width: 756px;
	}

	.service-hero {
		min-height: 360px;
		padding: 160px 0 72px;
	}

	.service-hero__title {
		font-size: 40px;
	}

	.service-content {
		padding: 48px 0 72px;
	}

	.service-content__aside {
		margin-top: 32px;
	}

	.service-section {
		margin-bottom: 56px;
	}

	.service-section__title {
		font-size: 26px;
		line-height: 34px;
	}

	.service-uz__title,
	.service-zasto__title,
	.service-kljucni__title,
	.service-faq__title {
		font-size: 24px;
		line-height: 32px;
		letter-spacing: 1.5px;
	}

	.service-uz__card-title,
	.service-kljucni__item-title {
		font-size: 20px;
		line-height: 24px;
	}

	.service-zasto__item-title {
		font-size: 17px;
		line-height: 22px;
	}

	.service-uz__panel,
	.service-zasto__panel,
	.service-kljucni__panel {
		padding: 28px 24px;
	}

	.service-proces__step {
		grid-template-columns: 140px 1fr;
		gap: 20px;
	}
}

@media screen and (max-width: 599px) {
	.service-hero {
		padding: 132px 0 56px;
	}

	.service-hero__title {
		font-size: 30px;
		line-height: 36px;
	}

	.service-hero__text {
		font-size: 15px;
		line-height: 24px;
	}

	.service-content {
		padding: 36px 0 56px;
	}

	.service-section {
		margin-bottom: 44px;
	}

	.service-section__title {
		font-size: 22px;
		line-height: 30px;
	}

	.service-uz__title,
	.service-zasto__title,
	.service-kljucni__title,
	.service-faq__title {
		font-size: 20px;
		line-height: 28px;
		letter-spacing: 1px;
	}

	.service-uz__card-title,
	.service-kljucni__item-title {
		font-size: 18px;
		line-height: 22px;
	}

	.service-zasto__item-title {
		font-size: 16px;
		line-height: 20px;
	}

	.service-uz__panel,
	.service-zasto__panel,
	.service-kljucni__panel {
		padding: 24px 18px;
	}

	.service-proces__step {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.service-proces__media {
		max-width: 240px;
	}

	.service-faq__question {
		font-size: 15px;
		line-height: 22px;
	}

	.service-poslovnice {
		margin-top: 0;
	}

	.service-poslovnice__title {
		font-size: 20px;
		line-height: 28px;
		letter-spacing: 1px;
	}

	.service-poslovnice__branches {
		--bs-gutter-y: 32px;
	}

	.service-poslovnice__branch-title {
		font-size: 16px;
		line-height: 24px;
	}

	.service-poslovnice__contact dd {
		font-size: 16px;
		line-height: 24px;
	}
}
