/*
Theme Name: The Pool Boys
Theme URI: https://poolboys.com
Author: OWD
Description: Custom WordPress theme for The Pool Boys, a residential pool service company in Greater Houston, Texas. Home, Services, and About are fully editable from the Customizer; Team, Testimonials, Services, FAQs, and Sponsorships are managed as custom post types.
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-pool-boys
Tags: custom-logo, custom-menu, translation-ready, threaded-comments
*/

/* ========================================================================
   RESET
   ======================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Anchor targets (e.g. #diagnostic, #installation, #standard-of-care) land
   below the fixed 84px nav instead of hiding underneath it. */
:target { scroll-margin-top: 100px; }
section[id], [id].tpb-anchor { scroll-margin-top: 100px; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: 1.6;
	color: var(--charcoal);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }
input, textarea, select { font: inherit; }

/* ========================================================================
   FONTS
   ======================================================================== */
@font-face {
	font-family: 'Oswald Fallback';
	src: local('Arial Narrow'), local('Arial');
	size-adjust: 85%;
	ascent-override: 100%;
}

/* ========================================================================
   VARIABLES
   ======================================================================== */
:root {
	--navy: #02348F;
	--ocean: #054FCD;
	--arctic: #0397D6;
	--algae: #00C950;
	--charcoal: #1A2332;
	--white: #FFFFFF;
	--fog: #8FA3B8;
	--line: #D8E0E8;
	--muted: #64748B;
	--muted-dark: #445566;
	--off: #F4F4F4;
	--alt: #eef1f6;
	--star: #FBBC05;
	--inactive: #7A8899;
	--inactive-note: #4A5568;

	--font-display: 'Oswald', 'Oswald Fallback', Arial Narrow, Arial, sans-serif;
	--font-body: 'Figtree', sans-serif;

	--fs-section-y: clamp(72px, calc(3.89vw + 53.33px), 128px);
	--fs-section-x: clamp(24px, calc(3.33vw + 8px), 72px);
	--fs-inner-x: clamp(24px, calc(3.33vw + 8px), 72px);
	--fs-header-mb: clamp(48px, calc(2.22vw + 37.33px), 80px);
	--fs-pillar-transition-mb: clamp(40px, calc(2.22vw + 29.33px), 72px);
	--fs-container: clamp(1100px, calc(15.625vw + 800px), 1200px);

	/* Site-wide type scale (single source of truth; applied in assets/css/type-scale.css) */
	--text-h1: clamp(38px, 4.58vw, 100px);
	--text-h2: clamp(32px, calc(3vw + 18px), 56px);
	--text-h3: clamp(22px, calc(0.6vw + 16.5px), 28px);
	--text-h4: clamp(18px, calc(0.21vw + 16px), 20px);
	--text-p1: clamp(17px, calc(0.208vw + 16.01px), 20px);
	--text-p2: clamp(16px, calc(0.104vw + 16px), 18px);
	--text-p3: clamp(13px, calc(0.104vw + 12px), 14px);
	--text-eyebrow: clamp(12px, calc(0.21vw + 10px), 14px);
	--text-btn: 14px;

	/* Legacy aliases so any rule still using the old names follows the scale */
	--text-body: var(--text-p1);
	--text-section-headline: var(--text-h2);
	--text-card: var(--text-p2);
	--text-hero: var(--text-h1);
	--text-cred: 26px;
	--text-cred-label: var(--text-p3);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ========================================================================
   UTILITY / ACCESSIBILITY
   ======================================================================== */
.visually-hidden, .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--navy);
	color: var(--white);
	padding: 12px 20px;
	font-weight: 600;
}
.skip-link:focus {
	left: 8px; top: 8px;
}
:focus-visible { outline: 2px solid var(--arctic); outline-offset: 2px; }

.tpb-placeholder-img { object-fit: cover; }

/* Trademark marks (™ ® ℠) — scaled to a consistent, standard size site-wide.
   Wrapped by scaleTrademarks() in assets/js/theme.js. em-based so it stays
   proportional in every context (huge hero headline down to footer fine print). */
.tpb-mark {
	font-size: 0.5em;
	vertical-align: 0.35em; /* top of the mark lines up with the cap height (feedback 949105) */
	line-height: 0;
	margin-left: 0.18em;
	font-weight: inherit;
}

/* ========================================================================
   BUTTONS
   ======================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: var(--text-btn);
	letter-spacing: 0.01em;
	padding: 16px 28px;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--ocean); }
.btn-secondary { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.5); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-outline-navy { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

/* ========================================================================
   NAV (canonical, shared on every page)
   ======================================================================== */
header { position: relative; }
nav#mainNav {
	position: fixed; top: 0; left: 0; right: 0; z-index: 300;
	height: 84px;
	padding: 0 64px;
	display: flex; align-items: center; justify-content: space-between;
	transition: background 0.5s ease;
}
nav#mainNav.scrolled { background: rgba(2,52,143,0.98); }
.nav-logo a { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > .menu-item { position: relative; }
.nav-links > .menu-item > a,
.nav-links > .nav-top-link {
	font-size: 14px;
	font-weight: 600;
	color: rgba(255,255,255,0.85);
	letter-spacing: 0.05em;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	gap: 6px;
	border-radius: 4px;
	transition: color 0.2s, background 0.2s;
	white-space: nowrap;
}
.nav-links > .menu-item > a:hover,
.nav-links > .nav-top-link:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-links > .current-menu-item > a { color: var(--white); }
.nav-links > .menu-item > a svg { width: 10px; height: 10px; opacity: 0.4; flex-shrink: 0; }
/* Chevron on desktop parent items (WP menu adds .menu-item-has-children on items with a dropdown). */
.nav-links > .menu-item-has-children > a::after {
	content: "";
	width: 7px; height: 7px;
	margin-left: 2px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	opacity: 0.5;
	flex-shrink: 0;
	transition: transform 0.25s ease, opacity 0.2s;
}
.nav-links > .menu-item-has-children:hover > a::after { transform: translateY(0) rotate(225deg); opacity: 0.9; }
/* Invisible hover bridge across the gap between a parent item and its dropdown,
   so moving the cursor down to a sub-item doesn't cross a dead zone that closes it. */
.nav-links > .menu-item-has-children::after {
	content: "";
	position: absolute;
	top: 100%; left: 0; right: 0;
	height: 14px;
}
.nav-links .sub-menu {
	display: none;
	position: absolute; top: calc(100% + 8px); left: 0;
	background: var(--white);
	border-radius: 6px;
	box-shadow: 0 16px 48px rgba(0,0,0,0.18);
	min-width: 240px;
	padding: 8px;
	z-index: 400;
}
.nav-links .menu-item-has-children:hover > .sub-menu,
.nav-links .menu-item-has-children:focus-within > .sub-menu { display: block; }
.nav-links .sub-menu a {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--charcoal);
	padding: 10px 16px;
	border-radius: 4px;
	letter-spacing: 0.02em;
	transition: background 0.15s;
}
.nav-links .sub-menu li:not(.drop-label) > a { padding-left: 28px; }
.nav-links .sub-menu a:hover { background: var(--off); color: var(--navy); }
.nav-links .sub-menu li.drop-label > a,
.nav-links .sub-menu a.drop-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--navy);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	padding: 10px 16px 6px;
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-phone { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85); letter-spacing: 0.04em; transition: color 0.2s; white-space: nowrap; }
.nav-phone:hover { color: var(--white); }
.nav-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.12); }
.nav-cta {
	background: var(--arctic);
	color: var(--white) !important;
	padding: 12px 26px;
	border-radius: 4px;
	font-weight: 700 !important;
	font-size: var(--text-btn);
	letter-spacing: 0.06em;
	transition: background 0.2s;
	flex-shrink: 0;
}
.nav-cta:hover { background: var(--ocean) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; border: none; background: transparent; }
.hamburger span { width: 24px; height: 2px; background: rgba(255,255,255,0.8); border-radius: 2px; display: block; }

.mob-nav {
	display: none; flex-direction: column;
	align-items: stretch; justify-content: flex-start;
	position: fixed; top: 84px; left: 0; right: 0; bottom: 0; z-index: 299;
	background: var(--off);
	padding: 40px 28px 56px;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
	overflow-y: auto;
}
.mob-nav.open { transform: translateX(0); }
.mob-nav-list { display: flex; flex-direction: column; width: 100%; }
.mob-nav-list a, .mob-nav > a {
	font-weight: 600;
	font-size: 18px;
	letter-spacing: 0.01em;
	color: var(--navy);
	padding: 22px 0;
	border-bottom: 1px solid rgba(0,0,0,0.08);
	display: block;
}
.mob-nav-phone { font-size: 15px !important; color: var(--charcoal) !important; }

/* Mobile dropdown accordion: parent row = link + chevron toggle; sub-menu
   collapses below and expands on tap (toggle injected by theme.js). */
.mob-nav-list .menu-item-has-children {
	display: flex; flex-wrap: wrap; align-items: stretch;
	border-bottom: 1px solid rgba(0,0,0,0.08);
}
.mob-nav-list .menu-item-has-children > a { flex: 1; border-bottom: none; }
.mob-nav-toggle {
	flex-shrink: 0; width: 56px; background: transparent; border: none;
	border-left: 1px solid rgba(0,0,0,0.06); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	color: var(--navy);
}
.mob-nav-toggle::before {
	content: ""; width: 9px; height: 9px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.25s ease;
}
.mob-nav-list .menu-item-has-children.open > .mob-nav-toggle::before { transform: translateY(2px) rotate(225deg); }
.mob-nav-list .sub-menu {
	flex-basis: 100%; list-style: none; margin: 0; padding: 0;
	display: none; background: rgba(0,0,0,0.02);
}
.mob-nav-list .menu-item-has-children.open > .sub-menu { display: block; padding: 4px 0 12px; }
.mob-nav-list .sub-menu a {
	font-size: 15px; font-weight: 500; padding: 12px 0 12px 16px;
	color: var(--charcoal); border-bottom: 1px solid rgba(0,0,0,0.05);
}
.mob-nav-list .sub-menu li:last-child > a { border-bottom: none; }
.mob-nav-list .sub-menu li.drop-label > a {
	font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--muted); padding-top: 16px; padding-bottom: 6px; border-bottom: none;
}

.mob-nav-btn {
	margin-top: 36px;
	background: var(--navy);
	color: var(--white);
	border: none;
	width: 100%;
	padding: 18px 24px;
	border-radius: 3px;
	font-size: var(--text-btn);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
}

@media (min-width: 961px) {
	.hamburger, .mob-nav, .sticky-bar { display: none !important; }
}
@media (max-width: 960px) {
	nav#mainNav { padding: 0 24px; }
	.nav-links, .nav-phone, .nav-divider, .nav-cta { display: none; }
	.hamburger { display: flex; }
	.mob-nav { display: flex; }
	body { padding-bottom: 64px; }
}

/* ========================================================================
   CREDENTIAL BAR (shared shape, content differs per page via Customizer)
   ======================================================================== */
.cred-bar {
	background: var(--charcoal);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}
.cred-item {
	padding: 28px 32px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 7px;
	text-align: center;
	border-right: 1px solid rgba(255,255,255,0.08);
}
.cred-item:last-child { border-right: none; }
.cred-num, .cred-value {
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 500;
	color: var(--white);
	letter-spacing: 0.01em;
	line-height: 1;
}
.cred-num .cred-star, .cred-star { color: var(--star); margin-right: 6px; }
.cred-label { font-family: var(--font-body); font-size: var(--text-cred-label); font-weight: 600; color: var(--fog); }
@media (max-width: 960px) {
	.cred-bar { grid-template-columns: 1fr; }
	.cred-item { padding: 20px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
	.cred-item:last-child { border-bottom: none; }
	.cred-num, .cred-value { font-size: 18px; }
	.cred-label { font-size: 12px; }
}

/* ========================================================================
   GENERIC SECTION HEADER
   ======================================================================== */
.eyebrow {
	display: block;
	font-size: var(--text-eyebrow);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--arctic);
	margin-bottom: 12px;
}
.section-headline {
	font-family: var(--font-display);
	font-size: var(--text-section-headline);
	font-weight: 600;
	color: var(--navy);
	line-height: 1.15;
}

/* ========================================================================
   CTA SECTION (shared shape, content differs per page)
   ======================================================================== */
.cta-section {
	background: var(--white);
	padding: var(--fs-section-y) var(--fs-section-x);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.cta-inner { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-headline {
	font-family: var(--font-display);
	font-size: var(--text-section-headline);
	font-weight: 700;
	color: var(--navy);
	letter-spacing: 0.04em;
	line-height: 1.05;
	text-transform: uppercase;
	margin-bottom: 32px;
}
.cta-rule { width: 40px; height: 3px; background: var(--arctic); margin: 0 auto 32px; }
.cta-trust { font-size: var(--text-body); color: var(--muted); line-height: 1.85; margin-bottom: 32px; }
.cta-trust a.cta-phone {
	color: var(--navy); font-weight: 700;
	border-bottom: 2px solid var(--navy); padding-bottom: 1px;
	transition: color 0.2s, border-color 0.2s; white-space: nowrap; text-decoration: none;
}
.cta-trust a.cta-link {
	color: var(--navy); font-weight: 700;
	border-bottom: 1px solid var(--navy); padding-bottom: 1px;
	transition: color 0.2s, border-color 0.2s; text-decoration: none;
}
.cta-btn {
	display: inline-flex;
	align-items: center;
	background: var(--navy);
	color: #fff;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 800;
	padding: 20px 48px;
	border-radius: 3px;
	text-decoration: none;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	transition: background 0.2s, transform 0.15s;
	margin-bottom: 40px;
}
.cta-btn:hover { background: var(--ocean); transform: translateY(-1px); }
.cta-creds {
	display: flex; align-items: center; justify-content: center;
	gap: 20px; flex-wrap: wrap;
	padding-top: 28px; border-top: 1px solid rgba(143,163,184,0.5); /* subtle, semi-transparent rule above the credential bar */
	width: 100%; list-style: none; margin: 0;
}
.cta-cred { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.cta-cred-star { color: var(--star); margin-right: 4px; }
.cta-cred-sep { width: 1px; height: 14px; background: rgba(143,163,184,0.5); flex-shrink: 0; }
@media (max-width: 960px) {
	.cta-btn { width: 100%; justify-content: center; }
}

/* ========================================================================
   STICKY MOBILE BAR
   ======================================================================== */
.sticky-bar {
	display: none;
	position: fixed; bottom: 0; left: 0; right: 0; z-index: 298;
	background: var(--white);
	border-top: 1px solid var(--line);
	padding: 10px 20px;
	align-items: center; justify-content: space-between; gap: 12px;
}
.sb-left { display: flex; align-items: center; gap: 8px; }
.sb-badge {
	width: 28px; height: 28px; border-radius: 50%;
	border: 1px solid #ddd; display: flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 900; color: #4285F4; font-family: serif; flex-shrink: 0;
}
.sb-stars { color: var(--star); font-size: 11px; }
.sb-rating { font-size: 14px; font-weight: 800; color: var(--charcoal); }
.sb-sub { font-size: 10px; color: var(--muted); display: block; }
.sb-btn {
	background: var(--navy); color: var(--white); border: none;
	padding: 11px 20px; border-radius: 4px;
	font-size: 13px; font-weight: 700;
	white-space: nowrap; text-decoration: none; display: inline-block;
}
@media (max-width: 960px) { .sticky-bar { display: flex; } }

/* ========================================================================
   FOOTER · canonical
   ======================================================================== */
.site-footer { background: var(--charcoal); padding: 80px 72px 0; }
.footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 56px;
	padding-bottom: 64px;
	border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-logo-img { display: block; height: 30px; width: auto; margin-bottom: 16px; } /* was 35px: downsized slightly (feedback 949153) */
.nav-logo svg { display: block; height: 28px; width: auto; max-width: 100%; }
.footer-contact { font-size: 15px; color: rgba(255,255,255,0.7); line-height: 2.1; }
.footer-contact p { margin: 0; }
.footer-contact a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-contact a:hover { color: var(--white); }
.footer-social { display: flex; gap: 16px; margin-top: 24px; }
.footer-social a {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 36px;
	color: rgba(255,255,255,0.85);
	transition: color 0.2s;
}
.footer-social a:hover { color: var(--white); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col-heading { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--arctic); margin-bottom: 18px; }
.footer-col-list { display: flex; flex-direction: column; }
.footer-col-list a { display: block; font-size: 15px; color: rgba(255,255,255,0.7); margin-bottom: 12px; font-weight: 500; transition: color 0.2s; }
.footer-col-list a:hover { color: var(--white); }
.footer-seo { max-width: 1200px; margin: 0 auto; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.footer-seo p { font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.85; }
.footer-bottom {
	max-width: 1200px; margin: 0 auto; padding: 20px 0 16px;
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
	font-size: 12px; color: rgba(255,255,255,0.7);
}
.footer-bottom-left { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.footer-bottom-left a { font-size: 12px; color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-bottom-left a:hover { color: var(--white); }
.footer-sep { font-size: 12px; color: rgba(255,255,255,0.35); }
@media (max-width: 960px) {
	.site-footer { padding: 56px 28px 0; }
	.footer-inner { grid-template-columns: 1fr; gap: 40px; }
	.footer-bottom { flex-direction: column; text-align: center; }
}

/* ========================================================================
   WORDPRESS DEFAULTS
   ======================================================================== */
.alignleft { float: left; margin: 0 24px 12px 0; }
.alignright { float: right; margin: 0 0 12px 24px; }
.aligncenter { display: block; margin: 0 auto 12px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; margin-top: 6px; }
.wp-block-image img { border-radius: 4px; }

/* Page-specific styles for Home, Services, and About live in
   assets/css/home.css, assets/css/services.css, and assets/css/about.css
   and are enqueued only on the templates that need them. */
