/* ==========================================================================
 * AJ Gabriele Marketing — Block styles
 * Loaded on the front-end (wp_enqueue_scripts) and inside the editor
 * (add_editor_style) so the Site Editor preview matches the front end.
 *
 * Convention: each block-style variation registered in inc/block-styles.php
 * has a matching .is-style-<name> selector here. Global site-chrome classes
 * (from templates + parts) start with .ajg-.
 * ========================================================================== */

/* ---------- Site-chrome ---------- */

/*
 * Sticky must live on the template-part wrapper (the direct child of the page root):
 * a sticky element inside a wrapper only as tall as itself has no room to stick, so
 * putting sticky on the inner group did nothing. The wrapper's parent spans the page.
 */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.ajg-site-header {
	background-color: rgba(255, 255, 255, 0.95);
	position: relative;
	isolation: isolate;
}
/* Frosted-glass blur lives on a pseudo-element, NOT on the header itself.
 * backdrop-filter on an ancestor makes that ancestor the containing block for
 * position:fixed descendants, which trapped the mobile nav overlay inside the
 * ~80px header box and broke the mobile menu. A ::before is not an ancestor of
 * the nav, so the overlay is free to cover the viewport while the look is kept. */
.ajg-site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	backdrop-filter: saturate(180%) blur(10px);
	-webkit-backdrop-filter: saturate(180%) blur(10px);
	pointer-events: none;
}
/* Header sits flush above the hero — no gap, no divider line. */
header.wp-block-template-part + main {
	margin-block-start: 0 !important;
	margin-top: 0 !important;
}

/*
 * Hero photo overlay is a full-strength directional gradient (source uses the raw
 * rgba(17,24,39,0.75→0.35) alphas). The cover block otherwise renders gradient
 * overlays at 50% opacity, which washed the hero out and lost its "shadow".
 *
 * !important is a deliberate counter-assertion: making the cover markup canonical
 * requires the overlay span to carry has-background-dim has-background-dim-0, and
 * core's `.has-background-dim.has-background-dim-0 {opacity:0}` (specificity 0,4,0)
 * would otherwise zero out our gradient. !important keeps the directional gradient
 * at full strength regardless. See _ajg_refactor audit.
 */
main .wp-block-cover__background.has-background-gradient {
	opacity: 1 !important;
}

.ajg-site-footer a {
	color: inherit;
	text-decoration: none;
}
.ajg-site-footer a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}
/* Footer link lists (Legal) have no bullets in the source. */
.ajg-site-footer ul {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

/* Active nav item is navy; the rest are near-black (matches source). */
.wp-block-navigation .current-menu-item > a,
.wp-block-navigation .current_page_item > a {
	color: var(--wp--preset--color--primary);
}

/* CTA band is solid navy (matches source) -- no gradient override. */

/*
 * Stats-strip / cta-band are full-width template-part sections. Their invocations
 * carry the alignfull class (see front-page.html) so WP's own alignfull rules break
 * the wrapper out of the constrained main to a true edge-to-edge band.
 */

/* Footer sits flush against the last section (CTA band) — no gap — like the source. */
main + footer,
main + .wp-block-template-part {
	margin-top: 0 !important;
}

.ajg-stats-strip .wp-block-heading {
	font-family: var(--wp--preset--font-family--sans); /* source uses Inter for the stat numbers */
	line-height: 1;
	letter-spacing: normal;
}

/* ---------- Eyebrow (paragraph variation) ---------- */

.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.4px;
	line-height: 1.4;
	margin-bottom: 12px;
}

/* ---------- Heading display (blog hero 96px) ---------- */

.is-style-display {
	font-size: var(--wp--preset--font-size--giant);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.03em;
}

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

/*
 * The source uses fixed 48px-tall buttons (Tailwind h-12) with horizontal-only
 * padding and flex-centered label. We replicate that with min-height + inline-flex
 * so the label stays vertically centered and any trailing icon sits 8px after it.
 */
.wp-block-button__link {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	line-height: 1.2;
}
.wp-block-button__link svg {
	width: 20px;
	height: 20px;
	flex: none;
}

/* ---------- Button variations ---------- */

/* Legacy name "primary-pill" — the source uses 6px rectangular buttons, not pills. */
.wp-block-button.is-style-primary-pill > .wp-block-button__link {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-foreground);
	border-radius: 6px;
	padding: 0 32px;
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 500;
	transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.wp-block-button.is-style-primary-pill > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--secondary);
	box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.25), 0 4px 6px -4px rgba(30, 58, 138, 0.15);
	transform: translateY(-1px);
}

.wp-block-button.is-style-outline-navy > .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--primary);
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 6px;
	padding: 0 28px;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	transition: background-color 0.18s ease, color 0.18s ease;
}
.wp-block-button.is-style-outline-navy > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-foreground);
}

.wp-block-button.is-style-ghost-white > .wp-block-button__link {
	background-color: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 6px;
	padding: 0 32px;
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 500;
	backdrop-filter: blur(6px);
	transition: background-color 0.18s ease, border-color 0.18s ease;
}
.wp-block-button.is-style-ghost-white > .wp-block-button__link:hover {
	background-color: #ffffff;
	color: var(--wp--preset--color--primary);
	border-color: #ffffff;
}

.wp-block-button.is-style-solid-violet > .wp-block-button__link {
	background-color: var(--wp--preset--color--secondary);
	color: #ffffff;
	border-radius: 6px;
	padding: 0 32px;
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 500;
	transition: background-color 0.18s ease;
}
.wp-block-button.is-style-solid-violet > .wp-block-button__link:hover {
	background-color: #2c1770;
}

/* ---------- Group variations (cards & sections) ---------- */

.wp-block-group.is-style-card {
	background-color: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm at rest, matches source */
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wp-block-group.is-style-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.wp-block-group.is-style-card-elevated {
	background-color: var(--wp--preset--color--background);
	border-radius: 24px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.wp-block-group.is-style-section-navy {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-foreground);
	padding: var(--wp--preset--spacing--110) var(--wp--preset--spacing--60);
}
.wp-block-group.is-style-section-navy .wp-block-heading,
.wp-block-group.is-style-section-navy p {
	color: var(--wp--preset--color--primary-foreground);
}

.wp-block-group.is-style-section-dark {
	background: linear-gradient(180deg, var(--wp--preset--color--dark-surface) 0%, var(--wp--preset--color--dark-surface-alt) 100%);
	color: #ffffff;
	padding: var(--wp--preset--spacing--110) var(--wp--preset--spacing--60);
}
.wp-block-group.is-style-section-dark .wp-block-heading,
.wp-block-group.is-style-section-dark p {
	color: #ffffff;
}

/* ---------- Quote (testimonial variation) ---------- */

.wp-block-quote.is-style-testimonial {
	background-color: var(--wp--preset--color--surface-alt);
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 12px;
	padding: 24px;
	font-style: italic;
	font-size: var(--wp--preset--font-size--lg);
	color: var(--wp--preset--color--text-medium);
}

/* ---------- List (checkmark variation) ---------- */

.wp-block-list.is-style-checkmark {
	list-style: none;
	padding-left: 0;
}
.wp-block-list.is-style-checkmark > li {
	position: relative;
	padding-left: 32px;
	margin-bottom: 12px;
	line-height: 1.5;
}
.wp-block-list.is-style-checkmark > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 24px;
	height: 24px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='m9 12 2 2 4-4'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/* ---------- Service card icon (navy-tinted rounded square in card body) ---------- */

.ajg-service-icon {
	width: 48px;
	height: 48px;
	background-color: rgba(30, 58, 138, 0.1); /* bg-primary/10 */
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--primary);
	margin-bottom: 16px;
}
.ajg-service-icon svg {
	width: 24px;
	height: 24px;
}

/* ---------- "Learn More" inline text link (service cards) ---------- */

.ajg-learn-more a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	text-decoration: none;
}
.ajg-learn-more a svg { width: 16px; height: 16px; }
.ajg-learn-more a:hover { text-decoration: underline; }

/* ---------- Dark cards (cards on navy sections, e.g. About Expertise) ---------- */

.ajg-dark-card {
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 24px;
}
.ajg-dark-card__icon {
	width: 48px;
	height: 48px;
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--primary-light);
	margin-bottom: 16px;
}
.ajg-dark-card__icon svg { width: 24px; height: 24px; }
.ajg-dark-card .wp-block-heading { margin: 0 0 8px; }
.ajg-dark-card p { margin: 0; line-height: 1.6; }

/* ---------- Responsive video embed (service pages) ---------- */

.ajg-video {
	position: relative;
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
	aspect-ratio: 16 / 9;
	border-radius: 12px;
	overflow: hidden;
	background: #0d1526;
}
.ajg-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Timeline (About milestones) ---------- */

.ajg-timeline { position: relative; }
.ajg-timeline__item {
	position: relative;
	display: flex;
	gap: 24px;
	padding-bottom: 32px;
}
.ajg-timeline__item:last-child { padding-bottom: 0; }
.ajg-timeline__marker {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 9999px;
	background-color: var(--wp--preset--color--primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 14px;
	z-index: 1;
}
.ajg-timeline__item:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 27px;
	top: 56px;
	bottom: 0;
	width: 2px;
	background-color: var(--wp--preset--color--border);
}
.ajg-timeline__body {
	padding-top: 17px;
	color: var(--wp--preset--color--text-medium);
	line-height: 1.6;
}

/* ---------- Pillar card icon (target/chart/users/zap style badges) ---------- */

.ajg-pillar-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 16px;
	color: var(--wp--preset--color--primary);
	display: block;
}

/* ==========================================================================
 * .ajg-blog-theme — mustard sub-theme applied to single-post via body_class
 * (from functions.php). Modeled here as a scoped variation, not baked into base.
 * ========================================================================== */

.ajg-blog-theme .wp-block-post-title {
	font-size: var(--wp--preset--font-size--giant);
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1;
}
.ajg-blog-theme .wp-block-post-featured-image img {
	border-radius: 24px;
	box-shadow: 0 25px 50px -12px rgba(30, 58, 138, 0.25);
}
.ajg-blog-theme .is-style-eyebrow {
	color: var(--wp--preset--color--accent);
}
.ajg-blog-theme .wp-block-post-content {
	font-size: var(--wp--preset--font-size--lg);
	line-height: 1.7;
}
.ajg-blog-theme .wp-block-post-content .wp-block-heading {
	margin-top: 2em;
	margin-bottom: 0.6em;
}
.ajg-blog-theme .wp-block-post-content blockquote {
	background: rgba(138, 109, 30, 0.08);
	border-left: 4px solid var(--wp--preset--color--accent);
	border-radius: 0 0 0 9999px; /* asymmetric decorative shape from audit */
	padding: 24px 32px;
	margin: 32px 0;
}

/* ==========================================================================
 * .ajg-dark-theme — page-level dark palette for /ai-acquisition
 * ========================================================================== */

/*
 * Scoped to `main` only -- header and footer are shared site chrome and must
 * stay on the standard light theme for brand consistency across every page,
 * including this one. An earlier version forced color:#fff on the whole body,
 * which made the footer's heading invisible (white text on its white background).
 */
.ajg-dark-theme main {
	background: linear-gradient(180deg, #0a0f1e 0%, #0d1526 100%);
}
.ajg-dark-theme main .wp-block-heading,
.ajg-dark-theme main .wp-block-post-title,
.ajg-dark-theme main p,
.ajg-dark-theme main li {
	color: #ffffff;
}
.ajg-dark-theme main .wp-block-list.is-style-checkmark > li::before {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='m9 12 2 2 4-4'/></svg>");
}
.ajg-dark-theme main .has-surface-alt-background-color {
	background-color: transparent !important;
}
.ajg-dark-theme main .wp-block-group.is-style-card {
	background-color: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
}
.ajg-dark-theme main .wp-block-button.is-style-primary-pill > .wp-block-button__link {
	background-color: var(--wp--preset--color--primary-bright);
}
.ajg-dark-theme main .wp-block-button.is-style-primary-pill > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary-light);
}

/* ==========================================================================
 * Scroll-reveal animation (fade-in-up), matches the source's on-scroll reveal.
 * The .ajg-reveal class is added by assets/js/reveal.js, so if JS is disabled
 * nothing is hidden. .is-visible is toggled on when the element scrolls in.
 * ========================================================================== */

.ajg-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
	will-change: opacity, transform;
}
.ajg-reveal.ajg-reveal--card {
	transform: translateY(30px);
}
.ajg-reveal.is-visible {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.ajg-reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* ==========================================================================
 * Responsive tweaks
 * ========================================================================== */

@media (max-width: 782px) {
	.ajg-cta-band {
		padding-top: var(--wp--preset--spacing--90);
		padding-bottom: var(--wp--preset--spacing--90);
	}
	.ajg-stats-strip .wp-block-heading.has-massive-font-size {
		font-size: var(--wp--preset--font-size--huge);
	}
	/* columnCount grids aren't responsive by default — 2 columns on tablet. */
	main .wp-block-group.is-layout-grid,
	.wp-block-post-content .wp-block-group.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 599px) {
	/* single column on phones */
	main .wp-block-group.is-layout-grid,
	.wp-block-post-content .wp-block-group.is-layout-grid {
		grid-template-columns: 1fr !important;
	}
	/* tighten section padding on phones.
	 * The homepage hero (hero-primary, min-height:90vh) now lives inside post-content
	 * after the homepage was moved into Pages, so `main > .wp-block-cover` no longer
	 * matches it — target it by its unique 90vh min-height instead. Inner-page hero
	 * covers (384px) are intentionally left untouched to stay pixel-identical. */
	.wp-block-post-content > .wp-block-group,
	main > .wp-block-cover,
	.wp-block-cover[style*="90vh"] {
		padding-left: var(--wp--preset--spacing--50) !important;
		padding-right: var(--wp--preset--spacing--50) !important;
	}
}

/* ==========================================================================
 * Cookie-consent banner
 * ========================================================================== */

.ajg-cookie {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: #ffffff;
	border-top: 1px solid var(--wp--preset--color--border);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}
.ajg-cookie[hidden] { display: none; }
.ajg-cookie__inner {
	max-width: 1368px;
	margin: 0 auto;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	gap: 24px;
}
.ajg-cookie__text strong {
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 4px;
}
.ajg-cookie__text p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wp--preset--color--text-medium);
}
.ajg-cookie__actions { flex: none; display: flex; gap: 12px; }
.ajg-cookie__btn {
	border: 0;
	border-radius: 6px;
	padding: 10px 22px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
}
.ajg-cookie__btn--decline { background: var(--wp--preset--color--secondary); color: #fff; }
.ajg-cookie__btn--accept { background: var(--wp--preset--color--primary); color: #fff; }
.ajg-cookie__btn:hover { opacity: 0.92; }
@media (max-width: 599px) {
	.ajg-cookie__inner { flex-direction: column; align-items: stretch; gap: 12px; }
	.ajg-cookie__actions { justify-content: flex-end; }
}

/* ==========================================================================
 * Mobile nav overlay alignment
 * The header nav uses justify-content:right for desktop (items-justified-right),
 * but that setting leaks into the open mobile overlay and squeezes the links
 * into a ~59px column pinned to the right edge, clipping them off-screen.
 * Inside the OPEN overlay only, reset to a normal full-width, left-aligned
 * column so every link is fully visible and easily tappable.
 * ========================================================================== */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	justify-content: flex-start !important;
	width: 100% !important;
	gap: 4px !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	width: 100% !important;
	text-align: left !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block !important;
	padding: 10px 0 !important;
	font-size: var(--wp--preset--font-size--xl, 1.25rem) !important;
}

/* ---------- About: preserve the dark-card "our values" section as STACKED ----------
 * The group is authored as a 2-column grid (columnCount:2) but rendered stacked
 * (display:block, no gap, full width) on the live site because the old loose-HTML
 * markup stole the group's layout classes. Now that the markup is canonical the grid
 * would activate; per client decision we keep the exact original stacked appearance. */
main .wp-block-group.is-layout-grid:has(> .ajg-dark-card),
.wp-block-post-content .wp-block-group.is-layout-grid:has(> .ajg-dark-card) {
	display: block !important;
}

/* ---------- Hero left-pinned column ----------
 * The hero's inner 768px column is pinned to the LEFT of the centered 1368px
 * container (so hero text lines up with sections below). This used to be an inline
 * style on the group, which made the block non-canonical in the editor; moved here
 * as a class so the wp:group validates while the layout is unchanged. */
.is-hero-col {
	max-width: 768px;
	margin-left: 0 !important;
	margin-right: auto;
}

/* ---------- CTA button arrow ----------
 * The "Schedule a Consultation" button had an inline <svg> arrow inside its <a>,
 * which is invalid inside a core/button. Re-created here as a ::after mask (identical
 * arrow-right icon) so the button stays a native, editable block. The existing
 * .wp-block-button__link { gap:8px } handles the spacing. */
.ajg-cta-band .is-style-solid-violet .wp-block-button__link::after {
	content: "";
	width: 20px;
	height: 20px;
	flex: none;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
