/* GTC Atlas site chrome: site footer with newsletter sign-up, and heading capitalisation. */

/* -------------------------------------------------------------------------
 * 1. Normal capitalisation for headings.
 * Astra's typography settings force Title Case (text-transform: capitalize) on
 * headings. Undo it on the heading elements and theme/Spectra title classes only.
 * Headings carrying a plugin class (gtc...) keep their own styling, so the
 * plugin's deliberate uppercase labels are untouched; spans and kicker labels
 * with their own classes are not targeted. Navigation menu items are not headings.
 * ---------------------------------------------------------------------- */
:is(h1, h2, h3, h4, h5, h6):not([class*="gtc"]):not(.site-title),
:is(h1, h2, h3, h4, h5, h6):not([class*="gtc"]):not(.site-title) > a,
.entry-content :is(h1, h2, h3, h4, h5, h6):not([class*="gtc"]),
.entry-title,
.entry-title a,
.page-title,
.widget-title,
.wp-block-heading:not([class*="gtc"]),
.ast-archive-title,
.ast-archive-description .ast-archive-title,
.ast-single-post .entry-title,
.uagb-heading-text,
.wp-block-uagb-advanced-heading .uagb-heading-text,
.uagb-ifb-title,
.uagb-infobox__title,
.uagb-cta__title,
.uagb-post__title,
.uagb-post__title a,
.uagb-tm__title,
.uagb-team__title,
.uagb-faq-questions,
.uagb-question {
	text-transform: none !important;
}

/* -------------------------------------------------------------------------
 * 2. Horizontal overflow guard. clip (not hidden) keeps position: sticky working.
 * ---------------------------------------------------------------------- */
html { overflow-x: clip; }

/* -------------------------------------------------------------------------
 * 3. Site footer
 * ---------------------------------------------------------------------- */
.gtc-sf {
	--sf-green: #24422b;
	--sf-green-dark: #1a3020;
	--sf-cream: #f6f1e4;
	--sf-cream-soft: #ddd6c4;
	--sf-gold: #a8742a;
	--sf-gold-light: #f0d49c;
	--sf-ink: #1f2a22;
	--sf-line: rgba(246, 241, 228, .18);
	--sf-sans: 'GTCA Sans', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--sf-serif: 'GTCA Serif', 'Source Serif 4', Georgia, serif;
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	background: var(--sf-green);
	color: var(--sf-cream);
	font: 400 17px/1.55 var(--sf-sans);
	clear: both;
	overflow-wrap: anywhere;
}
.gtc-sf *, .gtc-sf *::before, .gtc-sf *::after { box-sizing: border-box; }
.gtc-sf p { margin: 0; color: inherit; }
.gtc-sf .gtc-sf-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Links */
.gtc-sf a { color: var(--sf-cream); text-decoration: none; }
.gtc-sf a:hover { color: var(--sf-gold-light); text-decoration: underline; text-underline-offset: 3px; }
.gtc-sf a:focus-visible,
.gtc-sf button:focus-visible,
.gtc-sf input:focus-visible {
	outline: 3px solid var(--sf-gold-light) !important;
	outline-offset: 3px !important;
	box-shadow: none;
}

/* Headings: sentence case, never uppercase. */
.gtc-sf h2.gtc-sf-h,
.gtc-sf h2.gtc-sf-nl-h { text-transform: none !important; letter-spacing: 0; }

/* Newsletter band */
.gtc-sf .gtc-sf-nl { background: var(--sf-green-dark); border-bottom: 1px solid var(--sf-line); padding: 56px 0; }
.gtc-sf .gtc-sf-nl-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 56px; align-items: start; }
.gtc-sf h2.gtc-sf-nl-h { margin: 0 0 12px; font: 600 clamp(26px, 3vw, 34px)/1.2 var(--sf-serif); color: var(--sf-cream); }
.gtc-sf .gtc-sf-nl-p { font-size: 17px; color: var(--sf-cream-soft); max-width: 34em; }
.gtc-sf .gtc-sf-nl-form { min-width: 0; }

/* Shared button (fallback link) */
.gtc-sf .gtc-sf-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 10px 26px; border-radius: 4px;
	background: var(--sf-gold-light); color: var(--sf-ink);
	font: 700 17px/1.2 var(--sf-sans); text-decoration: none;
}
.gtc-sf .gtc-sf-btn:hover { background: #fff; color: var(--sf-ink); text-decoration: none; }

/* SureForms inside the footer: light labels, white inputs, gold-light button. */
.gtc-sf .srfm-form-container {
	--srfm-color-scheme-primary: #f0d49c !important;
	--srfm-color-scheme-text-on-primary: #1f2a22 !important;
	--srfm-color-scheme-text: #f6f1e4 !important;
	--srfm-color-input-label: #f6f1e4 !important;
	--srfm-color-input-description: #ddd6c4 !important;
	--srfm-color-input-placeholder: #5d675e !important;
	--srfm-color-input-text: #1f2a22 !important;
	--srfm-color-input-prefix: #4f5a50 !important;
	--srfm-color-input-background: #ffffff !important;
	--srfm-color-input-background-hover: #ffffff !important;
	--srfm-color-input-background-disabled: #e9e4d6 !important;
	--srfm-color-input-border: #dcd3bd !important;
	--srfm-color-input-border-hover: #f0d49c !important;
	--srfm-color-input-border-focus-glow: rgba(240, 212, 156, .45) !important;
	--srfm-color-input-selected: #f0d49c !important;
	--srfm-btn-color-hover: #ffffff !important;
	--srfm-color-error: #ffd2c4 !important;
	--srfm-error-color: #ffd2c4 !important;
	--srfm-color-error-text: #ffd2c4 !important;
	--srfm-bg-color: transparent !important;
	--srfm-form-bg-color: transparent !important;
	background: transparent !important;
	color: var(--sf-cream);
	padding: 0 !important;
	margin: 0 !important;
	max-width: 100% !important;
	border: 0 !important;
	box-shadow: none !important;
}
.gtc-sf .srfm-form-container form,
.gtc-sf .srfm-form { background: transparent !important; padding: 0 !important; margin: 0 !important; max-width: 100% !important; }
.gtc-sf .srfm-form-container .srfm-block-label,
.gtc-sf .srfm-form-container label,
.gtc-sf .srfm-form-container legend,
.gtc-sf .srfm-form-container .srfm-block-text,
.gtc-sf .srfm-form-container .srfm-description,
.gtc-sf .srfm-form-container .srfm-block-description {
	color: var(--sf-cream) !important;
	font-family: var(--sf-sans) !important;
	font-size: 16px !important;
	line-height: 1.45 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}
.gtc-sf .srfm-form-container .srfm-block-label { font-weight: 600 !important; }
.gtc-sf .srfm-form-container .srfm-required { color: var(--sf-gold-light) !important; }
.gtc-sf .srfm-form-container a { color: var(--sf-gold-light) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.gtc-sf .srfm-form-container a:hover { color: #fff !important; }
.gtc-sf .srfm-form-container input[type="text"],
.gtc-sf .srfm-form-container input[type="email"],
.gtc-sf .srfm-form-container .srfm-input-common:not([type="checkbox"]):not([type="radio"]) {
	width: 100% !important;
	min-height: 48px !important;
	padding: 10px 14px !important;
	background: #fff !important;
	color: var(--sf-ink) !important;
	border: 1px solid #dcd3bd !important;
	border-radius: 4px !important;
	font: 400 17px/1.3 var(--sf-sans) !important;
}
.gtc-sf .srfm-form-container input::placeholder { color: #5d675e !important; opacity: 1; }
.gtc-sf .srfm-form-container .srfm-error-message,
.gtc-sf .srfm-form-container .srfm-error-wrap,
.gtc-sf .srfm-form-container .srfm-common-error-message { color: #ffd2c4 !important; font-size: 15px !important; }
/* Consent checkbox: the native box or SureForms' styled box, both legible on green. */
.gtc-sf .srfm-form-container input[type="checkbox"]:not(.screen-reader-text) {
	width: 22px !important; height: 22px !important; accent-color: var(--sf-gold-light); flex: none;
}
.gtc-sf .srfm-form-container .srfm-cbx { display: flex !important; align-items: flex-start; gap: 10px; min-height: 44px; cursor: pointer; }
/* The tick box is the first span; the second span is the label text and must stay transparent on the dark footer. */
.gtc-sf .srfm-form-container .srfm-cbx .srfm-span-wrap:first-child:not(.srfm-block-label) {
	flex: none; background: #fff !important; border-color: #dcd3bd !important;
}
.gtc-sf .srfm-form-container .srfm-cbx .srfm-span-wrap.srfm-block-label,
.gtc-sf .srfm-form-container .srfm-cbx .srfm-span-wrap + .srfm-span-wrap {
	flex: 1 1 auto; background: transparent !important; border: 0 !important; color: #f6f1e4 !important;
}
.gtc-sf .srfm-form-container .srfm-cbx .srfm-span-wrap.srfm-block-label a { color: #f0d49c !important; }
.gtc-sf .srfm-form-container .srfm-cbx input:focus-visible + .srfm-span-wrap { outline: 3px solid var(--sf-gold-light); outline-offset: 2px; }
/* Submit button */
.gtc-sf .srfm-form-container .srfm-submit-container { margin-top: 8px !important; }
.gtc-sf .srfm-form-container button[type="submit"],
.gtc-sf .srfm-form-container .srfm-submit-button,
.gtc-sf .srfm-form-container .srfm-button {
	min-height: 48px !important;
	padding: 10px 30px !important;
	background: var(--sf-gold-light) !important;
	color: var(--sf-ink) !important;
	border: 0 !important;
	border-radius: 4px !important;
	font: 700 17px/1.2 var(--sf-sans) !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}
.gtc-sf .srfm-form-container button[type="submit"]:hover,
.gtc-sf .srfm-form-container .srfm-submit-button:hover { background: #fff !important; color: var(--sf-ink) !important; }
.gtc-sf .srfm-form-container .srfm-submit-button * { color: inherit !important; }
/* Success message after submit */
.gtc-sf .srfm-single-form.srfm-success-box,
.gtc-sf .srfm-success-box { background: transparent !important; color: var(--sf-cream) !important; border: 1px solid var(--sf-line) !important; }
.gtc-sf .srfm-success-box * { color: var(--sf-cream) !important; }

/* Columns */
.gtc-sf .gtc-sf-cols {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
	gap: 40px 48px;
	padding-top: 56px;
	padding-bottom: 48px;
}
.gtc-sf .gtc-sf-col { min-width: 0; }
.gtc-sf .gtc-sf-name { margin: 0 0 12px; font: 600 26px/1.2 var(--sf-serif); }
.gtc-sf .gtc-sf-name a { color: var(--sf-cream); display: inline-flex; align-items: center; min-height: 44px; }
.gtc-sf .gtc-sf-logo { display: inline-block; margin: 0 0 16px; padding: 10px 14px; background: var(--sf-cream); border-radius: 6px; line-height: 0; }
.gtc-sf .gtc-sf-logo a { display: inline-block; }
.gtc-sf .gtc-sf-logo img { display: block; width: auto; max-width: 220px; height: auto; max-height: 64px; }
.gtc-sf .gtc-sf-tag { color: var(--sf-cream-soft); max-width: 24em; }
.gtc-sf h2.gtc-sf-h {
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--sf-gold);
	font: 600 20px/1.25 var(--sf-serif);
	color: var(--sf-gold-light);
}
.gtc-sf .gtc-sf-list { list-style: none; margin: 0; padding: 0; }
.gtc-sf .gtc-sf-list li { margin: 0; padding: 0; }
.gtc-sf .gtc-sf-list a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; font-size: 17px; line-height: 1.3; }

/* Bottom bar */
.gtc-sf .gtc-sf-bar { background: var(--sf-green-dark); border-top: 1px solid var(--sf-line); }
.gtc-sf .gtc-sf-bar-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 20px; padding-bottom: 20px; font-size: 15px; color: var(--sf-cream-soft); }

/* Tablet: two columns */
@media (max-width: 980px) {
	.gtc-sf .gtc-sf-nl-in { grid-template-columns: minmax(0, 1fr); }
	.gtc-sf .gtc-sf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Mobile: one column */
@media (max-width: 600px) {
	.gtc-sf .gtc-sf-wrap { padding-left: 20px; padding-right: 20px; }
	.gtc-sf .gtc-sf-nl { padding: 40px 0; }
	.gtc-sf .gtc-sf-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 32px; }
	.gtc-sf .gtc-sf-bar-in { flex-direction: column; }
	.gtc-sf .srfm-form-container .srfm-submit-button,
	.gtc-sf .srfm-form-container button[type="submit"] { width: 100% !important; }
}

/* Astra leaves no footer wrapper when the plugin footer is on; guard against stray builder rows. */
body.gtc-sf-on .site-footer:not(.gtc-sf),
body.gtc-sf-on .ast-small-footer,
body.gtc-sf-on .footer-adv { display: none !important; }

/* Log in and join pages: a gouache painting behind a cream card. */
body.gtc-auth .site-content { background: #24422b var(--gtc-auth-bg) center / cover no-repeat; padding: 64px 16px 80px; }
body.gtc-auth .site-content > .ast-container { display: block; max-width: 100%; padding: 0; }
body.gtc-auth #primary { float: none; width: 100%; max-width: 620px; margin: 0 auto !important; padding: 36px 40px 28px !important; background: rgba(251, 248, 240, .97); border-radius: 6px; box-shadow: 0 18px 50px rgba(18, 30, 21, .35); }
body.gtc-auth #primary article, body.gtc-auth #primary .ast-article-single { background: transparent !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
body.gtc-auth .entry-title { font-family: "GTCA Serif", "Source Serif 4", Georgia, serif; color: #24422b; }
@media (max-width: 640px) {
	body.gtc-auth .site-content { padding: 28px 12px 48px; }
	body.gtc-auth #primary { padding: 24px 18px 18px !important; }
}

/* Wide painted banners on plugin pages. */
.gtc-banner { margin: 0 0 28px; width: 100%; aspect-ratio: auto; height: clamp(200px, 28vw, 420px); overflow: hidden; border-radius: 2px; background: #dfe5d6; }
.gtc-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .gtc-banner { height: 56vw; margin-bottom: 18px; } }

/* Page banners placed as full-width image blocks run edge to edge. */
.entry-content > .wp-block-image.alignfull.gtc-page-banner { max-width: none !important; width: auto !important; margin: 0 calc(50% - 50vw) 32px !important; }
.entry-content > .wp-block-image.alignfull.gtc-page-banner img { width: 100%; max-height: 520px; object-fit: cover; }
.gtc-inclusive-events table { font-size: 15px; }
.gtc-inclusive-events td, .gtc-inclusive-events th { vertical-align: top; }
@media (max-width: 640px) { .gtc-inclusive-events { overflow-x: auto; } }
/* Phone menu: keep the header in view while the menu is open, and let the whole menu scroll. */
@media (max-width: 921px) {
	body.ast-main-header-nav-open { overflow: hidden; }
	body.ast-main-header-nav-open #masthead { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; }
	body.admin-bar.ast-main-header-nav-open #masthead { top: 46px; }
	body.ast-main-header-nav-open .ast-mobile-header-wrap .ast-mobile-header-content { max-height: calc(100vh - 120px) !important; max-height: calc(100dvh - 120px) !important; overflow-y: auto !important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 24px; }
	.ast-mobile-header-wrap .menu-toggle.ast-mobile-menu-trigger-fill { background: #24422b !important; border-color: #24422b !important; color: #f4e7c9 !important; }
	.ast-mobile-header-wrap .menu-toggle.ast-mobile-menu-trigger-fill .ast-mobile-svg { fill: #f4e7c9 !important; }
	.ast-mobile-header-wrap .menu-toggle:focus-visible { outline: 2px solid #f4e7c9; outline-offset: 2px; }
}

/* Phones and tablets: the transparent header sat on top of the page, covering titles and banners.
   Put it in the page flow so content starts below it. */
body.ast-theme-transparent-header.ast-header-break-point #masthead { position: relative !important; }

/* Headings: one serif face and scale across the site, as on the Rankings pages. */
.entry-title,
.ast-archive-title,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4,
.wp-block-heading,
.uagb-heading-text,
.ultp-builder-content h1, .ultp-builder-content h2, .ultp-builder-content h3 {
	font-family: 'GTCA Serif', 'Source Serif 4', Georgia, 'Times New Roman', serif !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
}
.entry-title, .entry-content h1, h1.wp-block-heading { font-size: clamp(32px, 3.6vw, 48px) !important; line-height: 1.15 !important; }
.entry-content h2, h2.wp-block-heading { font-size: clamp(26px, 2.6vw, 34px) !important; line-height: 1.2 !important; }
.entry-content h3, h3.wp-block-heading { font-size: clamp(20px, 1.9vw, 24px) !important; line-height: 1.3 !important; }
.entry-content h4, h4.wp-block-heading { font-size: 19px !important; line-height: 1.35 !important; }

/* Desktop: ordinary pages lost their transparent header, so drop the gap Astra left for it. */
@media (min-width: 922px) {
	body.page:not(.home):not(.ast-plain-container) #primary { margin-top: 28px !important; }
	body.page:not(.home):not(.ast-plain-container) #primary article.page { padding-top: 8px !important; }
	body.page:not(.home) .entry-header { margin-bottom: 20px; }
}

/* Inclusivity: "On this page" links. */
.gtc-onpage { margin: 8px 0 32px; padding: 18px 22px; background: #f3efe3; border-left: 4px solid #24422b; border-radius: 2px; }
.entry-content .gtc-onpage p { margin: 0 0 10px !important; font-size: 13px !important; font-weight: 700 !important; letter-spacing: .08em; text-transform: uppercase !important; color: #24422b !important; }
.gtc-onpage ul { margin: 0; padding: 0; list-style: none; columns: 2 260px; column-gap: 32px; }
.gtc-onpage li { margin: 0 0 6px; break-inside: avoid; }
.gtc-onpage a { color: #1f2a22; text-decoration: underline; text-decoration-color: rgba(36, 66, 43, .35); text-underline-offset: 3px; }
.gtc-onpage a:hover { text-decoration-color: #24422b; }
.entry-content h2[id] { scroll-margin-top: 24px; }

/* Legibility. PostX sets every paragraph to its dark "contrast" colour (html body.postx-page p),
   which turned the text in dark boxes and the footer dark green on dark green. Let the plugin's
   own sections set their text colour again. */
html body.postx-page :is(.gtca, .gtcg, .gtcpl, .gtcn, .gtccal, .gtcco, .gtch, .gtc-sf, .gtc-onpage) p,
html body.postx-page :is(.gtca, .gtcg, .gtcpl, .gtcn, .gtccal, .gtcco, .gtch, .gtc-sf) li { color: inherit; }
html body.postx-page .gtc-sf .gtc-sf-bar p { color: rgba(244, 231, 201, .78); }
html body.postx-page .gtca .gtca-panel-dark p, html body.postx-page .gtcg .gtcg-now p { color: #e8efe4; }

/* Menu: Astra's purple active and hover colour, off brand and low contrast. */
.main-header-menu .menu-item.current-menu-item > .menu-link,
.main-header-menu .menu-item.current-menu-ancestor > .menu-link,
.main-header-menu .menu-item > .menu-link:hover,
.ast-builder-menu-mobile .menu-item.current-menu-item > .menu-link { color: #14301e !important; }
.main-header-menu .menu-item.current-menu-item > .menu-link { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Tag and category chips: white text on mid-blue or mid-green fell short; use the site green. */
.uagb-post__taxonomy.highlighted, .uagb-post__taxonomy.highlighted a,
.ultp-category-list, a.ultp-category-list { background-color: #24422b !important; color: #fff !important; }
.ultp-heading-wrap .ultp-heading-inner span { color: #24422b !important; }

/* Related posts, tables and search boxes. */
.ast-related-post-title a, .ast-related-post-title { color: #1f2a22 !important; }
.entry-content table a { color: #1a5c2c; }
.wp-block-search__input { color: #1f2a22 !important; }
.wp-block-search__input::placeholder, .srfm-form-container input::placeholder, .srfm-form-container textarea::placeholder { color: #5d6b60 !important; opacity: 1; }
