/*
 * OBC.mk public site - shared design system for index.php and registration.php.
 * Colours come from the OBC mark: the blue of the letters and the green of the sphere.
 */

:root {
	color-scheme: light;

	--ink: #0b1b2b;
	--text: #22364a;
	--muted: #586b7f;
	--placeholder: #8595a6;
	--line: #e3e9f0;
	--line-strong: #cfd9e4;
	--bg: #ffffff;
	--bg-soft: #f5f8fb;

	--brand: #0a72ae;
	--brand-hover: #085f92;
	--brand-bright: #19a2de;
	--brand-soft: #e8f4fb;
	--brand-ring: rgba(25, 162, 222, 0.2);
	--green: #2d8a52;
	--green-bright: #7cc242;
	--green-soft: #e9f6ee;
	--danger: #c23a2f;
	--danger-ink: #9b2c23;
	--danger-soft: #fdeeec;

	--navy: #0b1b2b;
	--navy-2: #11283d;
	--on-dark: #e8eff6;
	--on-dark-muted: #9fb2c5;
	--on-dark-accent: #6cc8f0;

	--radius-sm: 8px;
	--radius: 12px;
	--radius-lg: 16px;
	--radius-xl: 24px;
	--shadow-sm: 0 1px 2px rgba(11, 27, 43, 0.06);
	--shadow: 0 1px 2px rgba(11, 27, 43, 0.05), 0 10px 28px -10px rgba(11, 27, 43, 0.14);
	--shadow-lg: 0 2px 6px rgba(11, 27, 43, 0.05), 0 28px 60px -18px rgba(11, 27, 43, 0.28);

	--font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--container: 1200px;
	--header-h: 72px;
}

/* ---------- Base ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

html.modal-open {
	overflow: hidden;
}

body {
	margin: 0;
	min-width: 320px;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	color: var(--ink);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p {
	margin: 0;
}

a {
	color: var(--brand);
	text-decoration: none;
}

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

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

:focus-visible {
	outline: 3px solid var(--brand-ring);
	outline-offset: 2px;
}

[hidden] {
	display: none !important;
}

.container {
	width: min(100% - 32px, var(--container));
	margin-inline: auto;
}

@media (min-width: 768px) {
	.container {
		width: min(100% - 48px, var(--container));
	}
}

.sr-only {
	position: absolute;
	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;
	top: -60px;
	left: 12px;
	z-index: 100;
	padding: 10px 16px;
	border-radius: var(--radius-sm);
	background: var(--ink);
	color: #fff;
	font-weight: 600;
}

.skip-link:focus {
	top: 12px;
}

.i {
	width: 20px;
	height: 20px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 22px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:active {
	transform: translateY(1px);
}

.btn .i {
	width: 18px;
	height: 18px;
}

.btn-primary {
	background: var(--brand);
	color: #fff;
	box-shadow: 0 1px 2px rgba(11, 27, 43, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
	background: var(--brand-hover);
}

.btn-secondary {
	background: #fff;
	border-color: var(--line-strong);
	color: var(--ink);
}

.btn-secondary:hover {
	background: var(--bg-soft);
	border-color: #b6c5d4;
}

.btn-light {
	background: #fff;
	color: var(--ink);
}

.btn-light:hover {
	background: #eaf1f7;
}

.btn-outline-light {
	border-color: rgba(255, 255, 255, 0.28);
	color: #fff;
}

.btn-outline-light:hover {
	border-color: rgba(255, 255, 255, 0.6);
	background: rgba(255, 255, 255, 0.06);
}

.btn-sm {
	height: 40px;
	padding: 0 16px;
	font-size: 0.9375rem;
}

.btn-lg {
	height: 54px;
	padding: 0 26px;
	font-size: 1.0625rem;
}

.btn-block {
	width: 100%;
}

.btn[disabled],
.btn[aria-busy='true'] {
	opacity: 0.7;
	cursor: progress;
	transform: none;
}

.spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

.btn[aria-busy='true'] .spinner {
	display: inline-block;
}

.btn[aria-busy='true'] .btn-icon {
	display: none;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--muted);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
	background: var(--bg-soft);
	color: var(--ink);
}

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(255, 255, 255, 0.88);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled,
.site-header.is-solid {
	border-bottom-color: var(--line);
}

.site-header.is-scrolled {
	box-shadow: 0 10px 24px -20px rgba(11, 27, 43, 0.4);
}

.nav {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	height: var(--header-h);
}

.brand {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 14px;
	color: var(--ink);
}

.brand img {
	width: auto;
	height: 40px;
}

.brand-tag {
	padding-left: 14px;
	border-left: 1px solid var(--line-strong);
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-left: auto;
}

.nav-link {
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--text);
	font-size: 0.9375rem;
	font-weight: 500;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
	background: var(--bg-soft);
	color: var(--ink);
}

.nav-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: 12px;
}

.nav-toggle {
	display: none;
	margin-left: auto;
	color: var(--ink);
}

.nav-toggle .i {
	width: 22px;
	height: 22px;
}

.nav-toggle .i-close,
.nav-toggle[aria-expanded='true'] .i-open {
	display: none;
}

.nav-toggle[aria-expanded='true'] .i-close {
	display: block;
}

.nav-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	color: var(--text);
	font-size: 0.9375rem;
	font-weight: 500;
}

.nav-back:hover {
	color: var(--brand);
}

.nav-back .i {
	width: 18px;
	height: 18px;
}

@media (max-width: 960px) {
	.nav-toggle {
		display: inline-grid;
	}

	.nav-menu {
		position: absolute;
		top: calc(100% + 8px);
		right: 0;
		left: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		margin-left: 0;
		padding: 10px;
		border: 1px solid var(--line);
		border-radius: var(--radius-lg);
		background: #fff;
		box-shadow: var(--shadow-lg);
	}

	.nav-menu.is-open {
		display: flex;
	}

	.nav-link {
		padding: 12px 14px;
		font-size: 1rem;
	}

	.nav-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		margin: 6px 0 0;
		padding-top: 12px;
		border-top: 1px solid var(--line);
	}

	.nav-actions .btn {
		width: 100%;
		height: 46px;
	}
}

@media (max-width: 560px) {
	.brand-tag {
		display: none;
	}

	.brand img {
		height: 36px;
	}
}

/* ---------- Form fields ---------- */

.field {
	display: grid;
	align-content: start;
	gap: 6px;
	min-width: 0;
}

.label {
	color: var(--ink);
	font-size: 0.875rem;
	font-weight: 600;
}

.label .optional {
	color: var(--muted);
	font-weight: 400;
}

.input,
.textarea,
.select {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	background: #fff;
	color: var(--ink);
	font-size: 1rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.textarea {
	height: auto;
	min-height: 140px;
	padding: 12px 14px;
	line-height: 1.5;
	resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
	color: var(--placeholder);
	opacity: 1;
}

.input:hover,
.textarea:hover {
	border-color: #b6c5d4;
}

.input:focus,
.textarea:focus {
	outline: none;
	border-color: var(--brand-bright);
	box-shadow: 0 0 0 4px var(--brand-ring);
}

.hint {
	color: var(--muted);
	font-size: 0.8125rem;
	line-height: 1.45;
}

.field-error {
	display: none;
	align-items: flex-start;
	gap: 6px;
	color: var(--danger);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.4;
}

.field-error .i {
	width: 16px;
	height: 16px;
	margin-top: 1px;
}

.field.has-error .field-error {
	display: flex;
}

.field.has-error .input,
.field.has-error .textarea,
.field.has-error .input-group {
	border-color: var(--danger);
}

.field.has-error .input:focus,
.field.has-error .textarea:focus,
.field.has-error .input-group:focus-within {
	box-shadow: 0 0 0 4px rgba(194, 58, 47, 0.14);
}

/* https:// [ firma ] .obc.mk */
.input-group {
	display: flex;
	align-items: stretch;
	height: 46px;
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-group:hover {
	border-color: #b6c5d4;
}

.input-group:focus-within {
	border-color: var(--brand-bright);
	box-shadow: 0 0 0 4px var(--brand-ring);
}

.input-group .input {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.input-group .input:focus,
.field.has-error .input-group .input:focus {
	box-shadow: none;
}

.addon {
	display: flex;
	flex: none;
	align-items: center;
	padding: 0 12px;
	background: var(--bg-soft);
	color: var(--muted);
	font-size: 0.9375rem;
	white-space: nowrap;
}

.addon:first-child {
	border-right: 1px solid var(--line);
}

.addon:last-child {
	border-left: 1px solid var(--line);
}

/* ---------- Captcha (image from captcha.php) ---------- */

.captcha-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.captcha-img {
	flex: none;
	width: 200px;
	height: 50px;
	overflow: hidden;
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	background: #fff;
}

.captcha-img img {
	width: 200px;
	height: 50px;
	transition: filter 0.3s ease, opacity 0.3s ease;
}

.captcha-img.is-loading img {
	filter: blur(6px);
	opacity: 0.6;
}

.captcha-input {
	font-weight: 600;
	letter-spacing: 0.4em;
	text-indent: 0.4em;
	text-align: center;
	text-transform: uppercase;
}

.captcha-input::placeholder {
	letter-spacing: 0.4em;
}

@media (max-width: 400px) {
	.captcha-row .btn {
		flex: 1 1 auto;
	}
}

/* Honeypot: invisible to people, tempting to form-filling bots. */
.hp-field {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Alerts ---------- */

.alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.alert .i {
	margin-top: 1px;
}

.alert-error {
	border-color: #f4cbc6;
	background: var(--danger-soft);
	color: var(--danger-ink);
}

.alert-info {
	border-color: #cfe6f5;
	background: var(--brand-soft);
	color: #0b5a88;
}

/* ---------- Dialogs ---------- */

.modal {
	width: min(560px, calc(100% - 32px));
	max-width: none;
	max-height: min(88vh, 820px);
	padding: 0;
	border: 0;
	border-radius: var(--radius-lg);
	background: #fff;
	color: var(--text);
	box-shadow: var(--shadow-lg);
}

.modal[open] {
	display: flex;
	flex-direction: column;
}

.modal::backdrop {
	background: rgba(11, 27, 43, 0.55);
}

.modal-sm {
	width: min(440px, calc(100% - 32px));
}

.modal-lg {
	width: min(760px, calc(100% - 32px));
}

.modal-inner {
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: inherit;
}

.modal-head {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 16px 16px 24px;
	border-bottom: 1px solid var(--line);
}

.modal-head h2 {
	font-size: 1.1875rem;
	letter-spacing: -0.01em;
}

.modal-body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 22px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.modal-body:focus {
	outline: none;
}

.modal-foot {
	flex: none;
	padding: 16px 24px 22px;
	border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
	.modal-head {
		padding-left: 18px;
	}

	.modal-body,
	.modal-foot {
		padding-inline: 18px;
	}
}

/* ---------- Footer ---------- */

.site-footer {
	padding: 56px 0 28px;
	border-top: 1px solid var(--line);
	background: var(--bg-soft);
	font-size: 0.9375rem;
}

.footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
}

.footer-brand img {
	width: auto;
	height: 40px;
}

.footer-brand p {
	max-width: 360px;
	margin-top: 16px;
	color: var(--muted);
}

.footer-col h3 {
	margin-bottom: 14px;
	color: var(--ink);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.footer-col ul {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-col a,
.footer-col span {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--text);
}

.footer-col a:hover {
	color: var(--brand);
}

.footer-col .i {
	width: 18px;
	height: 18px;
	margin-top: 3px;
	color: var(--muted);
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.875rem;
}

.footer-bottom a {
	color: var(--muted);
}

.footer-bottom a:hover {
	color: var(--brand);
}

.site-footer.is-compact {
	padding: 0 0 28px;
	border-top: 0;
	background: transparent;
}

.site-footer.is-compact .footer-bottom {
	margin-top: 0;
}

@media (max-width: 800px) {
	.footer-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 520px) {
	.footer-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}
}
