/* ShelterMegaMenus. Colours and type follow the theme (WordPress preset variables) and can be overridden with
   the --shmm-* variables below. */
.shelter-mm {
	--shmm-bg: var(--wp--preset--color--blue-light, #edf4f7);
	--shmm-text: var(--wp--preset--color--text, #222);
	--shmm-accent: var(--wp--preset--color--blue, #4fa3b8);
	--shmm-ring-a: var(--wp--preset--color--orange, #e8643c);
	--shmm-ring-b: var(--wp--preset--color--blue, #4fa3b8);
	font-size: clamp(.95rem, 1.2vw, 1.15rem);
	min-width: 0;
	align-self: stretch;
	display: flex;
	align-items: stretch;
	position: static;
}
.shelter-mm ul { list-style: none; margin: 0; padding: 0; }
.shelter-mm a { text-decoration: none; color: inherit; }

/* The panels hang from the header section. */
.site-header { position: relative; }

/* Top level: items fill the full height of the bar, so there is no dead space to cross. */
.shelter-mm__list { display: flex; align-items: stretch; gap: 0; }
.shelter-mm__item { display: flex; align-items: stretch; position: static; }
.shelter-mm__link { display: flex; align-items: center; padding: 0 .15em 0 .5em; color: var(--shmm-text); line-height: 1.2; }
.shelter-mm__item:not(.has-panel) .shelter-mm__link { padding-right: .5em; }
.shelter-mm__link:hover,
.shelter-mm__item.is-open .shelter-mm__link { color: var(--shmm-accent); }
.shelter-mm__toggle { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 1.15em; cursor: pointer; color: var(--shmm-text); }
.shelter-mm__toggle::before { content: ''; width: .42em; height: .42em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-20%) rotate(45deg); transition: transform .2s; }
.shelter-mm__item.is-open .shelter-mm__toggle::before { transform: translateY(20%) rotate(-135deg); }
.shelter-mm a:focus-visible, .shelter-mm button:focus-visible { outline: 2px solid var(--shmm-accent); outline-offset: 2px; }

/* Panel */
.shelter-mm__panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 9999; background: var(--shmm-bg); color: var(--shmm-text); font-size: 1rem;
	opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; box-shadow: 0 14px 30px rgba(0,0,0,.08); }
.shelter-mm__item.is-open > .shelter-mm__panel { opacity: 1; visibility: visible; pointer-events: auto; }
.shelter-mm__panel-inner { box-sizing: border-box; width: 100%; max-width: 1280px; margin: 0 auto; padding: 36px var(--shmm-inset, clamp(16px, 3vw, 40px)); display: grid; gap: 40px; align-items: start;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; grid-template-areas: "intro links cards"; }
.shelter-mm__panel.side-left .shelter-mm__panel-inner { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "cards intro links"; }
.shelter-mm__panel.side-below .shelter-mm__panel-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "intro links" "cards cards"; }
.shelter-mm__panel.no-cards .shelter-mm__panel-inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "intro links"; }
.shelter-mm__panel.no-links .shelter-mm__panel-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "intro cards"; }
.shelter-mm__panel.no-links.no-cards .shelter-mm__panel-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro"; }
.shelter-mm__intro { grid-area: intro; }
.shelter-mm__linkcol { grid-area: links; }
.shelter-mm__cardcol { grid-area: cards; }

.shelter-mm__heading { margin: 0 0 .6em; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.shelter-mm__text { margin: 0 0 1.2em; max-width: 44ch; line-height: 1.5; }
.shelter-mm__btn { display: inline-block; padding: .5em 1.15em; font-size: .92rem; white-space: nowrap; border-radius: 999px; background: var(--shmm-accent); color: #fff !important; font-weight: 500; transition: filter .15s; }
.shelter-mm__btn:hover { filter: brightness(.92); }
.shelter-mm__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.shelter-mm__btn.is-outline { background: transparent; color: var(--shmm-accent) !important; box-shadow: inset 0 0 0 2px var(--shmm-accent); }
.shelter-mm__btn.is-outline:hover { background: var(--shmm-accent); color: #fff !important; filter: none; }
.shelter-mm__linkcol { display: flex; flex-wrap: wrap; gap: 0 48px; }
.shelter-mm__eyebrow { margin: 0 0 1em; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.shelter-mm__links li { margin: 0 0 .7em; }
.shelter-mm__links a { font-weight: 700; display: inline-flex; align-items: baseline; gap: .55em; }
.shelter-mm__links a::before { content: ''; width: .4em; height: .4em; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg) scale(.85); flex: none; }
.shelter-mm__links a:hover { color: var(--shmm-accent); }

/* Focus cards */
.shelter-mm__cards { display: flex; flex-wrap: wrap; gap: 24px; justify-content: flex-start; }
.shelter-mm__card a { display: flex; flex-direction: column; align-items: center; gap: .6em; text-align: center; font-weight: 700; font-size: .9rem; max-width: 150px; }
.shelter-mm__card-img { display: block; width: 130px; aspect-ratio: 1; overflow: hidden; background: #fff; }
.shelter-mm__card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shelter-mm__cards.is-circles .shelter-mm__card-img { border-radius: 50%; border: 4px solid var(--shmm-ring-b); }
.shelter-mm__cards.is-circles .shelter-mm__card:nth-child(odd) .shelter-mm__card-img { border-color: var(--shmm-ring-a); }
.shelter-mm__cards.is-squares .shelter-mm__card-img { border-radius: 10px; }
.shelter-mm__cards.is-list { flex-direction: column; gap: .7em; }
.shelter-mm__cards.is-list .shelter-mm__card a { flex-direction: row; max-width: none; text-align: left; }
.shelter-mm__card-text { display: flex; flex-direction: column; gap: .15em; }
.shelter-mm__card-date { font-weight: 400; font-size: .85rem; }
.shelter-mm__card a:hover .shelter-mm__card-title { color: var(--shmm-accent); }

/* Phone / tablet: hamburger + drawer */
.shelter-mm__burger, .shelter-mm__drawer { display: none; }
@media (max-width: 1024px) {
	/* Header order on phones: [logo] [buttons, pushed right] [menu]. The nav sits after the header buttons, so the burger is the far-right control. */
	.shelter-mm { align-self: center; order: 3; margin-left: 0; }
	.header-wrap > .shelter-mm { margin-left: 8px; }
	.shelter-mm__list { display: none; }
	.shelter-mm__burger { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; padding: 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--shmm-text); }
	.shelter-mm__burger-icon, .shelter-mm__burger-icon::before { display: block; width: 24px; height: 2px; background: currentColor; content: ''; }
	.shelter-mm__burger-icon { position: relative; box-shadow: 0 6px 0 -0px transparent; }
	.shelter-mm__burger-icon::before { position: absolute; top: 6px; left: 0; }
	.shelter-mm__drawer { position: fixed; inset: 0; z-index: 100000; background: #fff; color: var(--shmm-text); overflow-y: auto; padding: 70px 24px 40px; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; font-size: 1.15rem; }
	.shelter-mm__drawer { display: block; }
	.shelter-mm__drawer.is-open { transform: none; visibility: visible; }
	.shelter-mm__close { all: unset; position: absolute; top: 18px; right: 22px; cursor: pointer; font-weight: 700; padding: 6px 10px; }
	.shelter-mm__d-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e3e8ea; }
	.shelter-mm__d-row a { flex: 1; padding: 14px 0; font-weight: 700; }
	.shelter-mm__d-toggle { all: unset; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
	.shelter-mm__d-toggle::before { content: ''; width: .5em; height: .5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
	.shelter-mm__d-item.is-open .shelter-mm__d-toggle::before { transform: rotate(-135deg); }
	.shelter-mm__d-sub { display: none; padding: 6px 0 12px 14px; }
	.shelter-mm__d-item.is-open .shelter-mm__d-sub { display: block; }
	.shelter-mm__d-sub a { display: block; padding: 8px 0; }
	.shelter-mm__d-actions { display: grid; gap: 10px; margin-top: 24px; }
	.shelter-mm__d-btn { display: block; text-align: center; padding: 12px 18px; border: 2px solid var(--shmm-accent); border-radius: 999px; font-weight: 700; color: var(--shmm-accent); text-decoration: none; }
	.shelter-mm__d-btn.is-primary { background: var(--shmm-accent); color: #fff; }
	.shelter-mm__d-phone { margin: 18px 0 0; text-align: center; font-weight: 700; }
	.shelter-mm__d-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; list-style: none; margin: 18px 0 0; padding: 0; }
	.shelter-mm__d-social a { display: block; width: 28px; height: 28px; color: var(--shmm-text); }
	.shelter-mm__d-social svg { width: 100%; height: 100%; fill: currentColor; }
}
html.shelter-mm-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.shelter-mm__panel, .shelter-mm__drawer { transition: none; }
}
