/* ===================================================================
 * VPH COMPONENTS — header, top-bar, nav, logo, footer, buttons,
 * cards, CTA styles, popup/newsletter/cookie hides, emergency pill.
 * ================================================================ */

/* ===================================================================
 * VPH HEADER (rebuilt 2026-04-09 from TemplateMela demo structure)
 * ================================================================ */

/* 1. Header root + row wrappers (single source of truth for bg/colors) */
.site-header,
.site-header-wrap,
.site-header-inner-wrap,
.site-header-upper-wrap,
.site-top-header-wrap,
.site-main-header-wrap,
.site-header-row,
.site-header-row-layout-contained,
.site-header-row-layout-fullwidth {
	background-color: var(--vph-header-bg) !important;
	border-color: var(--vph-header-border) !important;
	max-width: 100% !important;
	width: 100% !important;
}
.site-header {
	color: var(--vph-header-text);
}
.site-top-header-wrap {
	border-bottom: 1px solid var(--vph-header-border) !important;
}
/* Force every inner header container transparent so the outer
   #000 background flows through edge-to-edge. */
.site-header .site-header-row-container-inner,
.site-header .site-header-row-container,
.site-header .site-container,
.site-header .site-header-upper-inner-wrap,
.site-header .site-header-top-section-left,
.site-header .site-header-top-section-right,
.site-header .site-header-main-section-left,
.site-header .site-header-main-section-right,
.site-header .site-header-item {
	background: transparent !important;
	background-color: transparent !important;
}

/* 2. Inner content containers — keep content in a 1280 centered box */
.site-header .site-container,
.site-header .site-header-row-container-inner,
.site-top-header-wrap .site-container,
.site-main-header-wrap .site-container,
.site-top-header-inner-wrap,
.site-main-header-inner-wrap {
	max-width: 1280px !important;
	width: auto !important;
	margin: 0 auto !important;
	padding: 0 24px !important;
	box-sizing: border-box;
}

/* 3. Top bar — social left, contact right, 44px tall */
.site-top-header-inner-wrap {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	min-height: 44px;
	gap: 24px;
}
.site-header-top-section-left,
.site-header-top-section-right {
	display: flex;
	align-items: center;
	gap: 20px;
}
.site-top-header-wrap,
.site-top-header-wrap a,
.site-top-header-wrap .header-contact-item,
.site-top-header-wrap .contact-label,
.site-top-header-wrap .contact-content,
.site-top-header-wrap .header-html-content {
	color: var(--vph-header-text-dim) !important;
	font-size: var(--vph-topbar-size) !important;
	font-weight: 500;
}
.site-top-header-wrap a:hover,
.site-top-header-wrap a:focus {
	color: var(--vph-color-accent) !important;
}

/* 3a. Social icons — hidden until real accounts are set up */
.header-social-wrap,
.header-social-inner-wrap {
	display: none !important;
}

/* 3b. Contact items — Call us / Service area / License badge */
.header-contact-wrap,
.header-contact-inner-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0;
}
.header-contact-wrap .header-contact-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 18px;
	border-left: 1px solid var(--vph-header-border) !important;
}
.header-contact-wrap .header-contact-item:first-child {
	border-left: none !important;
	padding-left: 0;
}
.header-contact-wrap .header-contact-item:last-child {
	padding-right: 0;
}
.header-contact-wrap .contact-title {
	color: var(--vph-header-text-dim) !important;
	font-size: 11px !important;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	display: block;
	line-height: 1.3;
}
.header-contact-wrap .contact-label {
	color: var(--vph-header-text) !important;
	font-size: 14px !important;
	font-weight: 600;
	display: block;
	line-height: 1.3;
}
/* 3c. "Licensed & Insured" — 3rd contact item rendered as a blue pill.
   NOTE: Only target :nth-child(3), NOT :last-child — the emergency item
   (4th child / last child) has its own red-pill rules in section 6. */
.header-contact-wrap .header-contact-item:nth-child(3) .contact-label {
	background: var(--vph-color-accent);
	color: #ffffff !important;
	padding: 4px 10px;
	border-radius: 2px;
	font-size: 11px !important;
	display: inline-block;
}
.header-contact-wrap .header-contact-item:nth-child(3) .contact-icon-container,
.header-contact-wrap .header-contact-item:nth-child(3) svg {
	display: none !important;
}

/* 4. Main bar — logo left, nav, utilities right, 120px tall */
.site-main-header-inner-wrap {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	min-height: 120px;
	gap: 32px;
}
.site-header-main-section-left {
	display: flex;
	align-items: center;
	gap: 48px;
	flex: 1 1 auto;
}
.site-header-main-section-right {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

/* 4a. Logo */
.site-branding,
.custom-logo-link,
.vph-image-logo {
	display: inline-flex !important;
	align-items: center !important;
	line-height: 0;
	background: transparent !important;
}
.vph-image-logo img,
.custom-logo {
	max-height: 120px !important;
	width: auto !important;
	height: auto !important;
}

/* 4b. Primary nav — horizontal, uppercase, accent hover */
.site-header .primary-menu-container > ul.menu,
.site-header .header-menu-container > ul.menu {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 4px;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}
/* Let the nav container grow so all items fit in one row */
.site-header .site-header-main-section-left .site-header-item:has(nav),
.site-header .site-header-main-section-left .header-navigation {
	flex: 1 1 auto;
	min-width: 0;
}
.site-header .primary-menu-container,
.site-header .header-menu-container {
	width: auto !important;
	max-width: none !important;
}
.site-header .primary-menu-container .menu-item > a,
.site-header .header-menu-container .menu-item > a,
.site-main-header-wrap .menu-item > a {
	color: var(--vph-header-text) !important;
	font-family: var(--vph-font-family) !important;
	font-size: 15px !important;
	font-weight: var(--vph-nav-weight) !important;
	letter-spacing: var(--vph-nav-tracking) !important;
	padding: 14px 18px !important;
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	white-space: nowrap !important;
	transition: color 0.15s ease, border-color 0.15s ease;
	border-bottom: 2px solid transparent !important;
}
.site-header .primary-menu-container .menu-item > a:hover,
.site-header .primary-menu-container .menu-item > a:focus,
.site-header .header-menu-container .menu-item > a:hover,
.site-header a:hover,
.site-header a:focus {
	color: var(--vph-color-accent) !important;
	border-bottom-color: var(--vph-color-accent) !important;
}
.site-header .primary-menu-container .current-menu-item > a {
	color: var(--vph-color-accent) !important;
	border-bottom: 2px solid var(--vph-color-accent) !important;
}

/* 4c. Submenu dropdowns */
.site-header .sub-menu,
.site-header .menu-item-has-children > .sub-menu {
	background-color: #0a0a0a !important;
	border: 1px solid var(--vph-header-border) !important;
	padding: 8px 0 !important;
	min-width: 220px;
}
.site-header .sub-menu .menu-item > a {
	color: var(--vph-header-text) !important;
	padding: 10px 20px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}
.site-header .sub-menu .menu-item > a:hover {
	color: var(--vph-color-accent) !important;
	background-color: rgba(255,255,255,0.05) !important;
}

/* 4c-2. Dropdown caret visibility on dark header */
.site-header .menu-item-has-children > a::after {
	opacity: 0.8 !important;
	margin-left: 6px !important;
}
.site-header .menu-item-has-children > a:hover::after {
	opacity: 1 !important;
}

/* 4d. Nav CTA chip — GET FREE QUOTE */
.site-header li.menu-cta-button {
	background: transparent !important;
}
.site-header li.menu-cta-button > a,
.site-header .primary-menu-container li.menu-cta-button > a,
.site-main-header-wrap li.menu-cta-button > a {
	background: var(--vph-color-accent) !important;
	color: #ffffff !important;
	border: 2px solid var(--vph-color-accent) !important;
	padding: 14px 28px !important;
	margin-left: 12px !important;
	border-radius: 6px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.6px !important;
	text-transform: uppercase !important;
	line-height: 1.2 !important;
	box-shadow: 0 2px 8px rgba(73,153,208,0.3) !important;
	transition: background-color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s !important;
	border-bottom: none !important;
}
.site-header li.menu-cta-button > a:hover,
.site-header .primary-menu-container li.menu-cta-button > a:hover,
.site-main-header-wrap li.menu-cta-button > a:hover {
	background: var(--vph-color-accent-dark) !important;
	border-color: var(--vph-color-accent-dark) !important;
	color: #ffffff !important;
	transform: scale(1.03) !important;
	box-shadow: 0 4px 12px rgba(73,153,208,0.4) !important;
	border-bottom: none !important;
}
.site-header li.menu-cta-button > a::before,
.site-header li.menu-cta-button > a::after {
	display: none !important;
}

/* 4e. Utility icons (mobile hamburger) */
.site-header .menu-toggle-open,
.site-header .header-account-label,
.site-header .header-button {
	color: var(--vph-header-text) !important;
	background: transparent !important;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.site-header .menu-toggle-open:hover {
	color: var(--vph-color-accent) !important;
}
/* Hide search — unnecessary for a 24-page local service site */
.search-toggle-open-container,
#search-drawer {
	display: none !important;
}

/* 4f. Hide WooCommerce cart (WC disabled; rules are defensive) */
.site-header .header-cart-wrap,
.site-header .base-header-cart,
.site-header .header-cart-inner-wrap,
.site-header .header-cart-button,
.site-header [class*="header-cart"],
#cart-drawer,
.cart-drawer-wrap {
	display: none !important;
}

/* 5. Mobile drawer (off-canvas nav)
   Avanam's drawer root is #mobile-drawer.popup-drawer (NOT .drawer).
   .drawer-inner > .drawer-header + .drawer-content.mobile-drawer-content
   nav#mobile-site-navigation.mobile-navigation.drawer-navigation            */
#mobile-drawer,
#mobile-drawer .drawer-inner,
#mobile-drawer .drawer-content,
#mobile-drawer .mobile-navigation,
#mobile-drawer .drawer-navigation {
	background-color: #0a0a0a !important;
	color: var(--vph-header-text) !important;
}

/* 5a. Close button — 48×48 tap target (Apple HIG) */
#mobile-drawer .drawer-header {
	display: flex !important;
	align-items: center;
	justify-content: flex-end;
	padding: 8px 12px !important;
	min-height: 56px;
	background: transparent !important;
}
#mobile-drawer .menu-toggle-close {
	color: var(--vph-header-text) !important;
	width: 48px !important;
	height: 48px !important;
	min-width: 48px;
	min-height: 48px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	cursor: pointer;
	border-radius: 8px;
	transition: background 0.15s;
	background: transparent !important;
}
#mobile-drawer .menu-toggle-close:hover,
#mobile-drawer .menu-toggle-close:focus {
	background: rgba(255,255,255,0.08) !important;
}

/* 5b. VPH branding bar at top of drawer (injected via JS) */
.vph-drawer-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 24px 20px;
	border-bottom: 1px solid var(--vph-header-border);
}
.vph-drawer-brand img {
	width: 56px;
	height: 56px;
	border-radius: 6px;
}
.vph-drawer-brand-text {
	font-family: var(--vph-font-family);
	font-size: 16px;
	font-weight: 700;
	color: var(--vph-header-text);
	line-height: 1.25;
}
.vph-drawer-brand-sub {
	font-size: 12px;
	font-weight: 500;
	color: var(--vph-header-text-dim);
	letter-spacing: 0.3px;
}

/* Hide the duplicate secondary nav inside the drawer */
#mobile-secondary-site-navigation,
.mobile-secondary-navigation {
	display: none !important;
}

/* 5c. Nav items — unified white text, accent for current only */
#mobile-drawer .menu-item > a {
	color: var(--vph-header-text) !important;
	font-family: var(--vph-font-family) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	padding: 16px 24px !important;
	border-bottom: 1px solid var(--vph-header-border) !important;
	transition: color 0.15s, background 0.15s;
}

/* 5d. Parent items (Services, Service Areas) — full white + animated chevron
   Avanam wraps these in li > div > a (not li > a), so use descendant selector. */
#mobile-drawer .menu-item-has-children a {
	color: var(--vph-header-text) !important;
	font-weight: 600 !important;
}
/* Chevron toggle button — larger tap target */
#mobile-drawer .drawer-sub-toggle {
	width: 48px !important;
	height: 48px !important;
	min-width: 48px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--vph-header-text) !important;
	background: transparent !important;
}
/* Animated chevron rotation on open */
#mobile-drawer .drawer-sub-toggle svg {
	transition: transform 0.25s ease;
	width: 18px;
	height: 18px;
	fill: var(--vph-header-text);
}
#mobile-drawer .menu-item-has-children.toggled-on .drawer-sub-toggle svg {
	transform: rotate(180deg);
}

#mobile-drawer .sub-menu {
	background-color: #000 !important;
}
#mobile-drawer .sub-menu .menu-item > a {
	padding-left: 40px !important;
	font-size: 14px !important;
	font-weight: 400 !important;
}
#mobile-drawer .menu-item > a:hover {
	color: var(--vph-color-accent) !important;
	background: rgba(255,255,255,0.04) !important;
}
#mobile-drawer .current-menu-item > a {
	color: var(--vph-color-accent) !important;
}

/* 5e. CTA button — "Get Free Quote" standout in drawer */
#mobile-drawer li.menu-cta-button {
	padding: 16px 24px 8px !important;
	border-bottom: none !important;
}
#mobile-drawer li.menu-cta-button > a {
	background: var(--vph-color-accent) !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-align: center !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	padding: 16px 24px !important;
	border-radius: 6px !important;
	border-bottom: none !important;
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
	transition: background 0.2s, transform 0.15s !important;
}
#mobile-drawer li.menu-cta-button > a:hover {
	background: var(--vph-color-accent-dark) !important;
	transform: translateY(-1px);
}

/* 5f. Tap-to-call bar at bottom of drawer (injected via JS) */
.vph-drawer-call {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 16px 24px 24px;
	padding: 16px 20px;
	background: #d32f2f;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 8px;
	font-family: var(--vph-font-family);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.3px;
	min-height: 52px;
	box-sizing: border-box;
	transition: background 0.2s;
}
.vph-drawer-call:hover,
.vph-drawer-call:focus {
	background: #b71c1c;
	color: #fff !important;
}
.vph-drawer-call-icon {
	font-size: 18px;
	line-height: 1;
}

/* === end VPH HEADER === */

/* -------------------------------------------------------------------
 * BREADCRUMB HERO IMAGE OVERRIDE
 * ---------------------------------------------------------------- */
.page-hero-section .entry-hero-container-inner,
.entry-hero.page-hero-section .entry-hero-container-inner {
	background-image: var(--vph-breadcrumb-hero) !important;
	background-color: var(--vph-color-primary) !important;
	background-size: cover !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
}

/* Remove WooCommerce cart icon from header (duplicate defensive rules) */
.header-cart-wrap,
.base-header-cart,
.header-cart-inner-wrap,
.header-cart-button,
.site-header [class*="header-cart"],
#cart-drawer,
.cart-drawer-wrap {
	display: none !important;
}

/* -------------------------------------------------------------------
 * ELEMENTOR BUTTONS — force white text on the (now black) button bg.
 * ---------------------------------------------------------------- */
.elementor-button,
.elementor-button-link,
.elementor-widget-button .elementor-button .elementor-button-text {
	color: #ffffff !important;
}
.elementor-button:hover,
.elementor-button-link:hover,
.elementor-widget-button .elementor-button:hover {
	background-color: var(--vph-color-accent) !important;
	color: #ffffff !important;
}
.elementor-widget-button .elementor-button:hover .elementor-button-text {
	color: #ffffff !important;
}

/* Hide demo newsletter / welcome / exit / cookie popups */
#welcome-popup, #exit-popup, #cookie-popup,
.popup-drawer.welcome-popup, .welcome-popup,
.popup-drawer.welcome_newsletter, .welcome_newsletter,
#welcome_dismiss_show,
#popup-newsletter-wrapper, .handyman-newsletter-popup,
.popup-newsletter, .newsletter-popup-wrapper,
#cookie-notice, .cookie-notice-container, #cookie-law-info-bar,
.cli-bar-container, .handyman-cookies-popup, #cookies-popup {
	display: none !important;
}
body.popup-open,
body[class*="showing-popup-drawer-"] {
	overflow: auto !important;
}

/* Avanam page hero with breadcrumb — hide on home only, leave on subpages */
.home .entry-hero {
	display: none !important;
}
.front-page .entry-hero {
	display: none !important;
}

/* Fix CTA button overlap on dark hero sections — force inline-block layout */
.entry-content p a[href^="tel:"],
.entry-content p a[href^="/contact"] {
	display: inline-block !important;
	margin: 4px 6px !important;
	vertical-align: middle !important;
}
/* Tone down the Elementor buttons */
.entry-content .elementor-widget-button {
	margin: 0 !important;
}

/* Footer widget contrast — Avanam ships with a dark footer; force light text */
.site-footer, .site-footer * {
	color: #ddd !important;
}
.site-footer h1, .site-footer h2, .site-footer h3,
.site-footer h4, .site-footer .widget-title, .site-footer .wp-block-heading {
	color: #fff !important;
}
.site-footer a {
	color: #ddd !important;
}
.site-footer a:hover {
	color: var(--vph-color-accent) !important;
}
.site-footer ul {
	list-style: none;
	padding-left: 0;
}
.site-footer ul li {
	line-height: 1.9;
}
.site-footer .footer-widget-area {
	padding: 30px 15px !important;
}
/* Footer sub-headings (Hours, License & Insurance) */
.site-footer .vph-footer-subhead {
	font-size: 14px !important;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #ffffff !important;
	margin-top: 18px !important;
	margin-bottom: 6px !important;
}
/* Hide empty Avanam top-footer row */
.site-top-footer-wrap {
	display: none !important;
}

/* -------------------------------------------------------------------
 * EMERGENCY CALL NOW — red pill in header (desktop) + sticky floating
 * pill bottom-right (mobile only).
 * ---------------------------------------------------------------- */
/* Target 4th contact item (Emergency) — Avanam doesn't add a custom class */
.header-contact-wrap .header-contact-item:nth-child(4) {
	background: #d32f2f !important;
	border-radius: 999px;
	padding: 10px 20px !important;          /* was 6px 14px — now meets 44px min tap target */
	margin-left: 10px;
	animation: vph-pulse 2.2s ease-in-out infinite;
	box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.55);
	border-left: none !important;
	cursor: pointer;
}
/* Hide the "Emergency line" title — redundant when the label says it all */
.header-contact-wrap .header-contact-item:nth-child(4) .contact-title {
	display: none !important;
}
/* Hide the phone icon — the red pill is visually distinct enough */
.header-contact-wrap .header-contact-item:nth-child(4) .contact-icon-container,
.header-contact-wrap .header-contact-item:nth-child(4) svg {
	display: none !important;
}
.header-contact-wrap .header-contact-item:nth-child(4),
.header-contact-wrap .header-contact-item:nth-child(4) a,
.header-contact-wrap .header-contact-item:nth-child(4) .contact-label {
	color: #fff !important;
	fill: #fff !important;
	font-weight: 700;
	font-size: 13px !important;
	letter-spacing: 0.3px;
	background: transparent !important;      /* kill the blue-pill bleed-through */
	padding: 0 !important;                   /* label padding handled by outer pill */
	border-radius: 0 !important;
}
.header-contact-wrap .header-contact-item:nth-child(4):hover {
	background: #b71c1c !important;
	transform: translateY(-1px);
	transition: background 180ms ease, transform 180ms ease;
}
@keyframes vph-pulse {
	0%   { box-shadow: 0 0 0 0   rgba(211, 47, 47, 0.55); }
	70%  { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0);    }
	100% { box-shadow: 0 0 0 0   rgba(211, 47, 47, 0);    }
}

/* Sticky mobile pill — hidden on desktop */
.vph-emergency-sticky {
	display: none;
}

/* VPH button base + variants */
.vph-btn {
	display: inline-block;
	padding: 16px 36px;
	border-radius: 4px;
	font-weight: 800;
	text-decoration: none;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: transform 0.2s ease, background 0.25s ease;
}
.vph-btn-primary {
	background: var(--vph-color-accent);
	color: #ffffff;
}
.vph-btn-primary:hover {
	background: #000000;
	color: #ffffff;
	transform: translateY(-2px);
}
.vph-btn-accent {
	background: var(--vph-color-accent);
	color: #ffffff;
}
.vph-btn-accent:hover {
	background: #000000;
	color: #ffffff;
	transform: translateY(-2px);
}
.vph-btn-secondary {
	background: transparent;
	color: #fff;
	border: 2px solid #fff;
}
.vph-btn-secondary:hover {
	background: #fff;
	color: #000000;
	transform: translateY(-2px);
}
.vph-btn-outline {
	background: transparent;
	color: #000000;
	border: 2px solid #000000;
}
.vph-btn-outline:hover {
	background: #000000;
	color: #ffffff;
	transform: translateY(-2px);
}
.vph-btn-outline-dark {
	background: transparent;
	color: #555;
	border: 2px solid #ccc;
	padding: 12px 24px;
	font-size: 13px;
}
.vph-btn-outline-dark:hover {
	background: #000000;
	color: #ffffff;
	border-color: #ffffff;
}
.vph-center {
	text-align: center;
}
