:root {
  --hp-orange: #F26A21;
  --hp-orange-dark: #D9591A;
  --hp-blue: #1D4E89;
  --hp-blue-dark: #163B67;
  --hp-gray: #6E6E6E;
  --hp-gray-light: #F2F2F2;
  --hp-white: #FFFFFF;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333;
  background: var(--hp-white);
  margin: 0;
}

/* ---- Header: always white background so the logo reads cleanly ---- */
.hp-header {
  background: var(--hp-white);
  border-bottom: 1px solid #e6e6e6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hp-header .navbar-nav .nav-link {
  color: var(--hp-blue);
  font-weight: 600;
  margin: 0 8px;
}
.hp-header .navbar-nav .nav-link:hover,
.hp-header .navbar-nav .nav-link.active {
  color: var(--hp-orange);
}
.btn-cta {
  background: var(--hp-orange);
  color: var(--hp-white);
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: 700;
}
.btn-cta:hover, .btn-cta:focus { background: var(--hp-orange-dark); color: var(--hp-white); }
.hp-header .logo img { height: 60px; }

/* ---- Header: social icons between logo and nav, vertical separators between nav links ---- */
.hp-header-social { align-items: center; gap: 14px; margin: 0 24px; }
.hp-social-icon { color: var(--hp-blue); font-size: 1.1rem; transition: color .15s; }
.hp-social-icon:hover { color: var(--hp-orange); }
.hp-nav-separated .hp-nav-sep {
  color: #ccc;
  display: flex;
  align-items: center;
  padding: 0 2px;
  font-size: 0.9rem;
  user-select: none;
}
@media (max-width: 991.98px) {
  .hp-nav-separated .hp-nav-sep { display: none; }
  .hp-header-social { margin: 12px 0; }
}

/* ---- Footer social icons ---- */
.hp-footer-social { display: flex; gap: 14px; margin-top: 12px; }
.hp-social-icon-footer { color: #fff; font-size: 1.2rem; opacity: 0.85; }
.hp-social-icon-footer:hover { opacity: 1; color: var(--hp-orange); }

/* ---- Hero / search ---- */
.hp-hero {
  background: linear-gradient(135deg, var(--hp-blue) 0%, var(--hp-blue-dark) 100%);
  color: var(--hp-white);
  padding: 64px 0 90px;
  text-align: center;
}
.hp-hero h1 { font-weight: 800; font-size: 2.4rem; }

/* ---- Hero slideshow variant: taller, up to 10 images (regular/undimmed, instant switch), text/search in a
   standout translucent card centered over them ---- */
.hp-hero-slideshow {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.hp-hero-slides { position: absolute; inset: 0; z-index: 0; }
.hp-hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
}
.hp-hero-slide.active { opacity: 1; }
.hp-hero-content { position: relative; z-index: 55; width: 100%; }
.hp-hero-standout {
  display: inline-block;
  max-width: 800px;
  width: 92%;
  margin: 0 auto;
  padding: 32px 36px;
  border-radius: 50px;
  background: rgba(211,211,211,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  color: var(--hp-blue-dark);
}
.hp-hero-standout p { color: var(--hp-gray); }
.hp-search-box {
  background: var(--hp-white);
  border-radius: 30px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-width: 760px;
  margin: 24px auto 0;
  display: flex;
  gap: 10px;
}
.hp-search-box input {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px 14px;
  flex: 1;
  color: var(--hp-gray);
  background: var(--hp-white);
}
.hp-search-box button {
  background: var(--hp-orange);
  color: var(--hp-white);
  border: none;
  border-radius: 6px;
  padding: 0 24px;
  font-weight: 700;
}
/* Main "what service do you need" search input -- fixed 450px per spec, other fields keep flexing */
.hp-search-box .hp-autocomplete-wrap { flex: 0 1 450px; }
.hp-search-box #serviceInput { width: 100%; }
.hp-search-box .hp-search-zip { max-width: 100px; flex: 0 1 100px; }

/* ---- Mobile homepage search: stacked vertically, Zip Code -> Service -> Search button ---- */
@media (max-width: 767.98px) {
  .hp-search-box { flex-direction: column; border-radius: 20px; }
  .hp-search-box .hp-search-zip {
    order: 1; max-width: none; flex-basis: auto; width: 100%;
  }
  .hp-search-box .hp-search-service {
    order: 2; flex-basis: auto; width: 100%;
  }
  .hp-search-box .hp-search-submit {
    order: 3; width: 100%; padding: 12px 24px;
  }
  .hp-popular-dropdown { max-height: 70vh; }
  .hp-popular-popup-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---- Homepage "Featured Local Companies" cards (Premium Plus + Premium) ---- */
.hp-company-card {
  background: var(--hp-white);
  border-radius: 8px;
  border: 1px solid #eaeaea;
  padding: 14px 10px;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
  display: block;
  color: var(--hp-gray);
}
.hp-company-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: var(--hp-orange);
}
.hp-company-card .logo-wrap { height: 50px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.hp-company-card .logo-wrap img { height: 50px; width: auto; max-width: 100%; object-fit: contain; }
.hp-company-card .name {
  color: var(--hp-blue);
  font-weight: 700;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-company-card .rating { color: var(--hp-gray); font-size: .85rem; margin-top: 4px; }

/* ---- Homepage "Services In-Demand in {zip}" -- up to 10 boxes, 5 per row, icon left / name+stats right ---- */
.hp-indemand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 768px) { .hp-indemand-grid { grid-template-columns: repeat(5, 1fr); } }
.hp-indemand-card {
  display: flex;
  align-items: stretch;
  background: var(--hp-white);
  border: 1px solid #eaeaea;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--hp-gray);
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.hp-indemand-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); border-color: var(--hp-orange); }
.hp-indemand-card .icon-wrap {
  flex: 0 0 64px;
  display: flex; align-items: center; justify-content: center;
  background: var(--hp-white);
  border-right: 1px solid #f0f0f0;
}
.hp-indemand-card .icon-wrap img { object-fit: contain; max-width: 100%; max-height: 100%; }
.hp-indemand-card .text-wrap { padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.hp-indemand-card .name { color: var(--hp-blue); font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-indemand-card .count { font-size: 0.78rem; margin-top: 1px; }
.hp-indemand-card .count strong { color: var(--hp-orange); font-weight: 700; }
.hp-indemand-card .count-sub { font-size: 0.7rem; color: var(--hp-gray); opacity: 0.75; margin-top: 1px; }

/* ---- Homepage "Popular Services" -- icon + name in a big rectangle, 12-15 spread across the full row ---- */
.hp-popular-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 576px) { .hp-popular-services-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .hp-popular-services-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 992px) { .hp-popular-services-grid { grid-template-columns: repeat(6, 1fr); } }
.hp-popular-service-box {
  background: var(--hp-white);
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 24px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--hp-gray);
  transition: transform .15s, box-shadow .15s;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 130px;
}
.hp-popular-service-box:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); border-color: var(--hp-orange); }
.hp-popular-service-box img { width: 42px; height: 42px; object-fit: contain; margin-bottom: 12px; }
.hp-popular-service-box .name { color: var(--hp-blue); font-weight: 700; font-size: 0.9rem; }

/* ---- Autocomplete dropdown: white background, sits directly below the field ---- */
.hp-search-box { position: relative; }
.hp-search-box-wrap { position: relative; max-width: 760px; margin: 24px auto 0; z-index: 60; }
.hp-search-box-wrap .hp-search-box { margin: 0; }
.hp-search-dim-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,35,66,0.55);
  z-index: 50;
  transition: opacity .2s ease;
}
.hp-popular-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--hp-white);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  padding: 16px;
  z-index: 1000;
  text-align: left;
  max-height: 600px;
  overflow-y: auto;
}
.hp-popular-popup-header { font-weight: 700; color: var(--hp-blue); margin-bottom: 10px; }
.hp-popular-popup-grid { max-height: none; grid-template-columns: repeat(2, 1fr) !important; }
@media (min-width: 576px) { .hp-popular-popup-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 768px) { .hp-popular-popup-grid { grid-template-columns: repeat(5, 1fr) !important; } }
.hp-autocomplete-wrap { position: relative; flex: 1; }
.hp-autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--hp-white);
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
  text-align: left;
}
.hp-autocomplete-list button {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--hp-white);
  color: var(--hp-gray);
  border: none;
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 14px;
  font-weight: 400;
}
.hp-autocomplete-list button:last-child { border-bottom: none; }
.hp-autocomplete-list button:hover { background: var(--hp-gray-light); color: var(--hp-blue); }

/* ---- Service boxes ---- */
.hp-services-section { padding: 48px 0; background: var(--hp-gray-light); }
.hp-services-section h2 { color: var(--hp-blue); font-weight: 700; text-align: center; margin-bottom: 30px; }
.hp-service-card {
  background: var(--hp-white);
  border-radius: 8px;
  border: 1px solid #eaeaea;
  padding: 18px;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
  display: block;
  color: var(--hp-gray);
}
.hp-service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: var(--hp-orange);
}
.hp-service-card img { width: 48px; height: 48px; margin-bottom: 10px; }
.hp-service-card .name { color: var(--hp-blue); font-weight: 700; }

/* ---- Sponsored badge / carousel ---- */
.hp-sponsored-badge {
  background: var(--hp-orange);
  color: var(--hp-white);
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* ---- Footer ---- */
.hp-footer { background: var(--hp-blue-dark); color: #d9e3ee; padding: 40px 0 20px; margin-top: 40px; }
.hp-footer a { color: #d9e3ee; }
.hp-footer a:hover { color: var(--hp-orange); }
.hp-footer h5 { color: var(--hp-white); font-weight: 700; margin-bottom: 14px; }

/* ---- Breadcrumb nav ---- */
.hp-breadcrumb {
  background: var(--hp-gray-light);
  padding: 10px 0;
  font-size: 0.85rem;
}
.hp-breadcrumb a { color: var(--hp-blue); text-decoration: none; font-weight: 600; }
.hp-breadcrumb a:hover { color: var(--hp-orange); }
.hp-breadcrumb .sep { color: #aaa; margin: 0 6px; }

/* ---- Search results: premium boxes + grid ---- */
.hp-premium-card {
  background: var(--hp-white);
  border: 2px solid var(--hp-orange);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  color: var(--hp-gray);
  transition: transform .15s;
}
.hp-premium-card:hover { transform: translateY(-3px); }
.hp-premium-card .logo-row { padding: 14px; text-align: center; }
.hp-premium-card .logo-row img { height: 50px; }
.hp-premium-card .cover-img { width: 100%; height: 120px; object-fit: cover; }
.hp-premium-card .name { padding: 10px; text-align: center; font-weight: 700; color: var(--hp-blue); }

.hp-grid-card {
  background: var(--hp-white);
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--hp-gray);
  display: block;
}
.hp-grid-card img { height: 40px; margin-bottom: 8px; }
.hp-grid-card .name { color: var(--hp-blue); font-weight: 600; font-size: 0.9rem; }

/* ---- Company profile ---- */
.hp-profile-header { background: var(--hp-gray-light); padding: 30px 0; }
.hp-profile-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--hp-white);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--hp-blue);
  font-weight: 600;
  text-decoration: none;
  margin: 4px 6px 4px 0;
}
.hp-profile-action:hover { border-color: var(--hp-orange); color: var(--hp-orange); }
.hp-promo-box {
  background: var(--hp-white);
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
}
.hp-promo-box img { width: 100%; height: 160px; object-fit: cover; }
.hp-promo-box .title { padding: 10px; font-size: 0.9rem; font-weight: 600; color: var(--hp-blue); }
.hp-gallery-grid img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; transition: transform .15s, box-shadow .15s; }
.hp-gallery-grid img:hover { transform: scale(1.03); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }

/* ---- Search results: sticky lead-capture form + required-field markers ---- */
.hp-quote-form-sticky { position: sticky; top: 16px; }
.hp-req-star { color: var(--hp-orange); font-weight: 700; }
.hp-req-star-invalid { color: #dc3545; }
@media (max-width: 991.98px) {
  .hp-quote-form-sticky { position: static; }
}

/* ---- Global full-screen loading overlay shown while a form (quote request, advertise application, etc.) submits ---- */
.hp-loading-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(255,255,255,0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.hp-loading-spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 5px solid #f3d9c0; border-top-color: var(--hp-orange);
  animation: hp-spin 0.8s linear infinite;
}
.hp-loading-text { margin-top: 16px; font-weight: 600; color: var(--hp-blue); }
@keyframes hp-spin { to { transform: rotate(360deg); } }

/* ---- "Get a Free Quote" section: made to stand out against the page ---- */
.hp-quote-section {
  background: linear-gradient(135deg, #fff8f2 0%, #fff 60%);
  border: 1px solid #f3d9c0;
  border-left: 6px solid var(--hp-orange);
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 6px 24px rgba(242, 106, 33, 0.08);
}

/* ---- Get a Free Quote: 5-step interactive wizard (slides horizontally between steps) ---- */
.hp-wizard-progress { display: flex; align-items: center; justify-content: center; }
.hp-wizard-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: #e9e9e9; color: #888;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.hp-wizard-dot.active { background: var(--hp-orange); color: #fff; }
.hp-wizard-dot.done { background: var(--hp-blue); color: #fff; }
.hp-wizard-line { flex: 1; height: 3px; background: #e9e9e9; max-width: 60px; }
.hp-wizard-viewport { overflow: hidden; transition: height .35s ease; }
.hp-wizard-track {
  display: flex;
  width: 500%; /* 5 steps */
  transition: transform .4s ease;
}
.hp-wizard-step {
  flex: 0 0 20%; /* 1 / 5 steps */
  width: 20%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 4px;
}
.hp-wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }

/* Step headers/descriptions: centered and a bit larger, on every stage */
.hp-wizard-step h5 { text-align: center; font-size: 1.4rem; font-weight: 800; }
.hp-wizard-step > p.text-muted { text-align: center; font-size: 1rem; margin-bottom: 1.25rem !important; }

/* Field labels: bigger and bold, on every stage */
.hp-wizard-step .form-label { font-size: 0.95rem; font-weight: 700; color: var(--hp-blue-dark); margin-bottom: 4px !important; }

.hp-service-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}
@media (min-width: 576px) { .hp-service-checkbox-grid { grid-template-columns: repeat(3, 1fr); } }
.hp-service-checkbox {
  display: flex; align-items: center; gap: 8px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  background: var(--hp-white);
  transition: border-color .15s, background .15s;
}
.hp-service-checkbox:hover { border-color: var(--hp-orange); }
.hp-service-checkbox.checked { border-color: var(--hp-orange); background: #fff4ec; font-weight: 600; }
.hp-service-checkbox input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; }

/* ---- Advertise-with-Us page banner: uploaded image, faded, with text on top ---- */
.hp-advertise-banner {
  background-size: cover;
  background-position: center;
  position: relative;
}
.hp-advertise-banner-overlay {
  background: linear-gradient(rgba(22,59,103,0.72), rgba(22,59,103,0.72));
  padding: 70px 0;
  color: var(--hp-white);
}
.hp-advertise-banner-overlay h1 { font-weight: 800; font-size: 2.2rem; }

/* ---- Advertise page: state map thumbnail hover-zoom + click-to-enlarge (lightbox reused from gallery) ---- */
.hp-state-map-thumb { transition: transform .2s ease, box-shadow .2s ease; }
.hp-state-map-thumb:hover { transform: scale(1.08); box-shadow: 0 8px 20px rgba(0,0,0,0.18); }

/* ---- Interactive job-photo lightbox on the company profile ---- */
.hp-lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 2000;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.hp-lightbox img { max-width: 88vw; max-height: 78vh; border-radius: 6px; }
.hp-lightbox-caption { color: #fff; margin-top: 10px; font-size: .95rem; }
.hp-lightbox-close {
  position: absolute; top: 18px; right: 26px; background: none; border: none; color: #fff;
  font-size: 2rem; line-height: 1; cursor: pointer;
}
.hp-lightbox-prev, .hp-lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none;
  color: #fff; font-size: 1.4rem; padding: 10px 14px; border-radius: 6px; cursor: pointer;
}
.hp-lightbox-prev:hover, .hp-lightbox-next:hover, .hp-lightbox-close:hover { background: rgba(255,255,255,0.3); }
.hp-lightbox-prev { left: 18px; }
.hp-lightbox-next { right: 18px; }

/* ---- Search results grid columns: mobile 2-across, desktop 5-across (premium) / 7-across (grid) ---- */
.hp-premium-col, .hp-grid-col { flex: 0 0 50%; max-width: 50%; }
@media (min-width: 576px) {
  .hp-premium-col { flex: 0 0 33.33%; max-width: 33.33%; }
  .hp-grid-col { flex: 0 0 25%; max-width: 25%; }
}
@media (min-width: 992px) {
  .hp-premium-col { flex: 0 0 20%; max-width: 20%; }
  .hp-grid-col { flex: 0 0 14.28%; max-width: 14.28%; }
}
.hp-promo-col { flex: 0 0 50%; max-width: 50%; }
@media (min-width: 768px) {
  .hp-promo-col { flex: 0 0 25%; max-width: 25%; }
}
