/*
 * Base styles for anything Elementor does not build directly:
 * the fallback header/footer (used only when no Elementor Pro Theme
 * Builder template is assigned to that location), the default blog
 * archive, single post, search results, comments, and 404 page.
 *
 * If a global Elementor Design System / Kit is installed, its Site
 * Settings colors and fonts take precedence on any Elementor-built
 * page; this file only affects the plain-WordPress chrome.
 */

/* ---------- Force the Elementor Pro header to always be solid black ----------
 * .gl-site-header below only covers this theme's OWN fallback header,
 * which only renders when no Elementor Pro Theme Builder template is
 * assigned to the header location. Since a header template IS assigned
 * (and its own background setting keeps getting left as white/transparent),
 * this rule targets Elementor Pro's actual header wrapper directly so the
 * header can never visually disappear again, no matter what the template's
 * own background field says. */
.elementor-location-header,
header[data-elementor-type="header"] {
	background-color: var(--gl-black) !important;
}

/* ---------- Fallback header ---------- */
.gl-site-header {
	background: var(--gl-black);
	border-bottom: 1px solid var(--gl-hairline);
	position: relative;
	z-index: 100;
}

.gl-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 18px 0;
}

.gl-site-branding img {
	display: block;
	height: 46px;
	width: auto;
}

.gl-site-title {
	font-family: var(--gl-font-display);
	font-size: 22px;
	color: var(--gl-ivory);
	text-decoration: none;
	letter-spacing: .02em;
}

.gl-primary-navigation ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 32px;
	margin: 0;
	padding: 0;
}

.gl-primary-navigation a {
	color: var(--gl-ivory);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	border-bottom: 1px solid transparent;
	padding-bottom: 4px;
}

.gl-primary-navigation a:hover,
.gl-primary-navigation a:focus {
	color: var(--gl-ivory);
	border-bottom-color: var(--gl-gold);
}

.gl-menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 0;
}

.gl-menu-toggle__bar {
	display: block;
	height: 2px;
	background: var(--gl-ivory);
}

@media (max-width: 860px) {
	.gl-primary-navigation {
		display: none;
		width: 100%;
		order: 3;
	}

	.gl-primary-navigation.is-open {
		display: block;
	}

	.gl-primary-navigation ul {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		padding: 16px 0 4px;
	}

	.gl-site-header__inner {
		flex-wrap: wrap;
	}

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

/* ---------- Fallback footer ---------- */
.gl-site-footer {
	background: var(--gl-black);
	color: var(--gl-silver);
	padding: 60px 0 28px;
}

.gl-footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--gl-hairline);
	margin-bottom: 24px;
}

.gl-footer-widget-title {
	color: var(--gl-ivory);
	font-size: 14px;
	text-transform: none;
	margin-bottom: 14px;
}

.gl-footer-navigation ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0 0 16px;
	padding: 0;
}

.gl-footer-navigation a {
	color: var(--gl-silver);
	text-decoration: none;
	font-size: 14px;
}

.gl-footer-navigation a:hover {
	color: var(--gl-gold);
}

.gl-site-info {
	font-size: 13px;
	color: #5c584e;
	margin: 0;
}

/* ---------- Blog / archive / search ---------- */
.gl-main {
	padding: 64px 40px 96px;
}

.gl-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 40px;
	margin-bottom: 48px;
}

.gl-card {
	border-bottom: 1px solid #e7e2d6;
	padding-bottom: 24px;
}

.gl-card__thumb {
	display: block;
	margin-bottom: 16px;
	aspect-ratio: 4/3;
	overflow: hidden;
}

.gl-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gl-entry-title {
	font-size: 22px;
	margin-bottom: 8px;
}

.gl-entry-title a {
	text-decoration: none;
	color: var(--gl-black);
}

.gl-entry-meta {
	font-size: 13px;
	color: var(--gl-silver);
	margin-bottom: 10px;
}

.gl-entry-footer {
	font-size: 13px;
	color: var(--gl-silver);
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 12px;
}

.gl-archive-header,
.gl-no-results {
	margin-bottom: 40px;
}

.gl-archive-title {
	font-size: 32px;
}

/* ---------- Blog index hero banner ---------- */
main .gl-blog-hero,
.gl-blog-hero {
	position: relative;
	width: 100%;
	background-color: var(--gl-black);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	height: 60vh;
	min-height: 460px;
	max-height: 720px;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.gl-blog-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.gl-blog-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 60px 40px 80px;
}

.gl-blog-hero__title {
	font-family: var(--gl-font-display);
	color: var(--gl-ivory);
	font-size: 56px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
	margin: 0;
	line-height: 1.1;
}

.gl-blog-hero__subtitle {
	color: var(--gl-ivory);
	font-size: 17px;
	line-height: 1.7;
	max-width: 760px;
	margin: 18px 0 0;
}

@media (max-width: 640px) {
	.gl-blog-hero,
	main .gl-blog-hero {
		height: 45vh;
		min-height: 320px;
	}

	.gl-blog-hero__inner {
		padding: 36px 20px 40px;
	}

	.gl-blog-hero__title {
		font-size: 32px;
	}
}

/* ---------- Elementor-built pages: no theme width constraints ---------- */
.gl-main--elementor {
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0;
}

/* ---------- Single / page ---------- */
.gl-main--single,
.gl-main--page {
	max-width: 760px;
	margin: 0 auto;
}

.gl-entry-content {
	font-size: 17px;
	line-height: 1.8;
}

.gl-entry-content > * + * {
	margin-top: 1.4em;
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid #e7e2d6;
}

.gl-nav-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--gl-silver);
}

/* ---------- Comments ---------- */
.gl-comments-area {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid #e7e2d6;
}

.gl-comment-list {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
}

.gl-comment-list li {
	margin-bottom: 24px;
}

/* ---------- Buttons ---------- */
.gl-button,
input[type="submit"] {
	display: inline-block;
	background: var(--gl-gold);
	color: var(--gl-black);
	border: 0;
	padding: 14px 28px;
	font-family: var(--gl-font-body);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
}

.gl-button:hover,
input[type="submit"]:hover {
	background: #f2c674;
	color: var(--gl-black);
}

/* Search form */
.search-form {
	display: flex;
	gap: 10px;
	margin: 16px 0;
}

.search-form .search-field {
	flex: 1;
	padding: 12px 14px;
	border: 1px solid var(--gl-silver);
	font-family: var(--gl-font-body);
}

/* Skip link */
.gl-skip-link:focus {
	position: fixed;
	left: 8px;
	top: 8px;
	z-index: 100000;
	background: var(--gl-ivory);
	color: var(--gl-black);
	padding: 12px 16px;
}

/* ---------- Force no header/footer on Elementor Canvas pages ----------
 * Something outside this theme (a plugin or custom-code snippet, not
 * yet identified) is printing the site header directly into <head> on
 * at least one page, even though that page correctly uses the
 * Elementor Canvas template (which should mean no header/footer at
 * all). Browsers auto-relocate stray flow content found in <head> to
 * the start of <body>, which is why it still renders visually despite
 * the invalid placement in the raw HTML.
 *
 * Rather than depend on finding and removing whatever is injecting
 * it, this rule hides it unconditionally, purely from the presence of
 * WordPress's own page-template-elementor_canvas body class — which
 * is added by WordPress core itself and cannot be spoofed by a
 * plugin. Any Canvas-template page, now or in the future, gets a
 * guaranteed clean header-free and footer-free result regardless of
 * what else on the site tries to print one. */
body.page-template-elementor_canvas .elementor-location-header,
body.page-template-elementor_canvas .elementor-location-footer,
body.page-template-elementor_canvas header[data-elementor-type="header"],
body.page-template-elementor_canvas footer[data-elementor-type="footer"] {
	display: none !important;
}
