/* Local fonts */
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter/Inter-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url("../fonts/inter/Inter-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url("../fonts/inter/Inter-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/instrument-sans/InstrumentSans-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/instrument-sans/InstrumentSans-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/instrument-sans/InstrumentSans-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Sans";
	src: url("../fonts/instrument-sans/InstrumentSans-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--adosoft-navy: #262A6E;
	--adosoft-blue: #292E7C;
	--adosoft-green: #328236;
	--adosoft-orange: #EF9012;
	--adosoft-petrol: #163042;
}

/* Brand primary color */
:root,
[data-bs-theme="light"] {
	--bs-primary: #262A6E;
	--bs-primary-rgb: 38, 42, 110;
	--bs-link-color: #262A6E;
	--bs-link-color-rgb: 38, 42, 110;
	--bs-link-hover-color: #328236;
}

/* Primary buttons */
.btn-primary {
	--bs-btn-bg: #262A6E;
	--bs-btn-border-color: #262A6E;
	--bs-btn-hover-bg: #292E7C;
	--bs-btn-hover-border-color: #292E7C;
	--bs-btn-active-bg: #292E7C;
	--bs-btn-active-border-color: #292E7C;
}

/* Navigation */
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
	color: #328236;
}

/* Back to top - independent from Font Awesome */
.back-top {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	width: 3.25rem;
	height: 3.25rem;
	padding: 0;
	border: 0;
	border-radius: 0.5rem;
	background: var(--adosoft-navy);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.5rem);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
	z-index: 1030;
	cursor: pointer;
}

.back-top:hover,
.back-top:focus-visible {
	background: var(--adosoft-blue);
	color: #ffffff;
}

.back-top:focus-visible {
	outline: 3px solid rgba(50, 130, 54, 0.35);
	outline-offset: 2px;
}

.back-top.back-top-show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-top::before,
.back-top::after {
	content: none !important;
}

.back-top i {
	font-size: 1.4rem;
	line-height: 1;
}

/* AdoSoft green accent */
.text-adosoft-green {
	color: #328236 !important;
}

/* PyCube section */
.adosoft-pycube-section {
	background: var(--adosoft-petrol);
}

.adosoft-pycube-core {
	width: 180px;
	height: 180px;
	border-radius: 50%;
	background: var(--adosoft-navy);
	border: 6px solid rgba(255, 255, 255, 0.12);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

.adosoft-system-node {
	background: #ffffff;
	color: var(--adosoft-petrol);
	border-radius: 0.5rem;
	padding: 0.8rem 1rem;
	font-weight: 600;
	box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

.adosoft-system-node i {
	color: var(--adosoft-green);
}

/* Header desktop */
@media (min-width: 1200px) {
	.navbar .nav-link {
		white-space: nowrap;
		font-size: 0.95rem;
		padding-left: 0.65rem;
		padding-right: 0.65rem;
	}

	.navbar .btn {
		white-space: nowrap;
	}

	.navbar-brand-item {
		max-width: 290px;
	}
}

/* Offset for navigation to sections with sticky header */
section[id] {
	scroll-margin-top: 90px;
}

/* Smooth navigation between sections */
html {
	scroll-behavior: smooth;
}

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

	.back-top {
		transition: none;
	}
}

/* PyCube ecosystem - responsive grid */
.adosoft-pycube-map {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr);
	grid-template-areas:
		"erp        .       wms"
		"external   core    anaf"
		"commercial .       production";
	align-items: center;
	justify-items: center;
	gap: 1.5rem 1.25rem;
	min-height: 430px;
}

.adosoft-pycube-map .adosoft-pycube-core {
	grid-area: core;
	width: 180px;
	height: 180px;
	flex-shrink: 0;
}

.adosoft-pycube-map .adosoft-system-node {
	width: 100%;
	max-width: 190px;
	min-width: 0;
	white-space: normal;
	text-align: center;
}

.pycube-map-erp {
	grid-area: erp;
}

.pycube-map-wms {
	grid-area: wms;
}

.pycube-map-external {
	grid-area: external;
}

.pycube-map-anaf {
	grid-area: anaf;
}

.pycube-map-commercial {
	grid-area: commercial;
}

.pycube-map-production {
	grid-area: production;
}

@media (max-width: 575.98px) {
	.adosoft-pycube-map {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"core       core"
			"erp        wms"
			"external   anaf"
			"commercial production";
		min-height: 0;
		gap: 0.75rem;
	}

	.adosoft-pycube-map .adosoft-pycube-core {
		width: 100%;
		height: auto;
		border-radius: 0.75rem;
		padding: 1.5rem;
	}

	.adosoft-pycube-map .adosoft-system-node {
		max-width: none;
		height: 100%;
	}
}

/* Secondary business domains */
.adosoft-domain-secondary {
	border-color: rgba(22, 48, 66, 0.1) !important;
	padding: 1.15rem !important;
}

.adosoft-domain-secondary .h5 {
	font-size: 1rem;
	line-height: 1.25;
	margin-bottom: 0.75rem !important;
}

.adosoft-domain-secondary p {
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--bs-secondary-color);
}

/* Business domain icons */
.adosoft-domain-icon {
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: rgba(50, 130, 54, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
}

.adosoft-domain-icon img {
	width: 2.5rem;
	height: 2.5rem;
	display: block;
}

.adosoft-domain-icon-sm {
	width: 2.75rem;
	height: 2.75rem;
}

.adosoft-domain-icon-sm img {
	width: 1.75rem;
	height: 1.75rem;
}

/* Accessibility - text contrast */
.text-body-secondary {
	color: #6F7170 !important;
}

/* Small descriptive text in domain cards */
#industrii .bg-body > p.small {
	color: #6F7170 !important;
}

/* Lighter brand green on the dark PyCube section */
.adosoft-pycube-section .text-adosoft-green {
	color: #5DAB62 !important;
}

/* Lighter brand green on dark theme blocks */
.bg-dark[data-bs-theme="dark"] span.text-adosoft-green {
	color: #5DAB62 !important;
}
