/**
 * @package ProMart
 */

.promart-home-blog {
	--promart-blog-navy: #0d3155;
	--promart-blog-gold: #d39d2b;
	--promart-blog-gold-dark: #b88725;
	--promart-blog-border: #e2e5ea;
	--promart-blog-muted: #717171;
	/* Was #9ca3af; darkened to meet the 4.5:1 AA text-contrast ratio for the
	   reading-time/author meta text on a white background. */
	--promart-blog-muted-light: #4b5563;
	padding-block: 2.5rem;
	background: #fff;
}

.promart-home-blog__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.promart-home-blog__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--promart-blog-navy);
	line-height: 1.45;
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}

.promart-home-blog__title.section-title::before {
	width: 4px;
	height: 1.25rem;
	margin-left: 0.5rem;
	flex-shrink: 0;
}

.promart-home-blog__viewport {
	position: relative;
}

.promart-home-blog__scroller {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}

.promart-home-blog__track {
	display: flex;
	gap: 1.25rem;
	padding-bottom: 0.25rem;
}

.promart-home-blog__card {
	flex: 0 0 calc(100% - 2rem);
	scroll-snap-align: start;
	background: #fff;
	border: 1px solid #eceff3;
	border-radius: 0.85rem;
	overflow: visible;
	box-shadow: 0 2px 12px rgba(13, 49, 85, 0.06);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	padding: 1.25rem;
}

.promart-home-blog__card:hover {
	box-shadow: 0 8px 24px rgba(13, 49, 85, 0.1);
	transform: translateY(-2px);
}

.promart-home-blog__media-wrap {
	position: relative;
	z-index: 2;
	margin-bottom: 0.75rem;
}

.promart-home-blog__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 0.65rem;
}

.promart-home-blog__image {
	display: block;
	width: 100%;
	height: 11.5rem;
	object-fit: cover;
	background: #e5e7eb;
	transition: transform 0.35s ease;
}

.promart-home-blog__card:hover .promart-home-blog__image {
	transform: scale(1.03);
}

.promart-home-blog__date {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	min-width: 0;
	padding: 0.28rem 0.5rem;
	background: #fff;
	border-radius: 0.45rem;
	box-shadow: 0 2px 8px rgba(13, 49, 85, 0.12);
	line-height: 1.2;
	white-space: nowrap;
	color: var(--promart-blog-navy);
}

.promart-home-blog__date-day,
.promart-home-blog__date-month {
	font-size: 0.75rem;
	font-weight: 800;
	color: var(--promart-blog-navy);
}

.promart-home-blog__watermark {
	display: none;
}

.promart-home-blog__category {
	position: absolute;
	bottom: -0.75rem;
	left: 50%;
	transform: translateX(-50%);
	background: var(--promart-blog-navy);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	white-space: nowrap;
	z-index: 5;
	pointer-events: none;
}

.promart-home-blog__body {
	padding: 1rem 0.25rem 0.25rem;
	text-align: center;
}

.promart-home-blog__card-title {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 800;
	line-height: 1.7;
}

.promart-home-blog__card-title a {
	color: var(--promart-blog-navy);
	transition: color 0.2s ease;
}

.promart-home-blog__card-title a:hover {
	color: var(--promart-blog-gold-dark);
}

.promart-home-blog__meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
	min-height: 1.5rem;
}

.promart-home-blog__author {
	margin: 0;
	font-size: 0.6875rem;
	color: var(--promart-blog-muted-light);
	line-height: 1.5;
}

.promart-home-blog__reading-time {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	flex-shrink: 0;
	font-size: 0.6875rem;
	color: var(--promart-blog-muted-light);
	line-height: 1;
}

.promart-home-blog__reading-time .material-symbols-outlined {
	font-size: 0.875rem;
}

.promart-home-blog__meta-icons {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.promart-home-blog__meta-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--promart-blog-muted-light);
	cursor: pointer;
	text-decoration: none;
	transition: color 0.2s ease;
}

.promart-home-blog__meta-icon:hover {
	color: var(--promart-blog-gold-dark);
}

.promart-home-blog__meta-icon .material-symbols-outlined {
	font-size: 1rem;
}

.promart-home-blog__meta-badge {
	position: absolute;
	top: -0.15rem;
	left: -0.15rem;
	min-width: 0.85rem;
	height: 0.85rem;
	padding: 0 0.15rem;
	border-radius: 999px;
	background: var(--promart-blog-gold);
	color: var(--promart-blog-navy);
	font-size: 0.5rem;
	font-weight: 700;
	line-height: 0.85rem;
	text-align: center;
}

.promart-home-blog__read-more {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	/* Was var(--promart-blog-gold-dark) (#b88725), ~3.2:1 on white. Darkened
	   to meet the 4.5:1 AA ratio required for this small bold text. */
	color: #8a6511;
	text-decoration: none;
	transition: color 0.2s ease;
}

.promart-home-blog__read-more:hover {
	color: var(--promart-blog-navy);
}

.promart-home-blog__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	/* Widened from 0.4rem to keep >=8px breathing room now that each dot's
	   tap target is 24x24px instead of the old 0.5rem visual-only box. */
	gap: 0.5rem;
}

.promart-home-blog__footer {
	display: flex;
	justify-content: center;
	margin-top: 1.25rem;
}

.promart-home-blog__footer:has(.promart-home-blog__dots[hidden]) {
	display: none;
	margin: 0;
}

.promart-home-blog__view-all {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	flex-shrink: 0;
	padding: 0.4375rem 0.875rem 0.4375rem 0.65rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--promart-blog-navy);
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(13, 49, 85, 0.05);
	white-space: nowrap;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.promart-home-blog__view-all:hover {
	color: var(--promart-blog-gold-dark);
	border-color: rgba(211, 157, 43, 0.55);
	background: #fffdf5;
	box-shadow: 0 6px 16px rgba(13, 49, 85, 0.08);
}

.promart-home-blog__view-all .material-symbols-outlined {
	font-size: 1.05rem;
	font-variation-settings: 'wght' 300;
}

.promart-home-blog__dot {
	/* Button hit area kept at the 24px tap-target minimum; the visible dot
	   stays small via the ::before circle so the design is unaffected. */
	position: relative;
	width: 1.5rem;
	height: 1.5rem;
	min-width: 1.5rem;
	min-height: 1.5rem;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
}

.promart-home-blog__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 999px;
	background: #d1d5db;
	transform: translate(-50%, -50%);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.promart-home-blog__dot.is-active::before {
	background: var(--promart-blog-navy);
	transform: translate(-50%, -50%) scale(1.15);
}

@media (max-width: 767px) {
	.promart-home-blog {
		--promart-blog-mobile-gutter: 1rem;
		--promart-blog-mobile-gap: 0.5rem;
		--promart-blog-mobile-card-width: calc((100vw - (2 * var(--promart-blog-mobile-gutter)) - var(--promart-blog-mobile-gap)) / 2);
		padding-block: 1.5rem 1.75rem;
		background: #f5f6f7;
	}

	.promart-home-blog__header {
		gap: 0.75rem;
		margin-bottom: 1rem;
	}

	.promart-home-blog__title {
		font-size: 1rem;
	}

	.promart-home-blog__title.section-title::before {
		height: 1.125rem;
	}

	.promart-home-blog__view-all {
		padding: 0.4rem 0.8rem 0.4rem 0.55rem;
		font-size: 0.75rem;
		border: 0;
		border-radius: 0.5rem;
		box-shadow: 0 2px 10px rgba(13, 49, 85, 0.08);
	}

	.promart-home-blog__viewport {
		margin-inline: -1rem;
	}

	.promart-home-blog__scroller {
		padding-inline: 1rem;
		padding-block: 0.35rem 0.65rem;
		scroll-padding-inline: 1rem;
		overscroll-behavior-x: contain;
		touch-action: pan-x;
	}

	.promart-home-blog__track {
		align-items: stretch;
		gap: var(--promart-blog-mobile-gap);
		width: max-content;
		padding-bottom: 0.15rem;
	}

	.promart-home-blog__card {
		display: flex;
		flex-direction: column;
		flex: 0 0 var(--promart-blog-mobile-card-width);
		width: var(--promart-blog-mobile-card-width);
		padding: 0.5rem 0.5rem 0.65rem;
		border: 0;
		border-radius: 0.65rem;
		box-shadow: 0 6px 20px rgba(13, 49, 85, 0.08);
	}

	.promart-home-blog__card:hover {
		transform: none;
		box-shadow: 0 6px 20px rgba(13, 49, 85, 0.08);
	}

	.promart-home-blog__card:hover .promart-home-blog__image {
		transform: none;
	}

	.promart-home-blog__media-wrap {
		margin-bottom: 0.35rem;
	}

	.promart-home-blog__media {
		border-radius: 0.55rem;
	}

	.promart-home-blog__image {
		height: auto;
		aspect-ratio: 16 / 10;
	}

	.promart-home-blog__date {
		top: 0.4rem;
		right: 0.4rem;
		padding: 0.16rem 0.35rem;
		border-radius: 0.3rem;
	}

	.promart-home-blog__date-day,
	.promart-home-blog__date-month {
		font-size: 0.625rem;
	}

	.promart-home-blog__watermark {
		display: block;
		position: absolute;
		bottom: 0.3rem;
		left: 0.3rem;
		z-index: 2;
		padding: 0.1rem 0.22rem;
		border-radius: 0.2rem;
		font-size: 0.4375rem;
		font-weight: 800;
		letter-spacing: 0.04em;
		line-height: 1;
		color: #fff;
		background: rgba(13, 49, 85, 0.28);
		text-shadow: 0 1px 2px rgba(13, 49, 85, 0.35);
		pointer-events: none;
	}

	.promart-home-blog__category {
		bottom: -0.55rem;
		max-width: calc(100% - 0.5rem);
		padding: 0.22rem 0.5rem;
		font-size: 0.5625rem;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.promart-home-blog__body {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		padding: 0.8rem 0.1rem 0.05rem;
	}

	.promart-home-blog__card-title {
		margin-bottom: 0.4rem;
		font-size: 0.6875rem;
		line-height: 1.55;
		text-align: center;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
		min-height: 2.14rem;
	}

	.promart-home-blog__meta {
		flex-wrap: nowrap;
		gap: 0.25rem;
		margin-bottom: 0.5rem;
	}

	.promart-home-blog__author,
	.promart-home-blog__reading-time {
		font-size: 0.5625rem;
	}

	.promart-home-blog__author {
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.promart-home-blog__reading-time .material-symbols-outlined,
	.promart-home-blog__meta-icon .material-symbols-outlined {
		font-size: 0.875rem;
	}

	.promart-home-blog__meta-icon {
		width: 1.35rem;
		height: 1.35rem;
	}

	.promart-home-blog__read-more {
		margin-top: auto;
		font-size: 0.6875rem;
	}

	.promart-home-blog__footer {
		margin-top: 0.35rem;
	}

	.promart-home-blog__dots {
		gap: 0.5rem;
	}

	.promart-home-blog__dot::before {
		width: 0.45rem;
		height: 0.45rem;
	}
}

@media (min-width: 640px) and (max-width: 767px) {
	.promart-home-blog {
		--promart-blog-mobile-gutter: 1.5rem;
		--promart-blog-mobile-gap: 0.75rem;
	}

	.promart-home-blog__viewport {
		margin-inline: -1.5rem;
	}

	.promart-home-blog__scroller {
		padding-inline: 1.5rem;
		scroll-padding-inline: 1.5rem;
	}
}

@media (min-width: 768px) {
	.promart-home-blog__card {
		flex-basis: calc(50% - 0.625rem);
	}
}

@media (min-width: 1024px) {
	.promart-home-blog__scroller {
		overflow: visible;
		scroll-snap-type: none;
	}

	.promart-home-blog__track {
		gap: 1rem;
	}

	.promart-home-blog__card {
		flex-basis: calc((100% - 4 * 1rem) / 5);
		padding: 1.25rem;
	}

	.promart-home-blog__card:nth-child(n + 6) {
		display: none;
	}

	.promart-home-blog__body {
		padding: 1rem 0.25rem 0.25rem;
	}

	.promart-home-blog__image {
		height: 10.5rem;
	}

	.promart-home-blog__card-title {
		font-size: 0.8125rem;
	}
}
