/* ============================================================
   Services Main Page Styles
   ============================================================ */

/* 1. Hero */
.services-hero {
	position: relative;
	min-height: 80vh;
	display: flex;
	align-items: center;
	background: var(--nb-ink);
	overflow: hidden;
}
.services-hero__overlay {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 70% 50%, rgba(255,198,39,.12) 0%, transparent 65%),
	            linear-gradient(135deg, rgba(17,18,20,.96) 50%, rgba(17,18,20,.7));
}
.services-hero__inner { position: relative; z-index: 1; max-width: 760px; color: #fff; padding: 120px 0 80px; }
.services-hero__inner h1 { font-size: clamp(2.2rem,5vw,3.5rem); line-height: 1.12; margin: 12px 0 18px; }
.services-hero__inner p { font-size: 1.15rem; color: rgba(255,255,255,.8); max-width: 600px; margin-bottom: 28px; }
.services-hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.services-hero__deco { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 420px; height: 420px; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.deco-icon { position: absolute; opacity: .08; color: var(--nb-yellow); }
.deco-icon svg { width: 80px; height: 80px; }
.deco-icon--1 { top: 20px; right: 60px; }
.deco-icon--2 { bottom: 40px; right: 120px; opacity: .05; }
.deco-icon--3 { top: 50%; right: 20px; }
@media (max-width: 900px) { .services-hero__deco { display: none; } .services-hero { min-height: auto; } .services-hero__inner { padding: 100px 0 60px; } }

/* 2. Trust bar */
.services-trust { background: var(--nb-yellow); padding: 36px 0; }
.services-trust__grid { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 16px; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item svg { width: 28px; height: 28px; flex-shrink: 0; color: var(--nb-ink); }
.trust-item span { font-weight: 700; font-size: .95rem; color: var(--nb-ink); }

/* 3. All services grid */
.all-services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 40px; }
.service-feature-card { background: #fff; border: 2px solid #f0f0f0; border-radius: 20px; padding: 32px 24px; display: flex; flex-direction: column; gap: 12px; transition: border-color .2s, box-shadow .2s, transform .2s; text-decoration: none; color: inherit; }
.service-feature-card:hover { border-color: var(--nb-yellow); box-shadow: 0 12px 40px rgba(255,198,39,.15); transform: translateY(-4px); }
.service-feature-card__icon { width: 60px; height: 60px; background: #fff9e6; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.service-feature-card__icon svg { width: 28px; height: 28px; color: var(--nb-yellow); }
.service-feature-card h3 { font-size: 1.05rem; margin: 0; }
.service-feature-card p { font-size: .9rem; color: var(--nb-muted); margin: 0; flex: 1; }
.service-feature-card__link { font-size: .88rem; font-weight: 600; color: var(--nb-yellow); text-decoration: none; margin-top: auto; }
@media (max-width: 900px) { .all-services-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .all-services-grid { grid-template-columns: 1fr; } }

/* 4. Specialty testing */
.specialty-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 20px; margin-top: 40px; justify-items: center; }
.specialty-card:last-child:nth-child(5n+1) { grid-column: 3; }
.specialty-card { background: #fff; border-radius: 18px; padding: 28px 20px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,.07); }
.specialty-card__icon { width: 56px; height: 56px; background: var(--nb-yellow); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.specialty-card__icon svg { width: 26px; height: 26px; color: var(--nb-ink); }
.specialty-card h3 { font-size: .97rem; margin-bottom: 8px; }
.specialty-card p { font-size: .85rem; color: var(--nb-muted); margin: 0; }
@media (max-width: 900px) { .specialty-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 560px) { .specialty-grid { grid-template-columns: repeat(2,1fr); } }

/* 5. Why our inspections */
.why-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; margin-top: 40px; }
.why-card { display: flex; gap: 20px; align-items: flex-start; background: #fff; border-radius: 16px; padding: 28px; border: 1px solid #f0f0f0; }
.why-card__icon { width: 52px; height: 52px; background: #fff9e6; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.why-card__icon svg { width: 24px; height: 24px; color: var(--nb-yellow); }
.why-card h3 { margin: 0 0 8px; font-size: 1rem; }
.why-card p { font-size: .9rem; color: var(--nb-muted); margin: 0; }
@media (max-width: 700px) { .why-grid { grid-template-columns: 1fr; } }

/* 6. Systems we inspect */
.systems-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 36px; }
.system-item { background: #fff; border-radius: 12px; padding: 20px 16px; display: flex; align-items: center; gap: 14px; border: 1px solid #f0f0f0; }
.system-item svg { width: 22px; height: 22px; color: var(--nb-yellow); flex-shrink: 0; }
.system-item span { font-size: .9rem; font-weight: 600; }
@media (max-width: 860px) { .systems-grid { grid-template-columns: repeat(2,1fr); } }

/* 7. Inspection process (steps) */
.process-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 40px; counter-reset: process; }
.process-card { background: #fff; border-radius: 20px; padding: 32px 24px; position: relative; box-shadow: 0 4px 20px rgba(0,0,0,.07); counter-increment: process; }
.process-card::before { content: counter(process); position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; background: var(--nb-yellow); border-radius: 50%; font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; color: var(--nb-ink); }
.process-card h3 { font-size: 1rem; margin-bottom: 10px; padding-right: 44px; }
.process-card p { font-size: .88rem; color: var(--nb-muted); }
@media (max-width: 900px) { .process-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) { .process-grid { grid-template-columns: 1fr; } }

/* 8. Convenience panel */
.convenience-panel { background: var(--nb-ink); border-radius: 24px; padding: 48px; color: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.convenience-panel h2 { color: #fff; margin-bottom: 20px; }
.convenience-panel p { color: rgba(255,255,255,.8); margin-bottom: 24px; }
.convenience-panel__badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.convenience-panel__badges img { max-height: 52px; object-fit: contain; }
@media (max-width: 760px) { .convenience-panel { grid-template-columns: 1fr; gap: 28px; padding: 32px; } }

/* 9. Areas on services page */
.services-areas-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 36px; }
@media (max-width: 860px) { .services-areas-grid { grid-template-columns: repeat(2,1fr); } }

/* 10. FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-list--wide { max-width: 900px; }
.faq-item { border: 1px solid #e8e8e8; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.faq-question { width: 100%; background: #fff; border: none; cursor: pointer; padding: 20px 24px; font-size: 1rem; font-weight: 600; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--nb-ink); transition: background .2s; }
.faq-question:hover { background: #f8f9fa; }
.faq-question[aria-expanded="true"] { background: #fff9e6; }
.faq-caret { width: 20px; height: 20px; flex-shrink: 0; transition: transform .25s; }
.faq-question[aria-expanded="true"] .faq-caret { transform: rotate(180deg); }
.faq-answer { padding: 0 24px 20px; font-size: .95rem; color: var(--nb-muted); }

/* ============================================================
   Missing class aliases — aligns page-services.php with CSS
   ============================================================ */

/* Hero: enable background image from --hero-bg, alias __content → __inner */
.services-hero { background-image: var(--hero-bg, none); background-size: cover; background-position: center; }
.services-hero__content {
    position: relative; z-index: 1; max-width: 760px; color: #fff; padding: 120px 0 80px;
}
.services-hero__content h1 { font-size: clamp(2.2rem,5vw,3.5rem); line-height: 1.12; margin: 12px 0 18px; }
.services-hero__content p { font-size: 1.15rem; color: rgba(255,255,255,.8); max-width: 600px; margin-bottom: 28px; }

/* Floating icon decoration in hero */
.services-hero__icons { position: absolute; right: 0; top: 0; width: 38%; height: 100%; pointer-events: none; overflow: hidden; }
.float-icon { position: absolute; opacity: .05; color: var(--nb-yellow); }
.float-icon svg.nbpi-icon { width: 72px; height: 72px; }
.float-icon--home { top: 22%; right: 10%; }
.float-icon--roof { top: 50%; right: 4%; }
.float-icon--foundation { bottom: 22%; right: 18%; }
.float-icon--radon { top: 12%; right: 38%; }
.float-icon--thermal { bottom: 32%; right: 42%; }
.float-icon--mold { top: 64%; right: 26%; }
@media (max-width: 900px) { .services-hero__icons { display: none; } }

/* Trust bar */
.services-trust-bar { background: var(--nb-yellow); padding: 26px 0; }
.services-trust-bar__inner { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 12px; align-items: center; }
.stb-item { display: flex; align-items: center; gap: 10px; }
.stb-item svg.nbpi-icon { width: 22px; height: 22px; color: var(--nb-ink); flex-shrink: 0; }
.stb-item span { font-weight: 700; font-size: .9rem; color: var(--nb-ink); }

/* All services grid — flex for orphan centering */
.services-grid--full { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; margin-top: 40px; }
.service-card { flex: 0 1 calc(33.333% - 16px); min-width: 260px; background: #fff; border: 2px solid #f0f0f0; border-radius: 20px; padding: 28px 22px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.service-card:hover { border-color: var(--nb-yellow); box-shadow: 0 10px 36px rgba(255,198,39,.13); transform: translateY(-4px); }
.service-card h3 { font-size: 1rem; margin: 0; }
.service-card p { font-size: .9rem; color: var(--nb-muted); margin: 0; flex: 1; }
.service-card__link { font-size: .87rem; font-weight: 600; color: var(--nb-yellow); margin-top: auto; }
@media (max-width: 900px) { .service-card { flex: 0 1 calc(50% - 12px); } }
@media (max-width: 560px) { .service-card { flex: 0 1 100%; } }

/* Specialty card link + icon centering */
.specialty-card__link { display: block; font-size: .85rem; font-weight: 600; color: var(--nb-yellow); margin-top: 10px; }
.specialty-card .icon-3d { margin: 0 auto 16px; }
.specialty-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.specialty-card h3 { margin-bottom: 8px; }
.specialty-card p { font-size: .85rem; color: var(--nb-muted); margin: 0; flex: 1; }
/* Systems grid centering */
.systems-grid .system-card { justify-content: flex-start; }
.system-card .icon-3d { flex-shrink: 0; }

/* Differentiators (Why section) */
.differentiators-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; margin-top: 40px; }
.diff-card { display: flex; gap: 20px; align-items: flex-start; background: #fff; border-radius: 16px; padding: 28px; border: 1px solid #f0f0f0; }
.diff-card h3 { margin: 0 0 8px; font-size: 1rem; }
.diff-card p { font-size: .9rem; color: var(--nb-muted); margin: 0; }
@media (max-width: 700px) { .differentiators-grid { grid-template-columns: 1fr; } }

/* Systems grid — system-card alias for system-item */
.system-card { background: #fff; border-radius: 12px; padding: 20px 16px; display: flex; align-items: center; gap: 14px; border: 1px solid #f0f0f0; }
.system-card h3 { font-size: .9rem; font-weight: 600; margin: 0; }

/* Convenience section */
.services-convenience__grid { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; padding: clamp(56px,8vw,100px) 0; }
.services-conv__certs { background: #f8f9fa; border-radius: 20px; padding: 32px; }
.services-conv__certs h3 { margin-bottom: 20px; font-size: 1.05rem; }
.mini-badge-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; align-items: center; justify-items: center; margin-bottom: 24px; }
.mini-badge-grid img { max-height: 52px; max-width: 80px; object-fit: contain; width: 100%; }
@media (max-width: 860px) { .services-convenience__grid { grid-template-columns: 1fr; gap: 32px; } }

/* Areas grid on services page — flex centering */
.services-areas .area-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.services-areas .area-card { flex: 0 1 calc(25% - 12px); min-width: 150px; }

/* Center lone last card in service grids */
.services-grid--full article:last-child:nth-child(3n+1),
.services-grid article:last-child:nth-child(3n+1) {
	grid-column: 2;
}

/* Mobile: no forced 3rd column for the orphan card */
@media (max-width: 900px) { .specialty-card:last-child:nth-child(5n+1) { grid-column: auto; } .specialty-grid > * { min-width: 0; } }
@media (max-width: 400px) { .specialty-grid { grid-template-columns: 1fr; } }

/* Small phones: systems cards stack */
.systems-grid > * { min-width: 0; }
@media (max-width: 400px) { .systems-grid { grid-template-columns: 1fr; } }
