/**
 * Feed Posts Styles
 * Exact copy of feed/css/feeds.css teaser card design
 */

/* ============================================
   CONTAINER
   ============================================ */
.feed-posts-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ============================================
   GRID - Mobile first (1 column, horizontal cards)
   ============================================ */
.feed-posts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

/* ============================================
   CARD BASE
   ============================================ */
.feed-card {
	border: 0;
}

/* Card link - mobile: horizontal layout (image left, text right) */
.feed-card-link {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

/* ============================================
   IMAGE WRAPPER
   ============================================ */
.feed-card-image {
	overflow: hidden;
	background: #e0e0e0;
	border-radius: 8px;
	margin: 0 !important;
}

.feed-card-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.feed-card-image img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	transition: transform 0.3s ease;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.feed-card-content {
	padding-top: 0;
	padding-left: 10px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

/* ============================================
   TITLE
   ============================================ */
.feed-card-title {
	font-size: 1rem !important;
	line-height: 1.3 !important;
	color: #333;
	font-weight: 600 !important;
	margin: 0 !important;
}

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

/* ============================================
   HOVER EFFECTS
   ============================================ */
.feed-card:hover .feed-card-image img {
	transform: scale(1.03);
}

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

/* ============================================
   MOBILE (max-width: 409px)
   Fixed image size, horizontal layout
   ============================================ */
@media (max-width: 409px) {
	.feed-card-image {
		width: 180px;
		height: 110px;
		flex-shrink: 0;
	}

	.feed-card-content {
		margin-left: 0.4rem;
	}

	.feed-card-title {
		font-size: 0.9rem !important;
	}
}

/* ============================================
   TABLET+ (410px+)
   2-column grid, vertical cards
   ============================================ */
@media (min-width: 410px) {
	.feed-posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.feed-card-link {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}

	.feed-card-image {
		width: 100%;
		height: 0;
		padding-top: 60%;
		position: relative;
	}

	.feed-card-image a {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}

	.feed-card-image img {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}

	.feed-card-content {
		padding-left: 0;
		padding-top: 12px;
	}
}

/* ============================================
   LARGE CARD (510px+)
   First card spans 2 columns
   ============================================ */
@media (min-width: 510px) {
	.feed-card-large {
		grid-column: span 2;
	}

	.feed-card-large .feed-card-title {
		font-size: 1.1rem !important;
	}
}

/* ============================================
   DESKTOP (768px+)
   Larger gaps
   ============================================ */
@media (min-width: 768px) {
	.feed-posts-grid {
		gap: 20px;
	}

	.feed-card-title {
		font-size: 1rem !important;
	}

	.feed-card-large .feed-card-title {
		font-size: 1.2rem !important;
	}
}

/* ============================================
   PAGINATION
   ============================================ */
.feed-posts-query .wp-block-query-pagination {
	margin-top: 32px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

.feed-posts-query .wp-block-query-pagination a {
	color: #333;
	text-decoration: none;
	font-weight: 500;
}

.feed-posts-query .wp-block-query-pagination a:hover {
	color: #666;
}

/* ============================================
   NO RESULTS
   ============================================ */
.feed-posts-no-results {
	text-align: center;
	padding: 40px;
	color: #888;
	font-size: 18px;
}

/* ============================================
   PLACEHOLDER (no image)
   ============================================ */
.feed-card-placeholder {
	width: 100%;
	height: 100%;
	background: #e0e0e0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ============================================
   SHORTCODE PAGINATION
   ============================================ */
.feed-posts-pagination {
	margin-top: 32px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

.feed-pagination-links {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.feed-pagination-links a,
.feed-pagination-links span {
	padding: 8px 12px;
	text-decoration: none;
	color: #333;
	font-weight: 500;
	font-size: 14px;
}

.feed-pagination-links a:hover {
	color: #666;
	background: #f5f5f5;
	border-radius: 4px;
}

.feed-pagination-links .current {
	background: #333;
	color: #fff;
	border-radius: 4px;
}

/* ============================================
   SECTION TITLE
   ============================================ */
.feed-posts-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 16px 0;
	color: #333;
}

/* ============================================
   3-COLUMN GRID
   ============================================ */
@media (min-width: 600px) {
	.feed-posts-grid--3-cols {
		grid-template-columns: repeat(3, 1fr);
	}

	.feed-posts-grid--3-cols .feed-card-large {
		grid-column: span 3;
	}

	.feed-posts-grid--3-cols .feed-card-large .feed-card-title {
		font-size: 1.3rem !important;
	}
}

@media (max-width: 599px) {
	.feed-posts-grid--3-cols {
		grid-template-columns: repeat(2, 1fr);
	}

	.feed-posts-grid--3-cols .feed-card-large {
		grid-column: span 2;
	}
}
