/* Post Display Widget — frontend styles */

.pdw-wrapper * {
	box-sizing: border-box;
}

.pdw-wrapper.pdw-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ---------- Items container ---------- */
.pdw-items.pdw-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}

.pdw-items.pdw-list {
	display: flex;
	flex-direction: column;
}

@media (max-width: 767px) {
	.pdw-items.pdw-grid {
		grid-template-columns: 1fr !important;
	}
}

/* ---------- Card ---------- */
.pdw-card {
	background: #fff;
	border: 1px solid #e2e2e2;
}

.pdw-items.pdw-grid .pdw-card {
	display: flex;
	flex-direction: column;
}

.pdw-items.pdw-list .pdw-card {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 22px;
	padding: 22px 0;
	border: none;
	border-bottom: 1px solid #e2e2e2;
}

.pdw-items.pdw-list .pdw-card:first-child {
	padding-top: 0;
}

@media (max-width: 640px) {
	.pdw-items.pdw-list .pdw-card {
		grid-template-columns: 1fr !important;
	}
}

/* ---------- Image (standalone, no overlay) ---------- */
.pdw-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #e5e5e5;
}

.pdw-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Body / text content ---------- */
.pdw-body {
	padding: 16px 16px 18px;
	display: flex;
	flex-direction: column;
}

.pdw-items.pdw-list .pdw-body {
	padding: 0;
}

/* ---------- Category links (standalone, above title, max 2) ---------- */
.pdw-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.pdw-cat {
	display: inline-block;
	text-decoration: none;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 600;
	width: fit-content;
}

/* Solid badge style adds its own padding/background via inline style controls on the widget,
   but we set sane fallbacks here in case no style control values are present. */
.pdw-cat {
	padding: 0;
}

/* ---------- Title ---------- */
.pdw-title {
	margin: 0 0 8px;
	line-height: 1.25;
}

.pdw-title a {
	text-decoration: none;
	color: inherit;
}

.pdw-title a:hover {
	text-decoration: underline;
}

/* ---------- Excerpt ---------- */
.pdw-excerpt-link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.pdw-excerpt {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.55;
}

/* ---------- Meta (author / date) ---------- */
.pdw-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	margin: 0 0 10px;
}

.pdw-author {
	text-decoration: none;
	font-weight: 600;
}

.pdw-author:hover {
	text-decoration: underline;
}

.pdw-dot {
	opacity: 0.5;
}

/* ---------- Read more ---------- */
.pdw-readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	margin-top: auto;
}

.pdw-arrow {
	transition: transform 0.15s ease;
}

.pdw-card:hover .pdw-arrow {
	transform: translateX(3px);
}

.pdw-card:hover .pdw-media img {
	transform: scale(1.05);
}

/* ---------- Empty state ---------- */
.pdw-empty {
	text-align: center;
	opacity: 0.7;
	padding: 40px 0;
}

/* ---------- Pagination ---------- */
.pdw-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 34px;
	flex-wrap: wrap;
}

.pdw-page-btn {
	min-width: 34px;
	height: 34px;
	border: 1px solid #d5d5d5;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
}

.pdw-page-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.pdw-page-btn.current {
	color: #fff;
}

.pdw-page-status {
	font-size: 13px;
	padding: 0 6px;
}

.pdw-pagination--loadmore {
	justify-content: center;
}

.pdw-load-more {
	border: 1px solid #d5d5d5;
	background: #fff;
	padding: 10px 24px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
