/* =========================================================
   Global Pay — front-end styles (lightweight base theme)
   All colors/spacing come from theme.json via CSS custom props
   (var(--wp--preset--color--*)). Hex below are fallbacks only.
   ========================================================= */

:root {
	--gp-primary: var(--wp--preset--color--primary, #0b6fdb);
	--gp-navy:    var(--wp--preset--color--primary-dark, #073d68);
	--gp-accent:  var(--wp--preset--color--accent, #59b4e4);
	--gp-white:   var(--wp--preset--color--base, #fff);
	--gp-surface: var(--wp--preset--color--surface, #f4f8fc);
	--gp-ink:     var(--wp--preset--color--contrast, #0e2a3d);
	--gp-muted:   var(--wp--preset--color--muted, #5a7184);
	--gp-radius:  10px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gp-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 1.25rem; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 1000; background: #fff; padding: .5rem 1rem; border-radius: 6px; }

/* ---------- Header: centered logo on top, centered menu below ----------
   Desktop: only the menu row is sticky (keeps the tall logo from eating
   scroll space). Mobile: the whole header stays sticky since the menu is
   hidden behind the toggle button that lives in the logo row — see the
   mobile media query below. */
.site-header {
	background: linear-gradient(180deg, var(--gp-primary) 0%, #0a64c4 100%);
	box-shadow: 0 1px 0 rgba(255,255,255,.15);
}
.site-header__brand {
	display: flex; align-items: center; justify-content: center; position: relative;
	padding-block: .85rem;
}
.site-branding { text-align: center; }
.site-branding .custom-logo,
.site-branding .custom-logo-link img { max-height: var(--gp-logo-h, 56px); width: auto; margin-inline: auto; }
.site-title { color: var(--gp-white); font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; }
.site-title:hover { text-decoration: none; }

.site-header__nav-row { border-top: 1px solid rgba(255,255,255,.15); }
.site-nav { display: flex; justify-content: center; }

@media (min-width: 782px) {
	.site-header__nav-row {
		position: sticky; top: 0; z-index: 100;
		background: linear-gradient(180deg, var(--gp-primary) 0%, #0a64c4 100%);
		box-shadow: 0 1px 0 rgba(255,255,255,.15);
	}
}

/* "Sticky menu on scroll" Theme Option, unchecked */
body.gp-sticky-off .site-header,
body.gp-sticky-off .site-header__nav-row { position: static; }

.nav-menu {
	list-style: none; display: flex; align-items: center; justify-content: center; gap: 2rem;
	margin: 0; padding: .6rem 0;
}
.nav-menu a {
	color: var(--gp-white); font-weight: 600; padding: .5rem 0;
	border-bottom: 2px solid transparent;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
	text-decoration: none; border-bottom-color: var(--gp-white);
}

.nav-toggle {
	display: none; width: 42px; height: 42px; border: 0; cursor: pointer;
	background: transparent; padding: 0; position: absolute; right: 1.25rem; top: 50%;
	transform: translateY(-50%);
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
	content: ""; position: absolute; left: 9px; right: 9px; height: 2px;
	background: var(--gp-white); transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bar { top: 50%; }
.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Home hero ---------- */
.hero {
	position: relative; overflow: hidden;
	background: linear-gradient(180deg, var(--gp-primary) 0%, #0a64c4 100%);
	color: var(--gp-white);
	padding-block: clamp(2.5rem, 6vw, 5rem) 0;
}
.hero--media .hero__inner {
	max-width: none;
	display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center;
}
.hero__text { max-width: 48rem; }
.hero__title {
	color: var(--gp-white);
	font-size: var(--wp--preset--font-size--xx-large, clamp(2.25rem, 1.4rem + 4vw, 3.75rem));
	line-height: 1.05; margin: 0 0 1rem;
}
.hero__lead { font-size: 1.0625rem; opacity: .95; margin: 0 0 2rem; }
.hero__actions { margin: 0; }
.hero__media img { border-radius: var(--gp-radius); }
.hero__wave { display: block; width: 100%; height: auto; margin-top: clamp(1.5rem, 4vw, 3rem); }
.hero__wave-back { fill: var(--gp-white); opacity: .35; }
.hero__wave-front { fill: var(--gp-white); }

.btn {
	display: inline-block; font-weight: 700; padding: .85rem 1.75rem;
	border-radius: 999px; border: 2px solid transparent; transition: all .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--solid { background: var(--gp-white); color: var(--gp-navy); }
.btn--solid:hover { background: #eef5ff; }
.btn--ghost { border-color: rgba(255,255,255,.75); color: var(--gp-white); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Home content (blocks below hero) ---------- */
.home-content { padding-block: clamp(2.5rem, 6vw, 4.5rem); background: var(--gp-white); }

/* Optional card grid helper (native columns work too) */
.cards { display: grid; gap: 1.5rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--gp-white); border: 1px solid #e4edf6; border-radius: var(--gp-radius); padding: 1.75rem; box-shadow: 0 6px 24px -18px rgba(7,61,104,.5); }
.card__title { margin: 0 0 .5rem; color: var(--gp-navy); font-size: 1.2rem; }
.card__text { margin: 0; color: var(--gp-muted); }

/* ---------- Inner pages: light band + breadcrumb + typographic content ---------- */
.page-band {
	background: var(--gp-surface); color: var(--gp-ink); text-align: left;
	padding-block: clamp(1.5rem, 3vw, 2.25rem);
	border-bottom: 1px solid #e4edf6;
}
.page-band__title {
	color: var(--gp-navy); font-weight: 800;
	font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); margin: 0; line-height: 1.15;
}
.crumb { font-size: .875rem; font-weight: 600; margin: 0 0 .5rem; color: var(--gp-muted); }
.crumb a { color: var(--gp-muted); }
.crumb a:hover { color: var(--gp-primary); text-decoration: underline; }
.crumb .sep { opacity: .6; margin-inline: .4rem; }

.page { background: var(--gp-white); padding-block: 0; }
.content-card { color: var(--gp-ink); }
.page__content { line-height: 1.75; font-size: 1.0625rem; overflow-wrap: break-word; }
.page__content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.page__content table td, .page__content table th { padding: .5rem .75rem; border: 1px solid #e4edf6; text-align: left; }
.page__content .wp-block-table { overflow-x: auto; }
.page__content h1, .page__content h2, .page__content h3 { color: var(--gp-navy); }
.page__content h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem); margin: 2.5rem 0 1rem; }
.page__content h2:first-child { margin-top: 0; }
.page__content p { margin: 0 0 1.25rem; }
.page__content ul, .page__content ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.page__content li { margin: .35rem 0; }
.page__content img { border-radius: var(--gp-radius); }
.page__content a { text-decoration: underline; text-decoration-color: rgba(11,111,219,.35); text-underline-offset: 2px; }
.page__content a:hover { text-decoration-color: var(--gp-primary); }
.page-links { margin-top: 1.5rem; display: flex; gap: .5rem; }

/* 404: narrower, centered dead-end page */
body.error404 .page__content { max-width: 560px; text-align: center; }
body.error404 .search-form { justify-content: center; }

/* ---------- Post meta (date + category), blog cards, single post ---------- */
.post-meta { margin: .35rem 0 0; font-size: .9rem; color: var(--gp-muted); }
.post-meta a { color: inherit; }
.post-meta a:hover { color: var(--gp-primary); }
.post-meta__sep { margin-inline: .4rem; opacity: .7; }

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); background: var(--gp-white); }

.post-grid {
	display: grid; gap: 1.75rem; margin: 0;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.post-card {
	background: var(--gp-white); border: 1px solid #e4edf6; border-radius: var(--gp-radius);
	overflow: hidden; box-shadow: 0 6px 20px -16px rgba(7,61,104,.35);
	display: flex; flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 32px -16px rgba(7,61,104,.35);
	border-color: #d3e3f5;
}
.post-card__thumb { display: block; overflow: hidden; }
.post-card__thumb img { width: 100%; transition: transform .35s ease; }
.post-card:hover .post-card__thumb img { transform: scale(1.05); }
.post-card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card__title { margin: .5rem 0 .5rem; font-size: 1.15rem; }
.post-card__title a { color: var(--gp-navy); }
.post-card__title a:hover { text-decoration: none; color: var(--gp-primary); }
.post-card__excerpt { color: var(--gp-muted); flex: 1; }
.post-card__more {
	display: inline-flex; align-items: center; gap: .35rem;
	margin-top: 1rem; font-weight: 700; color: var(--gp-primary);
}
.post-card__more:hover { text-decoration: none; }
.post-card__more span { transition: transform .15s ease; }
.post-card__more:hover span { transform: translateX(3px); }

.single-post__thumb { margin: 0 0 1.75rem; }
.single-post__thumb img { width: 100%; border-radius: var(--gp-radius); }

.single-post__tags { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #e4edf6; }
.single-post__tags .tags-label { color: var(--gp-muted); font-weight: 700; }
.single-post__tags a {
	display: inline-block; margin: .2rem .25rem; padding: .3rem .75rem;
	background: var(--gp-surface); color: var(--gp-navy); border-radius: 999px; font-size: .875rem;
	border: 1px solid transparent; transition: background .15s ease, border-color .15s ease;
}
.single-post__tags a:hover { text-decoration: none; background: var(--gp-white); border-color: var(--gp-primary); }

.post-navigation { margin-top: 1.5rem; }
.post-navigation .nav-links { display: flex; gap: 1rem; justify-content: space-between; }
.post-navigation .nav-previous,
.post-navigation .nav-next { flex: 1 1 0; }
.post-navigation .nav-next { text-align: right; }
.post-navigation a {
	display: block; background: var(--gp-white); border: 1px solid #e4edf6; border-radius: var(--gp-radius);
	padding: 1rem 1.25rem; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.post-navigation a:hover {
	text-decoration: none; border-color: var(--gp-primary);
	transform: translateY(-2px); box-shadow: 0 10px 20px -14px rgba(7,61,104,.35);
}
.post-nav__dir { display: block; font-size: .8rem; font-weight: 700; color: var(--gp-muted); text-transform: uppercase; letter-spacing: .04em; }
.post-nav__title { display: block; margin-top: .3rem; color: var(--gp-navy); font-weight: 700; }

/* ---------- Native search form (used on 404 + empty search results) ---------- */
.search-form { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.search-form .search-form__label,
.search-form label { flex: 1 1 220px; margin: 0; }
.search-field {
	width: 100%; border: 1px solid #e3e8ec; background: #f7f9fb;
	border-radius: 2px; padding: .65rem .75rem; font: inherit; color: var(--gp-ink);
}
.search-field:focus { outline: 2px solid var(--gp-accent); outline-offset: 1px; background: #fff; }
.search-submit {
	background: var(--gp-primary); color: var(--gp-white); border: 0; cursor: pointer;
	font-weight: 700; padding: .65rem 1.4rem; border-radius: 2px;
}
.search-submit:hover { background: #0a64c4; }

.btn--primary { background: var(--gp-primary); color: var(--gp-white); }
.btn--primary:hover { background: #0a64c4; }

/* ---------- Contact form (native) ---------- */
.gp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gp-field { margin: 0 0 1.5rem; max-width: 560px; }
.gp-field label { display: block; font-size: .95rem; color: #3a4750; margin-bottom: .4rem; }
.gp-field input, .gp-field textarea {
	width: 100%; border: 1px solid #e3e8ec; background: #f7f9fb;
	border-radius: 2px; padding: .65rem .75rem; font: inherit; color: var(--gp-ink);
}
.gp-field input:focus, .gp-field textarea:focus { outline: 2px solid var(--gp-accent); outline-offset: 1px; background: #fff; }
.gp-field textarea { min-height: 150px; resize: vertical; }
.gp-submit {
	background: var(--gp-primary); color: var(--gp-white); border: 0; cursor: pointer;
	font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	padding: .75rem 1.6rem; border-radius: 2px;
}
.gp-submit:hover { background: #0a64c4; }
.gp-form__ok { background: #e7f6ec; border: 1px solid #b7e0c4; color: #1e6b3a; padding: .75rem 1rem; border-radius: 2px; margin: 0 0 1.5rem; }
.gp-form__errors { background: #fdecec; border: 1px solid #f3c2c2; color: #9b2226; padding: .5rem 1rem; border-radius: 2px; margin: 0 0 1.5rem; }
.gp-form__errors ul { margin: .25rem 0; padding-left: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--gp-navy); color: rgba(255,255,255,.85); }
.site-footer__inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: .35rem 1rem; padding-block: 1.25rem; text-align: center;
}
.site-footer__copy { margin: 0; }
.site-footer__nav { display: flex; align-items: center; }
.site-footer__nav:empty { display: none; }
.site-footer__copy + .site-footer__nav::before { content: "|"; margin-right: 1rem; opacity: .5; }
.footer-menu { list-style: none; display: flex; align-items: center; gap: 0; margin: 0; padding: 0; }
.footer-menu li + li::before { content: "|"; margin: 0 .75rem; opacity: .5; }
.footer-menu a, .site-footer a { color: var(--gp-accent); }

/* ---------- Back to top ---------- */
.to-top {
	position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90;
	width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
	display: grid; place-items: center;
	background: var(--gp-primary); color: var(--gp-white);
	box-shadow: 0 8px 20px -8px rgba(7,61,104,.7);
	opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease;
}
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.site-header { position: sticky; top: 0; z-index: 101; }
	/* Nav row is a sibling of .site-header now (not nested — see the
	   desktop comment above), so on mobile it needs its own sticky pin,
	   offset to sit right below the pinned logo row. 72px = the mobile
	   logo cap (44px) + the brand row's vertical padding (2 × .85rem). */
	.site-header__nav-row { position: sticky; top: 72px; z-index: 100; }
	/* Logo left-aligned on mobile/tablet (same 1140px/padding grid as
	   everything else — .site-header__brand keeps its .container class,
	   only the internal alignment changes). Desktop stays centered. Height
	   is also capped here: the Customizer slider goes up to 120px
	   (desktop-oriented), which could otherwise crowd the toggle button. */
	.site-header__brand { justify-content: flex-start; }
	.site-branding { text-align: left; }
	.site-branding .custom-logo,
	.site-branding .custom-logo-link img {
		margin-inline: 0; max-height: min(var(--gp-logo-h, 56px), 44px);
	}
	.nav-toggle { display: block; }
	.site-header__nav-row { border-top: 0; }
	.site-nav {
		max-height: 0; overflow: hidden;
		transition: max-height .25s ease;
	}
	.site-nav.is-open {
		max-height: 60vh; border-top: 1px solid rgba(255,255,255,.15);
		box-shadow: 0 12px 24px -16px rgba(0,0,0,.25);
	}
	.nav-menu { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1rem; }
	.nav-menu a { padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.15); text-align: center; }
	.nav-menu a:hover, .nav-menu .current-menu-item > a { border-bottom-color: rgba(255,255,255,.6); }

	.hero--media .hero__inner { grid-template-columns: 1fr; }
	.hero__media { order: -1; }

	.post-navigation .nav-links { flex-direction: column; }
	.post-navigation .nav-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}
