/**
 * WPYog News — Public Styles
 * @package WPYog_News
 */

/* =========================================================
   Reset / Base
   ========================================================= */
.wpyog-news-wrap *,
.wpyog-news-wrap *::before,
.wpyog-news-wrap *::after {
	box-sizing: border-box;
}

.wpyog-news-wrap {
	font-family: inherit;
	margin: 0 0 2.5rem;
}

/* =========================================================
   LIST LAYOUT
   ========================================================= */
.wpyog-layout-list .wpyog-news-list-container {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.wpyog-list-item {
	display: flex;
	gap: 0;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	border: 1px solid #efefef;
	transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.wpyog-list-item:hover {
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.11);
	transform: translateY(-2px);
}

/* Thumb */
.wpyog-list-item .wpyog-item-thumb {
	flex: 0 0 210px;
	max-width: 220px;
	overflow: hidden;
}

.wpyog-list-item .wpyog-item-thumb a {
	display: block;
	height: 100%;
}

.wpyog-list-item .wpyog-item-thumb img {
	width: 100%;
	height: 100%;
	min-height: 180px;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.wpyog-list-item:hover .wpyog-item-thumb img {
	transform: scale(1.04);
}

/* Body */
.wpyog-list-item .wpyog-item-body {
	flex: 1;
	padding: 1.5rem 1.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.wpyog-list-item.no-thumb .wpyog-item-body {
	padding: 1.5rem 1.6rem;
}

/* Category pills — list */
.wpyog-item-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.wpyog-item-cats a {
	display: inline-block;
	padding: 0.15rem 0.65rem;
	background: #f0f4ff;
	color: #3F51B5;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 20px;
	text-decoration: none;
	transition: background 0.2s;
}

.wpyog-item-cats a:hover {
	background: #3F51B5;
	color: #fff;
}

/* =========================================================
   CARD LAYOUT
   ========================================================= */
.wpyog-layout-card .wpyog-news-card-container {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, 1fr);
}

.wpyog-layout-card.wpyog-cols-2 .wpyog-news-card-container {
	grid-template-columns: repeat(2, 1fr);
}

.wpyog-layout-card.wpyog-cols-4 .wpyog-news-card-container {
	grid-template-columns: repeat(4, 1fr);
}

.wpyog-card-item {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
	border: 1px solid #efefef;
	transition: box-shadow 0.25s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.wpyog-card-item:hover {
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.13);
	transform: translateY(-3px);
}

.wpyog-card-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Card thumb */
.wpyog-card-thumb {
	position: relative;
	overflow: hidden;
}

.wpyog-card-thumb a {
	display: block;
	line-height: 0;
}

.wpyog-card-thumb img {
	width: 100%;
	height: 210px;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.wpyog-card-item:hover .wpyog-card-thumb img {
	transform: scale(1.06);
}

.wpyog-card-no-thumb {
	height: 160px;
	background: linear-gradient(135deg, #3F51B5 0%, #5C6BC0 60%, #7986CB 100%);
}

/* Category pills — cards (overlaid on image) */
.wpyog-card-cats {
	position: absolute;
	top: 0.65rem;
	left: 0.65rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	z-index: 2;
}

.wpyog-card-cats a {
	display: inline-block;
	padding: 0.18rem 0.6rem;
	background: rgba(63, 81, 181, 0.9);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 20px;
	text-decoration: none;
	backdrop-filter: blur(4px);
	transition: background 0.2s;
}

.wpyog-card-cats a:hover {
	background: rgba(40, 53, 147, 0.95);
}

/* Card body */
.wpyog-card-body {
	padding: 1.1rem 1.2rem 0.6rem;
	flex: 1;
}

/* Card footer */
.wpyog-card-footer {
	padding: 0.75rem 1.2rem 1.1rem;
	border-top: 1px solid #f2f2f2;
}

.wpyog-card-bottom-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.6rem;
	flex-wrap: wrap;
	gap: 0.4rem;
}

/* =========================================================
   Shared typography
   ========================================================= */

/* Title (h2) */
.wpyog-item-title {
	margin: 0 0 0.3rem;
	font-size: 1.4rem;
	line-height: 1.45;
	font-weight: bold;
}

.wpyog-item-title a {
	color: #1a1a2e;
	text-decoration: none;
	transition: color 0.2s;
}

.wpyog-item-title a:hover {
	color: #3F51B5;
}

/* Date */
.wpyog-item-date {
	font-size: 0.9rem;
	color: #888;
	display: inline-block;
}

/* Excerpt */
.wpyog-item-excerpt {
	font-size: 1.1rem;
	color: #4c4b4b;
	line-height: 1.6;
	margin: 0;
}

/* Card excerpt — slightly smaller */
.wpyog-card-body .wpyog-item-excerpt {
	font-size: 0.88rem;
	color: #555;
}

/* =========================================================
   Source credit
   ========================================================= */
.wpyog-source {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.82rem;
	color: #555;
}

.wpyog-source-favicon {
	width: 24px;
	height: 24px;
	vertical-align: middle;
	border-radius: 2px;
	object-fit: contain;
}

.wpyog-source-name {
	color: #444;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.82rem;
}

.wpyog-source-name:hover {
	color: #3F51B5;
}

/* =========================================================
   Item footer (list layout)
   ========================================================= */
.wpyog-item-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 0.85rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* =========================================================
   Read More button — indigo pill
   ========================================================= */
.wpyog-read-more {
	display: inline-block;
	padding: 0.4rem 1.1rem;
	background: #3F51B5;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 20px;
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
	transition: background 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 6px rgba(63, 81, 181, 0.28);
}

.wpyog-read-more:hover {
	background: #303F9F;
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(63, 81, 181, 0.38);
}

/* =========================================================
   Pagination
   ========================================================= */
.wpyog-pagination {
	margin-top: 2rem;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.3rem;
}

.wpyog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.3rem;
	height: 2.3rem;
	padding: 0 0.65rem;
	border: 1.5px solid #ddd;
	border-radius: 6px;
	color: #444;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	background: #fff;
}

.wpyog-pagination .page-numbers.current,
.wpyog-pagination .page-numbers:hover {
	background: #3F51B5;
	color: #fff;
	border-color: #3F51B5;
}

.wpyog-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

/* =========================================================
   Load More button
   ========================================================= */
.wpyog-load-more-wrap {
	margin-top: 2.5rem;
	text-align: center;
}

.wpyog-load-more-btn {
	display: inline-block;
	padding: 0.7rem 2.8rem;
	background: transparent;
	color: #3F51B5;
	border: 2px solid #3F51B5;
	border-radius: 30px;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	letter-spacing: 0.03em;
	transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
	line-height: 1.5;
}

.wpyog-load-more-btn:hover {
	background: #3F51B5;
	color: #fff;
	box-shadow: 0 6px 18px rgba(63, 81, 181, 0.3);
}

.wpyog-load-more-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	box-shadow: none;
}

/* =========================================================
   Single post: Prev / Next navigation
   ========================================================= */
.wpyog-post-navigation {
	margin-top: 3rem;
	border-top: 2px solid #f0f0f0;
	padding-top: 1.5rem;
}

.wpyog-nav-links {
	display: flex;
	gap: 1.5rem;
}

.wpyog-nav-prev,
.wpyog-nav-next {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1.1rem 1.3rem;
	background: #f8f9ff;
	border: 1.5px solid #e5e8f5;
	border-radius: 10px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wpyog-nav-prev:hover,
.wpyog-nav-next:hover {
	border-color: #3F51B5;
	box-shadow: 0 4px 14px rgba(63, 81, 181, 0.1);
}

.wpyog-nav-next {
	text-align: right;
}

.wpyog-nav-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	color: #3F51B5;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.wpyog-nav-title {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	color: #1a1a2e;
	text-decoration: none;
	line-height: 1.4;
	transition: color 0.2s;
}

.wpyog-nav-title:hover {
	color: #3F51B5;
}

.wpyog-nav-empty {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
	pointer-events: none;
}

/* =========================================================
   No news
   ========================================================= */
.wpyog-no-news {
	text-align: center;
	padding: 2.5rem;
	color: #999;
	background: #fafafa;
	border: 1.5px dashed #e0e0e0;
	border-radius: 10px;
	font-size: 0.95rem;
}

/* =========================================================
   Responsive
   ========================================================= */
@media ( max-width: 900px ) {
	.wpyog-layout-card.wpyog-cols-4 .wpyog-news-card-container {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media ( max-width: 768px ) {
	.wpyog-list-item {
		flex-direction: column;
	}

	.wpyog-list-item .wpyog-item-thumb {
		flex: 0 0 auto;
		max-width: 100%;
	}

	.wpyog-list-item .wpyog-item-thumb img {
		min-height: unset;
		height: 220px;
	}

	.wpyog-list-item .wpyog-item-body {
		padding: 1.1rem 1.2rem;
	}

	.wpyog-layout-card .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-3 .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-4 .wpyog-news-card-container {
		grid-template-columns: repeat(2, 1fr);
	}

	.wpyog-nav-links {
		flex-direction: column;
	}

	.wpyog-nav-next {
		text-align: left;
	}
}

@media ( max-width: 480px ) {
	.wpyog-layout-card .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-2 .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-3 .wpyog-news-card-container,
	.wpyog-layout-card.wpyog-cols-4 .wpyog-news-card-container {
		grid-template-columns: 1fr;
	}

	.wpyog-item-title {
		font-size: 0.97rem;
	}

	.wpyog-item-excerpt {
		font-size: 0.9rem;
	}
}
