/* Расписание богослужений. Colors follow the Благовест theme; the fallbacks serve the admin preview. */
.sched {
	--s-navy: var(--navy, #13304f);
	--s-paper: var(--paper, #fffaf1);
	--s-sand: var(--sand, #efe2c6);
	--s-line: var(--line, #e2d3b3);
	--s-line-soft: var(--line-soft, #ece1c9);
	--s-gold: var(--gold, #c9a24f);
	--s-gold-deep: var(--gold-deep, #7f5e1c);
	--s-wine: var(--wine, #8e2b24);
	--s-ink: var(--ink, #262019);
	--s-muted: var(--muted, #675d51);
	--s-on-navy: var(--on-navy, #f6efe1);
	--s-serif: var(--serif, "PT Serif", Georgia, serif);
	--s-sans: var(--sans, "Golos Text", -apple-system, "Segoe UI", Roboto, sans-serif);
	--s-day-a: #fffdf8;
	--s-day-b: #faf4e9;
	color: var(--s-ink);
	font-family: var(--s-sans);
	font-size: 16px;
	line-height: 1.5;
}
.sched *, .sched *::before, .sched *::after { box-sizing: border-box; }
.sched p { margin: 0; }

.sched-head { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: flex-end; justify-content: space-between; padding: 0 0 18px; }
.sched-head__main { flex: 1 1 660px; min-width: 0; }
.sched .sched-head__church { margin: 18px 0 0; padding-left: 16px; border-left: 1px solid var(--s-gold); color: var(--s-navy); font: 1.4rem/1.5 var(--s-serif); }
.sched-head__church span { color: var(--s-wine); font-style: italic; }
.sched-head__title { font-family: var(--s-serif); font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); line-height: 1.1; margin: 0; color: var(--s-navy); }
.sched-head__title span { color: var(--s-wine); }
.sched-head__nav { display: flex; gap: 18px; margin-top: 12px; font-size: .95rem; }
.sched-head__nav a { color: var(--s-navy); font-weight: 600; text-decoration: none; }
.sched-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sched-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--s-line); background: var(--s-paper); color: var(--s-navy); font: 600 .92rem var(--s-sans); text-decoration: none; cursor: pointer; }
.sched-btn--wine { background: var(--s-wine); border-color: var(--s-wine); color: #fff; }
.sched-btn svg { width: 18px; height: 18px; }

.sched-strip { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--cream, #f7efdf) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--s-line); padding: 10px 0; margin-bottom: 10px; }
.sched--preview .sched-strip { position: static; }
.sched-strip__row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.sched-strip__row::-webkit-scrollbar { display: none; }
.sched-chip { flex: 0 0 auto; width: 46px; border-radius: 12px; border: 1px solid var(--s-line-soft); background: var(--s-paper); text-align: center; padding: 5px 0 4px; text-decoration: none; color: var(--s-ink); line-height: 1.1; }
.sched-chip b { display: block; font-size: 1.05rem; }
.sched-chip small { font-size: .7rem; color: var(--s-muted); }
.sched-chip.is-red b, .sched-chip.is-red small { color: var(--s-wine); }
.sched-chip.is-past { opacity: .45; }
.sched-chip.is-today { background: var(--s-navy); border-color: var(--s-navy); }
.sched-chip.is-today b, .sched-chip.is-today small { color: var(--s-on-navy); }
.sched-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .82rem; color: var(--s-muted); margin-bottom: 16px; } /* Below the strip: only the dates stick. */
.sched-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sched-legend i.is-red { background: var(--s-wine); }
.sched-legend i.is-eve { background: var(--s-day-b); border: 1px solid var(--s-line); }

.sched-past { margin: 0 0 14px; font-size: .9rem; }
.sched-past button { background: none; border: 0; color: var(--s-navy); font: 600 .9rem var(--s-sans); text-decoration: underline; cursor: pointer; padding: 0; }

.sched-days { display: flex; flex-direction: column; gap: 12px; padding-bottom: 40px; }
.sched-day { display: grid; grid-template-columns: 104px minmax(0, 1.15fr) minmax(0, 1fr); background: var(--s-paper); border: 1px solid var(--s-line-soft); border-radius: 18px; box-shadow: 0 10px 28px -14px rgba(38, 32, 25, .22); overflow: hidden; scroll-margin-top: 90px; }
.sched-day.is-past { display: none; }
.sched-days.show-past .sched-day.is-past { display: grid; opacity: .6; }
.sched-day.is-today { border-color: var(--s-navy); box-shadow: 0 0 0 2px var(--s-navy), 0 10px 28px -14px rgba(38, 32, 25, .22); }
.sched-day__date { grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 18px 10px; border-right: 1px solid var(--s-line-soft); text-align: center; background: var(--s-sand); }
.sched-day__num { font-family: var(--s-serif); font-size: 2.4rem; line-height: 1; font-weight: 700; color: var(--s-navy); }
.sched-day__wd { font-size: .85rem; color: var(--s-muted); margin-top: 4px; }
.sched-day__today.sched-day__today--next { background: transparent; color: var(--s-navy); box-shadow: inset 0 0 0 1px var(--s-navy); }
.sched-day.is-red .sched-day__num, .sched-day.is-red .sched-day__wd { color: var(--s-wine); }
.sched-day__today { display: inline-block; margin-top: 8px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--s-navy); color: var(--s-on-navy); border-radius: 999px; padding: 2px 8px; }

.sched-day__svc, .sched-day__eve { display: grid; grid-auto-rows: 1fr; }
.sched-svc { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px dashed var(--s-line-soft); }
.sched-svc:first-child { border-top: 0; }
.sched-svc__t { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--s-navy); }
.sched-svc.is-red .sched-svc__t { color: var(--s-wine); }
.sched-svc .sv-b { font-weight: 600; }
.sched-svc .sv-r { font-weight: 700; color: var(--s-wine); }
.sched-svc .sv-i { font-style: italic; color: var(--s-muted); font-family: var(--s-serif); }
.sched-svc .sv-bi { font-style: italic; font-weight: 700; font-family: var(--s-serif); }
.sched-svc__next { margin-top: 6px; font-size: .8rem; color: var(--s-gold-deep); }
.sched-svc__next a { color: var(--s-gold-deep); }
.sched-day__eve { grid-column: 2 / -1; border-top: 1px solid var(--s-line); }

.sched-day__cal { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-left: 1px solid var(--s-line-soft); font-family: var(--s-serif); font-size: .98rem; line-height: 1.45; }
.sched-day__caltext { flex: 1; min-width: 0; }
.sched-day__caltext p { margin: 0 0 4px; }
.sched-day__cal .cal-g { font-size: 1.3rem; font-weight: 700; color: var(--s-wine); line-height: 1.25; }
.sched-day__cal .cal-r { font-weight: 700; color: var(--s-wine); }
.sched-day__cal .cal-b { font-weight: 700; }
.sched-day__cal .cal-i { font-style: italic; color: var(--s-muted); }
.sched-day__cal .cal-bi { font-style: italic; font-weight: 700; }
.sched-day__icon { flex: 0 0 auto; width: 72px; height: auto; max-height: 110px; object-fit: cover; border-radius: 8px; }

.sched-day.lt-0 .sched-day__svc, .sched-day.lt-0 .sched-day__cal, .sched-day__eve.lt-0 { background: var(--s-day-a); }
.sched-day.lt-1 .sched-day__svc, .sched-day.lt-1 .sched-day__cal, .sched-day__eve.lt-1 { background: var(--s-day-b); }

/* Settings «Отображение»: without the месяцеслов column; the note above the days; the next month's first day. */
.sched--nocal .sched-day { grid-template-columns: 104px minmax(0, 1fr); }
.sched-note { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--s-gold); border-radius: 0 10px 10px 0; background: var(--s-day-b); color: var(--s-ink); font-size: .95rem; }
.sched-note p { margin: 0 0 6px; }
.sched-note p:last-child { margin-bottom: 0; }
.sched-chip--next { margin-left: 10px; border-style: dashed; }
.sched-chip--next small { color: var(--s-gold-deep); }

/* On the site the page is one light card, as posts and pages (.entry of the theme); the days inside have no shadow. */
.sched--page { --sched-pad: clamp(18px, 2.4vw, 30px); padding: clamp(18px, 2vw, 26px) var(--sched-pad) var(--sched-pad); border: 1px solid var(--s-line-soft); border-radius: var(--radius-lg, 28px); background: var(--s-paper); box-shadow: 0 6px 18px -12px rgba(38, 32, 25, .2); }
/* The strip spans the whole card, edge to edge and opaque, so the days scroll under it without showing at the sides. */
.sched--page .sched-strip { margin-inline: calc(-1 * var(--sched-pad)); padding-inline: 0; background: var(--s-paper); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 8px 12px -12px rgba(38, 32, 25, .35); }
.sched--page .sched-strip__row { padding-inline: var(--sched-pad); scroll-padding-inline: var(--sched-pad); }
.sched--page .sched-days { padding-bottom: 0; }
.sched--page .sched-day { border-color: var(--s-line); border-radius: 14px; box-shadow: none; }
.sched--page .sched-day.is-today { border-color: var(--s-navy); box-shadow: 0 0 0 1px var(--s-navy); }

@media (max-width: 860px) {
	.sched-day { grid-template-columns: 1fr; }
	.sched-day__date { grid-row: auto; order: -2; flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 10px; text-align: left; border-right: 0; border-bottom: 1px solid var(--s-line-soft); padding: 12px 16px; }
	.sched-day__num { font-size: 1.7rem; }
	.sched-day__today { margin: 0 0 0 auto; }
	.sched-day__cal { order: -1; border-left: 0; border-bottom: 1px solid var(--s-line-soft); padding: 12px 16px; font-size: .95rem; }
	.sched-day__eve { grid-column: auto; }
	.sched-svc { padding: 10px 16px; }
	.sched-day__cal .cal-g { font-size: 1.15rem; }
	.sched-day__icon { width: 56px; }
}

@media print {
	.sched--page { padding: 0; border: 0; box-shadow: none; }
	.sched-strip, .sched-head__actions, .sched-past { display: none; }
	.sched-day.is-past { display: grid; }
}
