/* ==========================================================================
   Posts (.sentio-posts)
   ==========================================================================
   Extracted from frontend.css during the Batch 8 mechanical extraction
   (2026-04-18). Behavior-preserving.
   Multi-layout WP_Query, AJAX filter/pagination, reading time, badges,
   entrance anims, hover reveal, floating author card.
   ========================================================================== */

/* ── Base ── */
.sentio-posts {
	position: relative;
}

/* ── Grid (default) ── */
.sentio-posts__grid {
	display: grid;
	grid-template-columns: repeat(var(--sentio-posts-cols, 3), 1fr);
}

/* ── List layout ── */
.sentio-posts--layout-list .sentio-posts__grid {
	display: flex;
	flex-direction: column;
}

.sentio-posts--layout-list .sentio-posts__card {
	display: flex;
	flex-direction: row;
	align-items: stretch;
}

.sentio-posts--layout-list .sentio-posts__image-wrap {
	flex: 0 0 40%;
	max-width: 40%;
}

.sentio-posts--layout-list .sentio-posts__content {
	flex: 1 1 60%;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* ── Masonry layout ── */
.sentio-posts--layout-masonry .sentio-posts__grid {
	display: block;
	column-count: var(--sentio-posts-cols, 3);
}

.sentio-posts--layout-masonry .sentio-posts__card {
	break-inside: avoid;
}

/* ── Carousel layout ── */
.sentio-posts--layout-carousel .sentio-posts__grid {
	display: block;
	overflow: hidden;
}

.sentio-posts__carousel-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 20px;
}

.sentio-posts__carousel-prev,
.sentio-posts__carousel-next {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #d1d5db;
	background: #fff;
	cursor: pointer;
	transition: all 0.25s;
	color: #374151;
}

.sentio-posts__carousel-prev:hover,
.sentio-posts__carousel-next:hover {
	background: #111827;
	color: #fff;
	border-color: #111827;
}

.sentio-posts__carousel-dots {
	display: flex;
	gap: 8px;
	align-items: center;
}

.sentio-posts__carousel-dots .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d1d5db;
	opacity: 1;
	transition: all 0.3s;
	cursor: pointer;
}

.sentio-posts__carousel-dots .swiper-pagination-bullet-active {
	background: #111827;
	width: 24px;
	border-radius: 4px;
}

/* ── Equal Height ── */
.sentio-posts--equal-height-yes .sentio-posts__card {
	display: flex;
	flex-direction: column;
}

.sentio-posts--equal-height-yes .sentio-posts__content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.sentio-posts--equal-height-yes .sentio-posts__excerpt {
	flex: 1;
}

/* ── Card ── */
.sentio-posts__card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
}

.sentio-posts__card:hover {
	transform: translateY(-4px);
}

/* ── Image ── */
.sentio-posts__image-wrap {
	position: relative;
	overflow: hidden;
}

.sentio-posts__image-wrap::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0);
	transition: background-color 0.3s;
	pointer-events: none;
	z-index: 1;
}

.sentio-posts__card:hover .sentio-posts__image-wrap::after {
	background: rgba(0,0,0,0.08);
}

.sentio-posts__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.sentio-posts__card:hover .sentio-posts__image {
	transform: scale(1.05);
}

/* Image ratios */
.sentio-posts--ratio-16-9 .sentio-posts__image-wrap { aspect-ratio: 16/9; }
.sentio-posts--ratio-4-3 .sentio-posts__image-wrap  { aspect-ratio: 4/3; }
.sentio-posts--ratio-1-1 .sentio-posts__image-wrap   { aspect-ratio: 1/1; }
.sentio-posts--ratio-3-4 .sentio-posts__image-wrap   { aspect-ratio: 3/4; }

/* ── Badges (Diff #4) ── */
.sentio-posts__badges {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	gap: 6px;
	z-index: 2;
}

.sentio-posts__badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #fff;
	line-height: 1.5;
}

.sentio-posts__badge--new {
	background: #10b981;
}

.sentio-posts__badge--sticky {
	background: #f59e0b;
}

/* ── Reading Time (Diff #4) ── */
.sentio-posts__reading-time {
	position: absolute;
	bottom: 12px;
	right: 12px;
	background: rgba(0,0,0,0.65);
	color: #fff;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 500;
	z-index: 2;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

/* ── Content ── */
.sentio-posts__content {
	padding: 20px;
}

/* Categories */
.sentio-posts__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.sentio-posts__cat {
	display: inline-block;
	padding: 2px 10px;
	background: #f3f4f6;
	color: #6366f1;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s;
}

.sentio-posts__cat:hover {
	background: #6366f1;
	color: #fff;
}

/* Title */
.sentio-posts__title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

.sentio-posts__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

.sentio-posts__title a:hover {
	color: #6366f1;
}

/* Meta */
.sentio-posts__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	font-size: 13px;
	color: #6b7280;
}

.sentio-posts__meta-author {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: default;
	position: relative;
}

.sentio-posts__author-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
}

.sentio-posts__author-name {
	font-weight: 500;
	color: #374151;
}

.sentio-posts__meta-date,
.sentio-posts__meta-comments {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.sentio-posts__meta-date::before {
	content: '';
	display: inline-block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #9ca3af;
}

.sentio-posts__meta-comments::before {
	content: '';
	display: inline-block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #9ca3af;
}

/* Excerpt */
.sentio-posts__excerpt {
	font-size: 14px;
	line-height: 1.65;
	color: #6b7280;
	margin-bottom: 12px;
}

/* Read More */
.sentio-posts__read-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: #6366f1;
	text-decoration: none;
	transition: gap 0.3s, color 0.2s;
}

.sentio-posts__read-more:hover {
	gap: 10px;
	color: #4f46e5;
}

.sentio-posts__read-more-arrow {
	transition: transform 0.3s;
}

.sentio-posts__read-more:hover .sentio-posts__read-more-arrow {
	transform: translateX(3px);
}

/* ── Hover Reveal (Diff #6) ── */
.sentio-posts__reveal {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
				opacity 0.35s ease;
}

.sentio-posts__card:hover .sentio-posts__reveal {
	max-height: 250px;
	opacity: 1;
}

/* ── Filter Bar (Diff #2) ── */
.sentio-posts__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-bottom: 28px;
}

.sentio-posts__filter {
	padding: 8px 20px;
	border: 1px solid #e5e7eb;
	border-radius: 24px;
	background: transparent;
	color: #374151;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s;
}

.sentio-posts__filter:hover {
	border-color: #6366f1;
	color: #6366f1;
}

.sentio-posts__filter--active {
	background: #111827;
	color: #fff;
	border-color: #111827;
}

/* ── Filter Transition Classes ── */
.sentio-posts__card--filter-hiding {
	opacity: 0 !important;
	transform: scale(0.85) translateY(10px) !important;
	transition: opacity 0.3s, transform 0.3s !important;
}

.sentio-posts__card--filter-hidden {
	display: none !important;
}

.sentio-posts__card--filter-showing {
	animation: sentioPostsFilterIn 0.4s ease forwards;
}

@keyframes sentioPostsFilterIn {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* ── Pagination (Diff #3) ── */
.sentio-posts__pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 32px;
	flex-direction: column;
	gap: 12px;
}

.sentio-posts__load-more {
	padding: 12px 36px;
	border: 2px solid #111827;
	border-radius: 8px;
	background: transparent;
	color: #111827;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s;
}

.sentio-posts__load-more:hover {
	background: #111827;
	color: #fff;
}

.sentio-posts__load-more--loading {
	opacity: 0.6;
	pointer-events: none;
}

.sentio-posts__page-numbers {
	display: flex;
	gap: 6px;
}

.sentio-posts__page-num {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	font-weight: 500;
	font-size: 14px;
	transition: all 0.25s;
}

.sentio-posts__page-num:hover {
	border-color: #111827;
}

.sentio-posts__page-num--active {
	background: #111827;
	color: #fff;
	border-color: #111827;
}

/* Spinner */
.sentio-posts__spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #e5e7eb;
	border-top-color: #6366f1;
	border-radius: 50%;
	animation: sentioPostsSpin 0.7s linear infinite;
}

@keyframes sentioPostsSpin {
	to { transform: rotate(360deg); }
}

/* Infinite scroll trigger */
.sentio-posts__infinite-trigger {
	height: 1px;
	width: 100%;
}

/* ── Entrance Animations (Diff #5) ── */
.sentio-posts__card--animate {
	opacity: 0;
	will-change: transform, opacity;
}

.sentio-posts__card--animate.sentio-posts__card--visible {
	opacity: 1;
	transform: none !important;
}

.sentio-posts__card--anim-fade-up {
	transform: translateY(40px);
}

.sentio-posts__card--anim-fade-in {
	transform: none;
}

.sentio-posts__card--anim-scale-up {
	transform: scale(0.85);
}

.sentio-posts__card--anim-slide-left {
	transform: translateX(50px);
}

.sentio-posts__card--anim-slide-right {
	transform: translateX(-50px);
}

/* ── Floating Author Card (Diff #8) ── */
.sentio-posts__author-popup {
	position: absolute;
	z-index: 100;
	display: none;
	width: 280px;
	padding: 16px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.15);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s, transform 0.25s;
	pointer-events: none;
}

.sentio-posts__author-popup--visible {
	display: flex !important;
	gap: 12px;
	opacity: 1;
	transform: translateY(0);
}

.sentio-posts__author-popup-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.sentio-posts__author-popup-info {
	flex: 1;
	min-width: 0;
}

.sentio-posts__author-popup-name {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	margin-bottom: 2px;
}

.sentio-posts__author-popup-role {
	display: block;
	font-size: 12px;
	color: #6366f1;
	font-weight: 500;
	margin-bottom: 6px;
	text-transform: capitalize;
}

.sentio-posts__author-popup-bio {
	font-size: 13px;
	line-height: 1.5;
	color: #6b7280;
	margin: 0 0 6px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sentio-posts__author-popup-count {
	font-size: 12px;
	color: #9ca3af;
	font-weight: 500;
}

/* ── Empty / Fallback ── */
.sentio-posts__empty {
	text-align: center;
	padding: 40px 20px;
	color: #9ca3af;
	font-size: 15px;
}

/* ── Posts Responsive ── */
@media (max-width: 767px) {
	.sentio-posts--layout-list .sentio-posts__card {
		flex-direction: column;
	}
	.sentio-posts--layout-list .sentio-posts__image-wrap {
		flex: none;
		max-width: 100%;
	}
	.sentio-posts__title {
		font-size: 16px;
	}
	.sentio-posts__filters {
		gap: 6px;
	}
	.sentio-posts__filter {
		padding: 6px 14px;
		font-size: 13px;
	}
	.sentio-posts__carousel-prev,
	.sentio-posts__carousel-next {
		width: 34px;
		height: 34px;
	}
}
