/* Video replaces slick slider — matches project-banner image sizing */
.project-banner-video {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 5px;
}
.project-banner-video__media {
  display: block;
  width: 120%;
  margin-left: -10%;
  height: auto;
  min-height: 220px;
  max-height: 70vw;
  object-fit: cover;
}
@media (min-width: 992px) {
  .project-banner-video__media {
    height: 420px;
    max-height: none;
  }
}
@media (max-width: 786px) {
  .project-banner-video__media {
    width: 100%;
    margin-left: 0;
  }
}

/* AJAX form feedback (send-lead.js / app.js) */
.js-reg-feedback {
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.45;
}
.reg-feedback--ok {
  background: rgba(62, 207, 190, 0.2);
  border: 1px solid rgba(62, 207, 190, 0.45);
  color: #1a5c54;
}
.reg-feedback--warn {
  background: rgba(212, 168, 83, 0.2);
  border: 1px solid rgba(212, 168, 83, 0.4);
  color: #5c4a1a;
}
.reg-feedback--err {
  background: rgba(216, 97, 60, 0.12);
  border: 1px solid rgba(216, 97, 60, 0.35);
  color: #7a2a18;
}

/* Duplicate lead form at bottom of page (same copy as banner / lightbox) */
.bottom-page-contact {
  padding: 2.5rem 0 3rem;
  background-color: #eef2ef;
}
.bottom-page-contact .headline {
  text-align: center;
  margin-bottom: 1.5rem;
}
.bottom-page-contact .headline::after,
.bottom-page-contact .headline::before {
  left: 50%;
  transform: translateX(-50%);
}
.bottom-page-contact .contact-form-page {
  max-width: 520px;
  margin: 0 auto;
}

#page-contact {
  scroll-margin-top: 1.25rem;
}

/* ——— Contact Us popup (blur + motion) ——— */
html.hp-contact-open,
html.hp-contact-open body {
  overflow: hidden;
}

.hp-contact-popup {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.hp-contact-popup.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.hp-contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 24, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

.hp-contact-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 1.75rem 1.6rem 1.5rem;
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(238, 242, 239, 0.98) 100%);
  border: 1px solid rgba(42, 64, 59, 0.12);
  box-shadow:
    0 24px 60px rgba(12, 20, 16, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  font-family: Cairo, Tajawal, "Segoe UI", sans-serif;
  color: #1e2c28;
  transform: translateY(28px) scale(0.94);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.hp-contact-popup.is-open .hp-contact-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.hp-contact-accent {
  width: 48px;
  height: 3px;
  border-radius: 999px;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #2a403b, #c4a574);
}

.hp-contact-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7c74;
  font-weight: 700;
}

.hp-contact-dialog h2 {
  margin: 0 0 0.45rem;
  font-size: 1.65rem;
  line-height: 1.2;
  color: #2a403b;
  font-weight: 800;
}

.hp-contact-lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4a5c55;
}

.hp-contact-close {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.85rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(42, 64, 59, 0.08);
  color: #2a403b;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hp-contact-close:hover {
  background: rgba(42, 64, 59, 0.16);
  transform: rotate(90deg);
}

.hp-contact-label {
  display: block;
  margin: 0.55rem 0 0.28rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #3d4f48;
}

.hp-contact-label span {
  font-weight: 500;
  color: #8a9a92;
}

.hp-contact-form input,
.hp-contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(42, 64, 59, 0.18);
  background: #fff;
  color: #1e2c28;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hp-contact-form input:focus,
.hp-contact-form textarea:focus {
  outline: none;
  border-color: #2a403b;
  box-shadow: 0 0 0 3px rgba(42, 64, 59, 0.12);
}

.hp-contact-form textarea {
  resize: vertical;
  min-height: 96px;
}

.hp-contact-submit {
  display: block;
  width: 100%;
  margin-top: 1.15rem;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  color: #f7f4ef;
  background: linear-gradient(135deg, #2a403b 0%, #3d5c54 55%, #2a403b 100%);
  box-shadow: 0 10px 24px rgba(42, 64, 59, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.hp-contact-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(42, 64, 59, 0.34);
  filter: brightness(1.05);
}

.hp-contact-submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.hp-contact-form .js-reg-feedback {
  margin-bottom: 0.85rem;
}

@media (max-width: 480px) {
  .hp-contact-dialog {
    padding: 1.4rem 1.15rem 1.25rem;
    border-radius: 14px;
  }
  .hp-contact-dialog h2 {
    font-size: 1.4rem;
  }
}
