/* ============================================================
   FYFX Blog List Widget
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.fyfx-blog-list-wrapper,
.fyfx-archive-posts-wrapper {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* ── Filter Bar ──────────────────────────────────────────── */
.fyfx-blog-filter-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.fyfx-blog-filters {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

/* ── Dropdown ────────────────────────────────────────────── */
.fyfx-filter-dropdown {
	position: relative;
}

.fyfx-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 8px;
	/* Gradient border trick */
	background-image:none!important;
	background-color:#2250EF33!important;
	border: 1px solid #4C75E1!important;
	color: #ffffff;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.fyfx-filter-btn:hover {
	opacity: 0.8;
}

.fyfx-filter-arrow {
	display: inline-flex;
	align-items: center;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.fyfx-filter-dropdown.open .fyfx-filter-arrow {
	transform: rotate(180deg);
}

.fyfx-dropdown-menu {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 180px;
	background: #0a1628;
	border: 1px solid rgba(76, 117, 225, 0.35);
	border-radius: 8px;
	z-index: 999;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.fyfx-filter-dropdown.open .fyfx-dropdown-menu {
	display: block;
}

.fyfx-dropdown-menu a {
	display: block;
	padding: 10px 16px;
	color: #ffffff;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.4;
	transition: background 0.15s, color 0.15s;
}

.fyfx-dropdown-menu a:hover,
.fyfx-dropdown-menu a.active {
	background: rgba(76, 117, 225, 0.18);
	color: #4C75E1;
}

/* ── Search ──────────────────────────────────────────────── */
.fyfx-blog-search {
	display: flex;
	align-items: stretch;
	flex: 1;
	max-width: 480px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	overflow: hidden;
	background: rgba(34, 80, 239, 0.1);
}

.fyfx-search-input {
	flex: 1;
	min-width: 0;
	padding: 12px 16px;
	background: transparent;
	background-color: #2250EF1A!important;
	border: 1px solid #FFFFFF1A!important;
	border: none;
	outline: none;
	color: #ffffff;
}

.fyfx-search-input::placeholder {
	color: rgba(255, 255, 255, 0.45);
}

.fyfx-search-btn {
	flex-shrink: 0;
	padding: 12px 24px;
	background: linear-gradient(180deg, #4C75E1 0%, #2151F2 100%);
	border: none;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.fyfx-search-btn:hover {
	opacity: 0.9;
}

/* ── Posts Grid ──────────────────────────────────────────── */
.fyfx-blog-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* ── Card ────────────────────────────────────────────────── */
.fyfx-blog-card {
	display: flex;
	flex-direction: column;
	background: rgba(34, 80, 239, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fyfx-blog-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(34, 80, 239, 0.18);
}

/* ── Card Header / Image ─────────────────────────────────── */
.fyfx-card-image {
	position: relative;
	height: 200px;
	overflow: hidden;
}

.fyfx-card-image a:not(.fyfx-card-category) {
	display: block;
	height: 100%;
}

.fyfx-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.fyfx-blog-card:hover .fyfx-card-image img {
	transform: scale(1.06);
}

.fyfx-card-no-image {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(34, 80, 239, 0.3), rgba(26, 79, 225, 0.15));
}

/* ── Category Badge ──────────────────────────────────────── */
.fyfx-card-category {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	color: #ffffff;
	text-decoration: none;
	border-radius: 6px;
	border: 1px solid transparent;
	/* Gradient border over dark+tinted background */
	background:
		linear-gradient(rgba(0, 2, 13, 0.55), rgba(34, 80, 239, 0.2)) padding-box,
		linear-gradient(180deg, #4C75E1 0%, #1A4FE1 100%) border-box;
	transition: opacity 0.2s;
}

.fyfx-card-category:hover {
	opacity: 0.85;
}

/* ── Card Body ───────────────────────────────────────────── */
.fyfx-card-body {
	flex: 1;
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fyfx-card-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.fyfx-card-title a {
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s;
}

.fyfx-card-title a:hover {
	color: #4C75E1;
}

.fyfx-card-excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #A7ADBE;
}

/* ── Card Footer ─────────────────────────────────────────── */
.fyfx-card-footer {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
}

/* Gradient separator line */
.fyfx-card-footer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 20px;
	right: 20px;
	height: 1px;
	background: linear-gradient(
		90deg,
		rgba(167, 173, 190, 0) 0%,
		rgba(167, 173, 190, 0.4) 50%,
		rgba(167, 173, 190, 0) 100%
	);
}

.fyfx-card-author {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #A7ADBE;
	font-size: 13px;
	min-width: 0;
}

.fyfx-author-avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%!important;
	object-fit: cover;
	flex-shrink: 0;
}

.fyfx-card-author a {
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fyfx-card-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	color: #A7ADBE;
	font-size: 13px;
	white-space: nowrap;
	flex-shrink: 0;
}

.fyfx-card-sep {
	opacity: 0.5;
}

/* ── Load More ───────────────────────────────────────────── */
.fyfx-load-more-wrapper {
	display: flex;
	justify-content: center;
	padding-top: 8px;
}

.fyfx-load-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 40px;
	background-image:none!important;
	background-color:#2250EF33!important;
	border: 1px solid #2250EF33!important;
	border: none;
	border-radius: 25px;
	color: #ffffff;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.fyfx-load-more-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.fyfx-load-more-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* ── States ──────────────────────────────────────────────── */
.fyfx-no-posts,
.fyfx-posts-error {
	grid-column: 1 / -1;
	padding: 48px 24px;
	text-align: center;
	color: #A7ADBE;
	font-size: 15px;
}

.fyfx-posts-loading {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 48px 24px;
}

.fyfx-posts-loading span {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #4C75E1;
	animation: fyfxPulse 1.2s ease-in-out infinite;
}

.fyfx-posts-loading span:nth-child(2) { animation-delay: 0.2s; }
.fyfx-posts-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes fyfxPulse {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
	40%            { transform: scale(1);   opacity: 1;   }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
	.fyfx-blog-posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.fyfx-blog-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.fyfx-blog-search {
		max-width: 100%;
	}

	.fyfx-blog-posts-grid {
		grid-template-columns: 1fr;
	}
	.fyfx-blog-filters {
		align-items: stretch;
	}
	.fyfx-filter-dropdown {
		flex-grow: 1;
		width: 45%;
	}
	.fyfx-filter-btn {
		width: 100%;
		display: flex;
		justify-content: space-between;
	}
}
