/*
 * Church pages (single and archive).
 * Mobile first. Fonts, .container and .btn come from Zegen; colours from the
 * custom properties in the child style.css.
 */

.doc-church {
	--doc-heading: #252525;
	--doc-surface: #f7f4f6;
	--doc-border: #ece6ea;
	--doc-radius: 6px;
	--doc-shadow: 0 6px 24px rgba(37, 37, 37, 0.08);
}

/* Section scaffold */

.doc-church-section {
	padding: 50px 0;
}

.doc-church-section:nth-of-type(even) {
	background: var(--doc-surface);
}

.doc-church-section__title {
	position: relative;
	margin: 0 0 30px;
	padding-bottom: 14px;
	font-size: 26px;
	line-height: 34px;
}

.doc-church-section__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 50px;
	height: 3px;
	background: var(--doc-accent);
}

/* Hero */

.doc-church-hero {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	min-height: 340px;
	padding: 60px 0 50px;
	color: #fff;
	background: linear-gradient(135deg, var(--doc-primary) 0%, var(--doc-accent) 100%);
}

.doc-church-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.doc-church-hero--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgba(103, 15, 72, 0.92) 0%, rgba(103, 15, 72, 0.55) 45%, rgba(0, 0, 0, 0.15) 100%);
}

.doc-church-hero__inner {
	position: relative;
	z-index: 2;
}

.doc-church-hero a {
	color: #fff;
}

.doc-church-hero__back {
	display: inline-block;
	margin-bottom: 18px;
	font-size: 13px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	opacity: 0.85;
}

.doc-church-hero__back:hover,
.doc-church-hero__back:focus {
	opacity: 1;
}

.doc-church-hero__deanery {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	opacity: 0.9;
}

.doc-church-hero__deanery a:hover {
	text-decoration: underline;
}

.doc-church-hero__title {
	margin: 0 0 8px;
	color: #fff;
	font-size: 30px;
	line-height: 38px;
}

.doc-church-hero__area {
	margin: 0 0 24px;
	font-size: 17px;
}

.doc-church-hero .doc-church-hero__btn {
	background: #fff;
	color: var(--doc-primary);
}

.doc-church-hero .doc-church-hero__btn:hover,
.doc-church-hero .doc-church-hero__btn:focus {
	background: var(--doc-hover);
	color: #fff;
}

.doc-church-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.doc-church-hero .doc-church-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 17px;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.doc-church-hero .doc-church-social__link:hover,
.doc-church-hero .doc-church-social__link:focus {
	border-color: #fff;
	background: #fff;
	color: var(--doc-primary);
}

/* Quick info bar */

.doc-church-quickinfo {
	background: #fff;
	border-bottom: 1px solid var(--doc-border);
}

.doc-church-quickinfo__list {
	display: grid;
	grid-template-columns: 1fr;
	margin: 0;
	padding: 0;
	list-style: none;
}

.doc-church-quickinfo__item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 18px 0;
	border-bottom: 1px solid var(--doc-border);
	line-height: 24px;
}

.doc-church-quickinfo__item:last-child {
	border-bottom: 0;
}

.doc-church-quickinfo__icon {
	flex: 0 0 auto;
	margin-top: 4px;
	color: var(--doc-accent);
	font-size: 20px;
}

.doc-church-quickinfo__text {
	min-width: 0;
	overflow-wrap: anywhere;
}

.doc-church-quickinfo__label {
	display: block;
	color: var(--doc-heading);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.doc-church-quickinfo a {
	color: var(--doc-primary);
}

.doc-church-quickinfo a:hover,
.doc-church-quickinfo a:focus {
	color: var(--doc-hover);
}

/* Service times */

.doc-church-services__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.doc-church-services__day {
	padding: 22px 24px;
	background: #fff;
	border-top: 3px solid var(--doc-primary);
	border-radius: var(--doc-radius);
	box-shadow: var(--doc-shadow);
}

.doc-church-services__day-name {
	margin: 0 0 12px;
	font-size: 18px;
	line-height: 26px;
}

.doc-church-services__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.doc-church-services__item {
	display: flex;
	gap: 14px;
	padding: 10px 0;
	border-top: 1px solid var(--doc-border);
	line-height: 22px;
}

.doc-church-services__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.doc-church-services__time {
	flex: 0 0 82px;
	color: var(--doc-heading);
	font-weight: 600;
}

.doc-church-services__name,
.doc-church-services__weeks {
	display: block;
}

.doc-church-services__weeks {
	color: var(--doc-accent);
	font-size: 13px;
	font-weight: 600;
}

.doc-church-services__lang {
	display: inline-block;
	margin-top: 4px;
	padding: 0 8px;
	border-radius: 20px;
	background: rgba(171, 27, 95, 0.1);
	color: var(--doc-primary);
	font-size: 12px;
	line-height: 20px;
}

/* About */

.doc-church-about__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
}

.doc-church-about__content > :last-child {
	margin-bottom: 0;
}

.doc-church-about__facts {
	align-self: start;
	margin: 0;
	padding: 24px;
	background: #fff;
	border-left: 3px solid var(--doc-accent);
	border-radius: var(--doc-radius);
	box-shadow: var(--doc-shadow);
}

.doc-church-about__fact + .doc-church-about__fact {
	margin-top: 16px;
}

.doc-church-about__facts dt {
	color: var(--doc-heading);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.doc-church-about__facts dd {
	margin: 0;
	color: var(--doc-primary);
	font-family: Poppins, sans-serif;
	font-size: 18px;
	font-weight: 600;
}

/* Clergy */

.doc-church-clergy__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.doc-church-clergy__card {
	display: block;
	text-align: center;
}

.doc-church-clergy__photo {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	margin-bottom: 14px;
	overflow: hidden;
	border-radius: var(--doc-radius);
	background: var(--doc-border);
	color: var(--doc-primary);
	font-size: 48px;
}

.doc-church-clergy__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	transition: transform 0.3s ease;
}

.doc-church-clergy__card:hover .doc-church-clergy__photo img {
	transform: scale(1.04);
}

.doc-church-clergy__name {
	margin: 0;
	font-size: 16px;
	line-height: 24px;
}

.doc-church-clergy__card:hover .doc-church-clergy__name,
.doc-church-clergy__card:focus .doc-church-clergy__name {
	color: var(--doc-hover);
}

.doc-church-clergy__role {
	margin: 2px 0 0;
	color: var(--doc-accent);
	font-size: 13px;
	line-height: 20px;
}

/* Ministries */

.doc-church-ministries__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.doc-church-ministries__item {
	padding: 22px 24px;
	background: #fff;
	border-radius: var(--doc-radius);
	box-shadow: var(--doc-shadow);
}

.doc-church-ministries__name {
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 26px;
}

.doc-church-ministries__desc {
	margin: 0 0 8px;
}

.doc-church-ministries__time {
	margin: 0;
	color: var(--doc-primary);
	font-size: 14px;
}

/* Gallery */

.doc-church-gallery__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.doc-church-gallery__item {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: var(--doc-radius);
}

.doc-church-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.doc-church-gallery__item:hover img,
.doc-church-gallery__item:focus img {
	transform: scale(1.05);
}

/* Location */

#church-location {
	scroll-margin-top: 90px;
}

.doc-church-location__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
}

.doc-church-location__heading {
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 24px;
}

.doc-church-location__address {
	margin-bottom: 24px;
	font-style: normal;
}

.doc-church-location__map {
	overflow: hidden;
	border-radius: var(--doc-radius);
	box-shadow: var(--doc-shadow);
	aspect-ratio: 4 / 3;
}

.doc-church-location__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Enquiry form */

#church-enquiry {
	scroll-margin-top: 90px;
}

.doc-church-enquiry__inner {
	max-width: 780px;
}

.doc-church-enquiry__intro {
	margin-bottom: 24px;
}

.doc-church-enquiry label {
	display: block;
	margin-bottom: 16px;
	color: var(--doc-heading);
	font-size: 14px;
	font-weight: 600;
}

.doc-church-enquiry .wpcf7-form-control-wrap {
	display: block;
	margin-top: 6px;
	font-weight: 400;
}

.doc-church-enquiry input[type="text"],
.doc-church-enquiry input[type="email"],
.doc-church-enquiry input[type="tel"],
.doc-church-enquiry textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--doc-border);
	border-radius: 4px;
	background: #fff;
}

.doc-church-enquiry input:focus,
.doc-church-enquiry textarea:focus {
	border-color: var(--doc-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(171, 27, 95, 0.15);
}

.doc-church-enquiry .wpcf7-submit {
	background: var(--doc-accent);
	color: #fff;
}

.doc-church-enquiry .wpcf7-submit:hover,
.doc-church-enquiry .wpcf7-submit:focus {
	background: var(--doc-hover);
}

/* Church cards (nearby churches and archive) */

.doc-church-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.doc-church-card {
	height: 100%;
}

.doc-church-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: #fff;
	border-radius: var(--doc-radius);
	box-shadow: var(--doc-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-church-card__link:hover,
.doc-church-card__link:focus {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(37, 37, 37, 0.14);
}

.doc-church-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.doc-church-card__media--fallback {
	background: linear-gradient(135deg, var(--doc-primary) 0%, var(--doc-accent) 100%);
	color: rgba(255, 255, 255, 0.85);
	font-size: 40px;
}

.doc-church-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.doc-church-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px 20px 20px;
}

.doc-church-card__title {
	margin: 0 0 4px;
	font-size: 17px;
	line-height: 24px;
}

.doc-church-card__area {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 22px;
}

.doc-church-card__more {
	margin-top: auto;
	color: var(--doc-accent);
	font-size: 13px;
	font-weight: 600;
}

.doc-church-card__link:hover .doc-church-card__title,
.doc-church-card__link:hover .doc-church-card__more {
	color: var(--doc-hover);
}

.doc-church-card__more .ti-arrow-right {
	font-size: 11px;
	vertical-align: middle;
}

/* Archive */

.doc-church-hero--archive {
	min-height: 0;
	padding: 50px 0 40px;
}

.doc-church-hero__desc {
	max-width: 720px;
	margin-bottom: 10px;
	opacity: 0.9;
}

.doc-church-hero__desc p:last-child {
	margin-bottom: 0;
}

.doc-church-hero__count {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	opacity: 0.85;
}

.doc-church-archive .doc-church-section {
	background: none;
}

.doc-church-search {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 12px;
	margin-bottom: 24px;
}

.doc-church-search__input.form-control {
	flex: 1 1 260px;
	max-width: 440px;
	height: 48px;
	padding: 0 18px 0 44px;
	border: 1px solid var(--doc-border);
	border-radius: 30px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23670f48' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 18px center;
	font-size: 15px;
}

.doc-church-search__input.form-control:focus {
	border-color: var(--doc-accent);
	box-shadow: 0 0 0 3px rgba(171, 27, 95, 0.15);
	outline: none;
}

.doc-church-search__button.btn {
	height: 48px;
	padding: 0 26px;
	border-radius: 30px;
}

.doc-church-search__clear {
	flex-basis: 100%;
	text-align: center;
	font-size: 14px;
	text-decoration: underline;
}

.doc-church-filter {
	margin-bottom: 30px;
}

.doc-church-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.doc-church-filter__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;
	border: 1px solid var(--doc-border);
	border-radius: 30px;
	background: #fff;
	color: var(--doc-heading);
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.doc-church-filter__link:hover,
.doc-church-filter__link:focus {
	border-color: var(--doc-accent);
	color: var(--doc-accent);
}

.doc-church-filter__link.is-active {
	border-color: var(--doc-primary);
	background: var(--doc-primary);
	color: #fff;
}

.doc-church-filter__count {
	min-width: 22px;
	padding: 0 6px;
	border-radius: 20px;
	background: var(--doc-surface);
	color: var(--doc-primary);
	font-size: 12px;
	line-height: 20px;
	text-align: center;
}

.doc-church-filter__link.is-active .doc-church-filter__count {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.doc-church-archive .post-pagination-wrap {
	margin-top: 40px;
}

.doc-church-empty {
	padding: 40px 0;
	text-align: center;
}

/* Keyboard focus */

.doc-church a:focus-visible {
	outline: 2px solid var(--doc-accent);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.doc-church *,
	.doc-church *::before,
	.doc-church *::after {
		transition: none !important;
	}
}

/* ≥ 576px */

@media (min-width: 576px) {
	.doc-church-clergy__grid,
	.doc-church-gallery__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.doc-church-cards,
	.doc-church-services__grid,
	.doc-church-ministries__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ≥ 768px */

@media (min-width: 768px) {
	.doc-church-section {
		padding: 70px 0;
	}

	.doc-church-section__title {
		font-size: 30px;
		line-height: 38px;
	}

	.doc-church-hero {
		min-height: 420px;
		padding: 80px 0 60px;
	}

	.doc-church-hero--archive {
		min-height: 0;
		padding: 70px 0 50px;
	}

	.doc-church-hero__title {
		font-size: 42px;
		line-height: 50px;
	}

	.doc-church-quickinfo__list {
		grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
		gap: 0 30px;
	}

	.doc-church-quickinfo__item {
		border-bottom: 0;
		padding: 24px 0;
	}

	.doc-church-location__layout {
		grid-template-columns: 1fr 2fr;
		align-items: start;
	}
}

/* ≥ 992px */

@media (min-width: 992px) {
	.doc-church-section {
		padding: 90px 0;
	}

	.doc-church-hero {
		min-height: 480px;
	}

	.doc-church-hero--archive {
		min-height: 0;
	}

	.doc-church-hero__title {
		font-size: 48px;
		line-height: 58px;
	}

	.doc-church-services__grid,
	.doc-church-ministries__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.doc-church-about__layout {
		grid-template-columns: 2fr 1fr;
	}

	.doc-church-about__layout > .doc-church-about__facts:only-child {
		grid-column: 1 / -1;
		max-width: 360px;
	}

	.doc-church-clergy__grid,
	.doc-church-cards {
		grid-template-columns: repeat(4, 1fr);
	}

	.doc-church-gallery__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}
