/* ============================================
   IT-Medical – Hovedstiler + responsivt
   ============================================ */

:root {
	--color-primary: #2f5aae;
	--color-primary-hover: #254a8f;
	--color-text: #272626;
	--color-text-muted: #555;
	--color-bg: #ffffff;
	--color-bg-light: #f4f5f7;
	--color-bg-dark: #121212;
	--color-border: #e0e0e0;
	--font-sans: 'Roboto', Arial, Helvetica, sans-serif;
	--font-heading: 'Roboto Slab', Georgia, serif;
	--container-max: 1170px;
	--header-height: 110px;
	--transition: 0.25s ease;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 100px;
}

@media (min-width: 961px) {
	html {
		scroll-padding-top: 115px;
	}
}

/* Unngår at anker-scroll havner under fast header */
.section,
.hero {
	scroll-margin-top: 100px;
}
@media (min-width: 961px) {
	.section,
	.hero {
		scroll-margin-top: 115px;
	}
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
}

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

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

a:hover {
	text-decoration: underline;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 9999;
	padding: 0.75rem 1rem;
	background: var(--color-primary);
	color: #fff;
	font-weight: 500;
	border-radius: 4px;
	transition: top 0.2s;
}

.skip-link:focus {
	top: 1rem;
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

.nav-overlay {
	display: none;
	pointer-events: none;
}

.container {
	width: 100%;
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 1rem;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 500;
	border-radius: 3px;
	border: none;
	cursor: pointer;
	transition: background var(--transition), color var(--transition);
	text-decoration: none;
}

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

.btn-primary:hover {
	background: var(--color-primary-hover);
	text-decoration: none;
}

.btn-secondary {
	background: transparent;
	color: var(--color-primary);
	border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
	background: var(--color-primary);
	color: #fff;
	text-decoration: none;
}

/* ========== HEADER ========== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--color-bg);
	box-shadow: 0 1px 0 var(--color-border);
}

.header-top {
	background: var(--color-bg-light);
	font-size: 0.875rem;
}

.header-top-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem 1.5rem;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.header-contact-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--color-text);
	font-weight: 700;
}

.header-contact-link:hover {
	color: var(--color-primary);
	text-decoration: none;
}

.header-contact-link svg {
	flex-shrink: 0;
}

.header-address {
	color: var(--color-text-muted);
}

.btn-contact-top {
	font-size: 0.8125rem;
	padding: 0.4rem 0.75rem;
	text-decoration: none;
}

.btn-contact-top:hover {
	text-decoration: none;
}

.header-main-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--header-height);
}

.logo {
	display: block;
	flex-shrink: 0;
}

.logo img {
	height: 100px;
	width: auto;
	max-width: 360px;
	object-fit: contain;
	object-position: left center;
}

@media (max-width: 960px) {
	.logo {
		flex-shrink: 1;
		min-width: 0;
	}
	.logo img {
		height: 80px;
		max-width: 288px;
		width: auto;
	}
}
@media (max-width: 480px) {
	.logo img {
		height: 70px;
		max-width: 220px;
	}
}

@media (min-width: 961px) {
	.logo img {
		height: 125px;
		max-width: 450px;
	}
	.site-header .header-main-inner {
		min-height: 135px;
	}
}

/* Hamburger – synlig bare på mobil/tablet */
.hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 110;
}

.hamburger-line {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--color-text);
	border-radius: 1px;
	transition: transform var(--transition), opacity var(--transition);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
	opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Main nav – desktop: horisontal */
.main-nav {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.nav-list {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-list a {
	color: var(--color-text);
	font-weight: 500;
}

.nav-list a:hover {
	color: var(--color-primary);
	text-decoration: none;
}

.nav-cta {
	white-space: nowrap;
}

/* ========== HERO ========== */
.hero {
	padding: 2rem 0 3rem;
	background: var(--color-bg-light);
}

.hero-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 2rem;
}

.hero-inner {
	flex: 1;
	min-width: 0;
	padding: 0;
}

.hero-frame {
	position: relative;
	flex-shrink: 0;
	width: 479px;
	height: 299px;
	border: 2px solid #b0c4d4;
	border-radius: 10px;
	overflow: hidden;
	background-color: #fff;
}

.hero-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: fill;
	vertical-align: middle;
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: var(--color-primary);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 500;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.hero-badge svg {
	flex-shrink: 0;
}

.hero-title {
	font-family: var(--font-heading);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	margin: 0 0 0.25rem;
	color: var(--color-text);
}

.hero-subtitle {
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 3.5vw, 2rem);
	font-weight: 700;
	margin: 0 0 1rem;
	color: var(--color-text);
}

.hero-text {
	max-width: 42rem;
	margin: 0 0 1.5rem;
	color: var(--color-text-muted);
	font-weight: 700;
}

.hero-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--color-text-muted);
}

/* ========== SECTIONS ========== */
.section {
	padding: 3.5rem 0;
}

.section:nth-of-type(even) {
	background: var(--color-bg-light);
}

.section-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-primary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.5rem;
}

.section-title {
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	margin: 0 0 0.75rem;
}

.section-desc {
	max-width: 38rem;
	margin: 0 0 2rem;
	color: var(--color-text-muted);
}

.section-intro {
	margin-bottom: 2rem;
}

/* Cards */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

.card {
	background: var(--color-bg);
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
	border: 1px solid var(--color-border);
}

.card-icon {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(47, 90, 174, 0.1);
	color: var(--color-primary);
	border-radius: 8px;
	margin-bottom: 1rem;
}

.card-icon svg {
	flex-shrink: 0;
}

.card h3 {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
}

.card p {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--color-text-muted);
	line-height: 1.55;
}

/* About */
.about-content {
	margin-bottom: 2rem;
}

.about-content p {
	margin: 0 0 1rem;
}

.about-cards {
	display: grid;
	gap: 1.5rem;
	margin-bottom: 2rem;
}

/* Karusell-overskrifter */
.carousel-title {
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	margin: 0 0 1rem;
	color: var(--color-text);
	text-align: center;
}

/* Kompetanse-karusell – full bredde, samme ramme som hero (BK1) */
.kompetanse-carousel {
	position: relative;
	width: 100%;
}

.carousel-track-wrap {
	overflow: hidden;
	border: 2px solid #b0c4d4;
	border-radius: 10px;
	background: var(--color-bg);
	width: 100%;
}

.carousel-track {
	display: flex;
	width: 300%;
	transition: transform 0.4s ease;
}

.carousel-track .carousel-page {
	flex: 0 0 33.333%;
	width: 33.333%;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: center;
	align-items: center;
	padding: 1rem;
	box-sizing: border-box;
}

.carousel-page-item {
	flex: 0 0 150px;
	width: 150px;
	height: 150px;
}

.carousel-page-item img {
	display: block;
	width: 150px;
	height: 150px;
	object-fit: contain;
	vertical-align: middle;
	box-sizing: border-box;
}

.carousel-dots {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.carousel-dots button {
	width: 10px;
	height: 10px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--color-border);
	cursor: pointer;
	transition: background 0.2s;
}

.carousel-dots button.active,
.carousel-dots button:hover {
	background: var(--color-primary);
}

.about-card {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 1rem 1.5rem;
	align-items: start;
	padding: 1.5rem;
	background: var(--color-bg);
	border-radius: 8px;
	border: 1px solid var(--color-border);
}

.about-card-left {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	min-width: 0;
}

.about-card-left svg {
	flex-shrink: 0;
	color: var(--color-primary);
}

.about-card-left h3 {
	margin: 0;
	font-size: 1.125rem;
	hyphens: none;
}

.about-card-middle {
	min-width: 1rem;
}

.about-card-right {
	min-width: 0;
}

.about-card-right p {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--color-text-muted);
}

.no-wrap {
	white-space: nowrap;
}

.stat-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 1rem;
}

.stat-card {
	text-align: center;
	padding: 1.25rem;
	background: var(--color-primary);
	color: #fff;
	border-radius: 8px;
}

.stat-number {
	display: block;
	font-size: 1.5rem;
	font-weight: 700;
}

.stat-label {
	font-size: 0.8125rem;
	opacity: 0.9;
}

/* Why */
.card-grid-why .card {
	max-width: 280px;
}

/* Contact */
.contact-grid {
	display: grid;
	gap: 2rem;
}

.contact-info h3 {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
}

.contact-details {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1rem;
}

.contact-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: var(--color-text);
	padding: 0.75rem;
	background: var(--color-bg);
	border-radius: 8px;
	border: 1px solid var(--color-border);
}

.contact-item:hover {
	text-decoration: none;
	border-color: var(--color-primary);
}

.contact-item-btn {
	justify-content: center;
	gap: 0.5rem;
}

.contact-item-btn span {
	flex: 0 1 auto;
}

.footer-contact-link {
	color: #fff;
	opacity: 0.85;
}

.footer-contact-link:hover {
	opacity: 1;
	text-decoration: underline;
}

.contact-item svg {
	flex-shrink: 0;
	color: var(--color-primary);
}

.contact-item-combined {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.contact-item-combined .contact-item-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.contact-item-combined .contact-item-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

.contact-item-combined .contact-item-row :first-child {
	text-align: left;
}

.contact-item-combined .contact-item-row :last-child {
	text-align: right;
}

.contact-item-combined .contact-item-content a {
	color: inherit;
	text-decoration: none;
}

.contact-item-combined .contact-item-content a:hover {
	text-decoration: underline;
}

.contact-form .form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-group {
	margin-bottom: 1rem;
}

.form-group label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 0.6rem 0.75rem;
	font-size: 1rem;
	font-family: inherit;
	border: 1px solid var(--color-border);
	border-radius: 4px;
}

.form-group textarea {
	min-height: 120px;
	resize: vertical;
}

.form-group-recaptcha {
	margin: 1rem 0;
}

.form-feedback {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border-radius: 4px;
	font-size: 0.9375rem;
}

.form-feedback--success {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

.form-feedback--error {
	background: #ffebee;
	color: #c62828;
	border: 1px solid #ef9a9a;
}

/* Midlertidig status under sending (smoke test / feilsøking) */
.form-feedback--status {
	background: #e3f2fd;
	color: #1565c0;
	border: 1px solid #90caf9;
}

.btn-submit {
	width: 100%;
	max-width: 280px;
	margin-top: 0.5rem;
}

.btn-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Footer */
.site-footer {
	background: var(--color-bg-dark);
	color: #fff;
	padding: 2.5rem 0 0;
}

.footer-inner {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr;
	gap: 2rem;
	padding-bottom: 2rem;
}

.footer-logo-text {
	display: block;
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	margin-bottom: 0.75rem;
	letter-spacing: 0.02em;
}

.footer-brand p {
	margin: 0;
	font-size: 0.875rem;
	opacity: 0.85;
}

.footer-nav h4,
.footer-services h4,
.footer-contact h4 {
	font-size: 0.9375rem;
	margin: 0 0 0.75rem;
}

.footer-nav ul,
.footer-services ul,
.footer-contact ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.875rem;
	opacity: 0.85;
}

.footer-nav a {
	color: #fff;
}

.footer-nav a:hover {
	text-decoration: underline;
}

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding: 1rem 0;
	text-align: center;
	font-size: 0.8125rem;
	opacity: 0.8;
}

.footer-bottom p {
	margin: 0.25rem 0;
}

.footer-support-link {
	text-align: center;
	padding: 1rem 0 1.5rem;
}

.footer-support-link a {
	display: inline-block;
	line-height: 0;
}

.footer-support-link img {
	display: block;
	max-width: 120px;
	height: auto;
}

/* ============================================
   RESPONSIVT – TABLET (768px)
   ============================================ */
@media (max-width: 992px) {
	.footer-inner {
		grid-template-columns: 1fr 1fr;
	}

	.contact-form .form-row {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.header-top-inner {
		justify-content: flex-end;
	}

	.hero {
		padding: 2rem 0 3rem;
	}

	.hero-row {
		flex-direction: column;
		gap: 1.5rem;
	}

	.hero-frame {
		width: 100%;
		max-width: 479px;
		height: 299px;
	}

	.hero-buttons {
		flex-direction: column;
	}

	.hero-buttons .btn {
		width: 100%;
	}

	.card-grid {
		grid-template-columns: 1fr;
	}

	.card-grid-why .card {
		max-width: none;
	}

	.about-card {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
	}

	.about-card-middle {
		display: none;
	}

	.about-card-right {
		grid-column: 1;
	}

	.stat-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-inner {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.footer-brand {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
}

/* ============================================
   HAMBURGER MENY – Mobil/tablet (960px)
   ============================================ */
@media (max-width: 960px) {
	.hamburger {
		display: flex;
	}

	.main-nav {
		position: fixed;
		top: 0;
		right: 0;
		width: min(320px, 100%);
		height: 100vh;
		height: 100dvh;
		background: var(--color-bg);
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding: calc(var(--header-height) + 1rem) 1.5rem 2rem;
		box-shadow: -4px 0 20px rgba(0,0,0,0.1);
		transform: translateX(100%);
		transition: transform var(--transition);
		overflow-y: auto;
		z-index: 100;
	}

	.main-nav.is-open {
		transform: translateX(0);
	}

	.nav-list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.nav-list li {
		border-bottom: 1px solid var(--color-border);
	}

	.nav-list a {
		display: block;
		padding: 1rem 0;
		font-size: 1.0625rem;
	}

	.nav-cta {
		margin-top: 1rem;
		justify-content: center;
		padding: 0.875rem 1.25rem;
	}

	/* Overlay – kun over det mørke området (venstre), IKKE over menyen – slik at menypunktene alltid er klikkbare */
	.nav-overlay {
		display: none;
		position: fixed;
		left: 0;
		top: 0;
		bottom: 0;
		right: auto;
		width: calc(100% - min(320px, 100%));
		background: rgba(0,0,0,0.4);
		z-index: 99;
	}

	.nav-overlay.is-visible {
		display: block;
		pointer-events: auto;
	}
}

/* Lukk overlay ved klikk – håndteres i JS ved å lukke meny */
@media (max-width: 960px) {
	body.menu-open {
		overflow: hidden;
	}
}

/* ============================================
   MOBIL – smal skjerm (480px)
   ============================================ */
@media (max-width: 480px) {
	.header-top {
		font-size: 0.8125rem;
	}

	.header-top-inner {
		justify-content: flex-end;
		gap: 0.75rem;
	}

	.section {
		padding: 2.5rem 0;
	}

	.hero-stats {
		flex-direction: column;
	}
}
