/**
 * Style dla modułu Posts
 */

.oddo-posts-wrapper {
	width: 100%;
}

.oddo-posts-grid {
	display: grid;
	gap: 30px;
	grid-auto-rows: auto;
	width: 100%;
}

/* Responsywność kolumn */
.oddo-posts-grid--columns-1 {
	grid-template-columns: repeat(1, 1fr);
}

.oddo-posts-grid--columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.oddo-posts-grid--columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.oddo-posts-grid--columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.oddo-posts-grid--columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.oddo-posts-grid--columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

/* Tablet */
@media (max-width: 1024px) {
	.oddo-posts-grid--columns-tablet-1 {
		grid-template-columns: repeat(1, 1fr);
	}

	.oddo-posts-grid--columns-tablet-2 {
		grid-template-columns: repeat(2, 1fr);
	}

	.oddo-posts-grid--columns-tablet-3 {
		grid-template-columns: repeat(3, 1fr);
	}

	.oddo-posts-grid--columns-tablet-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Mobile */
@media (max-width: 768px) {
	.oddo-posts-grid {
		gap: 20px;
	}

	.oddo-posts-grid--columns-mobile-1 {
		grid-template-columns: repeat(1, 1fr);
	}

	.oddo-posts-grid--columns-mobile-2 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Post Item */
.oddo-post {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	width: 100%;
	min-width: 0; /* Zapobiega przepełnieniu */
}

.oddo-post:hover {
	transform: translateY(-5px);
}

.oddo-post__thumbnail {
	width: 100%;
	overflow: hidden;
	position: relative;
	height: 250px;
	background-color: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.oddo-post__thumbnail img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	transition: transform 0.3s ease;
}

/* Biały box jako zasłonka gdy brak zdjęcia */
.oddo-post__thumbnail--placeholder {
	background-color: #ffffff;
	border: 1px solid #e5e5e5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.oddo-post__thumbnail--placeholder::after {
	content: '';
	display: block;
	width: 100%;
	height: 100%;
	background-color: #ffffff;
}

.oddo-post:hover .oddo-post__thumbnail img {
	transform: scale(1.05);
}

.oddo-post__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding-top: 20px;
}

.oddo-post__title {
	margin: 0 0 15px 0;
	font-size: 1.25em;
	line-height: 1.4;
}

.oddo-post__title a {
	text-decoration: none;
	color: #E67201;
	transition: color 0.3s ease;
}

.oddo-post__title a:hover {
	color: #c55f00;
}

.oddo-post__excerpt {
	margin: 0 0 15px 0;
	color: #666;
	line-height: 1.6;
}

.oddo-post__read-more {
	display: inline-block;
	margin-top: auto;
	padding: 0;
	background-color: transparent;
	color: #E67201;
	text-decoration: none;
	border-radius: 0;
	transition: color 0.3s ease, opacity 0.3s ease;
}

.oddo-post__read-more:hover {
	background-color: transparent;
	color: #c55f00;
	opacity: 1;
}

/* Pagination */
.oddo-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 40px;
	padding: 20px 0;
}

.oddo-pagination .page-numbers {
	display: inline-block;
	padding: 8px 12px;
	margin: 0 4px;
	text-decoration: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.oddo-pagination .page-numbers:hover {
	background-color: #E67201;
	color: #fff;
	border-color: #E67201;
}

.oddo-pagination .page-numbers.current {
	background-color: #E67201;
	color: #fff;
	border-color: #E67201;
}

.oddo-pagination .page-numbers.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* Responsywność paginacji */
@media (max-width: 768px) {
	.oddo-pagination {
		gap: 5px;
	}

	.oddo-pagination .page-numbers {
		padding: 6px 10px;
		font-size: 14px;
	}
}

