/* =====================================================
   Serenity Related Posts Widget
   ===================================================== */

/* ── Header row ── */
.srp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
}

/* ── Heading ── */
.srp-heading {
	font-size: 20px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0;
}

/* ── Sort Tabs ── */
.srp-sort-tabs {
	display: flex;
	gap: 4px;
}

.srp-sort-btn {
	position: relative;
	padding: 6px 14px;
	background: transparent;
	border: none;
	border-radius: 0;
	font-size: 13px;
	font-weight: 500;
	color: #888;
	cursor: pointer;
	transition: color 200ms ease;
}

.srp-sort-btn::after {
	content: '';
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 0;
	height: 2px;
	background: transparent;
	transition: background 200ms ease;
	border-radius: 2px;
}

.srp-sort-btn:hover { color: #555; }
.srp-sort-btn.active { color: #c9a96e; }
.srp-sort-btn.active::after { background: #c9a96e; }

/* ── Grid ── */
.srp-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	transition: opacity 250ms ease;
}

.srp-grid.loading { opacity: 0.4; pointer-events: none; }

/* ── Card ── */
.srp-card {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 260ms ease, box-shadow 260ms ease;
}

.srp-hover-lift:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.srp-card-image-link { display: block; }

.srp-card-image {
	width: 100%;
	height: 190px;
	overflow: hidden;
	position: relative;
	border-radius: 10px 10px 0 0;
}

.srp-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 380ms ease;
}

.srp-hover-zoom:hover .srp-card-image img { transform: scale(1.06); }

/* ── Badge ── */
.srp-badge {
	display: inline-block;
	padding: 3px 9px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: #c9a96e;
	color: #fff;
	border-radius: 3px;
}

.srp-card-image .srp-badge {
	position: absolute;
	top: 10px;
	left: 10px;
}

.srp-badge-inline { margin-bottom: 8px; }

/* ── Card body ── */
.srp-card-body {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.srp-card-title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 8px;
}

.srp-card-title a {
	color: #1a1a1a;
	text-decoration: none;
	transition: color 200ms ease;
}

.srp-card:hover .srp-card-title a { color: #c9a96e; }

.srp-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: #888;
	margin-bottom: 8px;
}

.srp-meta svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

.srp-excerpt {
	font-size: 13px;
	color: #555;
	line-height: 1.55;
	margin: 0;
}

.srp-no-posts {
	color: #888;
	font-style: italic;
	grid-column: 1 / -1;
}

/* ── Pagination ── */
.srp-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin-top: 28px;
}

.srp-pag-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	background: transparent;
	border: 1.5px solid #888;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	color: #555;
	cursor: pointer;
	transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.srp-pag-btn.active,
.srp-pag-btn:hover:not(.active) {
	background: #c9a96e;
	border-color: #c9a96e;
	color: #fff;
}

/* ── Carousel ── */
.srp-carousel-wrap {
	position: relative;
	overflow: hidden;
	padding-bottom: 44px;
}

.srp-track-outer { overflow: hidden; }

.srp-track {
	display: flex;
	gap: 24px;
	transition: transform 480ms cubic-bezier(.4,0,.2,1);
	will-change: transform;
}

.srp-slide { flex: 0 0 auto; min-width: 0; }

.srp-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(calc(-50% - 22px));
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1.5px solid #1a1a1a;
	border-radius: 50%;
	cursor: pointer;
	color: #1a1a1a;
	transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
	z-index: 10;
	padding: 0;
}

.srp-arrow:hover {
	background: #c9a96e;
	border-color: #c9a96e;
	color: #fff;
}

.srp-arrow.disabled { opacity: 0.3; pointer-events: none; }
.srp-prev { left: 0; }
.srp-next { right: 0; }

.srp-carousel-wrap .srp-track-outer { padding: 0 52px; }

.srp-dots {
	position: absolute;
	bottom: 6px;
	left: 0; right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.srp-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(0,0,0,0.18);
	cursor: pointer;
	border: none;
	padding: 0;
	transition: background 220ms ease, width 220ms ease;
}

.srp-dot.active {
	background: #c9a96e;
	width: 18px;
	border-radius: 4px;
}

/* ── Loading ── */
.srp-wrapper { position: relative; }

.srp-loading {
	display: none;
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,0.72);
	z-index: 10;
	border-radius: 10px;
}

.srp-wrapper.srp-loading-active .srp-loading { display: flex; }

.srp-spinner {
	width: 28px;
	height: 28px;
	border: 3px solid rgba(201,169,110,0.2);
	border-top-color: #c9a96e;
	border-radius: 50%;
	animation: srp-spin 600ms linear infinite;
}

@keyframes srp-spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 1024px) {
	.srp-grid { grid-template-columns: repeat(2, 1fr); }
	.srp-carousel-wrap .srp-track-outer { padding: 0 44px; }
}

@media (max-width: 768px) {
	.srp-grid { grid-template-columns: 1fr; }
	.srp-header { flex-direction: column; align-items: flex-start; }
	.srp-arrow { display: none; }
	.srp-carousel-wrap .srp-track-outer { padding: 0; }
}
