/* Base: reset, document, layout primitives, typography utilities. Desktop ≥ 900px, mobile < 900px (interpolated between 360 and 1200). */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Never overflow: hidden here — it would break position: sticky (hero stage). */
	overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-antracit);
	font-family: var(--ff);
	font-size: var(--fs-body);
	font-weight: var(--fw-regular);
	line-height: var(--lh-body);
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
	margin: 0;
}

ul,
ol {
	padding: 0;
	list-style: none;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Text links: hover/focus colour #58001C + dotted underline revealed left → right (global; pill buttons,
   icon links and image links are excluded). Background technique: no layout shift; on wrapped links the underline
   continues sequentially (first line, then the next). */
a {
	color: var(--c-link);
	text-decoration: none;
}
a:not(.rn-button):not(.rn-arrow-link):not(.rn-header__logo):not(.rn-nav__home):not(.rn-doctor-card__link):not(.rn-doctor-row__link):not(.rn-service-card__link):not(.rn-link-plain) {
	background-image: repeating-linear-gradient(to right, currentColor 0 2px, transparent 2px 4px);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	box-decoration-break: slice;      /* background spans the wrapped link as one strip → the reveal runs line 1 first, then line 2 */
	-webkit-box-decoration-break: slice;
	transition: background-size var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
a:not(.rn-button):not(.rn-arrow-link):not(.rn-header__logo):not(.rn-nav__home):not(.rn-doctor-card__link):not(.rn-doctor-row__link):not(.rn-service-card__link):not(.rn-link-plain):focus-visible {
	color: var(--link-hover, var(--c-link-on-dark)); /* dark/coloured surfaces set --link-hover to white for contrast */
	background-size: 100% 1px;
}
@media (hover: hover) {
	a:not(.rn-button):not(.rn-arrow-link):not(.rn-header__logo):not(.rn-nav__home):not(.rn-doctor-card__link):not(.rn-doctor-row__link):not(.rn-service-card__link):not(.rn-link-plain):hover {
		color: var(--link-hover, var(--c-link-on-dark));
		background-size: 100% 1px;
	}
}
/* Composite icon + text links (.rn-link-plain, e.g. footer "Pelji me tja", "Pelji me tja" in the aside): the colour shifts on
   the whole link, the dotted underline reveals under the text span only. */
.rn-link-plain {
	transition: color var(--t-fast) var(--ease);
}
.rn-link-plain > span {
	background-image: repeating-linear-gradient(to right, currentColor 0 2px, transparent 2px 4px);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: background-size var(--t-fast) var(--ease);
}
.rn-link-plain:focus-visible {
	color: var(--link-hover, var(--c-link-on-dark));
}
.rn-link-plain:focus-visible > span {
	background-size: 100% 1px;
}
@media (hover: hover) {
	.rn-link-plain:hover {
		color: var(--link-hover, var(--c-link-on-dark));
	}
	.rn-link-plain:hover > span {
		background-size: 100% 1px;
	}
}
/* Stretched card/row links (the whole card is the target): the name text gets the same hover, applied to the text itself. */
.rn-doctor-card__link,
.rn-doctor-row__link,
.rn-service-card__link {
	background-image: repeating-linear-gradient(to right, currentColor 0 2px, transparent 2px 4px);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: background-size var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.rn-doctor-card__link:focus-visible,
.rn-doctor-row__link:focus-visible,
.rn-service-card__link:focus-visible {
	color: var(--link-hover, var(--c-link-on-dark));
	background-size: 100% 1px;
}
@media (hover: hover) {
	.rn-doctor-card:hover .rn-doctor-card__link,
	.rn-doctor-row:hover .rn-doctor-row__link,
	.rn-service-card--cards:hover .rn-service-card__link,
	.rn-service-card__link:hover {
		color: var(--link-hover, var(--c-link-on-dark));
		background-size: 100% 1px;
	}
}
@media (prefers-reduced-motion: reduce) {
	a,
	.rn-link-plain > span,
	.rn-doctor-card__link,
	.rn-doctor-row__link,
	.rn-service-card__link {
		transition: none;
	}
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

:focus-visible {
	outline: 2px solid var(--c-link);
	outline-offset: 2px;
}

/* Screen-reader only */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	padding: 8px 16px;
	background: var(--c-white);
	color: var(--c-link);
}
.skip-link:focus {
	left: 8px;
}

/* ---------- Layout primitives ---------- */

/* Site wrapper: 1200px, centred in the viewport. */
.rn-wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
}

/* The main content column: starts at the intentional left offset (202px at 1200), ends at 1080. */
.rn-col {
	margin-left: var(--inset-l);
	margin-right: var(--inset-r);
}

/* Full-bleed background with the wrapper inside (hero media, footer, map). */
.rn-bleed {
	width: 100%;
}

/* Icon-only arrow links: colour shift only (no underline). */
.rn-arrow-link {
	transition: color var(--t-fast) var(--ease);
}
.rn-arrow-link:focus-visible {
	color: var(--c-link-on-dark);
}
@media (hover: hover) {
	.rn-arrow-link:hover {
		color: var(--c-link-on-dark);
	}
}

/* Icon from the sprite (32×32 boxes). */
.rn-icon {
	width: var(--icon);
	height: var(--icon);
	flex: none;
	fill: currentColor;
}

/* ---------- Typography utilities (sizes from Figma text styles) ---------- */

/* sc_regular / sc_semi_bold: 16px, uppercase, 1.6px tracking, line-height normal */
.rn-caps {
	font-size: var(--fs-small);
	font-weight: var(--fw-regular);
	letter-spacing: var(--ls-caps);
	line-height: normal;
	text-transform: uppercase;
}
.rn-caps--semibold {
	font-weight: var(--fw-semibold);
}

.rn-lead {
	font-size: var(--fs-lead);
	line-height: var(--lh-body);
}

.rn-body {
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.rn-small {
	font-size: var(--fs-small);
	line-height: var(--lh-body);
}

/* Rich text from restricted WYSIWYG fields */
.rn-rich > * + * {
	margin-top: 1.3em;
}
.rn-rich ul {
	list-style: disc;
	padding-left: 27px;
}
.rn-rich ol {
	list-style: decimal;
	padding-left: 27px;
}
.rn-rich a {
	color: var(--c-link);
}
.rn-rich strong {
	font-weight: var(--fw-semibold);
}

/* Layer that scrolls over the sticky hero stage (see blocks/hero). */
.rn-main__body,
.rn-footer {
	position: relative;
	z-index: 1;
	background: var(--c-bg);
}
/* Desktop: the content layer sits above the header (z 2), so the current-item marker under the nav
   always tucks under the title band — only its tip shows, whatever the band colour. Mobile keeps the
   header on top for the off-canvas menu. */
@media (min-width: 900px) {
	.rn-main__body {
		z-index: 3;
	}
}
