/*
Theme Name: BeaMS Theme
Theme URI: https://beams.org.au
Author: Beacon Musical Society Inc.
Author URI: https://beams.org.au
Description: A modern, clean theme for Beacon Musical Society (BeaMS).
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.7
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: beams
*/

/* === Reset & Base === */
*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--color-brand: #7B2D8B;
	--color-brand-dark: #5C2268;
	--color-brand-pale: #f3edf9;
	--color-teal: #1a6b6b;
	--color-teal-light: #e6f4f4;
	--color-ink: #1a1623;
	--color-text: #3a3244;
	--color-text-light: #6b6478;
	--color-bg: #f7f4fb;
	--color-bg-alt: #faf8fc;
	--color-surface: #ffffff;
	--color-border: #e8e2f0;
	--color-gold: #f5c842;
	--color-amber: #d4843a;
	--font-body: 'DM Sans', system-ui, sans-serif;
	--font-heading: 'DM Sans', system-ui, sans-serif;
	--max-width: 1200px;
	--content-width: 900px;
	--header-height: 70px;
	--r-sm: 4px;
	--r-md: 12px;
	--r-lg: 18px;
	--sh-sm: 0 1px 4px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
	--sh-md: 0 4px 16px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.04);
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--color-brand);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--color-brand-dark);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--color-ink);
	line-height: 1.3;
	margin-top: 0;
	font-weight: 700;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
	margin-top: 0;
	margin-bottom: 1.2em;
}

/* === Layout === */
.site-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.content-area {
	flex: 1;
}

.container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* === Header === */
.site-header {
	background: var(--color-ink);
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-height);
}

.site-branding {
	flex-shrink: 0;
	max-height: var(--header-height);
	display: flex;
	align-items: center;
}

.site-branding a {
	color: #ffffff;
	font-family: var(--font-heading);
	font-size: 1.4rem;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.02em;
	display: flex;
	align-items: center;
}

.site-branding img,
.site-branding .custom-logo {
	max-height: calc(var(--header-height) - 16px);
	width: auto;
	height: auto;
	object-fit: contain;
}

.site-branding .site-title-short {
	display: none;
}

/* === Navigation === */
.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.25rem;
}

.main-navigation li {
	position: relative;
}

.site-header .main-navigation a {
	display: block;
	padding: 0.5rem 0.9rem;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.85rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: var(--r-sm);
	transition: color 0.2s ease, background-color 0.2s ease;
}

.site-header .main-navigation a:hover,
.site-header .main-navigation .current-menu-item > a,
.site-header .main-navigation .current_page_item > a {
	color: #ffffff;
	background-color: var(--color-brand);
}

/* Dropdown menus */
.main-navigation .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--color-surface);
	min-width: 220px;
	box-shadow: var(--sh-md);
	border-radius: var(--r-md);
	padding: 0.5rem 0;
	z-index: 100;
	flex-direction: column;
	border: 1px solid var(--color-border);
}

.main-navigation li:hover > .sub-menu {
	display: flex;
}

.site-header .main-navigation .sub-menu a {
	color: var(--color-text);
	text-transform: none;
	font-size: 0.9rem;
	padding: 0.5rem 1.2rem;
	border-radius: 0;
}

.site-header .main-navigation .sub-menu a:hover {
	background-color: var(--color-brand);
	color: #ffffff;
}

.site-header .main-navigation .sub-menu .current-menu-item > a,
.site-header .main-navigation .sub-menu .current_page_item > a {
	background-color: var(--color-brand);
	color: #ffffff;
}

/* Mobile menu toggle */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 0.5rem;
	min-width: 44px;
	min-height: 44px;
	line-height: 1;
}

.menu-toggle svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

/* Sub-menu expand button (injected by JS) */
.sub-menu-toggle {
	display: none;
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	padding: 0.5rem;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
}

.sub-menu-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

/* === Hero Banner === */
.hero-banner {
	position: relative;
	min-height: 430px;
	display: flex;
	align-items: flex-end;
	background-color: var(--color-ink);
	background-size: cover;
	background-position: center 35%;
	background-repeat: no-repeat;
	overflow: hidden;
}

.hero-overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(to bottom, rgba(8, 18, 18, 0.1) 0%, rgba(8, 18, 18, 0.32) 38%, rgba(8, 18, 18, 0.84) 100%);
	z-index: 1;
}

.hero-banner.has-image .hero-overlay {
	background: linear-gradient(to bottom, rgba(8, 18, 18, 0.1) 0%, rgba(8, 18, 18, 0.32) 38%, rgba(8, 18, 18, 0.84) 100%);
}

.hero-content {
	position: relative;
	z-index: 2;
	padding: 2rem 1.5rem 3rem;
	max-width: var(--content-width);
	margin: 0 auto;
	width: 100%;
}

.hero-badge {
	display: inline-block;
	font-family: var(--font-body);
	font-size: 0.73rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.9);
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	padding: 0.3rem 0.9rem;
	border-radius: 999px;
	margin-bottom: 1rem;
}

.hero-title {
	color: #ffffff;
	font-size: clamp(2rem, 5vw, 3.1rem);
	font-weight: 700;
	line-height: 1.1;
	margin-bottom: 0.75rem;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
	max-width: 620px;
}

.hero-subtitle {
	color: rgba(255, 255, 255, 0.84);
	font-size: 0.98rem;
	font-weight: 300;
	line-height: 1.7;
	margin: 0;
	max-width: 560px;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
	.hero-banner {
		min-height: 320px;
	}

	.hero-content {
		padding: 1.5rem 1.1rem 2rem;
	}
}

/* === Content === */
.site-content {
	padding: 2.5rem 0 5rem;
}

.page-header {
	margin-bottom: 2rem;
}

.entry-title {
	font-size: 2.5rem;
	margin-bottom: 0.5rem;
}

.entry-meta {
	color: var(--color-text-light);
	font-size: 0.875rem;
	margin-bottom: 2rem;
}

.entry-content {
	max-width: var(--content-width);
}

.entry-content p {
	margin-bottom: 1.4em;
}

.entry-content img {
	border-radius: var(--r-md);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.5em;
	margin-bottom: 1.4em;
}

.entry-content pre {
	background: var(--color-brand-pale);
	border: 1px solid var(--color-border);
	border-radius: var(--r-md);
	padding: 1.2rem;
	overflow-x: auto;
	font-size: 0.9rem;
	line-height: 1.5;
	-webkit-overflow-scrolling: touch;
}

.entry-content code {
	background: var(--color-brand-pale);
	padding: 0.15em 0.4em;
	border-radius: var(--r-sm);
	font-size: 0.9em;
}

.entry-content pre code {
	background: none;
	padding: 0;
	border-radius: 0;
	font-size: inherit;
}

.entry-content blockquote {
	border-left: 4px solid var(--color-brand);
	margin: 1.5em 0;
	padding: 1em 1.5em;
	background: var(--color-brand-pale);
	border-radius: 0 var(--r-md) var(--r-md) 0;
	font-style: italic;
}

/* Full-width page template (for front page content) */
.page-template-default .entry-content,
.home .entry-content,
.page-template-front-page .entry-content {
	max-width: none;
}

/* === Section Labels (small-caps brand headings) === */
.is-style-section-label {
	font-family: var(--font-body);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-brand);
	margin-bottom: 1.1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.is-style-section-label::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--color-border);
}

/* === Content Card (white card with border) === */
.is-style-content-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--r-lg);
	padding: 2rem 2.25rem;
	box-shadow: var(--sh-sm);
}

/* === Alert / Callout Box === */
.is-style-alert-box {
	background: #fffbea;
	border: 1.5px solid var(--color-gold);
	border-radius: var(--r-md);
	padding: 1rem 1.25rem;
	font-size: 0.875rem;
	color: #5a4200;
}

.is-style-alert-box p {
	margin-bottom: 0;
}

.is-style-alert-box strong {
	color: #3d2d00;
}

/* === Contact Card === */
.is-style-contact-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--r-md);
	padding: 1.5rem;
	box-shadow: var(--sh-sm);
}

.is-style-contact-card .wp-block-heading {
	font-family: var(--font-body);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--color-text-light);
	margin-bottom: 0.25rem;
}

/* === Role Badge (pill) === */
.is-style-badge {
	display: inline-block;
	font-family: var(--font-body);
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	line-height: 1.4;
}

.has-teal-background-color.is-style-badge {
	background: var(--color-teal);
	color: #ffffff;
}

.has-primary-background-color.is-style-badge,
.has-brand-background-color.is-style-badge {
	background: var(--color-brand);
	color: #ffffff;
}

/* === Dark Info Bar (emergency contacts) === */
.is-style-dark-bar {
	background: var(--color-ink);
	color: #ffffff;
	border-radius: var(--r-md);
	padding: 1rem 1.5rem 1.25rem;
}

.is-style-dark-bar .wp-block-heading {
	font-family: var(--font-body);
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.38);
	margin-bottom: 0.75rem;
}

.is-style-dark-bar p {
	color: #ffffff;
	font-weight: 600;
	font-size: 0.92rem;
	margin-bottom: 0;
}

.is-style-dark-bar a {
	color: #ffffff;
	transition: color 0.2s ease;
}

.is-style-dark-bar a:hover {
	color: var(--color-gold);
}

.is-style-dark-bar .wp-block-columns {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding-top: 1rem;
}

/* === Tables — responsive overflow === */
.wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* === Document Table === */
.wp-block-table.is-style-document-table {
	background: var(--color-surface);
	border-radius: var(--r-md);
	box-shadow: var(--sh-sm);
	border: 1px solid var(--color-border);
	overflow: hidden;
}

.wp-block-table.is-style-document-table table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.9rem;
}

.wp-block-table.is-style-document-table thead th {
	font-family: var(--font-body);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--color-text-light);
	padding: 0.75rem 1rem;
	background: var(--color-bg-alt);
	border-bottom: 1px solid var(--color-border);
	text-align: left;
}

.wp-block-table.is-style-document-table tbody td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--color-border);
	vertical-align: middle;
}

.wp-block-table.is-style-document-table tbody tr:last-child td {
	border-bottom: none;
}

.wp-block-table.is-style-document-table tbody tr:hover {
	background-color: var(--color-brand-pale);
}

.wp-block-table.is-style-document-table a {
	display: inline-block;
	font-size: 0.79rem;
	font-weight: 600;
	color: var(--color-brand);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 0.3rem 0.8rem;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wp-block-table.is-style-document-table a:hover {
	background-color: var(--color-brand);
	border-color: var(--color-brand);
	color: #ffffff;
}

/* === Page background === */
.page .site-content {
	background-color: var(--color-bg);
}

.page .site-content .container {
	max-width: var(--content-width);
}

/* Full-width pages override */
.page-template-front-page .site-content {
	background-color: var(--color-bg);
}

.page-template-front-page .site-content .container {
	max-width: var(--max-width);
}

/* === WordPress Block Styles === */
.wp-block-image {
	margin-bottom: 1.5em;
}

.wp-block-image img {
	border-radius: var(--r-md);
}

.wp-block-embed {
	margin-bottom: 2em;
}

.wp-block-embed__wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: var(--r-md);
}

.wp-block-embed__wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.wp-block-separator {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 2.5rem 0;
}

.wp-block-button__link {
	background-color: var(--color-brand);
	color: #ffffff;
	padding: 0.75rem 1.8rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 1rem;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.wp-block-button__link:hover {
	background-color: var(--color-brand-dark);
	color: #ffffff;
	transform: translateY(-1px);
}

/* === Widgets / Sidebar === */
.widget {
	margin-bottom: 2rem;
}

.widget-title {
	font-size: 1.1rem;
	font-family: var(--font-body);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--color-brand);
}

/* === Footer === */
.site-footer {
	background: var(--color-surface);
	color: var(--color-text-light);
	border-top: 1px solid var(--color-border);
	padding: 2rem 0;
	margin-top: auto;
}

.footer-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

.footer-content {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 2rem;
	padding-bottom: 1.5rem;
}

.footer-info h3 {
	color: var(--color-ink);
	font-size: 1.3rem;
	margin-bottom: 0.5rem;
}

.footer-info p {
	margin: 0;
	font-size: 0.79rem;
}

/* Social icons */
.social-links {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.site-footer .social-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--color-brand-pale);
	border-radius: 50%;
	color: var(--color-brand);
	transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.site-footer .social-links a:hover {
	background: var(--color-brand);
	color: #ffffff;
	transform: translateY(-2px);
}

.social-links svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.footer-bottom {
	border-top: 1px solid var(--color-border);
	padding: 1rem 0 0;
	text-align: center;
	font-size: 0.79rem;
}

/* Footer navigation */
.footer-navigation ul {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.footer-navigation a {
	color: var(--color-text-light);
	font-size: 0.79rem;
	padding: 0.4rem 0;
	display: inline-block;
}

.footer-navigation a:hover {
	color: var(--color-brand);
	text-decoration: underline;
}

/* === Posts list (blog/archive) === */
.posts-list {
	display: grid;
	gap: 1.5rem;
}

.post-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--r-lg);
	padding: 2rem;
	box-shadow: var(--sh-sm);
	transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.post-card:hover {
	box-shadow: var(--sh-md);
	transform: translateY(-2px);
}

.post-card .entry-title {
	font-size: 1.5rem;
	margin-bottom: 0.3rem;
}

.post-card .entry-title a {
	color: var(--color-ink);
}

.post-card .entry-title a:hover {
	color: var(--color-brand);
}

.post-card .entry-meta {
	margin-bottom: 0.8rem;
}

.post-card .entry-summary p {
	margin-bottom: 0.8rem;
}

.read-more {
	display: inline-block;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--color-brand);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 0.3rem 0.8rem;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.read-more:hover {
	background-color: var(--color-brand);
	border-color: var(--color-brand);
	color: #ffffff;
}

/* === Pagination === */
.pagination {
	margin-top: 3rem;
	text-align: center;
}

.pagination .nav-links {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	font-size: 0.85rem;
}

.pagination .current {
	background: var(--color-brand);
	color: #ffffff;
	border-color: var(--color-brand);
}

/* === Comments === */
.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--color-border);
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment-body {
	padding: 1.5rem;
	margin-bottom: 1rem;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--r-md);
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: var(--r-md);
	font-family: var(--font-body);
	font-size: 1rem;
	transition: border-color 0.2s ease;
}

.comment-respond input:focus,
.comment-respond textarea:focus {
	outline: none;
	border-color: var(--color-brand);
}

.comment-respond .submit {
	background: var(--color-brand);
	color: #ffffff;
	border: none;
	padding: 0.75rem 2rem;
	border-radius: 999px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.comment-respond .submit:hover {
	background: var(--color-brand-dark);
}

/* === Responsive === */
@media (max-width: 900px) {
	:root {
		--header-height: 60px;
	}

	.site-branding a {
		font-size: 1.15rem;
	}

	.site-branding .site-title-full {
		display: none;
	}

	.site-branding .site-title-short {
		display: inline;
	}

	.menu-toggle {
		display: block;
	}

	.main-navigation {
		display: none;
		position: absolute;
		top: var(--header-height);
		left: 0;
		right: 0;
		background: var(--color-ink);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	}

	.main-navigation.toggled {
		display: block;
	}

	.main-navigation ul {
		flex-direction: column;
		padding: 0.5rem 0;
	}

	.main-navigation li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.main-navigation a {
		flex: 1;
		padding: 0.75rem 1.5rem;
		border-radius: 0;
	}

	.sub-menu-toggle {
		display: flex;
	}

	.main-navigation .sub-menu {
		display: none;
		position: static;
		box-shadow: none;
		background: rgba(0, 0, 0, 0.15);
		border-radius: 0;
		border: none;
		min-width: 0;
		width: 100%;
	}

	.main-navigation .sub-menu-open > .sub-menu {
		display: flex;
	}

	.main-navigation .sub-menu a {
		color: rgba(255, 255, 255, 0.85);
		padding-left: 2.5rem;
	}

	/* Disable hover-based sub-menus on mobile */
	.main-navigation li:hover > .sub-menu {
		display: none;
	}

	.main-navigation .sub-menu-open:hover > .sub-menu {
		display: flex;
	}

	h1 { font-size: 2rem; }
	h2 { font-size: 1.6rem; }

	.footer-content {
		flex-direction: column;
		text-align: center;
	}

	.social-links {
		justify-content: center;
	}

	.footer-navigation ul {
		justify-content: center;
	}
}

@media (max-width: 640px) {
	.site-content {
		padding: 1.75rem 0 3rem;
	}

	h1 { font-size: 1.75rem; }
	h2 { font-size: 1.4rem; }

	.entry-title {
		font-size: 1.75rem;
	}

	.post-card {
		padding: 1.5rem;
	}

	.is-style-content-card {
		padding: 1.25rem;
	}

	.is-style-dark-bar {
		padding: 1rem 1.25rem;
	}

	.is-style-contact-card {
		padding: 1.2rem;
	}

	.container {
		padding: 0 1.1rem;
	}
}

/* === Elementor Compatibility === */

/* Remove padding/constraints on Elementor-built pages */
.elementor-page .site-content {
	padding: 0;
}

.elementor-page .site-content.elementor-content-area {
	background-color: var(--color-bg);
}

.elementor-content-area .entry-content {
	max-width: none;
}

/* Ensure Elementor sections go full width */
.elementor-page .content-area {
	overflow: visible;
}

/* Let Elementor handle its own container widths */
.elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--max-width);
}

/* Canvas template: remove all theme chrome */
.elementor-canvas .site-container {
	min-height: auto;
}

/* Prevent theme heading styles from overriding Elementor widget styles */
.elementor-widget-heading h1,
.elementor-widget-heading h2,
.elementor-widget-heading h3,
.elementor-widget-heading h4,
.elementor-widget-heading h5,
.elementor-widget-heading h6 {
	font-family: inherit;
	color: inherit;
}

/* Prevent theme button styles from conflicting with Elementor buttons */
.elementor-button {
	font-family: var(--font-body);
}

/* Ensure Elementor's stretch section works */
.elementor-section-stretched {
	max-width: none;
}

/* Fix text contrast on dark/teal Elementor sections */
.elementor-section[data-settings] .elementor-background-overlay ~ .elementor-container h1,
.elementor-section[data-settings] .elementor-background-overlay ~ .elementor-container h2,
.elementor-section[data-settings] .elementor-background-overlay ~ .elementor-container h3,
.elementor-section[data-settings] .elementor-background-overlay ~ .elementor-container h4 {
	color: inherit;
}

/* Ensure headings/text on dark sections are legible */
.elementor-section .elementor-widget-heading .elementor-heading-title {
	font-family: var(--font-heading);
}

/* Override stray hardcoded blue link colors in Elementor content */
.elementor-widget-text-editor a[style*="color: #0000ff"],
.elementor-widget-text-editor a[style*="color:#0000ff"],
.elementor-widget-text-editor a[style*="color: blue"] {
	color: var(--color-brand) !important;
}

/* Normalize stray hardcoded light-blue backgrounds from old theme */
.elementor-element .elementor-background-overlay[style*="#C0D1F5"],
.elementor-element .elementor-background-overlay[style*="#7DB3FF"],
.elementor-element .elementor-background-overlay[style*="#dbe3ef"] {
	background-color: var(--color-brand-pale) !important;
}

/* Fix admin bar + Elementor sticky nav conflict */
.admin-bar .elementor-sticky--active {
	top: 32px !important;
}

@media (max-width: 782px) {
	.admin-bar .elementor-sticky--active {
		top: 46px !important;
	}
}

/* === Utility === */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.alignwide {
	max-width: var(--max-width);
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}
