/* ==========================================================================
   FHG Journal Card Grid v2.4.0
   Design: Figma FHG_Website / Journal_Teaser (Nodes 703:1547, 703:1560, 703:1561, 703:1564)
   Colors: Dark Forest #0D2102, Sand #DED7AE, Light 70% #F3F4EB
   Fonts: SangBleu Kingdom (title), Poppins (description, button)
   ========================================================================== */

/* --- Grid Layout --- */

.fhg-jcard-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 80px !important;
	row-gap: 40px;
	align-items: start;
	max-width: 100%;
	overflow: hidden;
}

/* --- Vertical Divider (Line between card columns) --- */

.fhg-jcard-grid--dividers .fhg-jcard::after {
	content: '';
	position: absolute;
	right: -40px;
	top: -9999px;
	bottom: -9999px;
	width: 1px;
	background-color: #0D2102;
	opacity: 0.2;
	pointer-events: none;
}

/* Continuous line: top/bottom -9999px extends through row gaps,
   grid overflow:hidden clips top/bottom and right edge automatically */

/* --- Card --- */

.fhg-jcard {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
}

/* Invisible stretched link covering entire card */
.fhg-jcard__link {
	position: absolute;
	inset: 0;
	z-index: 2;
	text-decoration: none;
}

/* --- Image --- */

.fhg-jcard__image-wrap {
	position: relative;
	width: 100%;
	border-radius: 15px;
	overflow: hidden;
	flex-shrink: 0;
}

/* Height variants based on Figma aspect ratios (510:548 tall, 510:411 short) */
.fhg-jcard--tall .fhg-jcard__image-wrap {
	aspect-ratio: 510 / 548;
}

.fhg-jcard--short .fhg-jcard__image-wrap {
	aspect-ratio: 510 / 411;
}

.fhg-jcard__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.6s cubic-bezier(0.33, 0, 0.2, 1);
}

.fhg-jcard:hover .fhg-jcard__image {
	transform: scale(1.04);
}

/* Placeholder when no featured image */
.fhg-jcard__image-placeholder {
	width: 100%;
	height: 100%;
	background-color: #F3F4EB;
}

/* --- Content --- */

.fhg-jcard__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding-top: 30px;
}

/* --- Title --- */

.fhg-jcard__title {
	font-family: 'SangBleu Kingdom', serif;
	font-weight: 500;
	font-size: 34px;
	line-height: 40px;
	letter-spacing: -0.34px;
	color: #0D2102;
	margin: 0 0 20px;
	max-width: 70%;
}

.fhg-jcard__title em,
.fhg-jcard__title i {
	font-style: italic;
}

/* --- Description --- */

.fhg-jcard__desc {
	font-family: 'Poppins', sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 28px;
	letter-spacing: -0.18px;
	color: #0D2102;
	margin: 0;
	max-width: 70%;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* --- Button (Secondary style) --- */

.fhg-jcard__btn {
	position: relative;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 15px;
	background-color: #ffffff;
	border-radius: 63px;
	border: none;
	padding: 5px 20px 6px;
	margin-top: 30px;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.3s ease;
}

.fhg-jcard__btn-text {
	font-family: 'Poppins', sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 28px;
	letter-spacing: -0.16px;
	color: #0D2102;
	white-space: nowrap;
}

.fhg-jcard__btn-arrow {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	color: #0D2102;
	transition: transform 0.3s ease;
}

.fhg-jcard__btn-arrow svg {
	width: 30px;
	height: 20px;
	display: block;
}

/* Button hover */
.fhg-jcard__btn:hover {
	background-color: #DED7AE;
}

.fhg-jcard__btn:hover .fhg-jcard__btn-arrow {
	transform: translateX(4px);
}

/* Card hover cursor */
.fhg-jcard:hover {
	cursor: pointer;
}

/* --- Focus visible --- */

.fhg-jcard__link:focus-visible ~ .fhg-jcard__image-wrap {
	outline: 2px solid #0D2102;
	outline-offset: 2px;
}

/* --- Empty state --- */

.fhg-jcard-grid__empty {
	font-family: 'Poppins', sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 28px;
	color: #0D2102;
	text-align: center;
	padding: 60px 20px;
}
