/* ============================================================
   YPS × Elementor / HFE / Hello — fidelity overrides
   Loaded last so HTML design wins over Elementor defaults.
   ============================================================ */

/* ---- Widget wrappers: full bleed, no Elementor padding ---- */
.elementor-widget-yps-header-topbar,
.elementor-widget-yps-site-header,
.elementor-widget-yps-dark-hero,
.elementor-widget-yps-practice-areas,
.elementor-widget-yps-process-steps,
.elementor-widget-yps-feature-grid,
.elementor-widget-yps-team,
.elementor-widget-yps-testimonials,
.elementor-widget-yps-mid-cta,
.elementor-widget-yps-booking-cta,
.elementor-widget-yps-footer {
  max-width: 100%;
}

.elementor-widget-yps-site-header > .elementor-widget-container,
.elementor-widget-yps-header-topbar > .elementor-widget-container,
.elementor-widget-yps-dark-hero > .elementor-widget-container,
.elementor-widget-yps-footer > .elementor-widget-container,
.elementor-widget-yps-practice-areas > .elementor-widget-container,
.elementor-widget-yps-process-steps > .elementor-widget-container,
.elementor-widget-yps-feature-grid > .elementor-widget-container,
.elementor-widget-yps-team > .elementor-widget-container,
.elementor-widget-yps-testimonials > .elementor-widget-container,
.elementor-widget-yps-mid-cta > .elementor-widget-container,
.elementor-widget-yps-booking-cta > .elementor-widget-container {
  margin: 0 !important;
  padding: 0 !important;
}

/* HFE / Elementor header must not clip fixed navbar.
   Keep HFE wrapper in normal flow so .nav-spacer still offsets the page.
   Only #site-header itself is position:fixed. */
.hfe-site-header,
.elementor-location-header,
header.ehf-header,
#masthead {
  position: relative !important;
  z-index: 10050 !important;
  overflow: visible !important;
  background: transparent !important;
  transform: none !important;
}

.hfe-site-header .elementor-section,
.hfe-site-header .e-con,
.elementor-location-header .e-con,
.elementor-location-header .elementor-section,
.hfe-site-header .elementor-widget-container,
.elementor-location-header .elementor-widget-container {
  overflow: visible !important;
  max-width: 100% !important;
}

/* ---- Top bar (must always show) ---- */
.nav-topbar,
.yps-header-topbar.nav-topbar,
.yps-site-header .nav-topbar {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 34px;
  background: #064733 !important;
  color: rgba(255, 255, 255, 0.88) !important;
  width: 100% !important;
  position: relative !important;
  z-index: 10001;
}

.nav-topbar-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px !important;
}

.nav-topbar-phone,
.nav-topbar-note,
.nav-topbar-link {
  display: inline-flex !important;
  color: #fff !important;
}

.nav-topbar-link {
  color: #e0ffc3 !important;
}

/* Fixed header stack — always above hero form */
.yps-site-header.navbar.is-fixed,
#site-header.navbar.is-fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 10060 !important;
  display: block !important;
  background: transparent !important;
  box-shadow: none !important;
}

.admin-bar .yps-site-header.navbar.is-fixed,
.admin-bar #site-header.navbar.is-fixed {
  top: 32px !important;
}

@media (max-width: 782px) {
  .admin-bar .yps-site-header.navbar.is-fixed,
  .admin-bar #site-header.navbar.is-fixed {
    top: 46px !important;
  }
}

.nav-spacer {
  display: block !important;
  width: 100%;
  min-height: var(--yps-header-h, 120px);
  height: var(--yps-header-h, 120px);
  flex: none !important;
  pointer-events: none;
  visibility: hidden;
}

/* Hero content sits below fixed header; form must never paint over nav */
.slider-section.yps-dark-hero,
.elementor-widget-yps-dark-hero .slider-section {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.slider-section .slide-content-wrap {
  z-index: 2 !important;
  padding-top: 28px !important;
  box-sizing: border-box;
}

.slider-section .cta_form-wrap.hero-cta-form {
  z-index: 3 !important;
  transform: none !important; /* avoid stacking above header */
}

.slider-section .cta_form-wrap.hero-cta-form:hover {
  transform: none !important;
}

/* ---- Buttons: readable text everywhere ---- */
.button-asle,
.button-asle.nav,
.button-main,
.footer-cta-btn.is-primary,
.ml-cta-btn,
.hero-cta-submit {
  color: #fff !important;
}

.button-asle .button-text,
.button-asle.nav .button-text,
.button-main,
.button-main .button-text,
.footer-cta-btn.is-primary,
.ml-cta-btn,
.ml-cta-btn-text,
.ml-cta-btn-text-alt,
.hero-cta-submit {
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Nav Free Consultation — green bg, white label */
.nav-button-wrapper-copy .button-asle.nav,
.yps-site-header .button-asle.nav {
  background-color: #154b3e !important;
  border-color: #154b3e !important;
}

.nav-button-wrapper-copy .button-asle.nav .button-text,
.yps-site-header .button-asle.nav .button-text {
  color: #fff !important;
  font-weight: 700 !important;
}

/* Process / generic green CTAs */
.step-card-wrapper .button-asle,
.step-card-wrapper .button-asle.w-button {
  background-color: #154b3e !important;
  color: #fff !important;
}

/* Hero phone CTA — white pill, dark green text */
.hero-slider-left .hero-block .button-border.hero,
.hero-slider-left .hero-block .button-asle.hero {
  background: #fff !important;
  background-image: none !important;
  border-color: #fff !important;
}

.hero-slider-left .hero-block .button-asle.hero,
.hero-slider-left .hero-block .button-asle.hero .button-text,
.hero-slider-left .hero-block .button-asle.hero .button-phone-icon {
  color: #064733 !important;
}

.hero-slider-left .hero-block .button-border.hero:hover {
  box-shadow: 0 0 28px rgba(255, 255, 255, 1), 0 10px 28px rgba(0, 0, 0, 0.25) !important;
}

/* Mid CTA phone / consultation */
.cta-sections .button-main,
.cta-sections .button-main.is-phone {
  color: #fff !important;
  background-color: #154b3e !important;
}

.cta-sections .button-main.is-phone {
  background-color: #fff !important;
  color: #064733 !important;
  border: 2px solid #fff !important;
}

.cta-sections .button-main.is-phone .button-phone-icon {
  color: #064733 !important;
}

/* Footer ghost / primary */
.footer-cta-btn.is-primary {
  background: #fff !important;
  color: #064733 !important;
}

.footer-cta-btn.is-ghost {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
}

/* ---- Footer bottom bar (match HTML) ---- */
.footer-section {
  display: block !important;
}

.footer-bottom-bar {
  display: block !important;
  width: 100% !important;
  background: rgba(0, 0, 0, 0.22) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.footer-bottom {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

.footer-copy,
.footer-legal-links a {
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 13px !important;
}

.footer-credit {
  display: inline-flex !important;
  align-items: center;
  text-decoration: none !important;
  opacity: 1 !important;
}

.footer-credit-logo {
  display: block !important;
  height: 36px !important;
  width: auto !important;
  max-width: 200px !important;
  filter: brightness(0) invert(1) !important;
}

.footer-credit:hover {
  opacity: 0.85;
}

@media (max-width: 767px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Team section ---- */
.team-section {
  display: block !important;
  position: relative;
  overflow: hidden;
}

.team-card-wrapper {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.team-card-wrapper .person {
  display: block !important;
  overflow: hidden;
}

.team-card-wrapper .person .image {
  display: block !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-person-name {
  padding: 10px 4px 0;
  text-align: center;
  color: #154b3e;
}

.team-person-name span {
  display: block;
  font-size: 13px;
  opacity: 0.7;
}

/* ---- Animations: Elementor-safe ---- */
[data-animate] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Contact Form 7 skin (hero + booking) — match HTML layout ---- */
.yps-cf7-wrap .wpcf7,
.yps-cf7-wrap .wpcf7-form,
.hero-cta-form .wpcf7,
.hero-cta-form .wpcf7-form,
.ml-cta-form-card .wpcf7,
.ml-cta-form-card .wpcf7-form {
  margin: 0;
  width: 100%;
}

.hero-cta-form .wpcf7-form,
.hero-cta-form .yps-cf7--hero,
.hero-cta-form .hero-cta-fields.yps-cf7 {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  border: none;
  width: 100%;
}

.hero-cta-form .wpcf7-form > p,
.hero-cta-form .yps-cf7 p,
.ml-cta-form-card .wpcf7-form > p,
.yps-cf7-wrap .wpcf7-form p {
  margin: 0 !important;
  padding: 0 !important;
}

.hero-cta-form .hero-cta-row,
.yps-cf7--hero .hero-cta-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin: 0;
}

.hero-cta-form .hero-cta-field,
.yps-cf7--hero .hero-cta-field,
.ml-cta-form-card .ml-cta-field,
.yps-cf7--booking .ml-cta-field {
  display: block;
  width: 100%;
  min-width: 0;
}

.hero-cta-form .wpcf7-form-control-wrap,
.yps-cf7 .wpcf7-form-control-wrap,
.ml-cta-form-card .wpcf7-form-control-wrap {
  display: block !important;
  width: 100% !important;
}

/* Inputs — mirror .hero-cta-input from yps-cta.css */
.hero-cta-form .wpcf7 input.wpcf7-form-control:not([type="submit"]),
.hero-cta-form .wpcf7 textarea.wpcf7-form-control,
.hero-cta-form .wpcf7 .hero-cta-input,
.yps-cf7--hero input.wpcf7-form-control:not([type="submit"]),
.yps-cf7--hero textarea.wpcf7-form-control {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 51px !important;
  margin: 0 !important;
  padding: 15px 16px !important;
  color: #fff !important;
  font-family: Inter, sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: 5px !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.hero-cta-form .wpcf7 textarea.wpcf7-form-control,
.yps-cf7--hero textarea.wpcf7-form-control,
.hero-cta-form .hero-cta-message {
  min-height: 120px !important;
  resize: vertical;
  padding-top: 15px !important;
}

.hero-cta-form .wpcf7 input::placeholder,
.hero-cta-form .wpcf7 textarea::placeholder,
.yps-cf7--hero input::placeholder,
.yps-cf7--hero textarea::placeholder {
  color: rgba(255, 255, 255, 0.65) !important;
  opacity: 1 !important;
  font-size: 18px !important;
}

.hero-cta-form .wpcf7 input:focus,
.hero-cta-form .wpcf7 textarea:focus,
.yps-cf7--hero input:focus,
.yps-cf7--hero textarea:focus {
  border-color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Submit — match HTML dark green pill */
.hero-cta-form .wpcf7 input[type="submit"],
.hero-cta-form .wpcf7 .hero-cta-submit,
.yps-cf7--hero input.wpcf7-submit,
.yps-cf7--hero .hero-cta-submit {
  width: 100% !important;
  cursor: pointer;
  border: none !important;
  border-radius: 100px !important;
  background: #154b3e !important;
  color: #fff !important;
  font-family: Inter, sans-serif !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  padding: 18px 40px !important;
  margin: 4px 0 0 !important;
  min-height: 52px;
  box-shadow: none !important;
}

.hero-cta-form .wpcf7 input[type="submit"]:hover,
.yps-cf7--hero .hero-cta-submit:hover,
.yps-cf7--hero input.wpcf7-submit:hover {
  background: #000 !important;
  color: #fff !important;
}

.yps-cf7--booking .ml-cta-row,
.ml-cta-form-card .ml-cta-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 12px;
  width: 100%;
}

.yps-cf7--booking,
.yps-cf7--booking.ml-cta-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.ml-cta-form-card .wpcf7 input.wpcf7-form-control:not([type="submit"]),
.ml-cta-form-card .wpcf7 textarea.wpcf7-form-control,
.ml-cta-form-card .wpcf7 select.wpcf7-form-control,
.yps-cf7--booking input.wpcf7-form-control:not([type="submit"]),
.yps-cf7--booking textarea.wpcf7-form-control,
.yps-cf7--booking select.wpcf7-form-control {
  width: 100% !important;
  box-sizing: border-box;
}

.ml-cta-form-card .wpcf7 input[type="submit"],
.ml-cta-form-card .wpcf7 .ml-cta-btn,
.yps-cf7--booking input.wpcf7-submit,
.yps-cf7--booking .ml-cta-btn {
  width: 100% !important;
  cursor: pointer;
  border: none !important;
  background: #154b3e !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 14px 28px !important;
  margin-top: 8px;
}

@media (max-width: 479px) {
  .hero-cta-form .hero-cta-row,
  .yps-cf7--hero .hero-cta-row,
  .yps-cf7--booking .ml-cta-row,
  .ml-cta-form-card .ml-cta-row {
    grid-template-columns: 1fr;
  }
}

.wpcf7-not-valid-tip {
  font-size: 12px;
  color: #ffb4b4;
  margin-top: 4px;
}

.ml-cta-form-card .wpcf7-not-valid-tip {
  color: #b32d2e;
}

.wpcf7-response-output {
  margin: 12px 0 0 !important;
  padding: 10px 12px !important;
  border-radius: 8px;
  font-size: 14px;
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: #17c64f;
}

.elementor-widget-yps-policy-page > .elementor-widget-container {
  margin: 0 !important;
  padding: 0 !important;
}

.elementor-widget-yps-policy-page .policy {
  display: block !important;
}

.yps-policy-page .policy_rich {
  display: block !important;
}

/* ---- Dark hero: tablet / mobile (content must size the section) ---- */
@media screen and (max-width: 991px) {
  .elementor-widget-yps-dark-hero,
  .elementor-widget-yps-dark-hero > .elementor-widget-container {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
  }

  .slider-section.yps-dark-hero,
  .elementor-widget-yps-dark-hero .slider-section {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
  }

  .slider-section .slider-content {
    position: relative !important;
    inset: auto !important;
    z-index: 2;
    width: 100%;
  }

  .slider-section .slide-content-wrap {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    height: auto !important;
    width: 100%;
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .slider-section .slider-wrapper {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0;
  }

  .slider-section .slider-2 {
    height: 100% !important;
    min-height: 100% !important;
  }
}

@media screen and (max-width: 767px) {
  .slider-section .slide-content-wrap {
    padding-top: 36px !important;
    padding-bottom: 40px !important;
  }
}
