/*
Theme Name:        JHLC
Description:       The Jewish Heritage Learning Center's site: a pinned masthead and one footer on every page, and a front page of the clock menu, the community, ways in and a contact form.
Author:            isometria.dev
Version:           1.1.0
Requires at least: 7.1
Tested up to:      7.1
Requires PHP:      8.2
Text Domain:       jhlc
Tags:              jhlc
*/

:root {
	--jhlc-navy: #001836;
	--jhlc-blue: #326fbd;
	--jhlc-ink: #1f2a3a;
	--jhlc-muted: #5b6678;
	--jhlc-line: #e3e8ef;
	--jhlc-tint: #f4f7fb;
}

/* ---------------------------------------------------------------------------
 * Header: one part on every template, pinned to the top of the window.
 * ------------------------------------------------------------------------ */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Below the admin bar for somebody signed in (it stops being fixed on a phone). */
.admin-bar .wp-site-blocks > header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar .wp-site-blocks > header.wp-block-template-part {
		top: 0;
	}
}

.wp-block-group.jhlc-header {
	padding: 8px 16px;
}

.jhlc-masthead {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
}

/* An in-page link lands below the pinned header, not under it. */
html {
	scroll-padding-top: 48px;
}

/* ---------------------------------------------------------------------------
 * Front page hero: the building photo, with the clock menu over it.
 * Desktop and tablet pin the clock to the right; a phone centres it, because
 * the clock's mobile size (340px) is nearly the whole width of the screen.
 * ------------------------------------------------------------------------ */

.wp-block-group.jhlc-hero {
	position: relative;
	width: 100%;
	min-height: 100vh;
	min-height: 100svh;
	background-size: cover;
	background-position: center;
}

.wp-block-group.jhlc-hero__clock {
	position: absolute;
	top: 20px;
	right: 0;
}

@media (max-width: 767px) {
	.wp-block-group.jhlc-hero {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 0;
		padding: 32px 0 48px;
		/* Keep the doorway of the building in frame on a narrow screen. */
		background-position: 30% center;
	}

	.wp-block-group.jhlc-hero__clock {
		position: static;
		width: 100%;
		padding-inline: 0;
	}

	.jhlc-hero__clock .element-clock-menu {
		margin-inline: auto;
	}
}

/* A large phone or a small tablet has room for more than the 340px clock. */
@media (min-width: 480px) and (max-width: 767px) {
	.jhlc-hero__clock .element-clock-menu {
		zoom: 1.3;
	}
}

/* The clock's labels sit straight on the photo: a soft shadow keeps them
 * legible over its bright windows. (The hands and pin carry ids; labels don't.) */
.jhlc-hero__clock .element-clock-menu > div:not([id]) {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 0 8px rgba(0, 0, 0, 0.35);
}

/* Phones narrower than the 340px clock plus a little air shrink it to fit. */
@media (max-width: 359px) {
	.jhlc-hero__clock .element-clock-menu {
		zoom: 0.88;
	}
}

/* ---------------------------------------------------------------------------
 * Campaign banner: one slim strip at the top of the front page's content.
 * ------------------------------------------------------------------------ */

.wp-block-group.jhlc-banner {
	margin: 0;
	padding: 10px 16px;
	background: var(--jhlc-navy);
	color: #fff;
}

.wp-block-group.jhlc-banner__inner {
	max-width: 1200px;
	margin-inline: auto;
	gap: 8px 24px;
}

.jhlc-banner .jhlc-banner__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
}

.jhlc-banner__text strong {
	font-family: var(--wp--preset--font-family--montserrat);
	font-weight: 600;
}

.jhlc-banner .jhlc-banner__actions {
	gap: 8px;
}

.jhlc-button.jhlc-button--small .wp-block-button__link {
	padding: 0.35em 1em;
	font-size: 14px;
}

@media (max-width: 600px) {
	.wp-block-group.jhlc-banner {
		padding-block: 8px;
	}

	.wp-block-group.jhlc-banner__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.jhlc-banner .jhlc-banner__text {
		font-size: 13px;
		line-height: 1.4;
	}

	.jhlc-button.jhlc-button--small .wp-block-button__link {
		padding: 0.3em 0.8em;
		font-size: 13px;
	}
}

/* ---------------------------------------------------------------------------
 * About section
 * ------------------------------------------------------------------------ */

.wp-block-group.jhlc-about {
	padding: 72px 24px 80px;
	background: #fff;
	color: var(--jhlc-ink);
}

.jhlc-about > * {
	max-width: 1080px;
}

.jhlc-about .jhlc-about__eyebrow {
	margin: 0 auto 8px;
	color: var(--jhlc-blue);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.jhlc-about .jhlc-about__title {
	margin: 0 auto 20px;
	color: var(--jhlc-navy);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.2;
}

.jhlc-about .jhlc-about__lead {
	margin: 0 auto 48px;
	color: var(--jhlc-muted);
	font-size: clamp(16px, 1.6vw, 18px);
	line-height: 1.7;
}

.jhlc-about .jhlc-about__cards {
	gap: 24px;
	margin: 0 auto;
}

.jhlc-card {
	padding: 28px 24px;
	border: 1px solid var(--jhlc-line);
	border-radius: 8px;
	background: #fff;
}

.jhlc-card h3 {
	margin: 0 0 12px;
	color: var(--jhlc-navy);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 20px;
	line-height: 1.3;
}

.jhlc-card p {
	margin: 0;
	color: var(--jhlc-muted);
	line-height: 1.65;
}

.jhlc-button .wp-block-button__link {
	padding: 0.65em 1.4em;
	border: 1px solid var(--jhlc-blue);
	border-radius: 5px;
	background: var(--jhlc-blue);
	color: #fff;
}

.jhlc-button--ghost .wp-block-button__link {
	background: transparent;
	color: var(--jhlc-blue);
}

/* For a dark background: the banner, the 404. */
.jhlc-button--light .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.7);
	background: transparent;
	color: #fff;
}

.jhlc-button--light .wp-block-button__link:hover,
.jhlc-button--light .wp-block-button__link:focus-visible {
	border-color: #fff;
	background: #fff;
	color: var(--jhlc-navy);
}

.jhlc-button .wp-block-button__link:hover,
.jhlc-button .wp-block-button__link:focus-visible {
	border-color: var(--jhlc-navy);
	background: var(--jhlc-navy);
	color: #fff;
}

@media (max-width: 781px) {
	.wp-block-group.jhlc-about {
		padding: 48px 16px 56px;
	}
}

/* ---------------------------------------------------------------------------
 * Section headings shared by Explore and Contact (as About's).
 * ------------------------------------------------------------------------ */

.jhlc-explore .jhlc-eyebrow,
.jhlc-contact .jhlc-eyebrow {
	margin: 0 auto 8px;
	color: var(--jhlc-blue);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
}

.jhlc-explore .jhlc-section-title,
.jhlc-contact .jhlc-section-title {
	margin: 0 auto 40px;
	color: var(--jhlc-navy);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.2;
	text-align: center;
}

/* ---------------------------------------------------------------------------
 * Explore: one card per place to go, 270 x 400 each, wrapping on a phone.
 * ------------------------------------------------------------------------ */

.wp-block-group.jhlc-explore {
	padding: 72px 16px 80px;
	background: var(--jhlc-tint);
}

.wp-block-group.jhlc-navcards {
	gap: 24px;
	max-width: 1080px;
	margin-inline: auto;
}

.wp-block-group.jhlc-navcard {
	box-sizing: border-box;
	flex: 0 0 270px;
	justify-content: flex-start;
	width: 270px;
	height: 400px;
	padding: 48px 24px 32px;
	border: 1px solid var(--jhlc-line);
	border-radius: 12px;
	background: #fff;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-group.jhlc-navcard:hover,
.wp-block-group.jhlc-navcard:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 16px 32px rgba(0, 24, 54, 0.12);
}

.wp-block-group.jhlc-navcard__logo {
	flex: none;
	width: 140px;
	height: 140px;
	margin: 0;
	border-radius: 50%;
	background: center / contain no-repeat;
	box-shadow: 0 8px 20px rgba(0, 24, 54, 0.12);
}

.jhlc-navcard--events .jhlc-navcard__logo {
	background-image: url("assets/images/logo-events.png");
}

.jhlc-navcard--clubs .jhlc-navcard__logo {
	background-image: url("assets/images/logo-clubs.png");
}

.jhlc-navcard--aleph .jhlc-navcard__logo {
	background-image: url("assets/images/logo-aleph-school.svg");
}

.jhlc-navcard .jhlc-navcard__name {
	margin: 32px 0 0;
	color: var(--jhlc-navy);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 24px;
	line-height: 1.25;
}

/* The button sits on the card's floor, whatever the name's length. */
.jhlc-navcard .jhlc-navcard__actions {
	justify-content: center;
	margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-group.jhlc-navcard {
		transition: none;
	}

	.wp-block-group.jhlc-navcard:hover,
	.wp-block-group.jhlc-navcard:focus-within {
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * Contact: the form, last thing before the footer.
 * ------------------------------------------------------------------------ */

.wp-block-group.jhlc-contact {
	padding: 72px 16px 80px;
	background: #fff;
}

.jhlc-contact > * {
	max-width: 720px;
}

.jhlc-contact .jhlc-section-title {
	margin-bottom: 16px;
}

.jhlc-contact .jhlc-contact__lead {
	margin: 0 auto 32px;
	color: var(--jhlc-muted);
	font-size: clamp(16px, 1.6vw, 18px);
	line-height: 1.7;
	text-align: center;
}

@media (max-width: 781px) {
	.wp-block-group.jhlc-explore,
	.wp-block-group.jhlc-contact {
		padding-block: 48px 56px;
	}
}

/* ---------------------------------------------------------------------------
 * Footer: contact details beside the map on a wide screen, stacked on a
 * narrow one; the copyright and the legal links stack on a phone.
 * ------------------------------------------------------------------------ */

.wp-block-group.jhlc-footer__main {
	padding-inline: 24px;
}

.jhlc-footer__contact .wp-block-heading {
	font-size: clamp(26px, 3.4vw, 40px);
	line-height: 1.2;
}

.wp-block-group.jhlc-footer__map {
	flex: 0 1 450px;
}

.jhlc-footer__map iframe {
	display: block;
	width: 100%;
	max-width: 450px;
	border-radius: 6px;
}

.wp-block-group.jhlc-footer__legal {
	gap: 4px;
}

.jhlc-footer__legal p {
	margin: 0;
}

.jhlc-footer__legal .jhlc-footer__nonprofit {
	color: #a9b4c6;
	font-size: 13px;
}

.jhlc-footer__nav a:hover,
.jhlc-footer__nav a:focus-visible {
	text-decoration: underline;
}

@media (max-width: 781px) {
	.wp-block-group.jhlc-footer__main {
		flex-direction: column;
		flex-wrap: wrap;
		align-items: stretch;
		gap: 32px;
	}

	.wp-block-group.jhlc-footer__map {
		flex: none;
		width: 100%;
	}

	.jhlc-footer__map iframe {
		max-width: none;
		height: 300px;
	}
}

@media (max-width: 600px) {
	.wp-block-group.jhlc-footer__bar {
		flex-direction: column;
		flex-wrap: wrap;
		align-items: center;
		gap: 12px;
		padding-inline: 16px !important;
		text-align: center;
	}

	.wp-block-group.jhlc-footer__legal {
		align-items: center;
	}

	.jhlc-footer__nav .wp-block-navigation__container {
		justify-content: center;
	}
}

/* ---------------------------------------------------------------------------
 * 404: the front page's photo under a navy veil, one centred message.
 * ------------------------------------------------------------------------ */

.wp-block-group.jhlc-404 {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 72vh;
	min-height: 72svh;
	margin: 0;
	padding: 72px 24px;
	background:
		linear-gradient(180deg, rgba(0, 24, 54, 0.82) 0%, rgba(0, 24, 54, 0.94) 100%),
		url("https://new.jhlc.org/wp-content/uploads/2026/09/hero-bg-1.jpg") center / cover no-repeat;
	color: #fff;
	text-align: center;
}

.wp-block-group.jhlc-404__inner {
	width: 100%;
	max-width: 640px;
}

.jhlc-404__inner > * {
	margin-inline: auto;
}

.jhlc-404 .jhlc-404__code {
	margin-top: 0;
	margin-bottom: 8px;
	background: linear-gradient(135deg, #70cd49 0%, var(--jhlc-blue) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: clamp(88px, 18vw, 160px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
}

.jhlc-404 .jhlc-404__title {
	margin-top: 0;
	margin-bottom: 16px;
	color: #fff;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: clamp(26px, 4vw, 38px);
	line-height: 1.2;
}

.jhlc-404 .jhlc-404__lead {
	max-width: 520px;
	margin-top: 0;
	margin-bottom: 32px;
	color: #d5dcea;
	font-size: clamp(16px, 1.6vw, 18px);
	line-height: 1.7;
}

.jhlc-404__search {
	max-width: 480px;
	margin-bottom: 24px;
}

.jhlc-404__search .wp-block-search__inside-wrapper {
	gap: 8px;
}

.jhlc-404__search .wp-block-search__input {
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.96);
	color: var(--jhlc-ink);
	font-size: 16px;
}

.jhlc-404__search .wp-block-search__button {
	min-height: 44px;
	margin: 0;
	padding: 0 1.4em;
	border: 1px solid #fff;
	border-radius: 5px;
	background: transparent;
	color: #fff;
}

.jhlc-404__search .wp-block-search__button:hover,
.jhlc-404__search .wp-block-search__button:focus-visible {
	background: #fff;
	color: var(--jhlc-navy);
}

.jhlc-404 .jhlc-404__actions {
	justify-content: center;
	gap: 12px;
	margin-bottom: 32px;
}

.jhlc-404 .jhlc-404__help {
	margin: 0;
	color: #a9b4c6;
	font-size: 14px;
}

.jhlc-404__help a {
	color: #fff;
}

@media (max-width: 600px) {
	.wp-block-group.jhlc-404 {
		padding: 56px 16px;
	}

	.jhlc-404__search .wp-block-search__inside-wrapper {
		flex-wrap: wrap;
	}

	.jhlc-404__search .wp-block-search__input,
	.jhlc-404__search .wp-block-search__button,
	.jhlc-404 .jhlc-404__actions .wp-block-button {
		width: 100%;
	}
}
