/* Виджет "Жизнь епархии" - Кастомный */

.custom-zhizn-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	row-gap: 40px;
	margin-bottom: 20px;
}

.custom-zhizn-card {
	display: flex;
	flex-direction: column;
	background: transparent;
	border: none;
	border-radius: 0;
	overflow: visible;
	transition: all 0.2s ease;
	height: 100%;
}

.custom-zhizn-card:hover {
	transform: translateY(-2px);
}

/* Картинка */
.custom-zhizn-thumb {
	height: 220px;
	overflow: hidden;
	position: relative;
	background: #f3f4f6;
	border-radius: 8px;
	flex-shrink: 0;
}

.custom-zhizn-thumb a {
	display: block;
	height: 100%;
}

.custom-zhizn-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.3s ease;
}

.custom-zhizn-card:hover .custom-zhizn-thumb img {
	transform: scale(1.05);
}

/* Красная метка категории */
.custom-zhizn-badge {
	position: absolute;
	bottom: 16px;
	left: 16px;
	background: #d83645;
	color: #ffffff !important;
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 4px;
	z-index: 10;
	transition: background 0.2s ease;
}

.custom-zhizn-badge a {
	color: #ffffff !important;
	text-decoration: none !important;
}

.custom-zhizn-badge a:hover {
	color: #ffffff !important;
}

.custom-zhizn-badge:hover {
	background: #c12d3a;
}

.custom-zhizn-badge:hover a {
	color: #ffffff !important;
}

/* Текстовая часть - без рамки и фона */
.custom-zhizn-content {
	padding: 12px 0 0;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Дата */
.custom-zhizn-meta {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 12px;
}

/* Заголовок - базовый размер 18px */
.custom-zhizn-title {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 12px;
}

.custom-zhizn-title a {
	color: #111827;
	text-decoration: none;
	transition: color 0.2s ease;
}

.custom-zhizn-title a:hover {
	color: #d83645;
}

/* Анонс - ПРИЖАТ К НИЗУ с затуханием последней строки */
.custom-zhizn-excerpt {
	margin-top: auto;
	font-size: 15px;
	line-height: 1.6;
	color: #4b5563;
	max-height: 4.8em;
	overflow: hidden;
	position: relative;
}

.custom-zhizn-excerpt p {
	margin: 0;
	text-align: justify !important;
}

/* Затухание только последней строки справа */
.custom-zhizn-excerpt::after {
	content: '';
	position: absolute;
	bottom: 0;
	right: 0;
	width: 30%;
	height: 1.6em;
	background: linear-gradient(to right, transparent, white);
	pointer-events: none;
}

/* Адаптивность для планшетов (720px - 999px) */
@media (min-width: 720px) and (max-width: 999px) {
	.custom-zhizn-grid {
		row-gap: 35px;
	}
	
	.custom-zhizn-thumb {
		height: 200px;
	}
	
	.custom-zhizn-title {
		font-size: 17px;
	}
}

/* Адаптивность для средних экранов (620px - 719px) */
@media (min-width: 620px) and (max-width: 719px) {
	.custom-zhizn-grid {
		row-gap: 30px;
	}
	
	.custom-zhizn-thumb {
		height: 200px;
	}
	
	.custom-zhizn-title {
		font-size: 16px;
	}
}

/* Адаптивность для маленьких экранов (481px - 619px) - 2 колонки */
@media (min-width: 481px) and (max-width: 619px) {
	.custom-zhizn-grid {
		gap: 20px;
		row-gap: 30px;
	}
	
	.custom-zhizn-thumb {
		height: 180px;
	}
	
	.custom-zhizn-title {
		font-size: 15px;
	}
	
	.custom-zhizn-content {
		padding: 12px 0 0;
	}
	
	.custom-zhizn-excerpt {
		font-size: 14px;
		max-height: 4.2em;
	}
}

/* Адаптивность для телефонов - 1 колонка (до 480px) */
@media (max-width: 480px) {
	.custom-zhizn-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		row-gap: 30px;
	}
	
	.custom-zhizn-thumb {
		height: 200px;
	}
	
	.custom-zhizn-title {
		font-size: 16px;
	}
	
	.custom-zhizn-excerpt {
		font-size: 15px;
	}
}


/* ===================== ВИДЖЕТ "ВАЖНЫЕ СОБЫТИЯ" ===================== */

.custom-vazhnye-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	row-gap: 40px;
	margin-bottom: 20px;
}

.custom-vazhnye-card {
	display: flex;
	flex-direction: column;
	transition: all 0.2s ease;
}

.custom-vazhnye-card:hover {
	transform: translateY(-2px);
}

/* Картинка */
.custom-vazhnye-thumb {
	height: 220px;
	overflow: hidden;
	position: relative;
	background: #f3f4f6;
	border-radius: 8px;
	flex-shrink: 0;
}

.custom-vazhnye-thumb a {
	display: block;
	height: 100%;
}

.custom-vazhnye-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.3s ease;
}

.custom-vazhnye-card:hover .custom-vazhnye-thumb img {
	transform: scale(1.05);
}

/* Красная метка категории */
.custom-vazhnye-badge {
	position: absolute;
	bottom: 16px;
	left: 16px;
	background: #d83645;
	color: #ffffff !important;
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 4px;
	z-index: 10;
	transition: background 0.2s ease;
}

.custom-vazhnye-badge a {
	color: #ffffff !important;
	text-decoration: none !important;
}

.custom-vazhnye-badge a:hover {
	color: #ffffff !important;
}

.custom-vazhnye-badge:hover {
	background: #c12d3a;
}

.custom-vazhnye-badge:hover a {
	color: #ffffff !important;
}

/* Текстовая часть - без рамки */
.custom-vazhnye-content {
	padding: 12px 0 0;
}

/* Дата */
.custom-vazhnye-meta {
	font-size: 13px;
	color: #6b7280;
	margin: 0 0 8px;
}

/* Заголовок - максимум 20px для больших экранов */
.custom-vazhnye-title {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
}

.custom-vazhnye-title a {
	color: #111827;
	text-decoration: none;
	transition: color 0.2s ease;
}

.custom-vazhnye-title a:hover {
	color: #d83645;
}

/* Адаптивность для планшетов (720px - 999px) */
@media (min-width: 720px) and (max-width: 999px) {
	.custom-vazhnye-grid {
		row-gap: 35px;
	}
	
	.custom-vazhnye-thumb {
		height: 200px;
	}
	
	.custom-vazhnye-title {
		font-size: 19px;
	}
}

/* Адаптивность для средних экранов (620px - 719px) */
@media (min-width: 620px) and (max-width: 719px) {
	.custom-vazhnye-grid {
		row-gap: 30px;
	}
	
	.custom-vazhnye-thumb {
		height: 200px;
	}
	
	.custom-vazhnye-title {
		font-size: 17px;
	}
}

/* Адаптивность для маленьких экранов (481px - 619px) - 2 колонки */
@media (min-width: 481px) and (max-width: 619px) {
	.custom-vazhnye-grid {
		gap: 20px;
		row-gap: 30px;
	}
	
	.custom-vazhnye-thumb {
		height: 180px;
	}
	
	.custom-vazhnye-title {
		font-size: 16px;
	}
}

/* Адаптивность для телефонов - 1 колонка (до 480px) */
@media (max-width: 480px) {
	.custom-vazhnye-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		row-gap: 30px;
	}
	
	.custom-vazhnye-thumb {
		height: 200px;
	}
	
	.custom-vazhnye-title {
		font-size: 18px;
	}
}

/* ===================== ВИДЖЕТ "ПУБЛИКАЦИИ" ===================== */

.custom-publikacii-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 20px;
}

.custom-publikacii-item {
	display: flex;
	gap: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e5e7eb;
	transition: all 0.2s ease;
}

.custom-publikacii-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.custom-publikacii-item:hover {
	transform: translateX(4px);
}

/* Картинка слева */
.custom-publikacii-thumb {
	flex-shrink: 0;
	width: 200px;
	height: 130px;
	overflow: hidden;
	border-radius: 6px;
	background: #f3f4f6;
}

.custom-publikacii-thumb a {
	display: block;
	height: 100%;
}

.custom-publikacii-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.custom-publikacii-item:hover .custom-publikacii-thumb img {
	transform: scale(1.05);
}

/* Текстовая часть справа */
.custom-publikacii-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Заголовок */
.custom-publikacii-title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 8px;
}

.custom-publikacii-title a {
	color: #111827;
	text-decoration: none;
	transition: color 0.2s ease;
}

.custom-publikacii-title a:hover {
	color: #d83645;
}

/* Дата */
.custom-publikacii-meta {
	font-size: 13px;
	color: #6b7280;
}

/* Адаптивность для средних экранов (до 720px) */
@media (max-width: 720px) {
	.custom-publikacii-thumb {
		width: 160px;
		height: 110px;
	}
	
	.custom-publikacii-title {
		font-size: 15px;
	}
}

/* Адаптивность для маленьких экранов (до 480px) */
@media (max-width: 480px) {
	.custom-publikacii-item {
		flex-direction: column;
		gap: 12px;
	}
	
	.custom-publikacii-thumb {
		width: 100%;
		height: 200px;
	}
	
	.custom-publikacii-title {
		font-size: 16px;
	}
}
