/* [cd_forum_cards] shortcode styles */

.cd-fcards-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: stretch;
	gap: 22px;
}

.cd-fcards-card {
	position: relative;
	box-sizing: border-box;
	min-height: 369px;
	/* 80px divider + 12px gap: keeps the subforum list clear of the footer. */
	padding-bottom: 92px;
	border: 1px solid #D9D9D9;
	border-radius: 20px;
	background: #fff;
}

/* --- Top row: icon + title ------------------------------------------- */

.cd-fcards-head {
	display: flex;
	align-items: center;
	padding: 22px 21px 0 21px;
}

.cd-fcards-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 83px;
	height: 83px;
	border-radius: 50em;
	background: #FEE3E0;
}

.cd-fcards-icon svg,
.cd-fcards-icon img {
	display: block;
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.cd-fcards-title {
	margin-left: 17px;
	font-family: 'Playfair Display', serif !important;
	font-weight: 500 !important;
	font-size: 24px !important;
	line-height: 29px !important;
	color: #F6599C;
	text-decoration: none;
}

.cd-fcards-title:hover,
.cd-fcards-title:focus {
	color: #F6599C;
	text-decoration: none;
}

/* --- Subforum list ---------------------------------------------------- */

.cd-fcards-subs {
	margin: 29px 0 0 0;
	padding: 0 21px;
	list-style: none;
}

.cd-fcards-sub {
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 400 !important;
	font-size: 17px !important;
	line-height: 28px !important;
	color: #1E1E1EB2;
}

.cd-fcards-sub a {
	color: inherit;
	text-decoration: none;
}

.cd-fcards-sub a:hover,
.cd-fcards-sub a:focus {
	color: inherit;
	text-decoration: underline;
}

/* --- Footer, pinned to the bottom of the card ------------------------- */

.cd-fcards-divider {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 80px;
	height: 1px;
	background: #00000033;
}

/* Starts 12px below the divider (80 - 12 = 68) and runs to the card edge. */
.cd-fcards-foot {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 0;
	height: 68px;
	display: flex;
	align-items: flex-start;
}

.cd-fcards-topics {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex-shrink: 0;
}

.cd-fcards-topics-label {
	font-family: 'Outfit', sans-serif !important;
	font-weight: 400 !important;
	font-size: 14px !important;
	line-height: 14px !important;
	color: #1E1E1EB2;
}

.cd-fcards-topics-count {
	margin-top: 0;
	font-family: 'Playfair Display', serif !important;
	font-weight: 500 !important;
	font-size: 30px !important;
	line-height: 30px !important;
	color: #F6599C;
}

/* 68px tall footer less the 19px bottom offset. */
.cd-fcards-vdivider {
	flex-shrink: 0;
	align-self: flex-start;
	width: 1px;
	height: 49px;
	margin-left: 60px;
	background: #00000033;
}

.cd-fcards-author {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: 68px;
	margin-left: 25px;
}

/* Sits 2px above the bottom of the vertical divider (19 + 2). The !important
   rules override the theme's global image border / padding, which would
   otherwise square the avatar off and ring it in the theme's accent colour. */
.cd-fcards-author-pic {
	position: absolute;
	left: 0;
	bottom: 21px;
	width: 33px !important;
	height: 33px !important;
	max-width: 33px;
	min-width: 33px;
	border: 0 !important;
	border-radius: 50em !important;
	padding: 0 !important;
	margin: 0 !important;
	background-color: transparent;
	box-shadow: none !important;
	object-fit: cover;
	overflow: hidden;
}

.cd-fcards-author-pic-empty {
	display: block;
	background: #4B2ACA;
}

.cd-fcards-author-label {
	position: absolute;
	left: 44px;
	right: 0;
	bottom: 53px;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 400 !important;
	font-size: 13px !important;
	line-height: 13px !important;
	color: #1E1E1EB2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Vertically centred on the 33px avatar: 21 + (33 - 17) / 2. */
.cd-fcards-author-name {
	position: absolute;
	left: 44px;
	right: 0;
	bottom: 29px;
	font-family: 'Outfit', sans-serif !important;
	font-weight: 400 !important;
	font-size: 17px !important;
	line-height: 17px !important;
	color: #1E1E1EE5;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cd-fcards-empty {
	font-family: 'Outfit', sans-serif;
	font-size: 15px;
	color: #666;
}

/* --- Responsive ------------------------------------------------------- */

@media (max-width: 1280px) {
	.cd-fcards-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 1024px) {
	.cd-fcards-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.cd-fcards-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
