/* ==========================================================================
   SECTIONS — блоки головної сторінки
   1. Банер (слайдер)
   2. Храми парафії + інформаційна смуга
   3. Блог / проповідь тижня
   4. Історія храму
   5. Розклад богослужінь
   6. Пожертва
   7. Онлайн запис на молитву
   8. Церковний календар
   9. 3D-тур
   ========================================================================== */


/* ==========================================================================
   1. БАНЕР
   ========================================================================== */

.hero {
	position: relative;
	overflow: hidden;
}

.hero__viewport {
	display: grid;
	/* жорстко фіксуємо колонку, щоб довге слово не розтягнуло банер */
	grid-template-columns: 100%;
}

.hero__slide {
	position: relative;
	display: grid;
	align-items: center;
	grid-area: 1 / 1;
	min-height: clamp(26rem, 68vh, 45rem);
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility .6s ease;
}

.hero__slide.is-active {
	opacity: 1;
	visibility: visible;
}

.hero__media {
	position: absolute;
	inset: 0;
}

.hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* затемнення, щоб текст читався на будь-якому фото */
.hero__slide::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(39, 59, 102, .92) 0%, rgba(39, 59, 102, .72) 45%, rgba(39, 59, 102, .15) 100%);
}

.hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	padding-block: clamp(2.5rem, 8vw, 8.875rem);
}

.hero__title {
	max-width: 35.375rem;
	font-family: var(--font-display);
	font-size: var(--fs-h1);
	font-weight: 600;
	line-height: 1.15;
	text-transform: uppercase;
	text-wrap: balance;
	overflow-wrap: break-word;
	color: var(--c-white);
}

.hero__text {
	max-width: 30rem;
	font-size: var(--fs-lead);
	color: var(--c-white);
}

.hero__dots {
	position: absolute;
	z-index: 2;
	bottom: clamp(1.25rem, 3vw, 2.5rem);
	left: 50%;
	translate: -50% 0;
	display: flex;
	gap: .8125rem;
}

.hero__dot {
	width: .875rem;
	height: .875rem;
	border: 1px solid var(--c-white);
	border-radius: 50%;
	transition: background-color var(--transition);
}

.hero__dot.is-active,
.hero__dot:hover {
	background-color: var(--c-blue);
}

/* пауза автопрокрутки — вимога WCAG 2.2.2 */
.hero__pause {
	position: relative;
	width: .875rem;
	height: .875rem;
	margin-left: .5rem;
	border: 1px solid var(--c-white);
	border-radius: 50%;
	transition: background-color var(--transition);
}

.hero__pause::before,
.hero__pause::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 2px;
	height: 6px;
	translate: 0 -50%;
	background-color: var(--c-white);
}

.hero__pause::before { left: 3px; }
.hero__pause::after  { right: 3px; }

/* у паузі — трикутник «продовжити» */
.hero__pause.is-paused::before {
	left: 4px;
	width: 0;
	height: 0;
	background: none;
	border-top: 3px solid transparent;
	border-bottom: 3px solid transparent;
	border-left: 5px solid var(--c-white);
}

.hero__pause.is-paused::after {
	display: none;
}

.hero__pause:hover,
.hero__pause:focus-visible {
	background-color: var(--c-blue);
}

@media (min-width: 768px) {
	.hero__slide::after {
		background: linear-gradient(113deg, var(--c-blue-dark) 0%, rgba(46, 69, 120, 0) 54%);
	}
}

/* на десктопі банер такої ж висоти, як у макеті (~720px), але не вище екрана */
@media (min-width: 1024px) {
	.hero__slide {
		min-height: min(45rem, 92vh);
	}
}


/* ==========================================================================
   2. ХРАМИ ПАРАФІЇ
   ========================================================================== */

.temples__grid {
	display: grid;
	gap: 1.75rem 1.1875rem;
	justify-items: center;
}

.temple-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	width: 100%;
	max-width: 21.25rem;
	height: 100%;
	padding: .75rem .375rem .375rem;
	background-color: var(--c-cream);
	transition: box-shadow var(--transition), translate var(--transition);
}

/* золота смуга по верхньому краю картки */
.temple-card::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 6px;
	background-image: var(--gold-h);
}

.temple-card--main,
.temple-card:hover {
	box-shadow: var(--shadow-card);
}

.temple-card:hover {
	translate: 0 -.25rem;
}

.temple-card__img {
	width: 100%;
	aspect-ratio: 620 / 412;
	object-fit: cover;
}

.temple-card__body {
	display: flex;
	flex-direction: column;
	gap: .8125rem;
	padding: 0 1.4375rem .625rem;
}

.temple-card__title {
	font-family: var(--font-display);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--c-blue);
}

.temple-card__type {
	font-size: var(--fs-sm);
	font-weight: 500;
	color: var(--c-brown);
}

@media (min-width: 576px) {
	.temples__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.temples__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}


/* --- Інформаційна смуга парафії ---------------------------------------- */

.parish-bar {
	position: relative;
	margin-top: clamp(1.75rem, 4vw, 2.5rem);
	padding: 1.875rem clamp(1.25rem, 3vw, 2.5625rem);
	background-color: var(--c-cream);
}

.parish-bar::before {
	content: "";
	position: absolute;
	inset-block: 0;
	left: 0;
	width: 6px;
	background-image: var(--gold-v);
}

.parish-bar__title {
	margin-bottom: 2.0625rem;
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	font-weight: 700;
	color: var(--c-ochre);
}

.parish-bar__list {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.parish-bar__list {
		display: flex;
		flex-wrap: wrap;
		gap: 1.75rem clamp(2rem, 5vw, 5.0625rem);
	}
}


/* ==========================================================================
   3. БЛОГ / ПРОПОВІДЬ ТИЖНЯ
   ========================================================================== */

.post-feature {
	display: grid;
	gap: 2.8125rem;
	padding: 1.125rem .9375rem;
	background-color: var(--c-cream);
}

.post-feature__img {
	width: 100%;
	aspect-ratio: 10 / 7;
	object-fit: cover;
}

.post-feature__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .875rem;
}

.post-feature__title {
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	font-weight: 700;
	line-height: 1.25;
	color: var(--c-blue);
}

.post-feature__excerpt {
	font-size: var(--fs-lead);
	line-height: 1.5;
}

.post-feature .btn {
	margin-top: .625rem;
	min-width: 12.5rem;
}

@media (min-width: 1024px) {
	.post-feature {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: center;
		gap: 3.875rem;
		padding: 2.5rem 4.9375rem 2.5rem 0;
	}

	.post-feature__img {
		aspect-ratio: 10 / 7;
		height: 100%;
	}
}


/* ==========================================================================
   4. ІСТОРІЯ ХРАМУ
   ========================================================================== */

.history__intro {
	display: grid;
	gap: 1.25rem;
}

.history__text {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	font-size: var(--fs-lead);
	line-height: 1.5;
}

.history__photo,
.history__wide {
	width: 100%;
	object-fit: cover;
}

.history__photo {
	aspect-ratio: 3 / 2;
}

/* --- Факти --- */

.facts {
	display: grid;
	gap: 1rem;
}

.fact {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .625rem;
	padding: .875rem 1.75rem;
	background-color: var(--c-cream);
}

.fact::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	translate: 0 -50%;
	width: 6px;
	height: min(5rem, 100%);
	background-image: var(--gold-v);
}

.fact__value {
	font-family: var(--font-display);
	font-size: clamp(2rem, 1.6rem + 1.7vw, 2.625rem);
	font-weight: 700;
	line-height: 1;
	color: var(--c-blue);
}

.fact__icon {
	--icon-size: 2rem;
	color: var(--c-blue);
}

.fact__label {
	font-size: var(--fs-body);
}

.fact--icon {
	gap: .25rem;
}

/* --- Ряди з фото --- */

.history__row {
	display: grid;
	gap: 1.5rem;
	margin-top: clamp(1.5rem, 4vw, 3rem);
}

.history__paragraph {
	font-size: var(--fs-lead);
	line-height: 1.5;
}

.history__thumb {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

@media (min-width: 480px) {
	.facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	.history__row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem 1.25rem;
	}

	.history__paragraph {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.history__intro {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: start;
		gap: 1.75rem 1.5rem;
	}

	.history__text  { grid-column: 1; }
	.facts          { grid-column: 1; }

	.history__photo {
		grid-column: 2;
		grid-row: 1 / span 2;
		height: 100%;
		max-height: 33rem;
	}

	.history__row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 19.3125rem) minmax(0, 19.3125rem);
		align-items: start;
		gap: 1.25rem;
	}

	.history__paragraph {
		grid-column: auto;
		padding-top: 1.75rem;
	}

	.history__row--reverse {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: center;
		gap: 1.625rem;
	}
}


/* ==========================================================================
   5. РОЗКЛАД БОГОСЛУЖІНЬ
   ========================================================================== */

.schedule__tabs {
	display: grid;
	gap: .875rem;
	margin-bottom: 1.25rem;
}

.temple-tab {
	position: relative;
	display: flex;
	align-items: center;
	gap: .75rem;
	min-height: 3.4375rem;
	padding: .625rem 1.375rem;
	font-size: var(--fs-sm);
	font-weight: 600;
	line-height: 1.3;
	color: var(--c-ink);
	background-color: var(--c-cream);
	transition: background-color var(--transition), color var(--transition);
}

/* золота лінія по нижньому краю таба */
.temple-tab::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3px;
	background-image: var(--gold-h);
}

.temple-tab__icon {
	--icon-size: 2.5rem;
}

.temple-tab__label {
	flex: 1;
}

.temple-tab:hover {
	background-color: #fff4d8;
}

.temple-tab.is-active {
	color: var(--c-white);
	background-color: var(--c-ochre);
}

.schedule__grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
}

/* у макеті картка неділі займає дві колонки в другому ряду */
@media (min-width: 1200px) {
	.schedule__grid > :last-child {
		grid-column: span 2;
	}
}

.day-card {
	display: flex;
	flex-direction: column;
	background-color: var(--c-cream);
}

.day-card__head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	padding: .625rem 1rem;
	font-family: var(--font-ui);
	font-size: var(--fs-sm);
	font-weight: 500;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--c-white);
	background-color: var(--c-brown);
}

.day-card__head .icon {
	--icon-size: 1.125rem;
}

.day-card__list {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	padding: 1.125rem .875rem 1.5rem;
}

.service {
	display: flex;
	align-items: flex-start;
	gap: 1.25rem;
}

.service__time {
	position: relative;
	flex: none;
	min-width: 3.75rem;
	padding-left: 1rem;
	font-family: var(--font-display);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

.service__time::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	translate: 0 -50%;
	width: 2px;
	height: 1.875rem;
	background-image: var(--gold-v);
}

.service__name {
	font-size: var(--fs-sm);
	line-height: 1.3;
}

@media (min-width: 768px) {
	.schedule__tabs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.375rem;
	}
}

@media (min-width: 1200px) {
	.schedule__tabs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}


/* ==========================================================================
   6. ПОЖЕРТВА
   ========================================================================== */

.donate {
	position: relative;
	overflow: hidden;
	background-color: var(--c-cream);
	background-image: url(../assets/icons/cross-watermark.svg);
	background-repeat: no-repeat;
	background-position: left max(1rem, 6%) bottom 12%;
	background-size: clamp(6.25rem, 15vw, 15.9375rem);
}

.donate .container {
	position: relative;
	z-index: 1;
}

.donate__panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	max-width: 46.6875rem;
	margin-inline: auto;
	text-align: center;
}

.donate__slogan {
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	font-weight: 700;
	line-height: 1.25;
	color: var(--c-ink);
	text-wrap: balance;
}

.donate .btn {
	width: 100%;
	max-width: 19.1875rem;
}

@media (min-width: 768px) {
	.donate__panel {
		flex-direction: row;
		justify-content: space-between;
		gap: 3.625rem;
		text-align: left;
	}

	.donate .btn {
		flex: none;
	}
}


/* ==========================================================================
   7. ОНЛАЙН ЗАПИС НА МОЛИТВУ
   Панель форми (.prayer-form) живе в components.css: та сама форма стоїть
   і на головній, і на сторінці контактів, а sections.css вантажиться
   лише на головній.
   ========================================================================== */


/* ==========================================================================
   8. ЦЕРКОВНИЙ КАЛЕНДАР
   ========================================================================== */

/* --- Перемикач місяців --- */

.months {
	display: flex;
	gap: .625rem;
	margin-bottom: 1.25rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: thin;
	padding-bottom: .5rem;
}

.months__btn {
	position: relative;
	flex: 0 0 auto;
	scroll-snap-align: start;
	min-width: 8.125rem;
	min-height: 3.4375rem;
	padding: 1rem .625rem;
	font-size: var(--fs-body);
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-transform: uppercase;
	background-color: var(--c-cream);
	transition: background-color var(--transition), color var(--transition);
}

.months__btn::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3px;
	background-image: var(--gold-h);
}

.months__btn:hover {
	background-color: #fff4d8;
}

.months__btn.is-active {
	color: var(--c-white);
	background-color: var(--c-ochre);
}

@media (min-width: 1024px) {
	.months {
		display: grid;
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 1.25rem;
		overflow: visible;
		padding-bottom: 0;
	}

	.months__btn {
		min-width: 0;
	}
}


/* --- Список днів --- */

.church-calendar__body {
	display: grid;
	gap: 2rem;
}

.cal-panel {
	min-width: 0;
}

.cal-list {
	display: flex;
	flex-direction: column;
}

.cal-day {
	display: grid;
	grid-template-columns: 2.25rem 2.75rem minmax(0, 1fr);
	padding-block: 1.125rem;
}

.cal-day__num {
	padding-right: .875rem;
	text-align: right;
}

.cal-day__dow,
.cal-day__body {
	padding-left: .875rem;
	border-left: 1px solid #dedede;
}

.cal-day__num,
.cal-day__dow {
	font-family: var(--font-ui);
	font-size: var(--fs-sm);
	color: var(--c-ink-muted);
}

/* великі свята — увесь запис червоний, як у друкованому календарі */
.cal-day--feast .cal-day__num,
.cal-day--feast .cal-day__dow,
.cal-day--feast .cal-day__week,
.cal-day--feast .cal-day__feast,
.cal-day--feast .cal-day__saint {
	color: #cc0202;
}

@media (min-width: 768px) {
	.cal-day {
		grid-template-columns: 9.6875rem 2.9375rem minmax(0, 1fr);
	}
}

.cal-day__body {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	font-size: var(--fs-sm);
}

.cal-day__week {
	color: var(--c-ink-muted);
}

.cal-day__feast {
	font-weight: 600;
	color: var(--c-blue);
}

.cal-day__saint {
	color: var(--c-ink);
}

.cal-day__readings {
	margin-top: .375rem;
	font-size: var(--fs-xs);
	line-height: 1.6;
	color: var(--c-ink-muted);
}

.cal-empty {
	padding: 3rem 1rem;
	font-size: var(--fs-lead);
	text-align: center;
	color: var(--c-ink-muted);
	background-color: var(--c-cream);
}


/* --- Картка сьогоднішнього дня --- */

.cal-today {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 16.9375rem;
	margin-inline: auto;
}

.cal-today__head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .625rem;
	padding: .8125rem 1rem;
	font-size: var(--fs-lead);
	color: var(--c-white);
	background-color: var(--c-blue);
	transition: background-color var(--transition);
}

.cal-today__head:hover {
	background-color: var(--c-blue-light);
}

.cal-today__head .icon {
	--icon-size: 1.5rem;
}

.cal-today__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.625rem;
	padding: 1.5625rem 1.25rem;
	text-align: center;
	background-color: var(--c-cream);
}

.cal-today__date {
	display: flex;
	align-items: baseline;
	gap: .5rem;
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--c-ochre);
}

.cal-today__dow   { font-size: 1.5rem; }
.cal-today__num   { font-size: 4rem; line-height: 1; color: var(--c-ink); }
.cal-today__month { font-size: 1.75rem; }

.cal-today__body {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	font-size: var(--fs-sm);
}

.cal-today__feast {
	font-weight: 500;
	color: var(--c-ochre);
}

@media (min-width: 1024px) {
	.church-calendar__body {
		grid-template-columns: minmax(0, 1fr) 16.9375rem;
		align-items: start;
		gap: 2.5rem;
	}

	.cal-today {
		margin-inline: 0;
	}
}


/* ==========================================================================
   9. 3D-ТУР
   ========================================================================== */

.tour__frame {
	position: relative;
	max-width: 67.4375rem;
	margin-inline: auto;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.tour__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tour__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.tour__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	width: 6rem;
	height: 6rem;
	margin: auto;
	color: var(--c-white);
	background-color: rgba(217, 217, 217, .77);
	border-radius: 50%;
	transition: background-color var(--transition), scale var(--transition);
}

.tour__play:hover,
.tour__play:focus-visible {
	background-color: rgba(255, 255, 255, .9);
	scale: 1.06;
}

.tour__play .icon {
	--icon-size: 2.125rem;
	margin-left: .25rem;
}

@media (min-width: 768px) {
	.tour__frame {
		aspect-ratio: 16 / 9;
	}
}

@media (min-width: 1200px) {
	.tour__frame {
		aspect-ratio: 1511 / 686;
	}
}
