/**
 * JMAA Brand Kit - styling for pages built by the migrator.
 *
 * Follows the association's own visual language: a full width banner with the
 * title laid over it, then a centred column of content with generous space,
 * uppercase letterspaced section headings, thin rules between sections and a
 * solid dark call to action button.
 *
 * Widget level rules use the long standing elementor-widget-* wrappers.
 * Section level rules use the jmaa-sec and jmaa-hero classes the migrator
 * writes into Elementor's own classes field.
 */

/* ---------- Banner ------------------------------------------------------- */

.jmaa-hero {
	position: relative;
	min-height: clamp(280px, 38vw, 460px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: clamp(40px, 6vw, 80px) 20px;
	overflow: hidden;
	background: var(--jmaa-black, #000);
}

/* The photograph sits behind everything else. */
.jmaa-hero .elementor-widget-image {
	position: absolute;
	inset: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}
.jmaa-hero .elementor-widget-image .elementor-widget-container,
.jmaa-hero .elementor-widget-image figure,
.jmaa-hero .elementor-widget-image a { height: 100%; }

.jmaa-hero .elementor-widget-image img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
	border-radius: 0;
	margin: 0;
}

/* Darkened so the title holds up over any photograph. */
.jmaa-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.58));
	z-index: 1;
}

.jmaa-hero .elementor-widget-heading {
	position: relative;
	z-index: 2;
	margin: 0;
	width: 100%;
}
.jmaa-hero .elementor-widget-heading .elementor-heading-title {
	color: #fff !important;
	text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.jmaa-hero .elementor-widget-heading h1.elementor-heading-title {
	font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3rem);
	font-weight: 500;
	letter-spacing: .01em;
}
.jmaa-hero .elementor-widget-heading h2.elementor-heading-title {
	font-size: clamp(.82rem, .76rem + .4vw, 1rem);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .22em;
	margin-top: 14px;
}
/* No gold rule in the banner. */
.jmaa-hero .elementor-heading-title::after { display: none !important; }

/* ---------- Content sections --------------------------------------------- */

.jmaa-sec {
	background-color: var(--jmaa-white, #fff);
	padding-block: clamp(34px, 4.5vw, 62px);
	padding-inline: max(20px, calc((100% - 760px) / 2));
	text-align: center;
}

/* A hairline between consecutive sections, as on the original site. */
.jmaa-sec + .jmaa-sec { border-top: 1px solid #E6E6E6; }

/* A section holding a row needs the wider measure, so the columns have room. */
.jmaa-sec:has(> .e-flexbox) {
	padding-inline: max(20px, calc((100% - 1080px) / 2));
}

/* Rows: real columns, stacking on a phone. */
.jmaa-sec > .e-flexbox {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: clamp(20px, 3.4vw, 46px);
}
.jmaa-sec > .e-flexbox > .e-flexbox {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
@media (max-width: 767px) {
	.jmaa-sec > .e-flexbox > .e-flexbox { width: 100% !important; flex: 1 1 100%; }
}

/* ---------- Headings ----------------------------------------------------- */

.elementor-widget-heading .elementor-heading-title {
	font-family: var(--jmaa-font-head);
	color: var(--jmaa-ink, #121212) !important;
	margin: 0;
	line-height: 1.25;
}

/* Page and section titles. */
.jmaa-sec .elementor-widget-heading h1.elementor-heading-title,
.jmaa-sec .elementor-widget-heading h2.elementor-heading-title:first-letter { }

.jmaa-sec .elementor-widget-heading h1.elementor-heading-title {
	font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem);
	font-weight: 500;
	letter-spacing: -.005em;
}

/* Subsection headings: uppercase and widely letterspaced. */
.jmaa-sec .elementor-widget-heading h2.elementor-heading-title,
.jmaa-sec .elementor-widget-heading h3.elementor-heading-title {
	font-size: clamp(.88rem, .82rem + .38vw, 1.06rem);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .17em;
	color: #3a3a3a !important;
}
.jmaa-sec .elementor-widget-heading h4.elementor-heading-title {
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: .04em;
}

/* ---------- Body copy ---------------------------------------------------- */

.elementor-widget-text-editor {
	font-family: var(--jmaa-font);
	color: #3f3f3f;
	font-size: clamp(.96rem, .93rem + .2vw, 1.02rem);
	line-height: 1.8;
	margin-inline: auto;
	max-width: 68ch;
}
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

.elementor-widget-text-editor a {
	color: var(--jmaa-gold-dark, #D99F00);
	text-decoration: none;
	font-weight: 600;
	border-bottom: 1px solid rgba(217,159,0,.45);
}
.elementor-widget-text-editor a:hover {
	color: var(--jmaa-black, #000);
	border-bottom-color: var(--jmaa-black, #000);
}

/* ---------- Buttons ------------------------------------------------------ */

.elementor-widget-button { text-align: center; }
.elementor-widget-button .elementor-button {
	background-color: var(--jmaa-black, #000) !important;
	color: #fff !important;
	font-family: var(--jmaa-font);
	font-weight: 600;
	font-size: .8rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	border-radius: 2px;
	padding: 16px 34px;
	border: 2px solid var(--jmaa-black, #000);
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease;
}
.elementor-widget-button .elementor-button:hover,
.elementor-widget-button .elementor-button:focus-visible {
	background-color: var(--jmaa-gold, #FFC20E) !important;
	border-color: var(--jmaa-gold, #FFC20E);
	color: var(--jmaa-black, #000) !important;
}

/* ---------- Images ------------------------------------------------------- */

.jmaa-sec .elementor-widget-image img {
	display: block;
	height: auto;
	width: auto;
	max-width: 100%;
	max-height: 420px;
	margin-inline: auto;
	border-radius: 0;
}

.elementor-widget-image figcaption,
.elementor-image figcaption {
	font-family: var(--jmaa-font);
	font-size: .8rem;
	color: #7a7a7a;
	text-align: center;
	margin-top: 10px;
}

/* ---------- Two column rows ---------------------------------------------- */

.jmaa-sec .e-flexbox { gap: clamp(20px, 3.4vw, 48px); }
.jmaa-sec .e-flexbox .e-flexbox { text-align: center; }

/* ---------- Galleries, dividers, maps ------------------------------------ */

.elementor-widget-image-gallery .gallery-item img {
	border-radius: 4px;
	border: 2px solid transparent;
	transition: border-color .2s ease, opacity .2s ease;
}
.elementor-widget-image-gallery .gallery-item img:hover {
	border-color: var(--jmaa-gold, #FFC20E);
	opacity: .92;
}
.elementor-widget-divider { --divider-color: #E6E6E6; }
.elementor-widget-google_maps iframe {
	border-radius: 4px;
	border: 1px solid #E6E6E6;
}

/* Rhythm between stacked widgets. */
.jmaa-sec .elementor-widget + .elementor-widget { margin-top: 20px; }

@media (max-width: 767px) {
	.jmaa-sec { padding-inline: 20px; }
	.jmaa-sec .elementor-widget-image img { max-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
	.elementor-widget-button .elementor-button,
	.elementor-widget-image-gallery .gallery-item img { transition: none; }
}
