/* Page-level spacing between blocks and at page end — measured per Figma page (desktop / mobile). */

/* Home: hero stage ends 897 (desktop) / 908 (mobile) → section labels at 927 / 940. */
.rn-main__body > .rn-columns:first-child {
	margin-top: 32px;
}
/* Home: columns end 2100 → footer 2147 (desktop); 2678 → 2706 (mobile). */
.rn-main__body > .rn-columns:last-child {
	padding-bottom: 28px;
}
/* Mobile: everything sits on the fixed 24px gutter (2026-08-21) — the per-frame Figma x-quirks
   (Zdravniki 53, 404 50/26/15) are intentionally normalised away below 900px. */

/* Legal pages: text end → footer (789 → 929 desktop; ≈41 mobile). Pogoji uporabe has no aside, so its
   last block is a plain .rn-wrap — same spacing there (popravki točka 14). */
.rn-main__body > .rn-columns--aside-before_all:last-child,
.rn-legal .rn-main__body > .rn-wrap:last-child {
	padding-bottom: 41px;
}
/* Legal page mobile: button (335–383) → text 417. */
.rn-columns--aside-before_all .rn-text {
	margin-top: 34px;
}
/* Vaš obisk: page header → columns (the gallery carries its own 26/16 top margin); the aside starts level with
   the gallery on desktop (626) and 48px under the steps on mobile (3311). */
.rn-page-header + .rn-columns {
	margin-top: 0;
}
.rn-page-header + .rn-columns .rn-columns__aside > .rn-ainfo:first-child {
	margin-top: 48px;
}
/* Vaš obisk: map end → footer (3165 → 3177 / 5298 → 5306). */
.rn-main__body > .rn-map:last-child {
	padding-bottom: 8px;
}
/* Storitve: last card 2123 → footer 2187 (mobile) / 1503 → 1567 (desktop). */
.rn-main__body .rn-services--cards:last-child,
.rn-main__body > .rn-wrap:last-child .rn-services--cards {
	padding-bottom: 64px;
}
/* Zdravniki: last card 2774 → footer 2829 (mobile) / 1467 → 1537 (desktop). */
.rn-main__body .rn-doctors--grid:last-child,
.rn-main__body > .rn-wrap:last-child .rn-doctors--grid {
	padding-bottom: 55px;
}
/* Zdravniki: "Ostali zdravniki in sodelavci" as the last block — list end 3661 → footer 3693 (mobile) / 1898 → 1941 (desktop). */
.rn-main__body > .rn-wrap:last-child .rn-staff {
	padding-bottom: 32px;
}
/* Grid followed by another page block (e.g. the staff list): no page-end padding — the next block sets the gap.
   (0,4,0) beats the :last-child rules above and in the desktop media query. */
.rn-main__body > .rn-wrap:not(:last-child) .rn-doctors--grid {
	padding-bottom: 0;
}
/* Cenik: table end → footer 1727 → 1799 (mobile) / 1555 → 1651 (desktop). */
.rn-main__body > .rn-wrap:last-child .rn-pricelist {
	padding-bottom: 72px;
}

/* Band / intro nested in the main column (Naročite se, Hvala, 404): they span the column, not the page column. */
.rn-columns__main .rn-col {
	margin-left: 0;
	margin-right: 0;
}
/* Focused pages (Naročite se, Hvala, 404): band inside the main column (570 wide); aside top-aligned with the band. */
.rn-layout-focused .rn-main__body > .rn-columns:first-child {
	margin-top: 0;
}
.rn-layout-focused .rn-main__body > .rn-columns:last-child {
	padding-bottom: 0;                  /* the light footer carries the content → shadow distance */
}
/* Mobile: aside follows the main column — 63px under the form panel (106:1606), phones directly after the text (154:821). */
.rn-layout-focused .rn-columns__aside > .rn-ainfo:first-child {
	margin-top: 63px;
}
.rn-layout-focused .rn-columns__aside > .rn-ainfo--phones:first-child {
	margin-top: 0;
}

@media (min-width: 900px) {
	.rn-columns .rn-band {
		padding-top: 119px;             /* title at 256 in a band at 137 (81:1133, 154:730) */
	}
	.rn-columns .rn-band:has(.rn-band__eyebrow) {
		padding-top: 90px;              /* 404: eyebrow 227, title 265 (116:2197) */
	}
	.rn-layout-focused .rn-columns__aside {
		padding-top: 11px;              /* aside label at 137 = band top (81:1133, 116:2197) */
	}
	.rn-page-header + .rn-columns .rn-columns__aside > .rn-ainfo:first-child {
		margin-top: 26px;
	}
	.rn-layout-focused .rn-columns__aside > .rn-ainfo:first-child {
		margin-top: 0;
	}
	.rn-layout-focused .rn-columns__aside > .rn-ainfo--phones:first-child {
		margin-top: 213px;              /* Hvala: phones at 350, aligned with the text (154:730) */
	}
	.rn-main__body > .rn-columns:first-child {
		margin-top: 30px;
	}
	.rn-main__body > .rn-columns:last-child {
		padding-bottom: 47px;
	}
	.rn-main__body > .rn-map:last-child {
		padding-bottom: 12px;
	}
	.rn-main__body > .rn-columns--aside-before_all:last-child,
	.rn-legal .rn-main__body > .rn-wrap:last-child {
		padding-bottom: 140px;
	}
	.rn-columns--aside-before_all .rn-text {
		margin-top: 21px;
	}
	.rn-main__body .rn-doctors--grid:last-child,
	.rn-main__body > .rn-wrap:last-child .rn-doctors--grid {
		padding-bottom: 70px;
	}
	.rn-main__body > .rn-wrap:last-child .rn-staff {
		padding-bottom: 43px;
	}
	.rn-main__body > .rn-wrap:last-child .rn-pricelist {
		padding-bottom: 96px;
	}
	/* Page header without an illustration at the top of a page (Cenik 338:1567): the lead keeps the design
	   width (569 of 878) — the same proportion as next to an illustration. Legal pages have no lead; the focused
	   pages nest the header inside columns, so neither is affected. */
	.rn-main__body > .rn-page-header--illu-none .rn-page-header__lead {
		max-width: calc(66% - 10px);
	}
}

/* ---------- Single service (80:489 / 106:1256) ---------- */
.rn-service__layout {
	display: flex;
	flex-direction: column;
}
.rn-service__main {
	display: contents;
}
.rn-service__lead {
	order: 1;
	margin: 15px 0 0;                   /* band 313 → lead 328 (24px gutter) */
	color: var(--c-antracit);
}
.rn-service__lead + .rn-rule {
	order: 2;
	margin: 26px 0 0;
}
.rn-service__aside {
	order: 3;
	margin-top: 24px;                   /* rule 846 → aside 870 */
}
.rn-service__content {
	order: 4;
	margin: 30px 0 0;                   /* aside end 1186 → text 1216 (24px gutter) */
	line-height: var(--lh-long);
}
.rn-service__content > * + * {
	margin-top: 12px;
}
.rn-service__aside .rn-label {
	min-height: 0;
	color: var(--c-pink);
}
.rn-service__benefits {
	margin-top: 14px;                   /* title (2 lines ≈ 38) → list +52 */
	font-weight: var(--fw-bold);
	color: var(--c-antracit);
}
.rn-service__benefits li {
	position: relative;
	padding-left: 14px;                 /* bullet 6px at x, text at +14 */
}
.rn-service__benefits li + li {
	margin-top: 8px;
}
/* "Izvajamo v naslednjih ambulantah" (popravki 316:3591 / 316:3592): benefits end 689.8 → label 727 → list 776;
   place name bold link colour, treatment note regular under it, places 8 apart. */
.rn-service__places {
	margin-top: 37px;
}
.rn-service__places:first-child {
	margin-top: 0;
}
.rn-service__places-list {
	margin-top: 11.5px;                 /* label (2 lines, 37.5) → list +49 */
	color: var(--c-antracit);
}
.rn-service__places-list li + li {
	margin-top: 8px;
}
.rn-service__place-name,
.rn-service__place-note {
	display: block;
}
.rn-service__place-name {
	width: fit-content;                 /* the link underline runs under the name only */
	font-weight: var(--fw-bold);
	color: var(--c-link);
}
.rn-service__benefits li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;                           /* ellipse 474 vs line top 465 */
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--c-pink);
}
.rn-doctor .rn-main__body,
.rn-service .rn-main__body {
	padding-bottom: 0;
}
.rn-main__body > .rn-service:last-child,
.rn-main__body > .rn-doctor:last-child {
	padding-bottom: 50px;               /* text end 1202 → footer 1252 */
}

/* ---------- Single doctor (42:69; mobile frame pending) ---------- */
.rn-doctor__layout {
	display: flex;
	flex-direction: column;
}
.rn-doctor__text {
	margin: 15px 0 0;
}
.rn-doctor__portrait {
	margin-top: 24px;
	width: 100%;                            /* mobile: full text-column width (popravki točka 17) */
	aspect-ratio: 261 / 279;
	background: var(--c-card);
	overflow: hidden;
}
.rn-doctor__portrait img {
	width: 100%;
	height: 100%;
	object-fit: contain;                    /* whole portrait always visible (21. 8.) */
}

/* ---------- 404 (116:2197 / 118:2309) ---------- */
.rn-404__lead {
	margin: 15px 0 0;
	color: var(--c-antracit);
}
.rn-404__lead + .rn-rule {
	margin: 26px 0 0;
}
.rn-404__text {
	margin: 23px 0 0;
}
.rn-404__aside {
	margin-top: 24px;
}
.rn-404__aside-title {
	padding-bottom: 18px;               /* label (19) at 137 → line 174 */
	border-bottom: 1px solid var(--c-pink);
	font-size: var(--fs-small);
	font-weight: var(--fw-semibold);
	letter-spacing: var(--ls-caps);
	line-height: normal;
	text-transform: uppercase;
	color: var(--c-pink);
}
.rn-404__aside-text {
	margin-top: 18px;                   /* line 174 → list 192 */
	font-weight: var(--fw-bold);
}
.rn-404__aside-text ul {
	padding-left: 11px;                 /* ul at 809, column at 820 */
	list-style: disc outside;
}
.rn-404__aside-text a {
	color: var(--c-link);
}
.rn-main__body > .rn-404:last-child {
	padding-bottom: 41px;
}

@media (min-width: 900px) {
	.rn-service__layout,
	.rn-doctor__layout {
		display: grid;
		grid-template-columns: minmax(0, 570fr) 48px minmax(0, 260fr);
		align-items: start;
	}
	.rn-service__main {
		display: block;
		grid-column: 1;
	}
	.rn-service__lead {
		margin: 15px 0 0 -1px;          /* band 395 → lead 410 (x=201) */
		width: auto;
		max-width: none;
	}
	.rn-service__content {
		margin: 21px 0 0 -1px;          /* rule 683 → text 704 */
		width: auto;
	}
	.rn-service__aside {
		grid-column: 3;
		margin-top: 18px;               /* band 395 → aside 413 */
	}
	.rn-doctor__text {
		grid-column: 1;
		margin: 21px 0 0;               /* band 395 → text 416 */
		width: auto;
		max-width: none;
	}
	.rn-doctor__portrait {
		grid-column: 3;
		margin-top: 21px;               /* portrait 820/416 */
		width: 100%;                    /* fills the (flexing) aside column (Figma 261 = column width) */
	}
	.rn-main__body > .rn-doctor:last-child {
		padding-bottom: 140px;          /* text end 789 → footer 929 */
	}
	.rn-404__lead {
		margin: 19px 0 0 2px;           /* band 329 → lead 348 (x=204) */
		width: auto;
		max-width: none;
	}
	.rn-404__lead + .rn-rule {
		margin-left: 0;
	}
	.rn-404__text {
		margin: 23px 0 0 2px;           /* rule 594 → text 617 */
		width: auto;
	}
	.rn-404__aside {
		margin-top: 0;
	}
	.rn-focused-404 .rn-band {
		padding-left: 29px;
	}
	.rn-focused-404 .rn-404__aside-title {
		margin-left: 0;
	}
	.rn-focused-404 .rn-404__aside-text {
		margin-left: -11px;
		width: 271px;
		max-width: calc(100% + 11px);
	}
	.rn-main__body > .rn-404:last-child {
		padding-bottom: 47px;           /* text end 848 → shadow ≈895 */
	}
}
