/*
 * Website Design Case Study - front-end styles
 * All selectors are prefixed with "wdcs-" to avoid clashing with
 * theme or other plugin styles.
 */

.wdcs-wrapper {
	box-sizing: border-box;
}

.wdcs-wrapper *,
.wdcs-wrapper *::before,
.wdcs-wrapper *::after {
	box-sizing: inherit;
}

/* ---------------------------------------------------------------------
 * Grid
 * A single defined 3-column grid. Cards are NOT stretched with
 * flex-grow, so 1 card occupies 1 column (1/3 width) and 2 cards
 * occupy 2 columns, exactly as specified.
 * ------------------------------------------------------------------- */
.wdcs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

/* ---------------------------------------------------------------------
 * Card
 * ------------------------------------------------------------------- */
.wdcs-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: none;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 6px 20px rgba(16, 24, 40, 0.07);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wdcs-card:hover {
	box-shadow: 0 4px 8px rgba(16, 24, 40, 0.07), 0 14px 28px rgba(16, 24, 40, 0.1);
	transform: translateY(-2px);
}

.wdcs-card-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #f3f4f6;
	overflow: hidden;
}

.wdcs-thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wdcs-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(
		45deg,
		#f3f4f6,
		#f3f4f6 10px,
		#eceef1 10px,
		#eceef1 20px
	);
}

.wdcs-card-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 26px 26px 20px;
}

.wdcs-card-title {
	margin: 0 0 18px;
	font-size: 1.2rem;
	line-height: 1.45;
	font-weight: 700;
	color: #14171f;
}

.wdcs-read-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: auto;
	padding: 0;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #1f6feb;
	background: none;
	text-decoration: none;
	transition: color 0.2s ease;
}

.wdcs-read-more-arrow {
	font-size: 0.95rem;
	line-height: 1;
}

.wdcs-read-more:hover,
.wdcs-read-more:focus {
	color: #1a5fce;
	text-decoration: underline;
}

.wdcs-card-footer {
	width: 100%;
	margin-top: 22px;
	padding-top: 14px;
	border-top: 1px solid #e9ebee;
}

.wdcs-card-date {
	font-size: 0.85rem;
	color: #9aa0a6;
}

/* ---------------------------------------------------------------------
 * Empty state
 * ------------------------------------------------------------------- */
.wdcs-empty {
	padding: 24px 0;
	color: #6b7280;
}

/* ---------------------------------------------------------------------
 * Pagination
 * ------------------------------------------------------------------- */
.wdcs-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.wdcs-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	color: #1f2328;
	text-decoration: none;
	font-size: 0.9rem;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wdcs-page-link:hover {
	background: #f3f4f6;
}

.wdcs-page-link.wdcs-page-current {
	background: #1f6feb;
	border-color: #1f6feb;
	color: #ffffff;
	pointer-events: none;
}

/* ---------------------------------------------------------------------
 * Responsive breakpoints
 * ------------------------------------------------------------------- */
@media (max-width: 900px) {
	.wdcs-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 22px;
	}
}

@media (max-width: 560px) {
	.wdcs-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}
}
