/*
Theme Name: EYM 2027
Theme URI: https://empoweryoungminds.org/
Author: Empower Young Minds
Description: Block theme for Empower Young Minds: sticky Bible School banner, new header and footer, and a full-width landing template. Everything is editable in the Site Editor and the Pages editor.
Version: 1.7.0
Requires at least: 6.6
Tested up to: 7.2
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: eym-2027
*/

/* Sticky banner + header */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(31, 78, 84, 0.08); }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
.wp-site-blocks > * + * { margin-block-start: 0; }

.eym-campaign-bar p { text-align: center; margin: 0; }
.eym-campaign-bar a { text-decoration: none; }
.eym-campaign-bar mark { text-decoration: underline; }
.eym-bar-short { display: none; }
@media (max-width: 640px) { .eym-bar-long { display: none; } .eym-bar-short { display: block; } }
/* The landing page already shows the dates and sign-up at the top */
body:has(.eym-signup:not(.eym-subscribe) .is-quick) .eym-campaign-bar { display: none; }

.eym-header .wp-block-image, .eym-brand .wp-block-image { margin: 0; }
.eym-wordmark { white-space: nowrap; }
.eym-wordmark a { text-decoration: none; }
.eym-nav a { text-decoration: none; color: var(--wp--preset--color--ink); }
.eym-nav a:hover { color: var(--wp--preset--color--teal); }
.eym-give .wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.eym-nav .wp-block-navigation__responsive-container-open { width: 44px; height: 44px; border-radius: 12px; background: var(--wp--preset--color--mint); color: var(--wp--preset--color--dark); justify-content: center; align-items: center; }
.eym-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 20px; }
@media (max-width: 420px) {
	.eym-wordmark { font-size: 15px !important; }
	.eym-give .wp-block-button__link { padding: 10px 16px !important; }
}
@media (max-width: 359px) { .eym-brand:not(.eym-brand-landing) .eym-wordmark { display: none; } }

/* Footer */
.eym-footer .eym-foot-links { list-style: none; margin: 0; }
.eym-footer .eym-foot-links a, .eym-footer a { text-decoration: none; }
.eym-footer a:hover { text-decoration: underline; }
.eym-footer strong { color: #fff; }
.eym-footer p, .eym-footer ul { margin-top: 0; margin-bottom: 0; }
.eym-break a { word-break: break-word; }

/* Landing template: let the page's own full-width sections run edge to edge */
.eym-landing-main { padding: 0; }
.eym-landing-main > .wp-block-post-content > .eym-lp { margin-top: 0; }
.eym-footer .wp-block-column > * + * { margin-top: 10px; }
.eym-footer .eym-foot-legal > * + * { margin-top: 10px; }
/* Mobile menu */
.eym-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 20px; }
.eym-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.eym-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: stretch; }
.eym-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { border-bottom: 1px solid #efeae0; padding: 12px 4px; width: 100%; }
.eym-nav .wp-block-navigation__responsive-container.is-menu-open { --navigation-layout-justification-setting: flex-start; --navigation-layout-justify: flex-start; text-align: left; }
.eym-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { align-items: flex-start; justify-content: flex-start; }
/* Any page built with the landing blocks (.eym-lp) goes edge to edge with the normal Page template too */
main:has(.eym-lp) { padding: 0 !important; }
main:has(.eym-lp) > .wp-block-post-title, main:has(.eym-lp) > .wp-block-post-featured-image { display: none; }
main:has(.eym-lp) > .wp-block-post-content { margin-top: 0; }

/* Site pages built with the landing blocks */
.eym-lp .eym-kid-chips { list-style: none; margin-left: 0; margin-right: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.eym-lp .eym-kid-chips li { margin: 0; }
.eym-lp .eym-kid-chips a { display: flex; align-items: center; gap: 8px; text-decoration: none; background: #fff; border: 1px solid #e6e0d2; border-radius: 999px; padding: 4px 14px 4px 4px; font-size: 16px; font-weight: 700; color: #1d2a2e; }
.eym-lp .eym-kid-chips img { width: 36px !important; height: 36px; border-radius: 50%; object-fit: cover; }
.eym-lp .eym-trio { text-align: center; }
.eym-lp .eym-trio .eym-stat { border-top: 0; padding-top: 0; }
@media (max-width: 781px) { .eym-lp .eym-trio { flex-wrap: nowrap !important; } .eym-lp .eym-trio > .wp-block-column { flex-basis: 0 !important; } }
.eym-lp .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; }
.eym-lp .eym-cta .wp-block-columns { align-items: center !important; }
.eym-lp .eym-cta .wp-block-column > :first-child { margin-top: 0; }
.eym-lp .eym-kid { height: 100%; }
.eym-lp .eym-kid .eym-kid-btn { margin-top: auto; }
.eym-lp .eym-kid .eym-kid-btn .wp-block-button, .eym-lp .eym-kid .eym-kid-btn .wp-block-button__link { width: 100%; }
.eym-lp .eym-kid .wp-block-button__link { font-size: 15px; padding: 10px 12px !important; min-height: 44px; white-space: normal; text-align: center; }
.eym-lp .eym-option { height: 100%; }
.eym-lp .eym-option .wp-block-buttons { margin-top: auto; }
.eym-lp .eym-shorts .wp-block-embed { margin: 0; }
.eym-lp .eym-shorts .wp-block-embed__wrapper::before { display: none; }
.eym-lp .eym-shorts iframe { position: static !important; width: 100% !important; height: auto !important; aspect-ratio: 9 / 16; border-radius: 14px; background: #17393e; display: block; }
.eym-lp .eym-shorts figcaption { font-size: 14px; line-height: 1.4; color: #34444a; opacity: 1; }
@media (max-width: 600px) { .eym-lp .eym-shorts, .eym-lp .eym-kids { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.eym-sponsor-note { margin: 0 0 16px; background: #e3eeec; border-radius: 14px; padding: 14px 18px; font-size: 17px; color: #1f4e54; }
.eym-contact .eym-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .eym-contact .eym-row { grid-template-columns: 1fr; } }
.eym-contact textarea { font: inherit; font-size: 16px; width: 100%; min-height: 140px; box-sizing: border-box; padding: 12px 16px; border: 1.5px solid #b9c4c2; border-radius: 12px; resize: vertical; }
.eym-contact label { font-weight: 700; }
.eym-form-done { background: #e3eeec; border-radius: 14px; padding: 16px 18px; font-size: 17px; color: #1f4e54; }
.eym-lp .eym-break a { word-break: break-word; }
.eym-lp .eym-kid { padding: 14px !important; gap: 10px; }
.eym-lp .eym-kid .eym-kid-btn > .wp-block-button { flex: 1 1 100%; }
.eym-lp .eym-kid h3 { margin-top: 4px; }
/* Tablet: keep the menu on one line */
@media (min-width: 600px) and (max-width: 1023px) {
	.eym-nav:not(.eym-page-nav) .wp-block-navigation__container { gap: 14px !important; }
	.eym-nav:not(.eym-page-nav) .wp-block-navigation-item { font-size: 14px; }
	.eym-nav:not(.eym-page-nav) .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item:last-child { display: none; }
}
@media (min-width: 600px) and (max-width: 820px) { .eym-brand:not(.eym-brand-landing) .eym-wordmark { display: none; } }

/* One-page campaign header: menu jumps to sections of the same page */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.eym-lp [id] { scroll-margin-top: 84px; }
.admin-bar .eym-lp [id] { scroll-margin-top: 116px; }
.eym-page-nav a[aria-current="true"] { color: var(--wp--preset--color--teal); text-decoration: underline; text-underline-offset: 6px; }
/* One-page header: campaign bar on top, then logo + name · section menu · language · main button.
   The section menu is the same as the new site's: links across the header on wide screens, ☰ below 1180px. */
.eym-header-landing .eym-hrow { flex-wrap: nowrap; }
.eym-header-landing .eym-header-actions { flex: 0 1 auto; margin-left: auto; min-width: 0; }
.eym-brand-landing { flex: 0 1 auto; min-width: 0; }
.eym-brand-landing .eym-wordmark { white-space: normal; }
.eym-page-nav .wp-block-navigation-item__content { white-space: nowrap; }
.eym-page-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--teal); }
@media (max-width: 1179px) {
	.eym-page-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.eym-page-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
@media (max-width: 600px) {
	.eym-brand-landing .eym-wordmark { font-size: 14px !important; max-width: 6.6em; line-height: 1.1 !important; }
	.eym-brand-landing .eym-logo img { width: 32px !important; height: 32px !important; }
	.eym-header-landing .eym-header-actions { gap: 6px !important; }
	.eym-header-landing .eym-give .wp-block-button__link { font-size: 14px !important; padding: 10px 12px !important; }
	.eym-header-landing .eym-lang-pill > summary { padding: 0 8px; }
}
@media (max-width: 420px) {
	.eym-header-landing .eym-hrow { gap: 8px !important; }
	.eym-header-landing .eym-header-actions { gap: 4px !important; }
	.eym-header-landing .eym-give .wp-block-button__link { padding: 10px 10px !important; }
	.eym-header-landing .eym-lang-pill > summary { padding: 0 6px; gap: 2px; }
}
@media (max-width: 379px) { .eym-header-landing .eym-lang-pill > summary::before { display: none; } }

/* Language selector: globe pill that opens a small menu */
.eym-lang-pill { position: relative; margin: 0; }
.eym-lang-pill > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; min-width: 44px; box-sizing: border-box; padding: 0 10px; border-radius: 12px; background: #e3eeec; color: #1f4e54; font-size: 14px; font-weight: 900; }
.eym-lang-pill > summary::-webkit-details-marker { display: none; }
.eym-lang-pill > summary::before { content: ""; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4e54' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.eym-lang-pill > summary::after { content: ""; width: 10px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4e54' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.eym-lang-pill .eym-lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 180px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid #e6e0d2; border-radius: 14px; box-shadow: 0 10px 30px rgba(31,78,84,0.16); }
.eym-lang-pill .eym-lang-menu li { margin: 0; }
.eym-lang-pill .eym-lang-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; color: #1d2a2e; font-size: 16px; font-weight: 700; text-decoration: none; }
.eym-lang-pill .eym-lang-menu a:hover { background: #f3f8f7; }
.eym-lang-pill .eym-lang-menu a[aria-current] { color: #0f6e6e; background: #e3eeec; }
.eym-lang-pill .eym-lang-menu a::after { content: attr(data-code); color: #5e6b6e; font-size: 13px; font-weight: 900; }

/* ---------- Campaign stages (same rules as the eym-landing plugin, so the header bar works on every page) ---------- */
html:not(.eym-stage-live):not(.eym-stage-giving):not(.eym-stage-closed) :is(.eym-when-live, .eym-when-giving, .eym-when-closed):not(.eym-when-pre),
html.eym-stage-live :is(.eym-when-pre, .eym-when-giving, .eym-when-closed):not(.eym-when-live),
html.eym-stage-giving :is(.eym-when-pre, .eym-when-live, .eym-when-closed):not(.eym-when-giving),
html.eym-stage-closed :is(.eym-when-pre, .eym-when-live, .eym-when-giving):not(.eym-when-closed) { display: none !important; }
html.eym-stage-live .eym-campaign-bar { background-color: #b3261e !important; }

/* ---------- Site pages: campaign band, trust row, checks ---------- */
.eym-campaign-band .eym-card { color: #34444a; }
.eym-campaign-band .wp-block-button.is-style-outline .wp-block-button__link { border-color: rgba(255,255,255,0.7); }
.eym-trust .eym-trust-item { border-left: 3px solid #0f6e6e; padding-left: 14px; }
.eym-trust .eym-trust-item p { margin: 0; }
.eym-lp .eym-checks { list-style: none; padding: 0; margin: 6px 0 0; }
.eym-lp .eym-checks li { position: relative; padding-left: 30px; margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: #34444a; }
.eym-lp .eym-checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #0f6e6e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }
.eym-site .eym-kid { scroll-margin-top: 140px; }
.eym-site .eym-kid:target { box-shadow: 0 0 0 3px #0f6e6e, 0 10px 30px rgba(31,78,84,0.12); }
/* Site pages keep the phone bar after the campaign closes (it goes back to Sponsor a child) */
@media (max-width: 781px) {
	html.eym-stage-closed .eym-lp.eym-site .eym-sticky-cta.eym-when-closed { display: flex !important; }
}
