/*
Theme Name: A1 No Nonsense Pest Control
Template: ams-atlas
Author: Atlas Marketing Solutions
Description: Brand child theme for A1 No Nonsense Pest Control. Colors, fonts and element styles are in theme.json; brand CSS and the client's custom sections are styled here.
Version: 0.1.0
Requires at least: 6.7
Requires PHP: 8.1
License: Proprietary
Text Domain: a1-pest-control
*/

/* Brand CSS for A1 No Nonsense Pest Control, to the A1 Brand Sheet V2.
   "No nonsense": direct, sturdy, neighborly. Charcoal structure with a lime
   green line (the brand sheet's own header), Noto Sans, flat white and light
   gray bands, 6 px corners, no soft shadows. The one flourish: featured
   photos sit on a solid green offset block. Green is a fill only (buttons,
   rules, the photo block, checks on charcoal), always with charcoal text,
   never green text on white. Links are Link Blue; icons on light grounds are
   Logo Blue. Prefix custom classes with "a1-pest-control-". */

:root {
	--a1-green: var(--wp--preset--color--accent);
	--a1-green-hover: var(--wp--preset--color--green-hover);
	--a1-charcoal: var(--wp--preset--color--contrast);
	--a1-charcoal-2: var(--wp--preset--color--charcoal-2);
	--a1-slate: var(--wp--preset--color--contrast-2);
	--a1-light: var(--wp--preset--color--base-2);
	--a1-blue: var(--wp--preset--color--secondary);
	--a1-link: var(--wp--preset--color--primary);
	--a1-line: var(--wp--preset--color--border);
	--a1-on-dark: #D9DFDD; /* body text on charcoal: 11.6:1 */
	--a1-offset: 12px;
	--atlas-logo-height: 3.25rem;
	--atlas-logo-height-mobile: 2.4rem;
}

@media (max-width: 781px) {
	:root {
		--a1-offset: 8px;
	}
}

/* ---------- Text colors: body copy is Slate Gray everywhere light ---------- */

.is-style-section-alt,
.is-style-card {
	color: var(--a1-slate);
}

:where(.is-style-section-dark) p,
:where(.is-style-section-dark) li {
	color: var(--a1-on-dark);
}

strong {
	color: inherit;
	font-weight: 700;
}

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

/* Secondary (outline): charcoal outline + text on light, charcoal fill on hover. */
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	background-color: var(--a1-charcoal);
	border-color: var(--a1-charcoal);
	color: #FFFFFF;
}

/* On charcoal: white outline, white fill with charcoal text on hover. */
:where(.is-style-section-dark) .wp-block-button.is-style-outline .wp-block-button__link:hover,
:where(.is-style-section-dark) .wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	background-color: #FFFFFF;
	border-color: #FFFFFF;
	color: var(--a1-charcoal);
}

:where(.is-style-section-dark) .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background-color: var(--a1-green-hover);
	color: var(--a1-charcoal);
}

/* ---------- Header: deeper charcoal, logo on charcoal, green line ---------- */

.a1-pest-control-header.is-style-section-dark {
	background-color: var(--a1-charcoal-2);
	border-bottom: 4px solid var(--a1-green);
}

.a1-pest-control-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	color: #FFFFFF;
}

.a1-pest-control-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover {
	color: var(--a1-green);
	text-decoration: none;
}

.a1-pest-control-header .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content,
.a1-pest-control-header .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--a1-green);
	text-decoration-thickness: 3px;
	text-underline-offset: .45em;
}

/* Dropdowns stay white with charcoal links (the shared theme's dropdown). */
.a1-pest-control-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container a:where(:not(.wp-element-button)) {
	color: var(--a1-charcoal);
}

/* The phone menu opens in charcoal, like the header. */
.a1-pest-control-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--a1-charcoal-2) !important;
	color: #FFFFFF !important;
}

.a1-pest-control-header .wp-block-navigation__responsive-container.is-menu-open a:where(:not(.wp-element-button)) {
	color: #FFFFFF;
}

.a1-pest-control-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.125rem;
}

.a1-pest-control-header .wp-block-navigation__responsive-container-open,
.a1-pest-control-header .wp-block-navigation__responsive-container-close {
	color: #FFFFFF;
}

.a1-pest-control-header__cta {
	align-items: center;
}

.a1-pest-control-header__phone {
	margin: 0;
	font-weight: 700;
	white-space: nowrap;
}

.a1-pest-control-header__phone a {
	color: #FFFFFF !important;
	text-decoration: none;
}

.a1-pest-control-header__phone a:hover {
	color: var(--a1-green) !important;
}

/* ---------- Hero (charcoal band) ---------- */

.a1-pest-control-hero.is-style-section-dark {
	background-color: var(--a1-charcoal);
}

.a1-pest-control-hero h1 {
	color: #FFFFFF;
	max-width: 18ch;
}

.a1-pest-control-hero:not(.a1-pest-control-hero--photo) h1 {
	max-width: 24ch;
}

.a1-pest-control-hero .a1-pest-control-hero__intro {
	font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
	color: #FFFFFF;
}

.a1-pest-control-hero .wp-block-atlas-breadcrumbs,
.a1-pest-control-hero .wp-block-atlas-breadcrumbs a {
	color: var(--a1-on-dark);
}

/* Photo first on phones? No: the H1 and buttons lead, the photo follows. */
@media (max-width: 781px) {
	.a1-pest-control-hero .wp-block-columns {
		gap: var(--wp--preset--spacing--50);
	}
}

/* ---------- Featured photos: solid green offset block ---------- */

.wp-block-image.a1-pest-control-photo {
	margin: 0 var(--a1-offset) var(--a1-offset) 0;
}

.wp-block-image.a1-pest-control-photo img {
	display: block;
	width: 100%;
	box-shadow: var(--a1-offset) var(--a1-offset) 0 0 var(--a1-green);
}

.a1-pest-control-split--image-left .wp-block-image.a1-pest-control-photo {
	margin: 0 0 var(--a1-offset) var(--a1-offset);
}

.a1-pest-control-split--image-left .wp-block-image.a1-pest-control-photo img {
	box-shadow: calc(-1 * var(--a1-offset)) var(--a1-offset) 0 0 var(--a1-green);
}

/* Phones: the heading always comes before the photo. */
@media (max-width: 781px) {
	.a1-pest-control-split--image-left > .wp-block-columns {
		flex-direction: column-reverse;
	}
}

/* ---------- Cards ---------- */

.a1-pest-control-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--a1-line);
	border-radius: 6px;
	transition: border-color .15s ease;
}

.a1-pest-control-card:hover,
.a1-pest-control-card:focus-within {
	border-color: var(--a1-charcoal);
}

.a1-pest-control-card .a1-pest-control-card__photo {
	margin: 0;
}

.a1-pest-control-card .a1-pest-control-card__photo img {
	display: block;
	width: 100%;
	border-bottom: 4px solid var(--a1-green);
}

.a1-pest-control-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: var(--wp--preset--spacing--40);
}

.a1-pest-control-card__body > * {
	margin-block: 0;
}

.a1-pest-control-card__body > .a1-pest-control-more:last-child {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--10);
}

/* ---------- "Explore ..." links ---------- */

.a1-pest-control-more a {
	font-weight: 700;
	text-decoration: none;
	color: var(--a1-link);
}

.a1-pest-control-more a::after {
	content: "\2192"; /* → */
	display: inline-block;
	margin-left: .4em;
	transition: transform .15s ease;
}

.a1-pest-control-more a:hover {
	text-decoration: underline;
	text-underline-offset: .2em;
}

.a1-pest-control-more a:hover::after {
	transform: translateX(3px);
}

:where(.is-style-section-dark) .a1-pest-control-more a {
	color: var(--a1-green);
}

/* ---------- Green band (accent style, e.g. the Protection Plan): charcoal only ---------- */

.is-style-section-accent :is(p, li) {
	color: var(--a1-charcoal);
}

.is-style-section-accent a:where(:not(.wp-element-button)),
.is-style-section-accent .a1-pest-control-more a {
	color: var(--a1-charcoal);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: .2em;
}

.is-style-section-accent .a1-pest-control-more a:hover {
	text-decoration-thickness: 3px;
}

.is-style-section-accent .a1-pest-control-lead {
	border-left-color: var(--a1-charcoal);
}

/* The photo block can't be green on green: charcoal there. */
.is-style-section-accent .wp-block-image.a1-pest-control-photo img {
	box-shadow: var(--a1-offset) var(--a1-offset) 0 0 var(--a1-charcoal);
}

.is-style-section-accent.a1-pest-control-split--image-left .wp-block-image.a1-pest-control-photo img {
	box-shadow: calc(-1 * var(--a1-offset)) var(--a1-offset) 0 0 var(--a1-charcoal);
}

/* ---------- Lead line (e.g. the tagline) ---------- */

.a1-pest-control-lead {
	padding-left: .9rem;
	border-left: 4px solid var(--a1-green);
	color: var(--a1-charcoal);
	font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
	font-weight: 700;
	line-height: 1.4;
}

:where(.is-style-section-dark) .a1-pest-control-lead {
	color: #FFFFFF;
}

/* ---------- Checklists: Logo Blue checks on light, green on charcoal ---------- */

.is-style-checklist li::before {
	background-color: var(--a1-blue);
}

.is-style-checklist li::after {
	background-color: #FFFFFF;
}

:where(.is-style-section-dark) .is-style-checklist li::before {
	background-color: var(--a1-green);
}

:where(.is-style-section-dark) .is-style-checklist li::after {
	background-color: var(--a1-charcoal);
}

/* ---------- Facts panel ---------- */

.a1-pest-control-facts {
	padding: var(--wp--preset--spacing--40);
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--a1-line);
	border-top: 4px solid var(--a1-green);
	border-radius: 6px;
}

.is-style-section-alt .a1-pest-control-facts {
	border-color: var(--a1-line);
	border-top-color: var(--a1-green);
}

.a1-pest-control-facts > * {
	margin-block: 0;
}

.a1-pest-control-fact {
	position: relative;
	padding-left: 2.1rem;
}

.a1-pest-control-fact + .a1-pest-control-fact {
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--a1-line);
}

.a1-pest-control-fact > p {
	margin: 0;
}

.a1-pest-control-fact::before,
.a1-pest-control-fact::after {
	content: "";
	position: absolute;
	left: 0;
	width: 1.35rem;
	height: 1.35rem;
	top: .15rem;
}

.a1-pest-control-fact + .a1-pest-control-fact::before,
.a1-pest-control-fact + .a1-pest-control-fact::after {
	top: calc(var(--wp--preset--spacing--30) + .15rem);
}

.a1-pest-control-fact::before {
	border-radius: 50%;
	background-color: var(--a1-blue);
}

.a1-pest-control-fact::after {
	background-color: #FFFFFF;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.75 3.75L17.5 8' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.75 3.75L17.5 8' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

.a1-pest-control-fact__label {
	color: var(--a1-charcoal);
	font-weight: 700;
}

/* ---------- Closing band ---------- */

.a1-pest-control-cta.is-style-section-dark {
	border-top: 6px solid var(--a1-green);
}

.a1-pest-control-cta h2 {
	color: #FFFFFF;
}

/* ---------- Footer ---------- */

/* Deeper charcoal with the green line, so it separates from a closing band above it. */
.a1-pest-control-footer.is-style-section-dark {
	background-color: var(--a1-charcoal-2);
	border-top: 6px solid var(--a1-green);
}

.a1-pest-control-footer .a1-pest-control-footer__logo img {
	height: 3.25rem;
	width: auto;
	max-width: 15rem;
	object-fit: contain;
	object-position: left center;
}

.a1-pest-control-footer .atlas-footer__heading {
	color: var(--a1-green);
	margin-bottom: var(--wp--preset--spacing--10);
}

.a1-pest-control-footer .a1-pest-control-footer__tagline {
	color: #FFFFFF;
	font-weight: 700;
}

.a1-pest-control-footer a:where(:not(.wp-element-button)) {
	color: #FFFFFF;
}

.a1-pest-control-footer a:where(:not(.wp-element-button)):hover {
	color: var(--a1-green);
}

.a1-pest-control-footer__bottom p {
	margin: 0;
}

/* ---------- Mobile call bar: blue Call, green Request an Estimate ---------- */

@media (max-width: 781px) {
	.wp-block-buttons.atlas-callbar {
		background-color: var(--a1-charcoal-2);
	}

	.atlas-callbar .a1-pest-control-callbar__call .wp-block-button__link {
		background-color: var(--a1-blue);
		color: #FFFFFF;
	}

	.atlas-callbar .a1-pest-control-callbar__call .wp-block-button__link:hover {
		background-color: #02659F;
	}

	.atlas-callbar .atlas-callbar__quote .wp-block-button__link {
		background-color: var(--a1-green);
		color: var(--a1-charcoal);
	}

	.atlas-callbar .wp-block-button__link {
		padding-inline: .5rem;
	}
}

@media (max-width: 360px) {
	.atlas-callbar .wp-block-button__link {
		font-size: .9375rem;
	}
}

/* ---------- Forms ---------- */

.forminator-ui .forminator-required {
	color: #B42318;
}
