/**
 * Front Page — Blog Carousel Section
 *
 * Fonts: DM Serif Display (headings), DM Sans (body).
 * Colors: Navy #1B2F5E, Gold #C8A96A, Blue #4BADD4, Cream #F8F5EF.
 *
 * @since 1.7.11
 */

/* ----------------------------------------------------------------
   0. Font-face (DM Serif Display + DM Sans — self-hosted)
   ---------------------------------------------------------------- */
@font-face {
	font-family: 'DM Serif Display';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/dm-serif-display-latin.woff2') format('woff2');
}
@font-face {
	font-family: 'DM Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/dm-sans-latin-regular.woff2') format('woff2');
}
@font-face {
	font-family: 'DM Sans';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/dm-sans-latin-semibold.woff2') format('woff2');
}
@font-face {
	font-family: 'DM Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/dm-sans-latin-bold.woff2') format('woff2');
}

/* ----------------------------------------------------------------
   1. Section wrapper
   ---------------------------------------------------------------- */
.revme-blog-carousel-section {
	background: #F8F5EF;
	padding: 72px 0 80px;
}

/* ----------------------------------------------------------------
   2. Section header
   ---------------------------------------------------------------- */
.revme-blog-carousel-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 40px;
	flex-wrap: wrap;
}

.revme-blog-carousel-header__left h2 {
	font-family: 'DM Serif Display', Georgia, serif;
	font-size: clamp(1.625rem, 3.5vw, 2.25rem);
	color: #1B2F5E;
	margin: 0 0 8px;
	line-height: 1.2;
}

.revme-blog-carousel-header__left p {
	font-family: 'DM Sans', 'Open Sans', sans-serif;
	font-size: 1rem;
	color: #4a5568;
	margin: 0;
	max-width: 520px;
	line-height: 1.6;
}

.revme-blog-carousel-header__link {
	font-family: 'DM Sans', 'Open Sans', sans-serif;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #1B2F5E;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.revme-blog-carousel-header__link:hover,
.revme-blog-carousel-header__link:focus {
	color: #C8A96A;
}

/* ----------------------------------------------------------------
   3. Carousel viewport & track
   ---------------------------------------------------------------- */
.revme-blog-carousel {
	position: relative;
}

.revme-blog-carousel__viewport {
	overflow: hidden;
	border-radius: 12px;
}

.revme-blog-carousel__track {
	display: flex;
	transition: transform 400ms ease;
}

.revme-blog-carousel__slide {
	flex: 0 0 calc(100% / 3);
	padding: 0 12px;
	box-sizing: border-box;
}

/* ----------------------------------------------------------------
   4. Blog card
   ---------------------------------------------------------------- */
.revme-blog-card {
	background: #FFFFFF;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(27, 47, 94, 0.08);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.revme-blog-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(27, 47, 94, 0.14);
}

/* Card image */
.revme-blog-card__image-wrap {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #1B2F5E;
}

.revme-blog-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Fallback placeholder */
.revme-blog-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1B2F5E 0%, #2C4A7C 100%);
}

.revme-blog-card__placeholder svg {
	width: 60px;
	height: auto;
}

/* Category badge */
.revme-blog-card__category {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #C8A96A;
	color: #FFFFFF;
	font-family: 'DM Sans', 'Open Sans', sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 20px;
	line-height: 1.4;
	text-decoration: none;
	z-index: 1;
}

/* Card body */
.revme-blog-card__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Title — 2 lines max */
.revme-blog-card__title {
	font-family: 'DM Serif Display', Georgia, serif;
	font-size: 1.125rem;
	color: #1B2F5E;
	line-height: 1.35;
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.revme-blog-card__title a {
	color: inherit;
	text-decoration: none;
}

.revme-blog-card__title a:hover,
.revme-blog-card__title a:focus {
	color: #C8A96A;
}

/* Excerpt — 3 lines max */
.revme-blog-card__excerpt {
	font-family: 'DM Sans', 'Open Sans', sans-serif;
	font-size: 0.875rem;
	color: #4a5568;
	line-height: 1.6;
	margin: 0 0 16px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

/* Meta row (read time + read more) */
.revme-blog-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
}

.revme-blog-card__read-time {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: 'DM Sans', 'Open Sans', sans-serif;
	font-size: 12px;
	color: #C8A96A;
	font-weight: 600;
}

.revme-blog-card__read-time svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.revme-blog-card__more {
	font-family: 'DM Sans', 'Open Sans', sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: #1B2F5E;
	text-decoration: none;
	transition: color 0.2s ease;
}

.revme-blog-card__more:hover,
.revme-blog-card__more:focus {
	color: #C8A96A;
}

/* ----------------------------------------------------------------
   5. Carousel arrows
   ---------------------------------------------------------------- */
.revme-blog-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #1B2F5E;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(27, 47, 94, 0.2);
	transition: background 0.2s ease, transform 0.2s ease;
}

.revme-blog-carousel__arrow:hover {
	background: #243B6A;
}

.revme-blog-carousel__arrow:focus-visible {
	outline: 3px solid #C8A96A;
	outline-offset: 2px;
}

.revme-blog-carousel__arrow svg {
	width: 18px;
	height: 18px;
}

.revme-blog-carousel__arrow--prev {
	left: -22px;
}

.revme-blog-carousel__arrow--next {
	right: -22px;
}

/* ----------------------------------------------------------------
   6. Dot indicators
   ---------------------------------------------------------------- */
.revme-blog-carousel__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 28px;
	padding: 0;
	list-style: none;
}

.revme-blog-carousel__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid #1B2F5E;
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.revme-blog-carousel__dot:focus-visible {
	outline: 3px solid #C8A96A;
	outline-offset: 2px;
}

.revme-blog-carousel__dot.is-active {
	background: #C8A96A;
	border-color: #C8A96A;
}

/* ----------------------------------------------------------------
   7. Tablet (768–1023px): 2 cards
   ---------------------------------------------------------------- */
@media (max-width: 1023px) {
	.revme-blog-carousel__slide {
		flex: 0 0 50%;
	}

	.revme-blog-carousel__arrow--prev {
		left: -8px;
	}

	.revme-blog-carousel__arrow--next {
		right: -8px;
	}
}

/* ----------------------------------------------------------------
   8. Mobile (<768px): native swipe with scroll-snap
   ---------------------------------------------------------------- */
@media (max-width: 767px) {
	.revme-blog-carousel-section {
		padding: 48px 0 56px;
	}

	.revme-blog-carousel-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		margin-bottom: 24px;
	}

	/* Let the viewport clip but allow the track to scroll natively. */
	.revme-blog-carousel__viewport {
		overflow: visible;
	}

	/* Native scroll-snap track — matches testimonial carousel pattern. */
	.revme-blog-carousel__track {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scroll-behavior: smooth;
		gap: 12px;
		padding-bottom: 12px;
		scrollbar-width: none;
		-ms-overflow-style: none;
		/* Disable the JS transform so native scroll works. */
		transform: none !important;
	}

	.revme-blog-carousel__track::-webkit-scrollbar {
		display: none;
	}

	/* 85% width cards — peek at the next card. */
	.revme-blog-carousel__slide {
		flex: 0 0 85%;
		max-width: 85%;
		padding: 0;
		scroll-snap-align: start;
	}

	.revme-blog-card__body {
		padding: 16px;
	}

	.revme-blog-card__title {
		font-size: 1rem;
	}

	/* Hide arrows on mobile — swipe replaces them. */
	.revme-blog-carousel__arrow {
		display: none;
	}

	.revme-blog-carousel__dots {
		margin-top: 20px;
		gap: 8px;
	}

	.revme-blog-carousel__dot {
		width: 8px;
		height: 8px;
	}
}
