/**
 * AAA Related Stories Shortcode Styles
 *
 * @package AAA_Templates
 */

/* ──────────────────────────────────────────
   Body (cards + view more)
   ────────────────────────────────────────── */
.aaa-related-stories__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
}

/* ──────────────────────────────────────────
   Card grid
   ────────────────────────────────────────── */
.aaa-related-stories__grid-wrapper {
	position: relative;
	width: 100%;
}

.aaa-related-stories__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

/* Horizontal scroll fade — hidden on desktop */
.aaa-related-stories__grid-fade {
	display: none;
}

/* ──────────────────────────────────────────
   Story card
   ────────────────────────────────────────── */
.aaa-related-stories__card {
	background: #fff;
	border: 1px solid #b9b9b9;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
}

.aaa-related-stories__card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Card image */
.aaa-related-stories__card-image {
	width: 100%;
	height: 401px;
	overflow: hidden;
	background: #b3b3b3;
}

.aaa-related-stories__card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.aaa-related-stories__card:hover .aaa-related-stories__card-image img {
	transform: scale(1.03);
}

.aaa-related-stories__card-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ddd;
}

/* Card content */
.aaa-related-stories__card-content {
	padding: 24px 16px 32px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

.aaa-related-stories__card-title {
	font-size: 32px;
	font-weight: 500;
	color: #000;
	margin: 0;
	line-height: 1.32;
	text-transform: capitalize;
	min-height: 84px; /* 2 lines: 32px × 1.32 × 2 */
}

/* Divider between title and hashtags */
.aaa-related-stories__card-divider {
	border: none;
	border-top: 1px solid #d4d4d4;
	margin: 0;
	width: 100%;
}

.aaa-related-stories__card-hashtags {
	font-size: 18px;
	font-weight: 500;
	color: #3f3f3f;
	margin: 0;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aaa-related-stories__card-excerpt {
	font-size: 18px;
	font-weight: 500;
	color: #3f3f3f;
	line-height: 1.3;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

/* View Detail button — full width, red outline */
.aaa-related-stories__card-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	font-size: 18px;
	font-weight: 600;
	color: #bf1d2d;
	text-decoration: none;
	border: 1px solid #bf1d2d;
	border-radius: 10px;
	padding: 6px 20px;
	box-sizing: border-box;
	transition: background 0.2s ease;
	margin-top: auto;
	font-family: inherit;
	letter-spacing: -0.36px;
	line-height: 1.48;
}

.aaa-related-stories__card-link:hover {
	background: #bf1d2d;
	color: #fff;
}

/* ──────────────────────────────────────────
   Footer — View More button
   ────────────────────────────────────────── */
.aaa-related-stories__footer {
	text-align: center;
}

.aaa-related-stories__view-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #bf1d2d;
	color: #fff;
	padding: 6px 24px;
	height: 48px;
	border-radius: 10px;
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease;
	font-family: inherit;
	letter-spacing: -0.36px;
	line-height: 1.48;
	box-sizing: border-box;
}

.aaa-related-stories__view-more:hover {
	background: #a0171f;
	color: #fff;
}

/* ──────────────────────────────────────────
   Responsive — Tablet
   ────────────────────────────────────────── */
@media (max-width: 1024px) {
	.aaa-related-stories__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.aaa-related-stories__card-image {
		height: 300px;
	}

	.aaa-related-stories__card-title {
		font-size: 24px;
		min-height: 64px;
	}
}

/* ──────────────────────────────────────────
   Responsive — Mobile
   ────────────────────────────────────────── */
@media (max-width: 768px) {
	/* Card grid — horizontal scroll */
	.aaa-related-stories__grid-wrapper {
		overflow: hidden;
	}

	.aaa-related-stories__grid {
		display: flex;
		gap: 20px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		padding-bottom: 4px;
		padding-right: 80px;
	}

	/* Hide scrollbar */
	.aaa-related-stories__grid::-webkit-scrollbar {
		display: none;
	}

	.aaa-related-stories__grid {
		-ms-overflow-style: none;
		scrollbar-width: none;
	}

	/* Fixed card width for horizontal scroll */
	.aaa-related-stories__card {
		min-width: 280px;
		max-width: 280px;
		flex-shrink: 0;
		scroll-snap-align: start;
	}

	.aaa-related-stories__card-image {
		height: 401px;
	}

	.aaa-related-stories__card-title {
		font-size: 24px;
		min-height: 64px;
	}

	.aaa-related-stories__card-excerpt,
	.aaa-related-stories__card-hashtags {
		font-size: 16px;
	}

	.aaa-related-stories__card-link {
		font-size: 16px;
		padding: 6px 16px;
		letter-spacing: -0.32px;
	}

	/* Right fade gradient for horizontal scroll */
	.aaa-related-stories__grid-fade {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		width: 80px;
		height: 100%;
		background: linear-gradient(to left, #f9f9f9 0%, rgba(249, 249, 249, 0) 100%);
		pointer-events: none;
		z-index: 1;
	}

	/* View More — smaller on mobile */
	.aaa-related-stories__view-more {
		width: 273px;
		height: 40px;
		font-size: 16px;
		padding: 6px 16px;
		letter-spacing: -0.32px;
	}
}
