/*
Theme Name: Distinctive Ceremonies
Theme URI: https://www.distinctiveceremonies.net.au/
Description: Block theme for Distinctive Ceremonies (Archbishop Ronald Langham). Every page is built from core blocks, so all text, images, menus, header and footer can be edited in the Site Editor and page editor.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: distinctive-ceremonies
Tags: full-site-editing, block-patterns, one-column, custom-logo, custom-menu, editor-style, wide-blocks
*/

/* ---------- General ---------- */
body {
	-webkit-font-smoothing: antialiased;
}

:where(.wp-site-blocks) > * {
	margin-block-start: 0;
}

.wp-block-post-content.dc-page-content > .alignfull {
	margin-block-start: 0;
	margin-block-end: 0;
}

.wp-block-image img {
	vertical-align: bottom;
}

/* Visibility helpers used by the header. */
@media (max-width: 781px) {
	.dc-hide-mobile {
		display: none !important;
	}
}

@media (min-width: 782px) {
	.dc-hide-desktop {
		display: none !important;
	}
}

/* ---------- Header ---------- */
.dc-header > .dc-header-main,
.dc-header > .dc-main-nav {
	margin-block-start: 0;
}

.dc-header .wp-block-site-logo img {
	height: auto;
}

.dc-header-contact .is-style-dc-phone a {
	color: inherit;
	text-decoration: none;
}

.dc-main-nav .wp-block-navigation {
	width: 100%;
}

.dc-main-nav .wp-block-navigation .current-menu-item > a,
.dc-main-nav .wp-block-navigation a[aria-current="page"] {
	color: var(--wp--preset--color--primary);
}

@media (max-width: 781px) {
	.dc-header-main {
		justify-content: center !important;
	}

	.dc-header .wp-block-site-logo img {
		width: 140px !important;
	}
}

/* Mobile action bar: menu, Facebook, enquire, phone. */
.dc-mobile-bar {
	gap: 0 !important;
	align-items: stretch;
}

.dc-mobile-bar > * {
	margin: 0 !important;
	min-height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--base);
	font-size: 0.75rem;
	text-transform: uppercase;
}

.dc-mobile-bar .dc-bar-link a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	width: 100%;
	color: inherit;
	text-decoration: none;
}

.dc-mobile-bar .dc-bar-link a::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--dc-icon) center / contain no-repeat;
	mask: var(--dc-icon) center / contain no-repeat;
}

.dc-mobile-menu .wp-block-navigation__responsive-container-open {
	color: var(--wp--preset--color--base);
}

.dc-mobile-menu .wp-block-navigation__responsive-container-open svg {
	width: 28px;
	height: 28px;
}

.dc-mobile-menu .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
	font-size: 1rem;
}

/* Icons (Font Awesome replacements as SVG masks). */
.dc-icon-facebook {
	--dc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 8V6.2c0-.8.2-1.2 1.4-1.2H17V2h-2.6C11.3 2 10 3.5 10 6v2H8v3h2v11h4V11h2.7l.3-3z'/%3E%3C/svg%3E");
}

.dc-icon-email,
.is-style-dc-envelope {
	--dc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v2.2l-10 6-10-6zM2 9.5l10 6 10-6V19H2z'/%3E%3C/svg%3E");
}

.dc-icon-phone,
.is-style-dc-phone {
	--dc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1z'/%3E%3C/svg%3E");
}

.is-style-dc-phone a,
.is-style-dc-phone {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
}

.is-style-dc-phone::before {
	content: "";
	width: 0.9em;
	height: 0.9em;
	background: currentColor;
	-webkit-mask: var(--dc-icon) center / contain no-repeat;
	mask: var(--dc-icon) center / contain no-repeat;
}

.is-style-dc-envelope .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.65em;
}

.is-style-dc-envelope .wp-block-button__link::before {
	content: "";
	width: 1em;
	height: 1em;
	background: currentColor;
	-webkit-mask: var(--dc-icon) center / contain no-repeat;
	mask: var(--dc-icon) center / contain no-repeat;
}

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border: 1px solid var(--wp--preset--color--primary);
	padding: 0.45em 1.4em;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.875rem;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* ---------- Home ---------- */
.dc-hero .wp-block-cover__inner-container {
	text-align: center;
}

.dc-services .dc-service-card {
	display: flex;
	flex-direction: column;
	gap: 0;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dc-services .dc-service-card > * {
	margin: 0;
}

.dc-services .dc-service-card .wp-block-image,
.dc-services .dc-service-card .wp-block-image a,
.dc-services .dc-service-card img {
	display: block;
	width: 100%;
}

.dc-services .dc-service-card:hover {
	transform: translateY(-0.4em);
	box-shadow: 0 10px 20px -5px rgba(30, 30, 30, 0.4);
}

.is-style-dc-arrow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.is-style-dc-arrow a {
	text-decoration: none;
	flex: 1;
}

.is-style-dc-arrow::after {
	content: "";
	flex: none;
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%236B5820' stroke-width='4'/%3E%3C/svg%3E") center / 60% no-repeat,
		var(--wp--preset--color--primary);
}

/* ---------- Content helpers ---------- */
.dc-on-dark h1,
.dc-on-dark h2,
.dc-on-dark h3,
.dc-on-dark a {
	color: inherit;
}

.is-style-dc-card {
	box-shadow: 0 10px 10px -5px rgba(30, 30, 30, 0.2);
	border-radius: 4px;
}

/* Accordion (Details block). */
.wp-block-details.dc-accordion {
	margin-block-start: 0;
}

.wp-block-details.dc-accordion summary {
	list-style: none;
	cursor: pointer;
	position: relative;
	padding-right: 2.5rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
}

.wp-block-details.dc-accordion summary::-webkit-details-marker {
	display: none;
}

.wp-block-details.dc-accordion summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: 1.75rem;
	color: var(--wp--preset--color--primary);
}

.wp-block-details.dc-accordion[open] summary::after {
	content: "−";
}

.wp-block-details.dc-accordion[open] summary {
	margin-bottom: 1rem;
}

.wp-block-details.dc-accordion > p {
	font-size: var(--wp--preset--font-size--small);
}

/* Gallery: keep a fixed 4-up grid, even on a short last row. */
.dc-gallery.wp-block-gallery.has-nested-images figure.wp-block-image {
	flex-grow: 0;
}

.dc-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Testimonials spacing */
.dc-testimonials > .wp-block-group + .wp-block-group {
	margin-block-start: var(--wp--preset--spacing--40);
}

/* ---------- Footer ---------- */
.dc-footer {
	position: relative;
	overflow: hidden;
}

.dc-footer::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -2%;
	width: 30%;
	height: 100%;
	background: url("assets/images/rings.jpg") bottom right / 90% no-repeat;
	opacity: 0.08;
	pointer-events: none;
}

.dc-footer > * {
	position: relative;
	z-index: 1;
}

.dc-footer a {
	color: var(--wp--preset--color--body-text);
	text-decoration: none;
}

.dc-footer a:hover {
	color: var(--wp--preset--color--primary);
}

@media (max-width: 781px) {
	.dc-footer-columns {
		text-align: center;
	}

	.dc-footer-nav,
	.dc-footer-nav .wp-block-navigation__container {
		justify-content: center !important;
		align-items: center !important;
	}
}

/* ---------- Enquiry form block ---------- */
.dc-enquiry {
	background: var(--wp--preset--color--base);
	border-radius: 0.5em;
	padding: 1.75rem 1.5rem;
	box-shadow: 0 10px 10px -5px rgba(30, 30, 30, 0.08);
}

.dc-enquiry__heading {
	margin: 0 0 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
	font-size: 1.5rem;
}

.dc-enquiry__row {
	margin: 0 0 0.9rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.875rem;
}

.dc-enquiry input:not([type="hidden"]),
.dc-enquiry select,
.dc-enquiry textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55em 0.6em;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--body-text);
	background: #f7f7f7;
	border: 1px solid #d5d5d5;
	border-radius: 0.2em;
}

.dc-enquiry input:focus,
.dc-enquiry select:focus,
.dc-enquiry textarea:focus {
	outline: 2px solid var(--wp--preset--color--primary-light);
	border-color: var(--wp--preset--color--primary);
}

.dc-enquiry__req {
	color: var(--wp--preset--color--muted);
}

.dc-enquiry__hint {
	margin: 0 0 1rem;
	font-size: 0.875rem;
}

.dc-enquiry__submit {
	display: block;
	margin: 0;
}

.dc-enquiry__submit .wp-block-button__link {
	width: 100%;
	cursor: pointer;
}

.dc-enquiry__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dc-enquiry__notice {
	padding: 0.75rem 1rem;
	border-radius: 0.2em;
	font-size: 0.9rem;
}

.dc-enquiry__notice.is-success {
	background: #e8f5ee;
	color: #1d6b40;
}

.dc-enquiry__notice.is-error {
	background: #fdecee;
	color: #a1000c;
}
