/**
 * Block: blog (latest posts / posts archive)
 * Block: post-card
 * Block: pagination
 */

.blog {
	padding: var(--aqua-section-space) 0;
	background: var(--aqua-light);
}

.post-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: var(--aqua-radius);
	background: var(--aqua-white);
	box-shadow: var(--aqua-shadow);
	transition: transform 0.45s var(--aqua-ease), box-shadow 0.45s ease;
}

/* Invisible strip under the card: keeps the hover state while the card is lifted
   (otherwise it trembles when the pointer rests on its bottom edge). */
.post-card::after {
	content: "";
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	height: 10px;
}

.post-card:hover {
	box-shadow: var(--aqua-shadow-hover);
	transform: translateY(-8px);
}

.post-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--aqua-radius) var(--aqua-radius) 0 0;
}

/* Light tint over the image on hover. */
.post-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	transition: background-color 0.5s;
}

.post-card:hover .post-card__media::after {
	background: rgba(0, 209, 249, 0.2);
}

.post-card__image {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.8s var(--aqua-ease);
}

.post-card:hover .post-card__image {
	transform: scale(1.07);
}

.post-card__date {
	position: absolute;
	top: 25px;
	left: 25px;
	z-index: 2;
	padding: 0.5rem 1.5rem;
	border-radius: var(--aqua-radius-sm);
	background: var(--aqua-primary);
	color: var(--aqua-white);
	font-size: 0.85rem;
	font-weight: 600;
}

.post-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 1.5rem;
}

.post-card__title {
	margin-bottom: 1rem;
	font-size: calc(1.275rem + 0.3vw);
	line-height: 1.35;
}

.post-card__title-link {
	color: var(--aqua-dark);
	text-decoration: none;
}

.post-card__title-link:hover {
	color: var(--aqua-primary);
}

.post-card__excerpt {
	margin-bottom: 1rem;
}

.post-card__excerpt:last-child {
	margin-bottom: 0;
}

.post-card__more {
	margin-top: auto;
	color: var(--aqua-secondary);
	font-weight: 700;
	text-decoration: none;
}

.post-card__more:hover {
	color: var(--aqua-primary);
}

@media (min-width: 1200px) {
	.post-card__title {
		font-size: 1.5rem;
	}
}

.pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 3rem 0 0;
	padding: 0;
	list-style: none;
}

.pagination__link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.75rem;
	border-radius: 50px;
	background: var(--aqua-white);
	color: var(--aqua-secondary);
	font-weight: 600;
	text-decoration: none;
	box-shadow: var(--aqua-shadow);
	transition: background-color 0.3s, color 0.3s;
}

.pagination__link:hover,
.pagination__link--current {
	background: var(--aqua-primary);
	color: var(--aqua-white);
}
