/* ==========================================================================
   Latest blog posts ([tech_ae_latest_posts])
   Mobile: slider, 1 card (next one peeks in) · Tablet 768px+: slider, 2 per view ·
   Desktop / laptop 1024px+: 3 cards in a row, no slider.
   ========================================================================== */
.tech-ae-lposts {
	--tech-ae-lp-gap: 16px;
	min-width: 0;
}

/* Heading: centred title, short blue line, subtitle */
.tech-ae-lposts__head { max-width: 640px; margin: 0 auto 26px; text-align: center; }
.tech-ae-lposts__title { margin: 0; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); }
.tech-ae-lposts__title::after {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	margin: 12px auto 0;
	border-radius: 3px;
	background: var(--tech-ae-primary);
}
.tech-ae-lposts__subtitle { margin: 12px 0 0; color: var(--tech-ae-grey); }

/* Track: horizontal scroll-snap slider below 1024px */
.tech-ae-lposts__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 86%;
	gap: var(--tech-ae-lp-gap);
	min-width: 0;
	margin: 0;
	padding: 6px 0 12px; /* Room for the hover lift / shadow. */
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	list-style: none;
}
.tech-ae-lposts__track::-webkit-scrollbar { display: none; }
.tech-ae-lposts__item { display: flex; min-width: 0; scroll-snap-align: start; }

/* Card: the whole card is one link */
.tech-ae-lcard {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--tech-ae-border);
	border-radius: var(--tech-ae-radius-lg);
	background: var(--tech-ae-white);
	color: var(--tech-ae-dark);
	transition: border-color var(--tech-ae-ease), box-shadow var(--tech-ae-ease), transform var(--tech-ae-ease);
}
.tech-ae-lcard:hover,
.tech-ae-lcard:focus-visible {
	border-color: var(--tech-ae-primary);
	box-shadow: 0 14px 30px -18px rgba(11, 81, 153, .55);
	color: var(--tech-ae-dark);
	transform: translateY(-3px);
}

.tech-ae-lcard__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--tech-ae-soft);
}
.tech-ae-lcard__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}
.tech-ae-lcard:hover .tech-ae-lcard__media img { transform: scale(1.05); }
.tech-ae-lcard__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--tech-ae-primary);
	opacity: .5;
}

.tech-ae-lcard__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 22px 24px; }
.tech-ae-lcard__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 18px;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: color var(--tech-ae-ease);
}
.tech-ae-lcard:hover .tech-ae-lcard__title { color: var(--tech-ae-primary); }
.tech-ae-lcard__excerpt { color: var(--tech-ae-grey); font-size: 15px; line-height: 1.6; }

/* Prev / next buttons (slider only) */
.tech-ae-lposts__nav { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.tech-ae-lposts.is-static .tech-ae-lposts__nav { display: none; }
.tech-ae-lposts__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--tech-ae-border);
	border-radius: 50%;
	background: var(--tech-ae-white);
	color: var(--tech-ae-dark);
	cursor: pointer;
	transition: background var(--tech-ae-ease), color var(--tech-ae-ease), border-color var(--tech-ae-ease);
}
.tech-ae-lposts__btn:hover:not(:disabled) { border-color: var(--tech-ae-primary); background: var(--tech-ae-primary); color: var(--tech-ae-white); }
.tech-ae-lposts__btn:disabled { opacity: .4; cursor: default; }

/* Tablet: 2 per view */
@media (min-width: 768px) {
	.tech-ae-lposts { --tech-ae-lp-gap: 20px; }
	.tech-ae-lposts__track { grid-auto-columns: calc((100% - var(--tech-ae-lp-gap)) / 2); }
}

/* Desktop / laptop: plain 3-column grid, no slider */
@media (min-width: 1024px) {
	.tech-ae-lposts { --tech-ae-lp-gap: 24px; }
	.tech-ae-lposts__track {
		grid-auto-flow: row;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		overflow: visible;
		scroll-snap-type: none;
	}
	.tech-ae-lposts__nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tech-ae-lposts__track { scroll-behavior: auto; }
	.tech-ae-lcard, .tech-ae-lcard__media img { transition: none; }
	.tech-ae-lcard:hover { transform: none; }
	.tech-ae-lcard:hover .tech-ae-lcard__media img { transform: none; }
}
