/* Place profile page. Colours/sizes are estimated from the design: adjust the variables. */
.ic-place-page {
	--ic-dark: #1f2d2a;
	--ic-text: #3d5a4f;
	--ic-green: #3d6b4f;
	--ic-navy: #223f6e;
	--ic-line: #dde3e6;
	--ic-soft: #f6f3ec; /* off-white band behind the tab panel */
	--ic-tint: #d8e9ee;
	--ic-gap: 0px; /* side spacing comes from the theme's own container (Astra), not from here */
}

/* One wrapper, so the theme's container (a flex row in Astra) holds a single block. Everything inside follows the theme's container width and padding. */
.ic-place-page { overflow-x: clip; }
.ic-place-wrap { width: 100%; flex: 1 1 100%; min-width: 0; }
.ic-place-wrap #primary,
.ic-place-wrap .site-main {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* Bands (green hero, navy bar, off-white tab area) run the full screen width; their content stays in the theme's container. */
.place-hero,
.place-backbar,
.ic-place-page .place-tabs .place-sections {
	margin-inline: calc(50% - 50vw);
	padding-inline: calc(50vw - 50%);
}

/* ---- Hero ---- */
.place-hero {
	background: linear-gradient(90deg, #5c7d4c 0%, #97b758 45%, #d3e05e 100%);
	color: #fff;
	padding-block: 40px;
}
.place-hero a { color: inherit; text-decoration: none; }
.place-hero a:hover,
.place-hero a:focus-visible { text-decoration: underline; }
.place-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.4em; margin: 0 0 12px; padding: 0; list-style: none; font-size: 0.875em; }
.place-breadcrumb li + li::before { content: "/"; margin-right: 0.4em; }
.place-hero__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.place-hero__title { margin: 0; color: inherit; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; line-height: 1.1; }
.place-hero__sub { margin: 16px 0 0; font-size: 1.125em; }

/* ---- Back bar ---- */
.place-backbar { background: var(--ic-navy); color: #fff; padding-block: 28px; }
.place-backbar a { color: inherit; font-size: 1em; text-decoration: none; }
.place-backbar a:hover,
.place-backbar a:focus-visible { text-decoration: underline; }

/* ---- Profile ---- */
.place-profile {
	display: grid;
	grid-template-columns: minmax(0, 31fr) minmax(0, 69fr);
	gap: 30px;
	padding-block: 80px 60px;
	margin-bottom: 0;
}
.place-profile__name { margin: 0 0 12px; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; color: var(--ic-dark); }
.place-profile__denomination { margin: 0 0 12px; font-size: 1em; color: var(--ic-green); }
.place-profile__details p { margin-bottom: 12px; }
.place-profile__about { font-size: 1em; line-height: 1.7; }

.place-contact { display: flex; flex-wrap: wrap; gap: 24px 40px; margin: 20px 0 28px; }
.place-contact dt { font-size: 1em; font-weight: 700; color: var(--ic-dark); }
.place-contact dd { margin: 4px 0 0; color: var(--ic-text); }
.ic-place-page .place-contact a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.ic-place-page .place-contact a:hover,
.ic-place-page .place-contact a:focus-visible { text-decoration-thickness: 2px; }

/* ---- Gallery tabs + carousel ---- */
.place-gallery__viewport { position: relative; }
.place-gallery__slide { margin: 0; }
.place-gallery__slide img { display: block; width: 100%; height: auto; }
.place-gallery__slide figcaption { margin-top: 8px; font-size: 0.875em; }
.place-gallery__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 54px;
	height: 54px;
	border: 0;
	background: var(--ic-navy);
	color: #fff;
	font-size: 1.5rem;
	cursor: pointer;
	/* Reset theme button styles (Astra adds padding, rounded corners and its own hover colours). */
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0; min-width: 0; line-height: 1; border-radius: 0; box-shadow: none;
}
.ic-place-page .place-gallery__btn:hover,
.ic-place-page .place-gallery__btn:focus,
.ic-place-page .place-gallery__btn:active { background-color: #1a3258; color: #fff; border: 0; box-shadow: none; }
.place-gallery__btn--prev { left: 0; }
.place-gallery__btn--next { right: 0; }
.place-gallery__meta { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 14px; }
.place-gallery__count { margin: 0; font-weight: 700; color: var(--ic-navy); }
.place-gallery__sep { align-self: stretch; width: 0; border-left: 2px solid var(--ic-navy); }
.place-gallery__map-link { padding: 0; border: 0; background: none; color: var(--ic-navy); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.ic-place-page .place-gallery__meta .place-gallery__map-link,
.ic-place-page .place-gallery__meta .place-gallery__map-link:hover,
.ic-place-page .place-gallery__meta .place-gallery__map-link:focus,
.ic-place-page .place-gallery__meta .place-gallery__map-link:active { background: none; border: 0; color: var(--ic-navy); box-shadow: none; }
.ic-place-page .place-gallery__meta .place-gallery__map-link:hover,
.ic-place-page .place-gallery__meta .place-gallery__map-link:focus-visible { text-decoration-thickness: 3px; }

.place-gallery__map { display: block; width: 100%; height: 400px; border: 0; }

/* Visible keyboard focus everywhere on this page */
.ic-place-page :is(a, button, summary):focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }

/* ---- Tabs (one per ACF field group) ---- */
.place-tabs { display: block; width: 100%; }
.place-tabs__nav,
.place-tabs__list { box-sizing: border-box; width: 100%; margin-inline: auto; padding: 0 0 24px; }
/* "On this page": a bordered heading above the tabs, in the same gutters. */
.place-tabs__title { box-sizing: border-box; margin: 0 auto; padding: 24px 0 12px; border-top: 1px solid rgba(32, 51, 46, 0.18); font-size: 1.25em; font-weight: 700; line-height: 1.3; color: var(--ic-dark); }
.place-tabs__nav ul,
.place-tabs__list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 auto; list-style: none; }
.place-tabs__nav ul { padding: 0; }
.place-tabs__nav a,
.place-tabs__tab { display: inline-block; padding: 10px 14px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ic-dark); font: inherit; font-size: 1em; text-decoration: none; cursor: pointer; }
.place-tabs__nav a:hover,
.place-tabs__tab:hover { background: #f3f8fa; border-color: #9fc3d6; }
.place-tabs__tab[aria-selected="true"] { background: rgba(217, 235, 238, 0.2); border-color: #b7d8f7; font-weight: 700; }
/* All tab labels are bold, and the selected tab has a visible background and border (high priority so Astra's button colours can't replace them). */
.ic-place-page .place-tabs .place-tabs__tab,
.ic-place-page .place-tabs .place-tabs__nav a { font-weight: 700; }
.ic-place-page .place-tabs .place-tabs__tab[aria-selected="true"] { background-color: rgba(217, 235, 238, 0.2); border-color: #b7d8f7; }
/* Keep the tab text dark in every state (Astra turns button text white on hover, focus and active). */
.ic-place-page .place-tabs .place-tabs__tab,
.ic-place-page .place-tabs .place-tabs__tab:hover,
.ic-place-page .place-tabs .place-tabs__tab:focus,
.ic-place-page .place-tabs .place-tabs__tab:active,
.ic-place-page .place-tabs .place-tabs__tab[aria-selected="true"] { color: var(--ic-dark); }
.ic-place-page .place-tabs .place-tabs__tab:not([aria-selected="true"]):hover,
.ic-place-page .place-tabs .place-tabs__tab:not([aria-selected="true"]):focus,
.ic-place-page .place-tabs .place-tabs__tab:not([aria-selected="true"]):active { background: #f3f8fa; border-color: #9fc3d6; }
.ic-place-page .place-tabs .place-sections { display: block; width: 100%; background-color: var(--ic-soft); }

/* ---- Section cards + accordion ---- */
.place-sections { background: var(--ic-soft); padding-block: 32px 60px; }
.place-sections > .place-card {
	box-sizing: border-box;
	margin: 0 0 24px;
}
.place-card {
	background: #fff;
	border: 1px solid var(--ic-line);
	border-radius: 24px;
	padding: 32px;
	color: var(--ic-text);
}
.place-card > h2 { margin: 0 0 24px; padding-bottom: 24px; border-bottom: 1px solid var(--ic-line); font-size: 1.75em; font-weight: 600; color: var(--ic-dark); }
.place-card dl { margin: 0; }
.place-card dl > div { margin-bottom: 14px; }
.place-card dt { display: inline; margin-right: 0.35em; font-weight: 700; } /* space between the label and its value */
.place-card dd { display: inline; margin: 0; }
.place-card dd dl { display: block; }
/* Multiple choice and long text: the answer sits below its label. Short answers stay beside it. */
.place-card .place-field--block > dt,
.place-card .place-field--block > dd { display: block; }
.place-card .place-field--block > dd { margin-top: 6px; }
.place-card .place-list { margin: 0; padding-left: 1.25em; list-style: disc; }
.place-card .place-list li { margin: 0 0 4px; }

.place-card details { border-bottom: 1px solid var(--ic-line); }
.place-card details:last-child { border-bottom: 0; }
.place-card details > dl { padding-bottom: 20px; }
.place-card summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 0;
	font-size: 1.125em;
	font-weight: 600;
	color: var(--ic-dark);
	cursor: pointer;
	list-style: none;
}
.place-card summary::-webkit-details-marker { display: none; }
.place-card summary::after {
	content: "";
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border: 1.5px solid var(--ic-dark);
	border-radius: 50%;
	background: no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2d2a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.place-card details[open] > summary::after { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) {
	.place-card summary::after { transition: transform 0.15s; }
}

@media (max-width: 782px) {
	.place-profile { grid-template-columns: 1fr; padding-block: 40px; }
	.place-card { padding: 20px; }
}

/* ---- Icons (placeholders until SVGs are added to assets/icons/) ---- */
.ic-place-page [hidden] { display: none !important; }
.place-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--ic-tint); color: var(--ic-dark); vertical-align: middle; margin-right: 0.6rem; }
.place-icon svg { width: 60%; height: 60%; fill: none; stroke: currentColor; }
/* Icons that come with their own coloured circle (the group icons) fill the whole slot. */
.place-icon:has(> svg.place-icon__badge) { background: none; }
.place-icon svg.place-icon__badge { width: 100%; height: 100%; }
.place-icon--placeholder::before { content: ""; width: 38%; height: 38%; border-radius: 50%; border: 2px solid currentColor; opacity: 0.35; }
.place-icon--sm { width: 1.75rem; height: 1.75rem; }
.place-icon--lg { width: 4.5rem; height: 4.5rem; margin-right: 1.25rem; }
.place-icon--bare,
.place-icon--glyph { width: auto; height: auto; background: none; border-radius: 0; margin-right: 0.35rem; }
.place-icon--bare svg { width: 1em; height: 1em; }
/* Icons on the navy and green bands are white. */
.place-backbar .place-icon,
.place-hero .place-icon--bare { color: #fff; }
.place-icon--hero { width: 13rem; height: 13rem; margin: 0; background: rgba(255, 255, 255, 0.18); color: #fff; }
.place-hero .place-icon--hero::before { border-color: #fff; }
.place-contact dt { display: flex; align-items: center; }
.place-contact dt .place-icon { margin-right: 0.5rem; }
.place-tabs__nav a,
.place-tabs__tab { display: inline-flex; align-items: center; }
.place-card > h2 { display: flex; align-items: center; }
.place-summary__label { display: inline-flex; align-items: center; }
@media (max-width: 782px) { .place-icon--hero { display: none; } }

/* Astra: no extra space above the content on church pages. */
.ast-plain-container.ast-no-sidebar #primary {
	margin-top: 0px;
}
