/* Phillips360 Modern V2.033 — focused homepage refinements.
   This layer loads only on the modern homepage, after final-polish.css and
   before accessibility.css. It keeps the approved changes isolated from
   payment, legacy templates, integrations, and administrator screens. */

/* Why Phillips360: wider, equal-size cards with readable service headings. */
body.p360-site .p360-value-grid {
  --p360-home-card-gap: clamp(18px, 2vw, 28px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--p360-home-card-gap);
}
body.p360-site .p360-value-card,
body.p360-site .p360-value-card:nth-child(n+5) {
  display: flex;
  min-height: clamp(340px, 31vw, 430px);
  height: 100%;
  padding: clamp(28px, 3.2vw, 44px);
  grid-column: auto;
  flex-direction: column;
}
body.p360-site .p360-value-card:last-child:nth-child(odd) {
  width: calc(50% - (var(--p360-home-card-gap) / 2));
  grid-column: 1 / -1;
  justify-self: center;
}
body.p360-site .p360-value-card__icon {
  margin: clamp(26px, 3.2vw, 42px) 0 clamp(22px, 2.7vw, 34px);
}
body.p360-site .p360-value-card h3 {
  max-width: none;
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 1.8vw, 2.05rem);
  letter-spacing: -.028em;
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
body.p360-site .p360-value-card p { margin-bottom: 0; }

/* Client ribbon: stronger theme-consistent label and larger logo slots. */
body.p360-site .p360-clients__heading span {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--p360-accent) 34%, transparent);
  border-radius: var(--p360-control-radius);
  background: color-mix(in srgb, var(--p360-accent) 11%, transparent);
  color: var(--p360-accent-strong);
  font-size: clamp(.76rem, .82vw, .9rem);
  font-weight: 820;
  letter-spacing: .105em;
}
body.p360-site .p360-clients__heading span::before {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--p360-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--p360-accent) 14%, transparent);
  content: "";
}
body.p360-site .p360-logo-marquee__item {
  width: clamp(210px, 19vw, 300px);
  height: 158px;
  padding: 24px 30px;
}
body.p360-site .p360-logo-marquee__item img {
  max-width: 205px;
  max-height: 90px;
  opacity: .7;
}

/* Featured Work: preserve each source image's intrinsic aspect ratio. */
body.p360-site .p360-work-card__media,
body.p360-site .p360-work-card--featured .p360-work-card__media {
  aspect-ratio: auto;
  background: rgba(8, 17, 26, .08);
}
body.p360-site .p360-work-card__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  transform: none;
}
body.p360-site .p360-work-card__media:hover img {
  filter: saturate(1.04);
  transform: none;
}

@media (max-width: 760px) {
  body.p360-site .p360-value-grid { grid-template-columns: 1fr; }
  body.p360-site .p360-value-card,
  body.p360-site .p360-value-card:nth-child(n+5),
  body.p360-site .p360-value-card:last-child:nth-child(odd) {
    width: 100%;
    min-height: 0;
    grid-column: auto;
  }
  body.p360-site .p360-logo-marquee__item {
    width: 190px;
    height: 138px;
    padding: 22px 26px;
  }
  body.p360-site .p360-logo-marquee__item img {
    max-width: 165px;
    max-height: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.p360-site .p360-logo-marquee__item img,
  body.p360-site .p360-work-card__media img { transform: none !important; }
}

/* V2.040 homepage-only mobile/responsiveness refinements ------------------ */
/* Hide the source Google Reviews plugin's duplicate/top navigation controls.
   The theme-owned controls below the cards remain the only active controls. */
body.p360-site .p360-reviews__embed :where(
  .grw-slider-btns,
  .grw-slider-prev,
  .grw-slider-next,
  .grw-slider-dots,
  .grw-slider-controls,
  .grw-slider-pagination,
  .rplg-slider-prev,
  .rplg-slider-next,
  .rplg-slider-dots,
  .rplg-slider-controls,
  .rplg-slider-pagination,
  .wp-google-slider-controls,
  .owl-controls,
  .owl-nav,
  .owl-dots,
  .slick-arrow,
  .slick-dots
) {
  display: none !important;
}

/* Increase contrast of the retained Google business/place summary such as
   “Phillips360 - Tulsa Web Design”, without changing plugin content. */
body.p360-site .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-businesses, .rplg-business) {
  padding: clamp(16px, 2vw, 24px) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 18px !important;
  background: rgba(0,0,0,.34) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.18) !important;
}
body.p360-site .p360-reviews__embed :where(.wp-google-name, .wp-google-name a, .grw-place-name, .grw-place-name a, .grw-header-title, .rplg-business-name, .rplg-business-name a) {
  color: #fff !important;
  opacity: 1 !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 12px rgba(0,0,0,.72) !important;
}

@media (max-width: 640px) {
  /* Phone Video / Designed in Motion */
  body.p360-site .p360-experience .p360-section-heading h2 {
    font-size: clamp(2.15rem, 10.5vw, 3.35rem) !important;
    line-height: 1 !important;
  }
  body.p360-site .p360-experience .p360-section-heading__copy p,
  body.p360-site .p360-experience .p360-story-step p {
    font-size: .98rem !important;
    line-height: 1.65 !important;
  }
  body.p360-site .p360-experience .p360-story-step h3 {
    font-size: clamp(2rem, 9.2vw, 2.85rem) !important;
    line-height: 1.02 !important;
  }
  body.p360-site .p360-experience .p360-story-step { padding: 24px 20px; }

  /* Why Phillips360 */
  body.p360-site .p360-intro .p360-section-heading h2 {
    font-size: clamp(2.2rem, 10.7vw, 3.45rem) !important;
    line-height: 1 !important;
  }
  body.p360-site .p360-intro .p360-section-heading__copy p,
  body.p360-site .p360-intro .p360-value-card p {
    font-size: .98rem !important;
    line-height: 1.65 !important;
  }
  body.p360-site .p360-intro .p360-value-card h3 {
    font-size: clamp(1.45rem, 7.4vw, 2rem) !important;
    line-height: 1.1 !important;
  }
  body.p360-site .p360-value-card,
  body.p360-site .p360-value-card:nth-child(n+5),
  body.p360-site .p360-value-card:last-child:nth-child(odd) {
    padding: 24px 20px;
  }

  /* Capabilities */
  body.p360-site .p360-services .p360-section-heading h2 {
    font-size: clamp(2.2rem, 10.7vw, 3.45rem) !important;
    line-height: 1 !important;
  }
  body.p360-site .p360-services .p360-section-heading__copy p {
    font-size: .98rem !important;
    line-height: 1.65 !important;
  }
  body.p360-site .p360-services .p360-service-card { min-height: 390px; }
  body.p360-site .p360-services .p360-service-card__content { padding: 24px 20px; }
  body.p360-site .p360-services .p360-service-card h3 {
    font-size: clamp(2rem, 10.2vw, 3rem) !important;
    line-height: .98 !important;
  }
  body.p360-site .p360-services .p360-service-card p {
    font-size: .9rem !important;
    line-height: 1.55 !important;
  }

  /* Featured Work */
  body.p360-site .p360-work .p360-section-heading h2 {
    font-size: clamp(2.25rem, 11vw, 3.55rem) !important;
    line-height: 1 !important;
  }
  body.p360-site .p360-work .p360-section-heading__copy p,
  body.p360-site .p360-work-card__meta p {
    font-size: .95rem !important;
    line-height: 1.6 !important;
  }
  body.p360-site .p360-work-card__meta h3 {
    font-size: clamp(1.7rem, 8.8vw, 2.55rem) !important;
    line-height: 1.05 !important;
  }

  /* Client Perspective */
  body.p360-site .p360-reviews__heading,
  body.p360-site .p360-reviews__top h2 {
    font-size: clamp(2.2rem, 10.4vw, 3.35rem) !important;
    line-height: 1 !important;
  }
  body.p360-site .p360-reviews__quote blockquote {
    font-size: clamp(1.75rem, 8.7vw, 2.6rem) !important;
    line-height: 1.08 !important;
  }
  body.p360-site .p360-reviews__quote p {
    font-size: .96rem !important;
    line-height: 1.65 !important;
  }

  /* Mobile reviews must show complete card text instead of clipping it to a
     fixed card height / line clamp. */
  body.p360-site .p360-reviews__embed.is-p360-review-carousel {
    --p360-review-card-height: auto;
    --p360-review-card-padding: 20px;
  }
  body.p360-site .p360-review-carousel__item {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body.p360-site .p360-review-card { height: auto; }
  body.p360-site .p360-review-card__excerpt {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    font-size: .94rem !important;
    line-height: 1.6 !important;
  }
  body.p360-site .p360-review-card__footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  /* Direct Contact */
  body.p360-site .p360-contact__headline h2 {
    max-width: 100%;
    font-size: clamp(2.35rem, 11.2vw, 3.7rem) !important;
    line-height: .98 !important;
    overflow-wrap: anywhere;
  }
  body.p360-site .p360-contact__round-link {
    width: 108px;
    height: 108px;
    margin-top: 24px;
    padding: 18px;
  }
  body.p360-site .p360-contact__grid { gap: 26px; }
  body.p360-site .p360-contact__details,
  body.p360-site .p360-contact__form { min-width: 0; }
  body.p360-site .p360-contact__details h3 {
    font-size: clamp(1.75rem, 8vw, 2.35rem) !important;
  }
  body.p360-site .p360-contact__details a,
  body.p360-site .p360-contact__details address {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  body.p360-site .p360-contact__form { padding: 20px; }
  body.p360-site .p360-contact__form-intro p {
    font-size: .94rem !important;
    line-height: 1.6 !important;
  }

  /* Footer: center every content column and nested menu on phones. */
  body.p360-site .p360-footer__inner,
  body.p360-site .p360-footer__brand,
  body.p360-site .p360-footer__navigation-column,
  body.p360-site .p360-footer__meta,
  body.p360-site .p360-footer__bottom,
  body.p360-site .p360-footer__bottom-group {
    align-items: center !important;
    text-align: center !important;
  }
  body.p360-site .p360-footer__brand,
  body.p360-site .p360-footer__navigation-column,
  body.p360-site .p360-footer__meta { justify-items: center; }
  body.p360-site .p360-footer__nav-list { justify-items: center; }
  body.p360-site .p360-footer__nav-list > li,
  body.p360-site .p360-footer__nav-list .sub-menu { text-align: center; }
  body.p360-site .p360-footer__nav-list .sub-menu {
    padding-left: 0;
    border-left: 0;
  }
  body.p360-site .p360-footer__bottom {
    align-items: center !important;
    justify-content: center;
  }
  body.p360-site .p360-footer__bottom-group {
    align-items: center !important;
  }
}

/* V2.041 homepage mobile heading/reflow correction ------------------------
   The global visual-system stylesheet intentionally loads after responsive.css
   and restores the desktop split-grid columns. On narrow viewports this can
   collapse the first column to only a few pixels; accessibility wrapping then
   renders section headings one character per line. These homepage-only rules
   reassert the intended single-column structure after final-polish/visual-system. */
@media (max-width: 900px) {
  body.p360-site .p360-section-heading--split,
  body.p360-site .p360-reviews__top,
  body.p360-site .p360-reviews__quote,
  body.p360-site .p360-contact__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    min-width: 0;
  }

  body.p360-site .p360-section-heading--split > *,
  body.p360-site .p360-reviews__top > *,
  body.p360-site .p360-reviews__quote > *,
  body.p360-site .p360-contact__grid > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.p360-site .p360-section-heading h2,
  body.p360-site .p360-reviews__heading,
  body.p360-site .p360-reviews__top h2,
  body.p360-site .p360-contact__headline h2 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
  }
}

@media (max-width: 640px) {
  /* Keep every homepage section title readable within a 320px viewport. */
  body.p360-site .p360-section-heading h2,
  body.p360-site .p360-reviews__heading,
  body.p360-site .p360-reviews__top h2 {
    font-size: clamp(2rem, 9.4vw, 3rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -.04em;
  }

  body.p360-site .p360-contact__headline h2 {
    font-size: clamp(2.1rem, 9.8vw, 3.1rem) !important;
    line-height: 1.02 !important;
  }

  /* The footer is the visible mobile location of “Start a project” because the
     desktop header CTA is hidden below 1180px. Keep it compact and tappable. */
  body.p360-site .p360-footer__meta .p360-button.p360-button--small {
    min-height: 44px;
    width: auto;
    max-width: 100%;
    padding: 9px 13px 9px 15px;
    gap: 10px;
    font-size: .66rem !important;
    line-height: 1.15;
    letter-spacing: .035em;
    white-space: nowrap;
  }
}


/* V2.042 homepage mobile header CTA refinement -----------------------------
   The header CTA is normally hidden by the responsive navigation breakpoint,
   but this keeps its typography/padding phone-safe if a retained/custom header
   rule makes it visible. Scoped to the homepage asset only. */
@media (max-width: 900px) {
  body.p360-site.home .p360-header__cta.p360-button--small {
    min-height: 44px;
    max-width: min(48vw, 158px);
    padding: 8px 10px 8px 12px !important;
    gap: 7px !important;
    font-size: clamp(.56rem, 2.15vw, .66rem) !important;
    line-height: 1.1 !important;
    letter-spacing: .025em !important;
    white-space: nowrap;
  }

  body.p360-site.home .p360-header__cta.p360-button--small span:first-child {
    font-size: inherit !important;
    line-height: inherit !important;
  }
}

@media (max-width: 480px) {
  body.p360-site.home .p360-header__cta.p360-button--small {
    max-width: 142px;
    padding-inline: 9px 10px !important;
    gap: 6px !important;
    font-size: clamp(.52rem, 2.6vw, .61rem) !important;
  }
}

/* V2.046 — homepage Client Perspective source-summary hardening -----------
   Some Google Reviews plugin builds paint the business-name anchor with a
   nested text-fill color and inject source navigation directly inside the
   business summary. Keep the business link readable and remove only those
   source controls; the theme-owned carousel controls below remain untouched. */
body.p360-site.home .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-business) :where(
  .wp-google-name,
  .wp-google-name a,
  .grw-place-name,
  .grw-place-name a,
  .grw-header-title,
  .grw-header-title a,
  .rplg-business-name,
  .rplg-business-name a,
  a[href*="maps.google"],
  a[href*="google.com/maps"],
  a[href*="google.com/?cid"],
  a[href*="maps.app.goo.gl"]
),
body.p360-site.home .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-business) :where(
  .wp-google-name,
  .wp-google-name a,
  .grw-place-name,
  .grw-place-name a,
  .grw-header-title,
  .grw-header-title a,
  .rplg-business-name,
  .rplg-business-name a,
  a[href*="maps.google"],
  a[href*="google.com/maps"],
  a[href*="google.com/?cid"],
  a[href*="maps.app.goo.gl"]
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
body.p360-site.home .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-business) :where(button, [role="button"]) {
  display: none !important;
}

/* V2.046 — remove late Google Reviews source navigation -------------------
   Plugin-native navigation can be injected after the theme carousel is ready.
   Hide known plugin controls unconditionally inside the homepage review embed;
   never hide the theme-owned .p360-review-carousel__button controls below. */
body.p360-site.home .p360-reviews__embed :where(
  .grw-btns, .grw-prev, .grw-next,
  .grw-slider-btns, .grw-slider-prev, .grw-slider-next, .grw-slider-controls, .grw-slider-pagination,
  .rplg-slider-btns, .rplg-slider-prev, .rplg-slider-next, .rplg-slider-controls, .rplg-slider-pagination,
  .wp-google-slider-controls, .wp-google-prev, .wp-google-next,
  .owl-controls, .owl-nav, .owl-prev, .owl-next, .owl-dots,
  .slick-arrow, .slick-prev, .slick-next, .slick-dots,
  .swiper-button-prev, .swiper-button-next,
  [class*="slider-prev"], [class*="slider-next"],
  [class*="review-prev"], [class*="review-next"],
  [class*="carousel-prev"], [class*="carousel-next"]
):not(.p360-review-carousel__button) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
