/* ============================================================
   BONIMEDICS BLOGG – SAMLINGSSIDA
   Tokens och komponenter är scoped till #bm-blog så att inget
   kolliderar med temat. Samma tokens som startsidan (#bm-home).
============================================================ */
#bm-blog {
	--teal:           #2a9d8f;
	--teal-dark:      #1f7a6e;
	--teal-deep:      #123e3a;
	--teal-light:     #e8f5f2;
	--teal-glow:      rgba(42, 157, 143, 0.12);
	--cream:          #faf8f5;
	--cream-warm:     #f5f0ea;
	--charcoal:       #2c2c2c;
	--charcoal-light: #555;
	--gold:           #c9a96e;
	--white:          #ffffff;
	--serif:          'Cormorant Garamond', Georgia, serif;
	--sans:           'Outfit', system-ui, sans-serif;
	--radius:         12px;
	--radius-lg:      20px;
	--shadow-soft:    0 4px 30px rgba(0, 0, 0, 0.06);
	--shadow-hover:   0 8px 40px rgba(42, 157, 143, 0.18);
	--ease-out:       cubic-bezier(0.23, 1, 0.32, 1);
	--transition:     200ms var(--ease-out);

	font-family: var(--sans);
	color: var(--charcoal);
	background: var(--cream);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

#bm-blog, #bm-blog *, #bm-blog *::before, #bm-blog *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

#bm-blog h1, #bm-blog h2, #bm-blog h3 {
	font-family: var(--sans);
	font-weight: 500;
}

#bm-blog img {
	display: block;
	max-width: 100%;
}

#bm-blog [hidden] {
	display: none !important;
}

#bm-blog .bm-blog__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

#bm-blog .bm-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

#bm-blog .bm-blog__inner {
	max-width: 1280px;
	margin: 0 auto;
}

/* ============================================================
   FADE-UP
============================================================ */
#bm-blog .fu {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}
#bm-blog .fu.visible {
	opacity: 1;
	transform: translateY(0);
}
#bm-blog .d1 { transition-delay: 40ms; }
#bm-blog .d2 { transition-delay: 80ms; }
#bm-blog .d3 { transition-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
	#bm-blog .fu {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ============================================================
   SHARED
============================================================ */
#bm-blog .section-label {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--teal);
	margin-bottom: 14px;
}
#bm-blog .section-label--light {
	color: rgba(255, 255, 255, 0.72);
}

#bm-blog .btn-teal,
#bm-blog .btn-white,
#bm-blog .btn-ghost,
#bm-blog .btn-outline-light {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.3px;
	border-radius: 50px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background 200ms var(--ease-out),
	            border-color 200ms var(--ease-out),
	            color 200ms var(--ease-out),
	            box-shadow 200ms var(--ease-out),
	            transform 160ms ease-out;
}
#bm-blog .btn-teal:active,
#bm-blog .btn-white:active,
#bm-blog .btn-ghost:active,
#bm-blog .btn-outline-light:active {
	transform: scale(0.97);
}
#bm-blog .btn-teal .bm-icon,
#bm-blog .btn-white .bm-icon,
#bm-blog .btn-ghost .bm-icon {
	width: 15px;
	height: 15px;
	transition: transform var(--transition);
}

#bm-blog .btn-teal {
	background: var(--teal);
	color: var(--white) !important;
	padding: 14px 30px;
}
#bm-blog .btn-white {
	background: var(--white);
	color: var(--teal-dark) !important;
	padding: 15px 34px;
	font-size: 15px;
}
#bm-blog .btn-ghost {
	background: transparent;
	color: var(--charcoal) !important;
	border-color: rgba(0, 0, 0, 0.12);
	padding: 13px 26px;
}
#bm-blog .btn-outline-light {
	background: transparent;
	color: var(--white) !important;
	border-color: rgba(255, 255, 255, 0.32);
	padding: 15px 30px;
	font-size: 15px;
}

@media (hover: hover) and (pointer: fine) {
	#bm-blog .btn-teal:hover {
		background: var(--teal-dark);
		transform: translateY(-2px);
		box-shadow: 0 8px 28px rgba(42, 157, 143, 0.32);
	}
	#bm-blog .btn-white:hover {
		background: var(--teal-light);
		transform: translateY(-2px);
		box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	}
	#bm-blog .btn-ghost:hover {
		border-color: var(--teal);
		color: var(--teal-dark) !important;
		background: var(--teal-light);
	}
	#bm-blog .btn-outline-light:hover {
		border-color: rgba(255, 255, 255, 0.7);
		background: rgba(255, 255, 255, 0.08);
	}
}

/* ============================================================
   1. HERO
============================================================ */
#bm-blog .bm-blog__hero {
	position: relative;
	overflow: hidden;
	padding: 96px 40px 64px;
	text-align: center;
	background: var(--cream);
}
#bm-blog .bm-blog__hero-glow {
	position: absolute;
	top: -260px;
	left: 50%;
	width: 900px;
	height: 620px;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center, rgba(42, 157, 143, 0.16) 0%, rgba(42, 157, 143, 0) 62%);
	pointer-events: none;
}
#bm-blog .bm-blog__hero-inner {
	position: relative;
	max-width: 760px;
	margin: 0 auto;
}
#bm-blog .bm-blog__h1 {
	font-size: clamp(38px, 5vw, 64px);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -1px;
	color: var(--charcoal);
	margin-bottom: 18px;
}
#bm-blog .bm-blog__h1 em {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 500;
	font-size: 1.1em;
	color: var(--teal);
}
#bm-blog .bm-blog__sub {
	font-size: 16.5px;
	color: var(--charcoal-light);
	max-width: 580px;
	margin: 0 auto;
	line-height: 1.7;
}
#bm-blog .bm-blog__hero-meta {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
	padding: 8px 18px;
	background: var(--white);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 50px;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.3px;
	color: var(--charcoal-light);
	box-shadow: var(--shadow-soft);
}
#bm-blog .bm-blog__hero-meta-sep {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--teal);
	opacity: 0.6;
}

/* ============================================================
   2. SENASTE ARTIKELN
============================================================ */
#bm-blog .bm-blog__featured {
	padding: 0 40px 72px;
	background: var(--cream);
}
#bm-blog .bm-feat {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	background: var(--white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.05);
	box-shadow: var(--shadow-soft);
	text-decoration: none !important;
	color: var(--charcoal) !important;
	transition: transform var(--transition), box-shadow var(--transition);
}
#bm-blog .bm-feat__img {
	position: relative;
	min-height: 420px;
	background: var(--cream-warm);
	overflow: hidden;
}
#bm-blog .bm-feat__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
#bm-blog .bm-feat__badge {
	position: absolute;
	top: 20px;
	left: 20px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: 50px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--teal-dark);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
#bm-blog .bm-feat__badge .bm-icon {
	width: 13px;
	height: 13px;
	color: var(--gold);
}
#bm-blog .bm-feat__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 16px;
	padding: 52px 56px;
}
#bm-blog .bm-feat__title {
	font-size: clamp(26px, 2.6vw, 34px);
	font-weight: 500;
	line-height: 1.22;
	letter-spacing: -0.4px;
	color: var(--charcoal);
}
#bm-blog .bm-feat__excerpt {
	font-size: 15.5px;
	line-height: 1.7;
	color: var(--charcoal-light);
}
#bm-blog .bm-feat__footer {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 22px;
	margin-top: 10px;
}

@media (hover: hover) and (pointer: fine) {
	#bm-blog .bm-feat:hover {
		transform: translateY(-4px);
		box-shadow: var(--shadow-hover);
	}
	#bm-blog .bm-feat:hover .bm-feat__img img {
		transform: scale(1.04);
	}
	#bm-blog .bm-feat:hover .btn-teal {
		background: var(--teal-dark);
	}
	#bm-blog .bm-feat:hover .btn-teal .bm-icon {
		transform: translateX(3px);
	}
}

/* ============================================================
   3. LISTA – toolbar, filter, sök
============================================================ */
#bm-blog .bm-blog__list {
	padding: 88px 40px 110px;
	background: var(--white);
}
#bm-blog .bm-blog__toolbar {
	display: flex;
	flex-direction: column;
	gap: 26px;
	margin-bottom: 44px;
}
#bm-blog .bm-blog__toolbar-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}
#bm-blog .bm-blog__h2 {
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 500;
	line-height: 1.2;
	color: var(--charcoal);
}
#bm-blog .bm-blog__count {
	font-size: 13px;
	font-weight: 500;
	color: var(--charcoal-light);
	letter-spacing: 0.2px;
}
#bm-blog .bm-blog__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	padding-top: 22px;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#bm-blog .bm-blog__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
#bm-blog .bm-blog__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	background: transparent;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 50px;
	font-family: var(--sans);
	font-size: 13px;
	font-weight: 600;
	color: var(--charcoal);
	cursor: pointer;
	transition: background var(--transition), border-color var(--transition), color var(--transition), transform 160ms ease-out;
}
#bm-blog .bm-blog__pill:active {
	transform: scale(0.97);
}
#bm-blog .bm-blog__pill-count {
	display: inline-block;
	min-width: 20px;
	padding: 1px 6px;
	border-radius: 50px;
	background: rgba(0, 0, 0, 0.05);
	font-size: 11px;
	font-weight: 600;
	color: var(--charcoal-light);
	text-align: center;
	transition: background var(--transition), color var(--transition);
}
#bm-blog .bm-blog__pill.is-active {
	background: var(--teal);
	border-color: var(--teal);
	color: var(--white);
}
#bm-blog .bm-blog__pill.is-active .bm-blog__pill-count {
	background: rgba(255, 255, 255, 0.2);
	color: var(--white);
}
#bm-blog .bm-blog__pill:focus-visible {
	outline: 2px solid var(--teal);
	outline-offset: 2px;
}

#bm-blog .bm-blog__search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 0 1 320px;
	min-width: 220px;
	background: var(--cream);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 50px;
	transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
#bm-blog .bm-blog__search:focus-within {
	background: var(--white);
	border-color: var(--teal);
	box-shadow: 0 0 0 4px var(--teal-glow);
}
#bm-blog .bm-blog__search > .bm-icon {
	position: absolute;
	left: 16px;
	width: 16px;
	height: 16px;
	color: var(--charcoal-light);
	pointer-events: none;
}
#bm-blog .bm-blog__search input {
	width: 100%;
	padding: 11px 40px 11px 42px;
	background: transparent;
	border: none;
	outline: none;
	font-family: var(--sans);
	font-size: 14px;
	color: var(--charcoal);
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
#bm-blog .bm-blog__search input::placeholder {
	color: #8a8a8a;
}
#bm-blog .bm-blog__search input::-webkit-search-cancel-button {
	display: none;
}
#bm-blog .bm-blog__search-clear {
	position: absolute;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	color: var(--charcoal-light);
	cursor: pointer;
	transition: background var(--transition), color var(--transition);
}
#bm-blog .bm-blog__search-clear .bm-icon {
	width: 13px;
	height: 13px;
}

@media (hover: hover) and (pointer: fine) {
	#bm-blog .bm-blog__pill:not(.is-active):hover {
		border-color: var(--teal);
		color: var(--teal-dark);
		background: var(--teal-light);
	}
	#bm-blog .bm-blog__search-clear:hover {
		background: var(--teal-light);
		color: var(--teal-dark);
	}
}

/* ============================================================
   3b. ARTIKELKORT (samma som startsidans .bm-acard)
============================================================ */
#bm-blog .bm-articles__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}
#bm-blog .bm-acard {
	background: var(--white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.05);
	box-shadow: var(--shadow-soft);
	text-decoration: none !important;
	color: var(--charcoal) !important;
	display: flex;
	flex-direction: column;
	transition: transform var(--transition), box-shadow var(--transition);
}
#bm-blog .bm-acard__img {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--cream);
}
#bm-blog .bm-acard__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#bm-blog .bm-acard__img-fallback {
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 30% 30%, rgba(42, 157, 143, 0.22), transparent 55%),
		linear-gradient(135deg, var(--teal-light), var(--cream-warm));
}
#bm-blog .bm-acard__body {
	padding: 28px 26px 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}
#bm-blog .bm-acard__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--teal);
}
#bm-blog .bm-acard__meta-sep {
	width: 4px;
	height: 4px;
	background: var(--teal);
	border-radius: 50%;
	opacity: 0.5;
	flex-shrink: 0;
}
#bm-blog .bm-acard__meta-date {
	color: var(--charcoal-light);
	font-weight: 500;
}
#bm-blog .bm-acard__title {
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--charcoal);
}
#bm-blog .bm-acard__excerpt {
	font-size: 14px;
	color: var(--charcoal-light);
	line-height: 1.65;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
#bm-blog .bm-acard__footer {
	margin-top: auto;
	padding-top: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
#bm-blog .bm-acard__readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--teal-dark);
}
#bm-blog .bm-acard__readmore .bm-icon {
	width: 14px;
	height: 14px;
	transition: transform var(--transition);
}
#bm-blog .bm-acard__time {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--charcoal-light);
}
#bm-blog .bm-acard__time .bm-icon {
	width: 13px;
	height: 13px;
	opacity: 0.7;
}

@media (hover: hover) and (pointer: fine) {
	#bm-blog .bm-acard:hover {
		transform: translateY(-5px);
		box-shadow: var(--shadow-hover);
	}
	#bm-blog .bm-acard:hover .bm-acard__img img {
		transform: scale(1.05);
	}
	#bm-blog .bm-acard:hover .bm-acard__readmore .bm-icon {
		transform: translateX(4px);
	}
}

/* Tomt resultat + Visa fler */
#bm-blog .bm-blog__empty {
	text-align: center;
	padding: 64px 24px;
	background: var(--cream);
	border-radius: var(--radius-lg);
	border: 1px dashed rgba(0, 0, 0, 0.1);
}
#bm-blog .bm-blog__empty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: var(--teal-light);
	color: var(--teal-dark);
}
#bm-blog .bm-blog__empty-icon .bm-icon {
	width: 22px;
	height: 22px;
}
#bm-blog .bm-blog__empty-title {
	font-size: 22px;
	margin-bottom: 8px;
}
#bm-blog .bm-blog__empty-text {
	font-size: 14.5px;
	color: var(--charcoal-light);
	margin-bottom: 24px;
}
#bm-blog .bm-blog__more {
	text-align: center;
	margin-top: 48px;
}
#bm-blog .bm-blog__more .btn-ghost .bm-icon {
	transform: rotate(90deg);
}

/* ============================================================
   4. CTA
============================================================ */
#bm-blog .bm-blog__cta {
	position: relative;
	overflow: hidden;
	padding: 96px 40px;
	background: var(--teal-deep);
	color: var(--white);
}
#bm-blog .bm-blog__cta-glow {
	position: absolute;
	right: -180px;
	top: -220px;
	width: 720px;
	height: 720px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(42, 157, 143, 0.55) 0%, rgba(42, 157, 143, 0) 65%);
	pointer-events: none;
}
#bm-blog .bm-blog__cta-inner {
	position: relative;
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) auto;
	align-items: center;
	gap: 48px;
}
#bm-blog .bm-blog__cta-h2 {
	font-size: clamp(32px, 4vw, 52px);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.6px;
	color: var(--white);
	margin-bottom: 18px;
}
#bm-blog .bm-blog__cta-h2 em {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 500;
	font-size: 1.1em;
	color: rgba(255, 255, 255, 0.9);
}
#bm-blog .bm-blog__cta-p {
	font-size: 16px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.76);
	max-width: 560px;
}
#bm-blog .bm-blog__cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
}

/* ============================================================
   RESPONSIVT
============================================================ */
@media (max-width: 1100px) {
	#bm-blog .bm-articles__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	#bm-blog .bm-feat__body {
		padding: 40px 40px;
	}
	#bm-blog .bm-blog__cta-inner {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	#bm-blog .bm-blog__cta-actions {
		justify-content: flex-start;
	}
}

@media (max-width: 860px) {
	#bm-blog .bm-feat {
		grid-template-columns: 1fr;
	}
	#bm-blog .bm-feat__img {
		min-height: 0;
		aspect-ratio: 16 / 10;
	}
	#bm-blog .bm-feat__body {
		padding: 32px 30px 36px;
	}
	#bm-blog .bm-blog__controls {
		flex-direction: column;
		align-items: stretch;
	}
	#bm-blog .bm-blog__search {
		flex: 1 1 auto;
		min-width: 0;
	}
	#bm-blog .bm-blog__list {
		padding: 72px 28px 88px;
	}
	#bm-blog .bm-blog__featured {
		padding: 0 28px 56px;
	}
	#bm-blog .bm-blog__hero {
		padding: 72px 28px 52px;
	}
	#bm-blog .bm-blog__cta {
		padding: 76px 28px;
	}
}

@media (max-width: 640px) {
	#bm-blog .bm-articles__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	#bm-blog .bm-blog__hero {
		padding: 56px 20px 44px;
	}
	#bm-blog .bm-blog__hero-meta {
		font-size: 12px;
		gap: 10px;
	}
	#bm-blog .bm-blog__featured {
		padding: 0 20px 48px;
	}
	#bm-blog .bm-feat__body {
		padding: 26px 22px 30px;
	}
	#bm-blog .bm-feat__footer {
		gap: 14px;
	}
	#bm-blog .bm-blog__list {
		padding: 60px 20px 72px;
	}
	#bm-blog .bm-blog__toolbar {
		gap: 20px;
		margin-bottom: 30px;
	}
	#bm-blog .bm-blog__pills {
		flex-wrap: nowrap;
		overflow-x: auto;
		/* Hindrar att pill-radens innehållsbredd sprids uppåt till temats
		   flex/grid-wrapper och gör hela sidan bredare än skärmen. Raden
		   scrollar i stället internt. */
		contain: inline-size;
		min-width: 0;
		padding-bottom: 4px;
		margin: 0 -20px;
		padding-left: 20px;
		padding-right: 20px;
		scrollbar-width: none;
	}
	#bm-blog .bm-blog__pills::-webkit-scrollbar {
		display: none;
	}
	#bm-blog .bm-blog__pill {
		flex-shrink: 0;
	}
	#bm-blog .bm-acard__body {
		padding: 22px 20px 24px;
	}
	#bm-blog .bm-blog__cta {
		padding: 64px 20px;
	}
	#bm-blog .bm-blog__cta-actions {
		flex-direction: column;
		align-items: stretch;
	}
	#bm-blog .bm-blog__cta-actions .btn-white,
	#bm-blog .bm-blog__cta-actions .btn-outline-light {
		width: 100%;
	}
}
