/* =========================================
   Homepage: "Trending at Obhan" card carousel
   (template-parts/home/trending.php)
========================================= */

.trending-section {
	background-color: #f4f4f4;
	padding: 34px 0 38px;
}

.trending-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
}

.trending-rule {
	display: block;
	width: 28px;
	height: 2px;
	background: #ed1b45;
	margin-bottom: 10px;
}

.trending-section .trending-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 28px;
	font-weight: 400;
	line-height: 1.2;
	color: #222;
	text-align: left;
}

.trending-tools {
	display: flex;
	align-items: center;
	gap: 14px;
}

.trending-all {
	color: #ed1b45;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.trending-all:hover,
.trending-all:focus {
	color: #ed1b45;
	text-decoration: underline;
}

.trending-arrow {
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid #cfcfcf;
	border-radius: 0;
	background: #fff;
	color: #333;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.trending-arrow:hover,
.trending-arrow:focus-visible {
	background: #333;
	border-color: #333;
	color: #fff;
}

.trending-arrow:disabled {
	opacity: 0.4;
	cursor: default;
	background: #fff;
	border-color: #cfcfcf;
	color: #333;
}

/* The row scrolls natively (touch, trackpad, keyboard); JS adds arrows + dots. */
.trending-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 60px) / 4);
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.trending-track::-webkit-scrollbar {
	display: none;
}

.trending-track:focus-visible {
	outline: 2px solid #ed1b45;
	outline-offset: 4px;
}

.trending-card {
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
	padding: 22px 20px 20px;
	background: #fff;
	border-top: 3px solid #ed1b45;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.trending-card-top {
	display: flex;
	align-items: center;
	gap: 14px;
}

.trending-photo {
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	overflow: hidden;
	background: #e6e6e6;
}

.trending-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.trending-tag {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #888;
}

.trending-section .trending-card-title {
	margin: 0;
	min-height: 44px;
	font-family: "Open Sans", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}

.trending-card-title a {
	color: #222;
	text-decoration: none;
}

.trending-card-title a:hover,
.trending-card-title a:focus {
	color: #ed1b45;
}

.trending-more {
	margin-top: auto;
	font-size: 13px;
	font-weight: 600;
	color: #ed1b45;
	text-decoration: none;
}

.trending-more:hover,
.trending-more:focus {
	color: #ed1b45;
	text-decoration: underline;
}

.trending-dots {
	display: none;
}

@media (max-width: 991px) {
	.trending-track {
		grid-auto-columns: calc((100% - 20px) / 2);
	}
}

@media (max-width: 767px) {
	.trending-section {
		padding: 26px 0 28px;
	}

	.trending-section .trending-title {
		font-size: 22px;
	}

	.trending-arrow,
	.trending-tools .trending-all {
		display: none;
	}

	.trending-track {
		grid-auto-columns: 82%;
		gap: 14px;
	}

	.trending-dots {
		display: flex;
		justify-content: center;
		gap: 6px;
		margin-top: 16px;
	}

	.trending-dots span {
		width: 7px;
		height: 7px;
		border-radius: 4px;
		background: #ccc;
		transition: width 0.2s, background-color 0.2s;
	}

	.trending-dots span.is-active {
		width: 20px;
		background: #ed1b45;
	}
}

@media (prefers-reduced-motion: reduce) {
	.trending-track {
		scroll-behavior: auto;
	}
}
