/* Phillips360 Modern V2.043 — sitewide responsive + contrast hardening
   --------------------------------------------------------------------------
   Scope: homepage, testimonials/reviews, Services list/detail, Blog/archive,
   Contact, Portfolio/project cards, generic Pages, retained legacy sections,
   and the shared footer/header. Loaded after page-specific experience layers
   and before accessibility safeguards so it can normalize the final cascade.
*/

/* Resilient reflow -------------------------------------------------------- */
body.p360-site :where(main, section, article, aside, header, footer, nav, div) { min-width: 0; }
body.p360-site :where(h1, h2, h3, h4, h5, h6, p, li, dd, dt, blockquote, address, a) {
  overflow-wrap: anywhere;
  word-break: normal;
}
body.p360-site :where(img, video, iframe, embed, object, svg) { max-width: 100%; }
body.p360-site :where(table) { max-width: 100%; }
body.p360-site :where(pre) { max-width: 100%; overflow-x: auto; }
body.p360-site :where(.p360-entry-content, .p360-content-section, .p360-content-archive) :where(iframe, video) {
  width: 100%;
}

/* Contrast normalization ------------------------------------------------- */
body.p360-site {
  --p360-text-dark-muted: #39444e;
  --p360-text-light-muted: #d9e2e8;
  --p360-muted: var(--p360-text-dark-muted);
}

/* Opaque light surfaces prevent muted copy from sitting on washed-out cards. */
body.p360-site :where(
  .p360-post-card,
  .p360-project-card,
  .p360-empty-state,
  .p360-service-scope__panel,
  .p360-contact__form,
  .p360-form-fallback
) {
  background: #fff;
  color: var(--p360-ink);
}

body.p360-site :where(
  .p360-content-section,
  .p360-content-archive,
  .p360-contact,
  .p360-service-index-intro,
  .p360-service-sales-hero,
  .p360-service-scope,
  .p360-service-fit,
  .p360-service-faq,
  .p360-service-related
) :where(p, li, address, .p360-post-card__excerpt) {
  color: var(--p360-text-dark-muted);
}

body.p360-site :where(.p360-post-card__meta, .p360-entry-meta, .text-muted) {
  color: var(--p360-text-dark-muted) !important;
}

body.p360-site :where(
  .p360-section--dark,
  .p360-reviews,
  .p360-service-directory,
  .p360-service-collaboration,
  .p360-service-use-cases,
  .p360-service-process,
  .p360-inner-services,
  .p360-footer
) :where(p, li, small, address) {
  color: var(--p360-text-light-muted);
}

body.p360-site .p360-section-heading--light .p360-section-heading__copy p,
body.p360-site .p360-service-directory__header > p,
body.p360-site .p360-service-directory__body p,
body.p360-site .p360-service-process__header > p,
body.p360-site .p360-service-process__steps p,
body.p360-site .p360-service-collaboration__steps p,
body.p360-site .p360-inner-services__header > p,
body.p360-site .p360-inner-service-card p,
body.p360-site .p360-reviews__quote p {
  color: var(--p360-text-light-muted) !important;
}

/* Reviews/testimonials: dark card + clearly readable copy on every page. */
body.p360-site .p360-review-carousel__item,
body.p360-site .p360-review-card {
  border-color: rgba(255,255,255,.18) !important;
  background: #111d28 !important;
  color: #fff !important;
}
body.p360-site .p360-review-card :where(p, span, time),
body.p360-site .p360-review-carousel__item :where(p, span, time) {
  color: var(--p360-text-light-muted) !important;
}
body.p360-site .p360-review-card :where(h3, h4, strong, a),
body.p360-site .p360-review-carousel__item :where(h3, h4, strong, a) {
  color: #fff !important;
}
body.p360-site .p360-review-score {
  border-color: rgba(255,255,255,.18);
  background: rgba(4,12,18,.76);
  color: #fff;
}
body.p360-site .p360-review-score p { color: var(--p360-text-light-muted) !important; }

/* Forms always use dark input copy on an opaque light input surface. */
body.p360-site :where(.p360-contact, .footer_form) :where(
  input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  textarea,
  select,
  .form-control
) {
  border-color: rgba(8,17,26,.30);
  background: #fff !important;
  color: #08111a !important;
}
body.p360-site :where(.p360-contact, .footer_form) :where(input, textarea)::placeholder {
  color: #4c5862 !important;
  opacity: 1 !important;
}
body.p360-site .p360-contact .wpcf7 label { color: #26333d; }

/* Retained light legacy sections: remove pale-on-pale combinations. */
body.p360-site .Bck_color { background: #fff; color: var(--p360-ink); }
body.p360-site :where(.p360_section_pragh, .Mrgn_top_prgh, .wraping_pargh, .p_stn_prgah) {
  color: var(--p360-text-dark-muted) !important;
}
body.p360-site .clients_section { color: var(--p360-ink); }

/* Inner hero responsive type --------------------------------------------- */
@media (max-width: 900px) {
  body.p360-site .p360-inner-hero { min-height: clamp(420px, 72svh, 620px); }
  body.p360-site .p360-inner-hero__content { padding-top: 126px; padding-bottom: 52px; }
  body.p360-site .p360-inner-hero h1 {
    max-width: 100%;
    font-size: clamp(2.7rem, 9.2vw, 5.2rem);
    line-height: .98;
  }
}
@media (max-width: 640px) {
  body.p360-site .p360-inner-hero { min-height: clamp(390px, 64svh, 540px); }
  body.p360-site .p360-inner-hero__content { padding-top: 108px; padding-bottom: 42px; }
  body.p360-site .p360-inner-hero h1 { font-size: clamp(2.25rem, 11.5vw, 3.7rem); }
}

/* Generic Page, Blog and Portfolio reflow -------------------------------- */
@media (max-width: 900px) {
  body.p360-site .p360-content-section,
  body.p360-site .p360-content-archive {
    padding-block: clamp(48px, 8vw, 76px);
  }
  body.p360-site .p360-post-list,
  body.p360-site .p360-project-list { grid-template-columns: 1fr !important; }
  body.p360-site .p360-content-title { font-size: clamp(2.35rem, 8vw, 4.3rem); }
}
@media (max-width: 640px) {
  body.p360-site .p360-content-section,
  body.p360-site .p360-content-archive { padding-block: 42px; }
  body.p360-site .p360-content-title {
    margin-bottom: 28px;
    font-size: clamp(2rem, 10vw, 3.15rem);
  }
  body.p360-site .p360-post-card__body { padding: 22px; }
  body.p360-site .p360-post-card h2,
  body.p360-site .p360-project-card h2 { font-size: clamp(1.55rem, 8.4vw, 2.35rem); }
  body.p360-site .p360-post-card__media { aspect-ratio: 4 / 3; }
  body.p360-site .p360-project-card__actions,
  body.p360-site .p360-empty-state__actions { align-items: stretch; flex-direction: column; }
  body.p360-site .p360-project-card__actions .p360-text-link,
  body.p360-site .p360-empty-state__actions .p360-button { width: 100%; }
  body.p360-site .p360-entry-content :where(h2) { font-size: clamp(1.85rem, 9vw, 2.8rem); }
  body.p360-site .p360-entry-content :where(h3) { font-size: clamp(1.5rem, 7vw, 2.15rem); }
}

/* Services list + detail ------------------------------------------------- */
@media (max-width: 900px) {
  body.p360-site :where(
    .p360-service-index-intro__grid,
    .p360-service-directory__header,
    .p360-service-collaboration__grid,
    .p360-service-sales-hero__grid,
    .p360-service-scope__grid,
    .p360-service-process__header,
    .p360-service-fit__grid,
    .p360-service-faq__grid,
    .p360-service-conversion__inner
  ) { grid-template-columns: 1fr !important; }
  body.p360-site :where(
    .p360-service-index-intro h2,
    .p360-service-directory__header h2,
    .p360-service-collaboration h2,
    .p360-service-sales-hero__copy h1,
    .p360-service-scope__content h2,
    .p360-service-process__header h2,
    .p360-service-fit h2,
    .p360-service-faq h2,
    .p360-service-conversion h2
  ) { font-size: clamp(2.45rem, 8.2vw, 4.9rem); }
  body.p360-site .p360-service-scope__panel { position: static; }
  body.p360-site .p360-service-process__steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  body.p360-site :where(
    .p360-service-index-intro h2,
    .p360-service-directory__header h2,
    .p360-service-collaboration h2,
    .p360-service-sales-hero__copy h1,
    .p360-service-scope__content h2,
    .p360-service-process__header h2,
    .p360-service-fit h2,
    .p360-service-faq h2,
    .p360-service-conversion h2,
    .p360-service-use-cases__header h2,
    .p360-service-related__header h2,
    .p360-service-testimonials__top h2
  ) {
    font-size: clamp(2rem, 10vw, 3.25rem) !important;
    line-height: 1;
  }
  body.p360-site .p360-service-directory__card a { padding: 26px 0; }
  body.p360-site .p360-service-directory__body h3 { font-size: clamp(1.45rem, 7vw, 2.15rem); }
  body.p360-site .p360-service-process__steps { grid-template-columns: 1fr; }
  body.p360-site .p360-service-sales-hero__visual { min-height: min(112vw, 430px); }
  body.p360-site .p360-service-scope__panel { padding: 24px 20px; }
  body.p360-site .p360-service-fit__list li { grid-template-columns: 34px minmax(0,1fr); }
  body.p360-site .p360-service-faq summary { padding-right: 48px; }
  body.p360-site .p360-service-faq details p { padding-right: 0; }
  body.p360-site .p360-service-conversion__inner { padding: 28px 22px; }
  body.p360-site :where(.p360-service-sales-hero__actions, .p360-service-conversion__actions) {
    width: 100%;
    align-items: stretch;
  }
  body.p360-site :where(.p360-service-sales-hero__actions, .p360-service-conversion__actions) .p360-button {
    width: 100%;
  }
}

/* Homepage sections ------------------------------------------------------ */
@media (max-width: 900px) {
  body.p360-site.home :where(.p360-section-heading--split, .p360-reviews__top, .p360-reviews__quote, .p360-contact__grid) {
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.p360-site.home .p360-section-heading h2,
  body.p360-site.home .p360-reviews__heading,
  body.p360-site.home .p360-reviews__top h2,
  body.p360-site.home .p360-contact__headline h2 {
    max-width: 100%;
    font-size: clamp(2.35rem, 8vw, 4.5rem) !important;
  }
  body.p360-site.home .p360-service-grid,
  body.p360-site.home .p360-work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body.p360-site.home .p360-section { padding-block: clamp(50px, 13vw, 72px); }
  body.p360-site.home .p360-section-heading h2,
  body.p360-site.home .p360-reviews__heading,
  body.p360-site.home .p360-reviews__top h2,
  body.p360-site.home .p360-contact__headline h2 {
    font-size: clamp(2rem, 10vw, 3.15rem) !important;
    line-height: 1 !important;
  }
  body.p360-site.home .p360-service-card { min-height: min(128vw, 500px); }
  body.p360-site.home .p360-service-card h3 { font-size: clamp(2rem, 10vw, 3rem) !important; }
  body.p360-site.home .p360-work-card__meta h3 { font-size: clamp(1.65rem, 8vw, 2.45rem) !important; }
  body.p360-site.home .p360-contact__round-link {
    width: 112px;
    height: 112px;
    padding: 18px;
    font-size: .7rem;
  }
}

/* Testimonials/reviews --------------------------------------------------- */
@media (max-width: 900px) {
  body.p360-site .p360-reviews__top,
  body.p360-site .p360-reviews__quote,
  body.p360-site .p360-service-testimonials__top { grid-template-columns: 1fr !important; }
  body.p360-site .p360-reviews__embed { max-width: 100%; }
}
@media (max-width: 640px) {
  body.p360-site .p360-reviews__embed.is-p360-review-carousel {
    --p360-review-columns: 1 !important;
    --p360-review-card-height: auto !important;
  }
  body.p360-site .p360-review-carousel__track { grid-auto-columns: 100% !important; }
  body.p360-site .p360-review-carousel__item,
  body.p360-site .p360-review-card { min-height: 0 !important; height: auto !important; }
  body.p360-site .p360-review-card__excerpt {
    display: block !important;
    overflow: visible !important;
    -webkit-box-orient: initial !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
  }
  body.p360-site .p360-review-carousel__controls { grid-template-columns: 46px minmax(0,1fr) 46px; }
  body.p360-site .p360-review-carousel__button { width: 46px; height: 46px; }
}

/* Contact ---------------------------------------------------------------- */
@media (max-width: 900px) {
  body.p360-site .p360-contact__grid { grid-template-columns: 1fr !important; gap: 38px; }
  body.p360-site .p360-contact__round-link { position: static; margin-top: 28px; }
  body.p360-site .p360-contact__details { padding-top: 0; }
  body.p360-site .p360-contact__details :where(a, address) { overflow-wrap: anywhere; }
  body.p360-site .p360-contact__form { min-width: 0; }
}
@media (max-width: 640px) {
  body.p360-site .p360-contact__headline h2 { font-size: clamp(2.1rem, 10.5vw, 3.3rem) !important; }
  body.p360-site .p360-contact__form { padding: 20px; border-radius: 22px; }
  body.p360-site .p360-contact .wpcf7 :where(input, textarea, select) { width: 100%; max-width: 100%; }
  body.p360-site .p360-contact .wpcf7 input[type="submit"] { width: 100%; }
  body.p360-site .p360-contact__details a { font-size: .98rem; }
}

/* Footer ----------------------------------------------------------------- */
@media (max-width: 900px) {
  body.p360-site .p360-footer__inner { grid-template-columns: 1fr 1fr; }
  body.p360-site .p360-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body.p360-site .p360-footer__inner { grid-template-columns: 1fr !important; text-align: center; }
  body.p360-site .p360-footer__brand,
  body.p360-site .p360-footer__navigation-column,
  body.p360-site .p360-footer__meta { align-items: center; justify-items: center; text-align: center; }
  body.p360-site .p360-footer__nav-list { grid-template-columns: 1fr !important; justify-items: center; }
  body.p360-site .p360-footer__nav-list :where(li, a) { text-align: center; }
  body.p360-site .p360-footer__bottom,
  body.p360-site .p360-footer__bottom-group { align-items: center; justify-content: center; text-align: center; }
  body.p360-site .p360-footer__bottom { flex-direction: column; }
  body.p360-site .p360-footer__bottom-group { flex-direction: column; }
  body.p360-site .p360-footer__meta .p360-button { width: auto; max-width: 100%; }
}

/* Bootstrap/legacy safety for retained templates ------------------------- */
@media (max-width: 767px) {
  body.p360-site :where(.container, .container-fluid) { max-width: 100%; }
  body.p360-site .row { margin-right: -10px; margin-left: -10px; }
  body.p360-site .row > [class*="col-"] { padding-right: 10px; padding-left: 10px; }
  body.p360-site :where(.wraping_pargh, .Mrgn_top_prgh) { width: 100%; max-width: 100%; }
}

/* V2.044 — Google business summary contrast + alignment --------------------
   The reviews plugin can inject its own muted/dark colors after initial theme
   styles. Keep the source data untouched, but make the retained business
   summary readable and centered on every review-enabled page. */
body.p360-site .p360-reviews__embed :where(.rplg-businesses) {
  width: 100% !important;
  margin-inline: auto !important;
  text-align: center !important;
}
body.p360-site .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-business) {
  box-sizing: border-box !important;
  width: min(100%, 560px) !important;
  max-width: 560px !important;
  margin: 0 auto clamp(24px, 3vw, 38px) !important;
  padding: clamp(20px, 3vw, 30px) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 20px !important;
  background: #101d27 !important;
  color: #f7fafc !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.28) !important;
  text-align: center !important;
}
body.p360-site .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-business) :where(
  div, p, span, small, strong, b, em, a,
  .wp-google-name, .wp-google-name a, .wp-google-rating, .wp-google-based, .wp-google-powered,
  .grw-place-name, .grw-place-name a, .grw-header-title, .grw-rating, .grw-based-text, .grw-powered,
  .rplg-business-name, .rplg-business-name a, .rplg-rating, .rplg-based-text, .rplg-powered
) {
  color: #f7fafc !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
body.p360-site .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,
  .rplg-business-name, .rplg-business-name a
) {
  font-weight: 800 !important;
}
body.p360-site .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-business) :where(
  .wp-google-based, .wp-google-powered, .grw-based-text, .grw-powered, .rplg-based-text, .rplg-powered
) {
  color: #dfe8ee !important;
}
body.p360-site .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-business) :where(
  .wp-google-stars, .wp-star, .grw-stars, .rplg-stars
) {
  color: #fbbc04 !important;
}
body.p360-site .p360-reviews__embed :where(.wp-google-place, .grw-place, .grw-header, .rplg-business) :where(
  .wp-google-left, .wp-google-right, .grw-place-info, .grw-header-inner,
  .rplg-business-info, .rplg-business-details
) {
  margin-inline: auto !important;
  text-align: center !important;
  justify-content: center !important;
}

/* Remove only source/plugin navigation. The theme-owned controls below the
   review cards remain visible and functional. */
body.p360-site .p360-reviews__embed :where(
  .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-dots, .slick-arrow, .slick-dots,
  button[class*="slider-prev"], button[class*="slider-next"],
  a[class*="slider-prev"], a[class*="slider-next"],
  button[class*="review-prev"], button[class*="review-next"],
  a[class*="review-prev"], a[class*="review-next"]
) {
  display: none !important;
}

/* Keep the shared footer CTA label black on hover/focus even after later
   sitewide link-color rules. */
body.p360-site .p360-footer__meta .p360-button:hover,
body.p360-site .p360-footer__meta .p360-button:focus-visible,
body.p360-site .p360-footer__meta .p360-button:hover > *,
body.p360-site .p360-footer__meta .p360-button:focus-visible > * {
  color: #000 !important;
}


/* V2.047 — sitewide Google Reviews source-summary hardening ---------------
   V2.046 removed the plugin-owned arrows on the homepage. Review-enabled
   service/detail pages use the same Google Reviews source markup, so apply
   the exact control suppression and business-name paint override globally. */
body.p360-site .p360-reviews__embed :where(
  .grw-btns, .grw-prev, .grw-next,
  .owl-prev, .owl-next,
  .slick-prev, .slick-next,
  .swiper-button-prev, .swiper-button-next,
  [class*="swiper-button-prev"], [class*="swiper-button-next"]
) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Force the Google business-name link to remain readable even when the
   plugin paints nested spans with its own dark text-fill color. */
body.p360-site .p360-reviews__embed :where(
  .wp-google-name a, .grw-place-name a, .grw-header-title a,
  .rplg-business-name a,
  a[href*="maps.google.com"], a[href*="google.com/maps"]
),
body.p360-site .p360-reviews__embed :where(
  .wp-google-name a, .grw-place-name a, .grw-header-title a,
  .rplg-business-name a,
  a[href*="maps.google.com"], a[href*="google.com/maps"]
) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* Buttons/role-buttons rendered inside the source business summary belong to
   the plugin, not the Phillips360 review carousel controls below the cards. */
body.p360-site .p360-reviews__embed :where(
  .wp-google-place, .grw-place, .grw-header, .rplg-business
) :where(button, [role="button"]):not(.p360-review-carousel__button) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
