.hram-calendar {
	--hram-accent: #ff5c29;
	--hram-track: #1c4230;
	--hram-desc: #a3b8ad;
	width: 100%;
}

.hram-calendar *,
.hram-calendar *::before,
.hram-calendar *::after {
	box-sizing: border-box;
}

.hram-calendar .widget-container {
	width: 100%;
	background: linear-gradient(159.44deg, rgba(255, 255, 255, 0) 0%, rgba(0, 36, 19, 0.12) 100%), linear-gradient(0deg, rgba(0, 36, 19, 0.25), rgba(0, 36, 19, 0.25));
	border-radius: 32px;
	padding: 24px;
	box-shadow: -2px 4px 16px 0px #0000001f;
	backdrop-filter: blur(10px);
	border: 1px solid #ffffff66;
}

.hram-calendar .widget-container + .widget-container {
	margin-top: 24px;
}

.hram-calendar .widget-container h3 {
	color: #fff;
	margin: 0 0 24px;
}

.hram-calendar .calendar-section {
	min-width: 360px;
}

.hram-calendar .schedule-title {
	font-size: 1.3rem;
	font-weight: normal;
	margin: 0 0 8px 0;
}

.hram-calendar .schedule-title span {
	color: var(--hram-desc);
}

.hram-calendar .accent-date {
	color: var(--hram-accent);
	font-size: 2rem;
	font-weight: bold;
	margin: 0 0 14px 0;
}

/* --- Таймлайн ближайшего богослужения --- */
.hram-calendar .timeline-container {
	position: relative;
	margin-bottom: 24px;
}

.hram-calendar .timeline-line {
	position: absolute;
	top: 6px;
	left: 0;
	right: 0;
	height: 2px;
	background-color: var(--hram-track);
	border-radius: 2px;
	z-index: 1;
}

.hram-calendar .timeline-progress {
	position: absolute;
	top: 6px;
	left: 0;
	height: 2px;
	width: 0;
	border-radius: 2px;
	background: var(--hram-accent);
	background: linear-gradient(90deg, color-mix(in srgb, var(--hram-accent) 25%, transparent) 0%, var(--hram-accent) 100%);
	transition: width 0.5s ease;
	z-index: 2;
}

.hram-calendar .timeline-grid {
	display: flex;
	position: relative;
	padding: 0 6%;
	z-index: 3;
}

.hram-calendar .timeline-item {
	flex: 1 1 0;
	min-width: 0;
	padding-right: 16px;
}

.hram-calendar .timeline-item:last-child {
	padding-right: 0;
}

.hram-calendar .timeline-dot {
	display: block;
	width: 12px;
	height: 12px;
	background-color: #092216;
	border: 2px solid #3b7a57;
	border-radius: 50%;
	margin-bottom: 12px;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hram-calendar .timeline-item.active .timeline-dot {
	background-color: var(--hram-accent);
	border-color: var(--hram-accent);
	box-shadow: 0 0 0 4px rgba(255, 92, 41, 0.18);
}

.hram-calendar .timeline-body {
	min-width: 0;
}

.hram-calendar .time-label {
	font-weight: bold;
	font-size: 0.95rem;
	margin-bottom: 6px;
	color: #fff;
}

.hram-calendar .event-desc {
	color: var(--hram-desc);
	font-size: 0.85rem;
	line-height: 1.4;
}

.hram-calendar .timeline-empty {
	color: var(--hram-desc);
	font-size: 0.9rem;
	padding: 8px 0;
}

@media (max-width: 600px) {
	.hram-calendar .schedule-title {
		font-size: 1.6rem;
		line-height: 1.25;
	}

	.hram-calendar .schedule-title span {
		display: block;
	}

	.hram-calendar .accent-date {
		font-size: 1.6rem;
	}

	/* Вертикальный таймлайн: службы сверху вниз */
	.hram-calendar .timeline-grid {
		flex-direction: column;
		padding: 0;
	}

	.hram-calendar .timeline-item {
		position: relative;
		flex: 0 0 auto;
		padding-right: 0;
		padding-left: 28px;
		padding-bottom: 22px;
	}

	.hram-calendar .timeline-item:last-child {
		padding-bottom: 0;
	}

	.hram-calendar .timeline-dot {
		position: absolute;
		left: 0;
		top: 2px;
		margin-bottom: 0;
	}

	.hram-calendar .timeline-line {
		top: 0;
		bottom: auto;
		left: 5px;
		right: auto;
		width: 2px;
		height: 100%;
	}

	.hram-calendar .timeline-progress {
		top: 0;
		left: 5px;
		right: auto;
		width: 2px;
		height: 0;
		background: var(--hram-accent);
		background: linear-gradient(180deg, color-mix(in srgb, var(--hram-accent) 25%, transparent) 0%, var(--hram-accent) 100%);
	}

	.hram-calendar .time-label {
		font-size: 1rem;
		margin-bottom: 4px;
	}

	.hram-calendar .event-desc {
		font-size: 0.9rem;
	}
}

/* --- Кнопка --- */
.hram-calendar .btn-schedule {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	/*margin: 24px auto 0 auto;*/
	background: #ffffff1a;
	color: #ffffff !important;
	padding: 10px 20px;
	border-radius: 8px;
	cursor: pointer;
	border: unset;
	transition: background 0.2s;
	text-decoration: unset;
	width: max-content;
}

.hram-calendar .btn-schedule:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* --- Сетка --- */
.hram-calendar .main-grid {
	display: grid;
	grid-template-columns: 360px 1fr;
	gap: 40px;
}

@media (min-width: 768px) {
	.hram-calendar section#event-content {
		border-left: 1px solid #ffffff1a;
		padding-left: 40px;
	}
}

@media (max-width: 768px) {
	.hram-calendar .main-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Календарь --- */
.hram-calendar .calendar-section h2 {
	font-size: 1.5rem;
	margin: 0 0 20px 0;
}

.hram-calendar .calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	font-size: 0.95rem;
}

.hram-calendar .calendar-arrow {
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(255, 255, 255, 0.08);
	color: white;
	font-size: 20px;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hram-calendar .calendar-arrow:hover {
	background: rgba(255, 90, 34, 0.2);
	transform: scale(1.08);
}

.hram-calendar .calendar-month {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	text-transform: capitalize;
}

.hram-calendar .calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
	text-align: center;
	font-size: 0.8rem;
	color: #a5a5a5;
	font-weight: bold;
	margin-bottom: 12px;
}

.hram-calendar .calendar-days-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
	text-align: center;
	font-size: 0.85rem;
	margin-bottom: 24px;
}

.hram-calendar .day-number {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	border-radius: 50%;
	cursor: pointer;
	color: #e5e7eb;
	font-size: 0.9rem;
}

.hram-calendar .day-number.other-month {
	color: #2a4739;
}

.hram-calendar .day-number.other-week {
	color: #537062;
	cursor: default;
	pointer-events: none;
}

.hram-calendar .day-number.has-service {
	background-color: #5c7a6cc7;
}

.hram-calendar .day-number.selected {
	background-color: var(--hram-accent) !important;
	color: #ffffff;
	font-weight: bold;
}

.hram-calendar .day-number.today-border {
	border: 2px solid #969696;
}

.hram-calendar .legend-list {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.85rem;
	color: var(--hram-desc);
	display: flex;
	flex-direction: column;
	gap: 8px;
	border: 1px solid #ffffff1c;
	border-radius: 8px;
	padding: 10px 16px;
}

.hram-calendar .legend-item {
	display: flex;
	align-items: center;
	gap: 10px;
}

.hram-calendar .dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
}

.hram-calendar .dot.orange {
	background-color: var(--hram-accent);
}

.hram-calendar .dot.current {
	border: 1px solid #969696;
	width: 10px;
	height: 10px;
	background: #4c6c5d5c;
}

.hram-calendar .dot.service {
	background-color: #4c6d5d;
	border: 1px solid #3b7a57;
}

.hram-calendar .dot.none {
	border: 2px solid #2a4739;
	background: transparent;
}

/* --- Святые --- */
.hram-calendar .saints-section .old-style-date {
	color: #9ca3af;
	font-size: 0.9rem;
	margin: -16px 0 20px 0;
}

.hram-calendar .section-subtitle {
	color: #ffffffbd;
	font-size: 0.8rem;
	margin-bottom: 16px;
	margin-top: 8px;
	text-transform: uppercase;
}

.hram-calendar .event-featured {
	display: none;
}

.hram-calendar .event-title {
	font-size: 1.5rem;
	font-weight: 500;
	color: #ffffff;
	margin-bottom: 0px;
}

.hram-calendar .event-badge {
	display: inline-block;
	margin: 10px 0 18px;
	padding: 4px 16px;
	font-size: 13px;
	line-height: 1.4;
	border-radius: 20px;
	color: #ffffff;
	background: rgba(255, 90, 34, 0.2);
	background: color-mix(in srgb, var(--hram-accent) 20%, transparent);
	border: 1px solid var(--hram-accent);
}

.hram-calendar .event-subtitle {
	font-size: 1rem;
	color: var(--hram-desc);
	margin-bottom: 16px;
}

.hram-calendar .saints-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hram-calendar .saints-hidden {
	display: contents;
}

.hram-calendar .saint-card {
	display: flex;
	align-items: center;
	gap: 16px;
	background: rgb(25 67 47);
	padding: 8px;
	border-radius: 32px;
	border: 1px solid #2f5544;
}

.hram-calendar .saint-avatar {
	width: 120px;
	height: 80px;
	border-radius: 24px;
	overflow: hidden;
	flex-shrink: 0;
}

.hram-calendar .saint-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transform: scale(1.2);
}

.hram-calendar .saint-info h4 {
	margin: 0 0 4px 0;
	font-size: 1rem;
	color: #ffffff;
	font-weight: 600;
}

.hram-calendar .saint-info p {
	margin: 0;
	font-size: 0.8rem;
	color: #9ca3af;
	line-height: 1.3;
}

/* --- Адаптивный вид секции «память святых» при ширине ≤1440 --- */
@media (max-width: 1440px) {
	.hram-calendar .event-title {
		display: none;
	}

	.hram-calendar .event-featured {
		display: block;
		margin-bottom: 20px;
	}

	.hram-calendar .event-featured img {
		display: block;
		width: 100%;
		height: 280px;
		object-fit: cover;
		object-position: center 30%;
		border-radius: 24px;
	}

	.hram-calendar .saints-section .section-subtitle {
		text-transform: none;
		color: #ffffff;
		font-size: 0.95rem;
		margin-top: 0;
		margin-bottom: 14px;
	}

	.hram-calendar .saints-list {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 10px;
	}

	.hram-calendar .saint-card {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		width: auto;
		max-width: 100%;
		padding: 5px 18px 5px 5px;
		border-radius: 999px;
		background: rgb(25 67 47);
		border: 1px solid #2f5544;
	}

	.hram-calendar .saint-avatar {
		width: 40px;
		height: 40px;
		border-radius: 50%;
	}

	.hram-calendar .saint-avatar img {
		transform: none;
	}

	.hram-calendar .saint-info h4 {
		margin: 0;
		font-size: 0.9rem;
		font-weight: 500;
	}

	.hram-calendar .saint-info p {
		display: none;
	}

	.hram-calendar .saints-list .btn-schedule {
		margin: 0;
		padding: 12px 20px;
		border-radius: 999px;
	}
}

@media (max-width: 600px) {
	.hram-calendar .event-featured img {
		height: 200px;
	}
}
