/*
Theme Name:   Squire Heritage
Description:  Child theme of Kadence for Squire Heritage Consulting.
Author:       Squire Heritage
Template:     kadence
Version:      1.0.0
Text Domain:  squireheritage-child
*/

/* Diagonal darker-tint mask over the top bar, aligned to the same left:45% / clip-path
   geometry as the hero slider's diagonal panel, so the two feel like one continuous line. */
.site-top-header-wrap {
	position: relative;
	overflow: hidden;
}

.site-top-header-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	left: 53%;
	background-color: #1d4571;
	clip-path: polygon(1% 0, 100% 0, 100% 100%, 0% 100%);
	z-index: 0;
	pointer-events: none;
}

.site-top-header-wrap .shc-topbar {
	position: relative;
	z-index: 1;
}

/* Top bar (phone / email / location) — plain text with icons, no button/pill background.
   Sits on the header's blue Top Row background, so text/icons are white with a lighter
   hover tone rather than the brand blue (which would disappear against that background). */
.shc-topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.75rem;
	padding: 0.5rem 0;
	font-size: 0.875rem;
	color: #fff;
}

.shc-topbar__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #fff;
	text-decoration: none;
	transition: color 0.2s ease;
}

a.shc-topbar__item:hover {
	color: rgba(255, 255, 255, 0.75);
}

/* Card grid: force all 5 "What We Do" cards onto one row on desktop, wrapping only on
   narrower screens rather than auto-fitting to a fixed minimum width */
@media (min-width: 1024px) {
	.shc-card-grid.shc-card-grid--five-up {
		grid-template-columns: repeat(5, 1fr);
	}
}

/* Default grid for new sections going forward: 4 columns on desktop (e.g. News), wrapping
   to fewer columns on smaller screens */
@media (min-width: 1024px) {
	.shc-card-grid.shc-card-grid--four-up {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 640px) and (max-width: 1023px) {
	.shc-card-grid.shc-card-grid--four-up {
		grid-template-columns: repeat(2, 1fr);
	}
}

.shc-topbar__item .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 1;
}

/*
 * Section rhythm: alternating full-width background bands, content kept to the
 * site's normal 1240px reading width inside each band.
 */
.shc-section {
	padding: 2rem 0;
}

.shc-section__inner {
	/* max-width: 1240px; */
	margin: 0 60px;
	padding: 0 1.5rem;
}

.shc-section--tint {
	background-color: #f4f6f8;
}

.shc-section--brand {
	background-color: #2b6cb0;
	color: #fff;
}

.shc-section--brand h2,
.shc-section--brand h3 {
	color: #fff;
}

.shc-section .wp-block-group__inner-container,
.shc-section > .wp-block-heading:first-child,
.shc-section > p:first-child {
	margin-top: 0;
}

/* Card grid used for "What we do" / "Who we help" style lists */
.shc-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.75rem;
	margin-top: 2rem;
}

.shc-card {
	background: #fff;
	border-radius: 4px;
	padding: 1.75rem;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	overflow: hidden;
}

.shc-card__thumb {
	display: block;
	width: calc(100% + 3.5rem);
	margin: -1.75rem -1.75rem 1.25rem;
	height: 140px;
	overflow: hidden;
}

.shc-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.shc-card:hover .shc-card__thumb img {
	transform: scale(1.06);
}

.shc-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.shc-card h4 {
	transition: color 0.2s ease;
}

.shc-card:hover h4 {
	color: var(--global-palette3, #2f6fb5);
}

.shc-section--brand .shc-card,
.shc-section--tint .shc-card {
	background: #fff;
	color: #1a202c;
}

.shc-card h4 {
	margin-top: 0;
	margin-bottom: 0.6rem;
	/* font size inherits the theme's global H4 setting, so it matches headings everywhere else */
}

.shc-card p {
	margin: 0;
	/* font size inherits the theme's global base/paragraph setting */
	color: #4a5568;
}

/*
 * Global "premium feel" touches: smooth in-page scrolling, and a consistent underline-grow
 * hover treatment for the primary navigation, echoing the top-bar link style above.
 */
html {
	scroll-behavior: smooth;
}

.main-navigation ul.menu > li > a {
	position: relative;
	transition: color 0.2s ease;
}

.main-navigation ul.menu > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 2px;
	width: 100%;
	height: 2px;
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.main-navigation ul.menu > li > a:hover::after,
.main-navigation ul.menu > li.current-menu-item > a::after {
	transform: scaleX(1);
}

/* Hero slider button + dots (hero-slider.css owns layout; these add the hover motion) */
.shc-hero-slide__button {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.shc-hero-slide__button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.shc-hero-slider__dot {
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.shc-hero-slider__dot:hover {
	transform: scale(1.2);
}

/* Native block buttons get the same lift-on-hover treatment for consistency */
.wp-block-button__link {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/*
 * Photo-hover-zoom utility for image-led tiles (the Projects category tiles called for in the
 * brief are photography-led, not icons — this is what gives them the subtle zoom on hover).
 */
.shc-hover-zoom {
	display: block;
	overflow: hidden;
}

.shc-hover-zoom img {
	transition: transform 0.4s ease;
}

.shc-hover-zoom:hover img {
	transform: scale(1.06);
}

/* News teaser cards: date + "Read more" on top of the standard card styling */
.shc-card__date {
	display: block;
	font-size: 0.8rem;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.5rem;
}

.shc-card__link {
	display: inline-block;
	margin-top: 0.75rem;
	font-weight: 600;
	color: var(--global-palette3, #2f6fb5);
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0% 1px;
	transition: background-size 0.25s ease;
}

.shc-card__link:hover {
	background-size: 100% 1px;
}

.shc-card__thumb-link {
	display: block;
}

/*
 * Testimonial slider — 3 cards in view on desktop, sliding one at a time; collapses to
 * 2-in-view on tablet and 1-in-view on mobile. Vanilla JS (inline, scoped to the block).
 */
.shc-testimonials__viewport {
	overflow: hidden;
}

.shc-testimonials__track {
	display: flex;
	gap: 1.75rem;
	transition: transform 0.5s ease;
}

.shc-testimonial-card {
	flex: 0 0 calc((100% - (2 * 1.75rem)) / 3);
	background: #fff;
	border-radius: 4px;
	padding: 1.75rem;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
}

.shc-testimonial-card__quote {
	flex: 1;
	font-style: italic;
	color: #4a5568;
	margin: 0 0 1rem;
}

.shc-testimonial-card__quote::before {
	content: "\201C";
}

.shc-testimonial-card__quote::after {
	content: "\2026\201D";
}

.shc-testimonial-card__name {
	font-weight: 600;
	margin: 0;
	color: #1a202c;
}

.shc-testimonials__nav {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 2rem;
}

.shc-testimonials__arrow {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #cbd5e0;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	line-height: 1;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.shc-testimonials__arrow:hover:not(:disabled) {
	background-color: var(--global-palette3, #2f6fb5);
	color: #fff;
	transform: scale(1.05);
}

.shc-testimonials__arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

@media (max-width: 1023px) {
	.shc-testimonial-card {
		flex: 0 0 calc((100% - 1.75rem) / 2);
	}
}

@media (max-width: 640px) {
	.shc-testimonial-card {
		flex: 0 0 100%;
	}
}

/*
 * Universal call-to-action band + 4-column footer (injected on every page via the
 * get_footer hook in functions.php). Dark navy for a premium corporate feel, distinct from
 * the brand blue used elsewhere so the footer reads as a clear "end of page" zone.
 */
.shc-cta-band {
	background-color: #14243e;
	color: #fff;
	padding: 3.5rem 0;
	text-align: center;
}

.shc-cta-band h2 {
	color: #fff;
	margin-top: 0;
}

.shc-cta-band p {
	max-width: 760px;
	margin: 0 auto 1.75rem;
	color: rgba(255, 255, 255, 0.85);
}

.shc-cta-band__button {
	display: inline-block;
	padding: 0.85rem 2.25rem;
	background-color: #fff;
	color: #14243e;
	font-weight: 700;
	text-decoration: none;
	border-radius: 2px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shc-cta-band__button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.shc-footer {
	background-color: #0e1b30;
	color: rgba(255, 255, 255, 0.75);
	padding: 3.5rem 0 2rem;
}

.shc-footer__columns {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2.5rem;
}

@media (max-width: 1023px) {
	.shc-footer__columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.shc-footer__columns {
		grid-template-columns: 1fr;
	}
}

.shc-footer__brand {
	color: #fff;
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
}

.shc-footer__tagline {
	margin: 0 0 1.25rem;
	font-size: 0.9rem;
	line-height: 1.6;
}

.shc-footer__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.shc-footer__social:hover {
	background-color: var(--global-palette3, #2f6fb5);
	transform: translateY(-2px);
}

.shc-footer__heading {
	color: #fff;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 1.25rem;
}

.shc-footer-nav {
	list-style: none;
	margin: 0;
	padding: 0;
}

.shc-footer-nav li {
	margin-bottom: 0.75rem;
}

.shc-footer-nav a {
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	transition: color 0.2s ease;
}

.shc-footer-nav a:hover {
	color: #fff;
}

.shc-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	font-size: 0.9rem;
}

.shc-footer__contact a,
.shc-footer__contact span {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	transition: color 0.2s ease;
}

.shc-footer__contact a:hover {
	color: #fff;
}

.shc-footer__contact .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/*
 * Site-wide link colour: brand blue, matching the H1-H4 heading colour already set in the
 * Kadence Customizer, per the client's explicit note to keep both blue and consistent.
 */
.entry-content a:not(.wp-block-button__link):not(.shc-card):not([class*="shc-"]),
.shc-section p a,
.shc-card p a {
	color: var(--global-palette3, #2f6fb5);
}

.entry-content a:not(.wp-block-button__link):hover {
	color: #1d4571;
}

/*
 * "What Do You Need Help With?" — six short clickable statements, 2 rows x 3 columns.
 * Deliberately a different, more compact treatment than .shc-card (no photo, tighter
 * padding, brand-blue tint at rest that inverts to solid blue on hover) so the section reads
 * as visually distinct within the page, as requested.
 */
.shc-help-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	margin-top: 2rem;
}

@media (max-width: 1023px) {
	.shc-help-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.shc-help-grid {
		grid-template-columns: 1fr;
	}
}

.shc-help-tile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	background-color: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 4px;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.4;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.shc-help-tile__arrow {
	flex-shrink: 0;
	font-size: 1.25rem;
	transition: transform 0.2s ease;
}

.shc-help-tile:hover {
	background-color: #fff;
	color: var(--global-palette3, #2f6fb5);
	transform: translateY(-3px);
}

.shc-help-tile:hover .shc-help-tile__arrow {
	transform: translateX(4px);
}

/*
 * "Evidence of Our Work" — 70/30 two-column layout: project card grid on the left,
 * category link list on the right. Photo treatment per the client's brief: muted/desaturated
 * at rest, becoming clear and full-colour on hover, with the brand blue used for the card's
 * heading overlay so continuity with the rest of the site's identity is preserved.
 */
.shc-evidence {
	display: grid;
	grid-template-columns: 70% 30%;
	gap: 2.5rem;
	margin-top: 2rem;
	align-items: start;
}

@media (max-width: 1023px) {
	.shc-evidence {
		grid-template-columns: 1fr;
	}
}

.shc-evidence__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

@media (max-width: 640px) {
	.shc-evidence__grid {
		grid-template-columns: 1fr;
	}
}

.shc-evidence-card {
	position: relative;
	display: block;
	border-radius: 4px;
	overflow: hidden;
	text-decoration: none;
	aspect-ratio: 4 / 5;
	background-color: var(--global-palette3, #2f6fb5);
}

.shc-evidence-card__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(45%) brightness(0.75) saturate(0.8);
	transition: filter 0.4s ease, transform 0.4s ease;
}

.shc-evidence-card:hover .shc-evidence-card__thumb {
	filter: grayscale(0%) brightness(1) saturate(1);
	transform: scale(1.05);
}

.shc-evidence-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(29, 69, 113, 0.92) 0%, rgba(29, 69, 113, 0.15) 55%, rgba(29, 69, 113, 0) 100%);
	z-index: 1;
}

.shc-evidence-card__label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 1.1rem 1.1rem;
	color: #fff;
}

.shc-evidence-card__category {
	display: block;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 0.25rem;
}

.shc-evidence-card__title {
	display: block;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.3;
}

.shc-evidence__categories {
	list-style: none;
	margin: 0;
	padding: 0;
}

.shc-evidence__categories li {
	border-bottom: 1px solid #e2e8f0;
}

.shc-evidence__categories a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 0.25rem;
	color: #1a202c;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.shc-evidence__categories a:hover {
	color: var(--global-palette3, #2f6fb5);
	padding-left: 0.5rem;
}

.shc-evidence__categories .shc-help-tile__arrow {
	color: inherit;
}

/* ---- Project pages: header band, card grids, single layout, chips, browser ---- */
.shc-pagehead {
	background: linear-gradient(135deg, #1d4571 0%, var(--global-palette3, #2f6fb5) 100%);
	color: #fff;
	padding: 3rem 0 3.25rem;
}

.shc-pagehead h1 {
	color: #fff;
	margin: 0.5rem 0 0;
}

.shc-pagehead__lead {
	max-width: 760px;
	margin: 1rem 0 0;
	font-size: 1.15rem;
	color: rgba(255, 255, 255, 0.9);
}

.shc-breadcrumb {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.8);
}

.shc-breadcrumb a {
	color: #fff;
	text-decoration: none;
}

.shc-breadcrumb a:hover {
	text-decoration: underline;
}

.shc-pcard-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	margin: 1.5rem 0 0;
}

@media (max-width: 1100px) {
	.shc-pcard-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
	.shc-pcard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
	.shc-pcard-grid { grid-template-columns: 1fr; }
}

.shc-pcard-grid--tiles {
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 800px) {
	.shc-pcard-grid--tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
	.shc-pcard-grid--tiles { grid-template-columns: 1fr; }
}

.shc-pcard { aspect-ratio: 4 / 3; }
.shc-pcard--tile { aspect-ratio: 3 / 2; }
.shc-pcard--tile .shc-evidence-card__title { font-size: 1.15rem; }
.shc-pcard__desc { text-transform: none; letter-spacing: 0; font-size: 0.85rem; margin-top: 0.35rem; margin-bottom: 0; }

.shc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0.75rem 0 0;
}

.shc-chip {
	display: inline-block;
	padding: 0.45rem 1rem;
	border: 1px solid var(--global-palette3, #2f6fb5);
	border-radius: 999px;
	background: #fff;
	color: var(--global-palette3, #2f6fb5);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.shc-chip:hover,
.shc-chip.is-active,
.shc-chip--solid {
	background: var(--global-palette3, #2f6fb5);
	color: #fff;
}

.shc-more-title { margin-top: 3rem; }

.shc-morelist {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	columns: 3 260px;
	column-gap: 2.5rem;
}

.shc-morelist li { break-inside: avoid; border-bottom: 1px solid #e2e8f0; }

.shc-morelist a {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 0.25rem;
	color: #1a202c;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.shc-morelist a:hover { color: var(--global-palette3, #2f6fb5); padding-left: 0.5rem; }

.shc-single {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 3rem;
	align-items: start;
}

@media (max-width: 900px) {
	.shc-single { grid-template-columns: 1fr; }
}

.shc-single__body img { max-width: 100%; height: auto; border-radius: 4px; }
.shc-single__aside { position: sticky; top: 2rem; }
.shc-single__photo { width: 100%; height: auto; border-radius: 4px; margin-bottom: 1.25rem; }
.shc-single__cta { margin-top: 1.5rem; background: var(--global-palette3, #2f6fb5); color: #fff; }

.shc-browser__bar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.shc-browser__search { max-width: 280px; width: 100%; padding: 0.55rem 0.9rem; border: 1px solid #cbd5e0; border-radius: 4px; }

/* Project view refinements */
.shc-project-view { margin: 0; }
.site-top-footer-inner-wrap { padding-top: 0; padding-bottom: 0; }

.shc-single__cta {
	background: #2b6cb0;
	color: #fff;
	border: 2px solid #2b6cb0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.shc-single__cta:hover {
	background: #fff;
	color: #2b6cb0;
}

.shc-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
	margin: 1.75rem 0;
}

.shc-gallery--1 { grid-template-columns: 1fr; }
.shc-gallery figure { margin: 0; }
.shc-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; display: block; }
.shc-gallery figcaption { font-size: 0.85rem; color: #4a5568; margin-top: 0.4rem; text-align: left; }
.shc-gallery figure:last-child:nth-child(odd) { grid-column: 1 / -1; }
.shc-gallery figure:last-child:nth-child(odd) img { aspect-ratio: 16 / 9; }

@media (max-width: 600px) {
	.shc-gallery { grid-template-columns: 1fr; }
}

.content-area.shc-project-view { margin-top: 0 !important; margin-bottom: 0 !important; }
