/**
 * Emmaus Church — Phase 2 global components
 * Header, navigation, buttons, newsletter, footer, cards, section shells
 */

/* -------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */
.wp-block-button__link,
.emmaus-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.75rem;
	padding: 0.7rem 1.4rem;
	border: 0;
	border-radius: 0.35rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.wp-block-button__link:hover,
.emmaus-btn:hover {
	transform: translateY(-1px);
}

.emmaus-btn--magenta,
.wp-block-button:not(.is-style-outline) .wp-block-button__link,
.has-magenta-background-color.wp-block-button__link {
	background: var(--wp--preset--color--magenta);
	color: var(--wp--preset--color--white);
}

.emmaus-btn--magenta:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: var(--wp--preset--color--purple);
	color: var(--wp--preset--color--white);
}

.emmaus-btn--navy,
.has-navy-background-color.wp-block-button__link {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}

.emmaus-btn--navy:hover {
	background: var(--wp--preset--color--purple-deep);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 2px solid var(--wp--preset--color--purple);
	color: var(--wp--preset--color--purple);
}

.emmaus-link-more {
	color: var(--wp--preset--color--cyan);
	font-weight: 700;
	text-decoration: none;
}

.emmaus-link-more:hover {
	color: var(--wp--preset--color--magenta);
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.emmaus-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--wp--preset--color--white);
	border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.emmaus-header__bar {
	display: grid;
	grid-template-columns: minmax(140px, 220px) 1fr minmax(120px, 200px);
	align-items: center;
	gap: 1rem 1.5rem;
	width: min(100% - 2.5rem, 1200px);
	margin-inline: auto;
	min-height: 5.25rem;
	padding-block: 0.65rem;
}

.emmaus-header__logo img,
.emmaus-header__partner img {
	display: block;
	width: auto;
	height: auto;
	max-height: 4.25rem;
}

.emmaus-header__logo img {
	max-width: 220px;
}

.emmaus-header__partner {
	justify-self: end;
}

.emmaus-header__partner img {
	max-width: 180px;
	max-height: 3.75rem;
}

.emmaus-header__nav {
	display: flex;
	justify-content: center;
}

.emmaus-header .wp-block-navigation {
	justify-content: center;
}

.emmaus-header .wp-block-navigation__container {
	gap: 0.35rem 1rem;
}

.emmaus-header .wp-block-navigation-item__content {
	padding: 0.45rem 1rem;
	border-radius: 999px;
	color: var(--wp--preset--color--black);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

.emmaus-header .wp-block-navigation-item__content:hover,
.emmaus-header .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--purple);
}

.emmaus-header .current-menu-item > .wp-block-navigation-item__content,
.emmaus-header .wp-block-navigation-item.current-menu-item > a {
	background: var(--wp--preset--color--purple);
	color: var(--wp--preset--color--white) !important;
}

/* Mobile toggle — native WP overlay enhanced */
.emmaus-header .wp-block-navigation__responsive-container-open {
	padding: 0.5rem;
	border-radius: 0.35rem;
}

.emmaus-header .wp-block-navigation__responsive-container-open svg {
	width: 1.5rem;
	height: 1.5rem;
}

.emmaus-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--white);
	padding-top: 2rem;
}

.emmaus-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	padding: 0.85rem 1.25rem;
	font-size: 1.05rem;
}

@media (max-width: 900px) {
	.emmaus-header__bar {
		grid-template-columns: 1fr auto auto;
		grid-template-areas: "logo partner toggle";
		gap: 0.65rem 0.85rem;
		min-height: 4.5rem;
		align-items: center;
	}

	.emmaus-header__logo { grid-area: logo; }
	.emmaus-header__partner { grid-area: partner; }
	.emmaus-header__nav {
		grid-area: toggle;
		justify-content: end;
	}

	.emmaus-header .wp-block-navigation {
		justify-content: flex-end;
	}
}

@media (max-width: 600px) {
	.emmaus-header__partner img {
		max-width: 100px;
		max-height: 2.75rem;
	}

	.emmaus-header__logo img {
		max-width: 150px;
		max-height: 3.25rem;
	}
}

/* -------------------------------------------------------------------------
   Section shells & cards
--------------------------------------------------------------------------- */
.emmaus-section {
	padding-block: clamp(3rem, 6vw, 5.5rem);
}

.emmaus-section--soft {
	background: var(--wp--preset--color--gray-soft);
}

.emmaus-section__title {
	color: var(--wp--preset--color--cyan);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 1rem;
}

.emmaus-section__title strong,
.emmaus-section__title .has-purple-color {
	color: var(--wp--preset--color--purple);
}

.emmaus-card {
	background: var(--wp--preset--color--white);
	border-radius: var(--emmaus-radius-card, 0.75rem);
	box-shadow: var(--emmaus-shadow-card);
	overflow: hidden;
}

.emmaus-card__body {
	padding: 1.25rem 1.35rem 1.5rem;
}

.emmaus-dots {
	display: inline-flex;
	gap: 0.35rem;
	vertical-align: middle;
}

.emmaus-dots span {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
}

.emmaus-dots span:nth-child(1) { background: var(--wp--preset--color--magenta); }
.emmaus-dots span:nth-child(2) { background: var(--wp--preset--color--cyan); }
.emmaus-dots span:nth-child(3) { background: var(--wp--preset--color--lime); }

/* -------------------------------------------------------------------------
   Newsletter — Figma: one row (name | surname | email | Subscribe) + consent
--------------------------------------------------------------------------- */
.emmaus-newsletter {
	background: #ebebeb;
	padding-block: clamp(2.75rem, 5vw, 4.25rem);
}

.emmaus-newsletter__inner {
	width: min(100% - 2.5rem, 1100px);
	margin-inline: auto;
	text-align: center;
}

.emmaus-newsletter h2 {
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--purple);
	font-size: clamp(1.85rem, 3.2vw, 2.5rem);
	font-weight: 800;
	line-height: 1.15;
}

.emmaus-newsletter__form {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.85rem;
	margin: 0;
	text-align: left;
}

.emmaus-newsletter__row {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.85fr) minmax(0, 1.55fr) minmax(8.5rem, 0.9fr);
	gap: 0.85rem;
	align-items: stretch;
}

/* Guard against wpautop <br> breaking the field grid */
.emmaus-newsletter__form br,
.emmaus-newsletter__row br {
	display: none !important;
}

.emmaus-newsletter__row > .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.emmaus-newsletter__field {
	width: 100%;
	min-height: 3.15rem;
	padding: 0.85rem 1.1rem;
	border: 0;
	border-radius: 0.4rem;
	background: var(--wp--preset--color--white);
	box-shadow: inset 0 0 0 1px #e0e0e0;
	font: inherit;
	font-size: 0.95rem;
	color: var(--wp--preset--color--black);
}

.emmaus-newsletter__field::placeholder {
	color: #9a9a9a;
	opacity: 1;
}

.emmaus-newsletter__field:focus {
	outline: 2px solid var(--wp--preset--color--cyan);
	outline-offset: 1px;
	box-shadow: none;
}

.emmaus-newsletter__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.15rem;
	padding: 0.85rem 1.35rem;
	border: 0;
	border-radius: 0.4rem;
	background: var(--wp--preset--color--magenta);
	color: var(--wp--preset--color--white);
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

.emmaus-newsletter__submit:hover {
	background: var(--wp--preset--color--purple);
}

.emmaus-newsletter__submit:disabled,
.emmaus-contact__send:disabled,
form.is-submitting [type="submit"] {
	opacity: 0.7;
	cursor: wait;
}

.emmaus-newsletter__field.is-invalid {
	box-shadow: inset 0 0 0 2px #c8102e;
}

.emmaus-newsletter__consent {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.55rem;
	max-width: 36rem;
	margin: 0.15rem 0 0;
	font-size: 0.82rem;
	line-height: 1.4;
	color: #6f6f6f;
	cursor: pointer;
}

.emmaus-newsletter__consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	margin: 0.15rem 0 0;
	accent-color: var(--wp--preset--color--purple);
	cursor: pointer;
}

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

.emmaus-form-notice {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	border-radius: 0.35rem;
	font-size: 0.95rem;
	font-weight: 600;
	text-align: left;
}

.emmaus-form-notice--success {
	background: #e8f6e8;
	color: #1d6b2c;
}

.emmaus-form-notice--error {
	background: #fde8ee;
	color: #9b1c3a;
}

.emmaus-newsletter .emmaus-form-notice {
	text-align: left;
}

@media (max-width: 800px) {
	.emmaus-newsletter__row {
		grid-template-columns: 1fr 1fr;
	}

	.emmaus-newsletter__field--email {
		grid-column: 1 / -1;
	}

	.emmaus-newsletter__submit {
		grid-column: 1 / -1;
	}
}

@media (max-width: 520px) {
	.emmaus-newsletter__row {
		grid-template-columns: 1fr;
	}

	.emmaus-newsletter__field--email,
	.emmaus-newsletter__submit {
		grid-column: auto;
	}
}

/* -------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.emmaus-footer {
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--white);
	padding-block: clamp(2.5rem, 5vw, 3.75rem);
}

.emmaus-footer__inner {
	width: min(100% - 2rem, 1200px);
	margin-inline: auto;
	display: grid;
	grid-template-columns: 1.1fr 1.4fr auto;
	gap: 2rem;
	align-items: center;
}

.emmaus-footer__logo img {
	max-width: 220px;
	height: auto;
}

.emmaus-footer__contact {
	display: grid;
	gap: 0.65rem;
	justify-items: start;
}

.emmaus-footer__contact p {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	font-size: 0.95rem;
}

.emmaus-footer__icon {
	width: 1.35rem;
	height: 1.35rem;
	flex: 0 0 auto;
	color: var(--wp--preset--color--cyan);
}

.emmaus-footer__social {
	display: flex;
	gap: 0.65rem;
	justify-content: flex-end;
}

.emmaus-footer__social a,
.emmaus-footer__social-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--charcoal);
	text-decoration: none;
	transition: transform 0.15s ease;
}

.emmaus-footer__social-placeholder {
	opacity: 0.55;
	cursor: default;
}

.emmaus-footer__social a:hover {
	transform: translateY(-2px);
	color: var(--wp--preset--color--black);
}

.emmaus-footer__social svg {
	width: 1.1rem;
	height: 1.1rem;
	fill: currentColor;
}

.emmaus-footer__copy {
	grid-column: 1 / -1;
	margin: 0.5rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.65);
	text-align: center;
}

@media (max-width: 800px) {
	.emmaus-footer__inner {
		grid-template-columns: 1fr;
		text-align: left;
	}

	.emmaus-footer__social {
		justify-content: flex-start;
	}
}

/* Breadcrumbs (blog / event singles & archives) */
.emmaus-breadcrumbs {
	margin: 0 0 1.25rem;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--wp--preset--color--ink, #1a1a1a);
}

.emmaus-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.emmaus-breadcrumbs__item:not(:last-child)::after {
	content: "/";
	margin-left: 0.5rem;
	opacity: 0.45;
}

.emmaus-breadcrumbs a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.emmaus-breadcrumbs a:hover,
.emmaus-breadcrumbs a:focus-visible {
	color: var(--wp--preset--color--purple, #4b1f7a);
}

.emmaus-breadcrumbs [aria-current="page"] span {
	font-weight: 600;
}

/* Fallback page hero (generic pages without photo media) */
.emmaus-page-hero:not(.emmaus-page-hero--about):not(.emmaus-page-hero--events):not(.emmaus-page-hero--blog):not(.emmaus-page-hero--contact) {
	display: grid;
	place-items: end start;
	min-height: clamp(12rem, 28vw, 20rem);
	padding: clamp(2rem, 5vw, 3.5rem);
	color: var(--wp--preset--color--white);
	background:
		linear-gradient(120deg, rgba(46, 17, 80, 0.55), rgba(0, 183, 212, 0.35)),
		var(--wp--preset--color--purple);
	background-size: cover;
	background-position: center;
}

.emmaus-page-hero:not(.emmaus-page-hero--about):not(.emmaus-page-hero--events):not(.emmaus-page-hero--blog):not(.emmaus-page-hero--contact) h1 {
	margin: 0;
	color: var(--wp--preset--color--white);
	font-size: clamp(2.75rem, 8vw, 5.5rem);
	font-weight: 800;
	line-height: 0.95;
}
