/* ==========================================================================
   Progressive Builders — home.css
   Home (front page) section layouts only. Loads on the front page.
   ========================================================================== */

/* 01 — HERO -------------------------------------------------------------- */
.pb-hero {
  position: relative;
  background-image: var(--pb-hero-img);
  background-size: cover;
  background-position: center;
  color: #fff;
  isolation: isolate;
}
.pb-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.68) 55%,
    rgba(0, 0, 0, 0.42) 100%
  );
  z-index: -1;
}
.pb-hero__inner {
  padding-block: clamp(80px, 13vw, 168px);
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}
.pb-hero__title {
  color: #fff;
  margin-bottom: 20px;
}
.pb-hero__subhead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--pb-light-text);
  line-height: 1.75;
  margin: 0 auto 32px;
  max-width: 62ch;
}
.pb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* 02 — TRUST BAR --------------------------------------------------------- */
.pb-trustbar {
  background: var(--pb-sawdust);
  border-bottom: 1px solid var(--pb-border-amber);
}
.pb-trustbar__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-block: 26px;
}
.pb-trustbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding-inline: 12px;
  border-left: 1px solid var(--pb-border-amber);
}
.pb-trustbar__item:first-child {
  border-left: 0;
}
.pb-trustbar__stat {
  font-family: var(--pb-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pb-navy);
  line-height: 1;
}
.pb-trustbar__label {
  font-size: 0.85rem;
  color: var(--pb-slate);
  line-height: 1.4;
}

/* 03 — SERVICES GRID ----------------------------------------------------- */
.pb-services__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.pb-service-card {
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  color: var(--pb-slate);
}
.pb-service-card__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--pb-radius-sm);
  background: var(--pb-tint);
  color: var(--pb-navy);
  margin-bottom: 18px;
}
.pb-service-card__icon i {
  font-size: 24px;
  line-height: 1;
}
.pb-service-card__title {
  color: var(--pb-head);
  margin-bottom: 10px;
}
.pb-service-card__desc {
  font-size: 0.95rem;
  color: var(--pb-ash);
  flex: 1;
  margin-bottom: 16px;
}
.pb-service-card__more {
  font-family: var(--pb-font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--pb-amber-dark);
}
.pb-service-card:hover .pb-service-card__more {
  color: var(--pb-navy);
}

/* Font Awesome "more" arrows — subtle nudge on hover. */
.pb-service-card__more i,
.pb-project-card__more i,
.pb-areas__link i {
  margin-left: 6px;
  font-size: 0.82em;
  transition: transform 0.25s ease;
}
.pb-service-card:hover .pb-service-card__more i,
.pb-project-card:hover .pb-project-card__more i,
.pb-areas__link:hover i {
  transform: translateX(4px);
}
/* Star icons */
.pb-stars i {
  margin: 0 1px;
}

/* 04 — OUR WORK (single-photo carousel) --------------------------------- */
.pb-featured {
  background: var(--pb-white);
}
.pb-featured .pb-section-title {
  color: var(--pb-head);
}
.pb-carousel {
  position: relative;
  margin-top: 44px;
}
.pb-carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.pb-carousel__track::-webkit-scrollbar {
  display: none;
}
.pb-carousel__slide {
  position: relative;
  flex: 0 0 calc((100% - 40px) / 3); /* 3 per view (two 20px gaps) */
  margin: 0;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  border-radius: var(--pb-radius);
  overflow: hidden;
  box-shadow: var(--pb-shadow-sm);
}
.pb-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.pb-carousel__slide:hover img {
  transform: scale(1.05);
}
.pb-carousel__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 44px 20px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35) 55%, transparent);
  color: #fff;
}
.pb-carousel__badge {
  font-family: var(--pb-font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: var(--pb-primary);
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.pb-carousel__title {
  font-family: var(--pb-font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.25;
}
.pb-carousel__meta {
  font-size: 0.74rem;
  color: var(--pb-light-text);
}
.pb-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--pb-dark);
  box-shadow: var(--pb-shadow-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease !important;
}
.pb-carousel__nav:hover,
.pb-carousel__nav:focus {
  background: var(--pb-primary);
  color: #fff;
}
.pb-carousel__nav--prev {
  left: 12px;
}
.pb-carousel__nav--next {
  right: 12px;
}
.pb-carousel__nav:disabled {
  opacity: 0;
  pointer-events: none;
}
.pb-featured__cta {
  margin-top: 40px;
}

/* 05 — WHY US ------------------------------------------------------------ */
.pb-why {
  background: var(--pb-ivory);
}
.pb-why .pb-section-title {
  color: var(--pb-head);
}
.pb-why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 44px;
}
.pb-why__item {
  background: var(--pb-white);
  border: 1px solid var(--pb-border);
  border-top: 3px solid var(--pb-amber);
  border-radius: var(--pb-radius);
  padding: 28px 24px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.pb-why__item:hover {
  transform: translateY(-6px);
  box-shadow: var(--pb-shadow-lg);
}
.pb-why__num {
  display: block;
  font-size: 1.1rem;
  color: var(--pb-amber);
  font-weight: 700;
  margin-bottom: 12px;
}
.pb-why__title {
  color: var(--pb-head);
  margin-bottom: 10px;
}
.pb-why__desc {
  font-size: 0.95rem;
  color: var(--pb-ash);
}

/* 06 — TESTIMONIALS ------------------------------------------------------ */
.pb-testimonials {
  background: var(--pb-navy);
}
.pb-testimonials .pb-section-title {
  color: #fff;
}
.pb-testimonials__rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.pb-testimonials__rating-text {
  color: var(--pb-light-text);
  font-size: 0.85rem;
}
.pb-stars {
  color: var(--pb-amber);
  letter-spacing: 2px;
  font-size: 1rem;
}
.pb-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}
.pb-testimonial {
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Testimonials are .pb-card, so they inherit the shared lift-on-hover. */
.pb-testimonial__quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--pb-slate);
  font-style: italic;
  margin: 0;
  flex: 1;
}
.pb-testimonial__cite {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pb-testimonial__name {
  font-family: var(--pb-font-display);
  font-weight: 600;
  color: var(--pb-head);
}
.pb-testimonial__meta {
  font-size: 0.75rem;
  color: var(--pb-ash);
}

/* 07 — SERVICE AREAS STRIP ---------------------------------------------- */
.pb-areas {
  background: var(--pb-white);
}
.pb-areas .pb-section-title {
  color: var(--pb-head);
}
.pb-areas__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px auto 22px;
  max-width: 760px;
}
.pb-areas__note {
  color: var(--pb-ash);
  max-width: 56ch;
  margin: 0 auto 16px;
}
.pb-areas__link {
  font-family: var(--pb-font-display);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--pb-amber-dark);
}
.pb-areas__link:hover {
  color: var(--pb-navy);
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .pb-services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pb-why__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 820px) {
  .pb-trustbar__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
  .pb-trustbar__item:nth-child(3) {
    border-left: 0;
  }
  .pb-carousel__slide {
    flex-basis: calc((100% - 20px) / 2); /* 2 per view (one 20px gap) */
  }
  .pb-testimonials__grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .pb-services__grid {
    grid-template-columns: 1fr; /* one "What We Build" card per row on mobile */
  }
  .pb-carousel__slide {
    flex-basis: 82%; /* one prominent slide, next one peeking */
  }
  .pb-carousel__nav {
    display: none; /* swipe on touch */
  }
  .pb-why__grid {
    grid-template-columns: 1fr;
  }
  .pb-trustbar__item {
    border-left: 0;
  }
  .pb-hero__actions .pb-btn {
    flex: 1 1 auto;
  }
}
