/* A-Key Marketing Fixes 1.0.0 — loads after akey-layout-polish. */

/* ---- 1. Header logo: shield + readable wordmark ---- */
#masthead .site-logo-img .custom-logo-link {
	display: inline-flex !important;
	align-items: center;
	gap: 12px;
	text-decoration: none !important;
}
#masthead .site-logo-img .custom-logo-link img.akey-shield {
	height: 74px !important;
	max-height: 74px !important;
	width: auto !important;
}
#masthead .akey-wordmark {
	display: flex;
	flex-direction: column;
	line-height: 1;
	color: #111111;
	white-space: nowrap;
}
#masthead .akey-wordmark__name {
	font-family: 'Staatliches', 'Bebas Neue', Impact, sans-serif;
	font-size: 38px;
	letter-spacing: 1.5px;
	color: #111111;
}
#masthead .akey-wordmark__sub {
	font-family: 'Montserrat', Arial, sans-serif;
	font-weight: 800;
	font-size: 11.5px;
	letter-spacing: 1.9px;
	color: #8C6A1E;
	margin-top: 4px;
}
/* Narrow desktops: the full menu needs the room, keep the shield only. */
@media (min-width: 922px) and (max-width: 1239px) {
	#masthead #ast-desktop-header .akey-wordmark {
		display: none;
	}
}
@media (max-width: 921px) {
	#masthead .site-logo-img .custom-logo-link img.akey-shield {
		height: 54px !important;
		max-height: 54px !important;
	}
	#masthead .site-logo-img .custom-logo-link {
		gap: 9px;
	}
	#masthead .akey-wordmark__name {
		font-size: 30px;
	}
	#masthead .akey-wordmark__sub {
		font-size: 9.5px;
		letter-spacing: 1.4px;
		margin-top: 3px;
	}
}
@media (max-width: 359px) {
	#masthead .akey-wordmark__sub {
		display: none;
	}
}

/* ---- 2. Menu: Español link ---- */
.ast-builder-menu-1 .main-header-menu > .akey-nav-lang > .menu-link {
	font-weight: 600;
}

/* ---- 3. Sticky header on desktop (top bar with the Call button stays visible too) ---- */
@media (min-width: 922px) {
	#masthead {
		position: sticky;
		top: 0;
		z-index: 999;
		background: #ffffff;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	}
	.admin-bar #masthead {
		top: 32px;
	}
	html {
		scroll-padding-top: 150px;
	}
}

/* ---- 4. Homepage: eight service cards (4 + 4 desktop, 2 across tablet, compact tiles on phones) ---- */
body.home .entry-content .akey-svc-row.akey-svc-8 {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 18px !important;
}
body.home .entry-content .akey-svc-row.akey-svc-8 > div,
body.home .entry-content .akey-svc-row.akey-svc-8 > div:nth-child(4):nth-last-child(2),
body.home .entry-content .akey-svc-row.akey-svc-8 > div:nth-child(5):last-child {
	grid-column: auto !important;
	padding: 22px 20px !important;
	position: relative;
}
body.home .entry-content .akey-svc-row.akey-svc-8 > div > h3 {
	font-size: 21px;
}
html body.home .entry-content .akey-svc-row.akey-svc-8 > div > a[href]:last-child {
	padding: 12px 16px !important;
	font-size: 15px !important;
}
/* Four across: use the full content width (the old 3 + 2 row was narrower). */
@media (min-width: 1100px) {
	body.home .entry-content .akey-svc-row.akey-svc-8 {
		width: min(1180px, calc(100vw - 48px)) !important;
		max-width: none !important;
		margin-left: calc(50% - min(590px, 50vw - 24px)) !important;
		margin-right: 0 !important;
		padding: 0 !important;
	}
}
@media (max-width: 1099px) {
	body.home .entry-content .akey-svc-row.akey-svc-8 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
@media (max-width: 767px) {
	body.home .entry-content .akey-svc-row.akey-svc-8 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 10px !important;
		padding: 0 12px !important;
	}
	body.home .entry-content .akey-svc-row.akey-svc-8 > div,
	body.home .entry-content .akey-svc-row.akey-svc-8 > div:nth-child(4):nth-last-child(2),
	body.home .entry-content .akey-svc-row.akey-svc-8 > div:nth-child(5):last-child {
		padding: 14px 12px !important;
		align-items: center;
		text-align: center;
		justify-content: center;
		min-height: 118px;
	}
	body.home .entry-content .akey-svc-row.akey-svc-8 > div > h3 {
		font-size: 18px !important;
		line-height: 1.25;
		margin: 0 !important;
	}
	body.home .entry-content .akey-svc-row.akey-svc-8 > div > h3 a {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}
	body.home .entry-content .akey-svc-row.akey-svc-8 > div > h3 .akey-ico--badge {
		margin: 0 !important;
	}
	/* The whole tile is the link. */
	body.home .entry-content .akey-svc-row.akey-svc-8 > div > h3 a::after {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: 8px;
	}
	body.home .entry-content .akey-svc-row.akey-svc-8 > div > p,
	html body.home .entry-content .akey-svc-row.akey-svc-8 > div > a[href]:last-child {
		display: none !important;
	}
}

/* ---- 5. Review buttons: read on Google Maps + leave a review ---- */
.entry-content .akey-review-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin: 22px auto 30px !important;
	max-width: 760px;
}
.entry-content .akey-review-actions .akey-review-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 22px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none !important;
	min-height: 48px;
}
.entry-content .akey-review-actions .akey-review-btn--read {
	background: #111111;
	color: #ffffff !important;
}
.entry-content .akey-review-actions .akey-review-btn--leave {
	background: #F8D068;
	color: #111111 !important;
	border: 2px solid #C9A13B;
}
.entry-content .akey-review-actions .akey-review-btn:hover,
.entry-content .akey-review-actions .akey-review-btn:focus {
	filter: brightness(1.08);
}

/* ---- 6. Footer: Contact | Services | Service Areas | Company ---- */
.akey-footer-areas li:has(a[href*="locksmith-photos-el-paso"]) {
	display: none !important;
}
.site-footer .akey-footer-company ul {
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
}
.site-footer .akey-footer-company li {
	margin: 0 0 4px !important;
}
@media (min-width: 768px) {
	.site-footer .site-primary-footer-wrap .site-primary-footer-inner-wrap.ast-builder-grid-row {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) !important;
		gap: 0 40px !important;
	}
	.site-footer .site-footer-section-2 .footer-widget-area:has(.akey-footer-areas) {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 0 32px !important;
	}
}
@media (min-width: 768px) and (max-width: 921px) {
	.site-footer .site-primary-footer-wrap .site-primary-footer-inner-wrap.ast-builder-grid-row {
		grid-template-columns: minmax(0, 1fr) !important;
		row-gap: 28px !important;
	}
}
@media (max-width: 767px) {
	.site-footer .akey-footer-company {
		margin-top: 24px;
	}
	.site-footer .akey-footer-company ul {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 12px;
	}
	.site-footer .akey-footer-company li {
		margin: 0 !important;
	}
	.site-footer .akey-footer-company li a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0 6px;
	}
}

/* ---- 7. About: Meet the Owner (hidden until filled in under Settings → A-Key Site) ---- */
.entry-content .akey-owner {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	max-width: 900px;
	margin: 40px auto !important;
}
.entry-content .akey-owner:not(:has(.akey-owner__photo)) {
	grid-template-columns: minmax(0, 1fr);
}
.entry-content .akey-owner__photo {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 8px;
	border: 3px solid #C9A13B;
}
.entry-content .akey-owner__text h2 {
	margin-top: 0;
}
@media (max-width: 767px) {
	.entry-content .akey-owner {
		grid-template-columns: minmax(0, 1fr);
	}
	.entry-content .akey-owner__photo {
		max-width: 280px;
	}
}
