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

/* ──────────────────────────────────────────
   Section container
   ────────────────────────────────────────── */
.aaa-stories {
	font-family: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	max-width: 1280px;
	margin: 0 auto;
}

/* ──────────────────────────────────────────
   Filter bar
   ────────────────────────────────────────── */
.aaa-stories__filters {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 48px;
	border-bottom: 1px solid #c8c8c8;
	margin-bottom: 48px;
}

.aaa-stories__filters-left {
	display: flex;
	align-items: center;
}

.aaa-stories__filter-label {
	font-size: 20px;
	font-weight: 700;
	color: #000;
	letter-spacing: -0.4px;
	white-space: nowrap;
}

.aaa-stories__filters-right {
	display: flex;
	gap: 12px;
	align-items: center;
}

/* Search input */
.aaa-stories__search {
	position: relative;
}

.aaa-stories__search-icon {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #3f3f3f;
	pointer-events: none;
}

.aaa-stories__search-input {
	width: 358px;
	padding: 7px 10px 7px 42px;
	border: 1px solid #c3c3c3;
	border-radius: 8px;
	font-size: 18px;
	font-weight: 500;
	font-family: inherit;
	color: #0f0f0f;
	background: #fff;
	outline: none;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
	height: 45px;
	letter-spacing: -0.36px;
}

.aaa-stories__search-input::placeholder {
	color: #3f3f3f;
}

.aaa-stories__search-input:focus {
	border-color: #333;
}

/* Custom select wrapper */
.aaa-stories__select-wrapper {
	position: relative;
}

.aaa-stories__select {
	appearance: none;
	-webkit-appearance: none;
	padding: 10px 36px 10px 10px;
	border: 1px solid #c3c3c3;
	border-radius: 8px;
	font-size: 18px;
	font-family: inherit;
	font-weight: 500;
	color: #3f3f3f;
	background: #fff;
	cursor: pointer;
	outline: none;
	transition: border-color 0.2s ease;
	height: 45px;
	letter-spacing: -0.36px;
	line-height: 1.4;
}

.aaa-stories__select:focus {
	border-color: #333;
}

.aaa-stories__select-arrow {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #3f3f3f;
	pointer-events: none;
}

/* Sort group */
.aaa-stories__sort {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 7px 12px;
	height: 45px;
	box-sizing: border-box;
}

.aaa-stories__sort-label {
	font-size: 18px;
	font-weight: 400;
	color: #000;
	white-space: nowrap;
	line-height: 24px;
}

.aaa-stories__select--sort {
	border: none;
	padding: 0 24px 0 0;
	height: auto;
	font-weight: 500;
	color: #000;
}

.aaa-stories__select--sort:focus {
	border-color: transparent;
}

/* ──────────────────────────────────────────
   Sections
   ────────────────────────────────────────── */
.aaa-stories__sections {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.aaa-stories__section {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.aaa-stories__divider {
	border: none;
	border-top: 1px solid #d4d4d4;
	margin: 0;
}

.aaa-stories__section-header {
	text-align: center;
}

.aaa-stories__section-title {
	font-size: 32px;
	font-weight: 500;
	color: #000;
	margin: 0;
	line-height: 1.1;
	letter-spacing: -0.96px;
}

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

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

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

/* ──────────────────────────────────────────
   Story card
   ────────────────────────────────────────── */
.aaa-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-stories__card:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

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

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

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

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

.aaa-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-stories__card-divider {
	border: none;
	border-top: 1px solid #d4d4d4;
	margin: 0;
	width: 100%;
}

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

.aaa-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-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-stories__card-link:hover {
	background: #bf1d2d;
	color: #fff;
}

/* ──────────────────────────────────────────
   Section footer — View More button
   ────────────────────────────────────────── */
.aaa-stories__section-footer {
	text-align: center;
}

.aaa-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-stories__view-more:hover {
	background: #a0171f;
	color: #fff;
}

/* ──────────────────────────────────────────
   Empty state
   ────────────────────────────────────────── */
.aaa-stories__empty {
	color: #666;
	font-size: 16px;
	text-align: center;
	padding: 60px 20px;
}

/* ──────────────────────────────────────────
   No results (JS-driven)
   ────────────────────────────────────────── */
.aaa-stories__no-results {
	display: none;
	color: #666;
	font-size: 16px;
	text-align: center;
	padding: 60px 20px;
}

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

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

	.aaa-stories__card-title {
		font-size: 24px;
	}
}

/* ──────────────────────────────────────────
   Responsive — Mobile
   ────────────────────────────────────────── */
@media (max-width: 768px) {
	.aaa-stories {
		background: #f6f7fa;
		padding: 32px 20px 48px;
	}

	/* Filter bar — stacked */
	.aaa-stories__filters {
		flex-direction: column;
		align-items: flex-start;
		gap: 32px;
		padding-bottom: 20px;
		margin-bottom: 32px;
		border-bottom-color: #c8c8c8;
	}

	.aaa-stories__filters-right {
		flex-wrap: wrap;
		gap: 12px;
		width: 100%;
	}

	.aaa-stories__search {
		width: 100%;
	}

	.aaa-stories__search-input {
		width: 100%;
		font-size: 16px;
		letter-spacing: -0.32px;
	}

	.aaa-stories__search-icon {
		width: 20px;
		height: 20px;
	}

	.aaa-stories__select {
		font-size: 16px;
		letter-spacing: -0.32px;
	}

	.aaa-stories__sort-label {
		font-size: 16px;
	}

	.aaa-stories__select--sort {
		font-size: 16px;
	}

	/* Sections */
	.aaa-stories__sections {
		gap: 32px;
	}

	.aaa-stories__section {
		gap: 32px;
	}

	.aaa-stories__section-title {
		font-size: 24px;
		letter-spacing: -0.72px;
	}

	/* Card grid — horizontal scroll */
	.aaa-stories__grid-wrapper {
		overflow: hidden;
	}

	.aaa-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-stories__grid::-webkit-scrollbar {
		display: none;
	}

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

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

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

	.aaa-stories__card-content {
		padding: 24px 16px 32px;
	}

	.aaa-stories__card-title {
		font-size: 24px;
		min-height: 64px; /* 2 lines: 24px × 1.32 × 2 */
	}

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

	/* View Detail — small button, not full width */
	.aaa-stories__card-link {
		font-size: 16px;
		padding: 6px 16px;
		letter-spacing: -0.32px;
	}

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

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