/* Site-wide overrides shared by every page. Selectors are intentionally
   more specific than the Divi/CF7 rules they replace. */

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-block .whatsapp-cta {
  position: fixed;
  right: 20px;
  bottom: 64px; /* sits above the fixed "Leave a message" tab */
  z-index: 999;
  display: block !important; /* critical CSS still hides it above 768px */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s, box-shadow 0.25s;
}
.whatsapp-block .whatsapp-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.whatsapp-block .whatsapp-cta a,
.whatsapp-block .whatsapp-cta img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}
@media (max-width: 767px) {
  .whatsapp-block .whatsapp-cta {
    right: 16px;
  }
}

/* ---------- "Leave a message" tab ----------
   Divi hid it on phones; show it everywhere. */
@media (max-width: 767px) {
  .et_pb_section.et_pb_section_1_tb_footer {
    display: block !important;
  }
}

/* ---------- Divi code modules on phones ----------
   A theme rule meant for the popup gives EVERY code module a navy 40px frame at
   90% width on phones (boxing the contact form and map, and leaving an empty navy
   block in the footer). Reset it; the popup has its own card styles below. */
@media (max-width: 767px) {
  #page-container .et_pb_code_inner {
    width: 100% !important;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
  }
}

/* ---------- Contact page: form, details and map as matching cards ---------- */
.et_pb_code_inner > .contact-form-wrapper form.wpcf7-form {
  border-radius: 9px;
  box-shadow: none;
}
.et_pb_code_inner > iframe[src*="google.com/maps"] {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 9px;
}
@media (max-width: 767px) {
  .et_pb_code_inner > .contact-form-wrapper form.wpcf7-form {
    padding: 20px;
  }
}

/* ---------- reCAPTCHA badge ----------
   Google's default bottom-right badge sits under the "Leave a message" tab and the
   WhatsApp button. Move it bottom-left, collapsed to the logo, expanding on hover.
   It stays visible, so no extra attribution text is needed under Google's terms. */
.grecaptcha-badge {
  left: 4px !important;
  right: auto !important;
  width: 70px !important;
  overflow: hidden !important;
  transition: width 0.3s ease !important;
  z-index: 998 !important;
}
.grecaptcha-badge:hover {
  width: 256px !important;
}

/* ---------- "Send us a message" popup ---------- */
.cf-toggle .et_pb_column_5_tb_footer {
  z-index: 100000;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(6, 22, 40, 0.6);
  backdrop-filter: blur(3px);
}
.message-popup {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: left;
}
.message-popup__header {
  position: relative;
  padding: 24px 64px 20px 28px;
  background: #093660;
  border-top: 4px solid #e30a0f;
}
.message-popup__header h2 {
  margin: 0 0 6px;
  padding: 0;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.message-popup__header p {
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.5;
}
.message-popup .closebtn {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.message-popup .closebtn:hover,
.message-popup .closebtn:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}

.message-popup .wpcf7-form {
  padding: 24px 28px 28px;
  margin: 0;
}
.message-popup .contact-form-wrapper p {
  margin: 0 0 14px;
  padding: 0;
}
.message-popup .contact-form-wrapper p:last-child {
  margin-bottom: 0;
}
.message-popup .wpcf7-form input[type="text"],
.message-popup .wpcf7-form input[type="email"],
.message-popup .wpcf7-form input[type="tel"],
.message-popup .wpcf7-form textarea {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid #d4d9dd !important;
  border-radius: 8px !important;
  background-color: #f7f9fb !important;
  color: #1f2a37 !important;
  font-family: 'Lato', sans-serif !important;
  font-size: 15px !important;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.message-popup .wpcf7-form textarea {
  height: 130px !important;
  resize: vertical;
}
.message-popup .wpcf7-form input::placeholder,
.message-popup .wpcf7-form textarea::placeholder {
  color: #8a94a0;
  font-size: 15px;
}
.message-popup .wpcf7-form input:focus,
.message-popup .wpcf7-form textarea:focus {
  border-color: #093660 !important;
  background-color: #fff !important;
  box-shadow: 0 0 0 3px rgba(9, 54, 96, 0.15);
}

.message-popup .contact-form-wrapper .submit,
.message-popup .contact-form-wrapper .submit:hover {
  display: block !important;
  width: 100%;
  margin: 6px 0 0 !important;
  padding: 14px 24px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background-color: #e30a0f !important;
  color: #fff !important;
  font-family: 'Lato', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transform: none !important;
  cursor: pointer;
  transition: background-color 0.2s;
}
.message-popup .contact-form-wrapper .submit:hover {
  background-color: #c0080c !important;
}
.message-popup .contact-form-wrapper .submit:after,
.message-popup .contact-form-wrapper .submit:before {
  display: none !important;
}
.message-popup .wpcf7-response-output {
  margin: 14px 0 0;
}

@media (max-width: 767px) {
  .message-popup__header {
    padding: 20px 60px 16px 20px;
  }
  .message-popup__header h2 {
    font-size: 22px;
  }
  .message-popup .wpcf7-form {
    padding: 20px;
  }
  .message-popup .wpcf7-form textarea {
    height: 110px !important;
  }
}

/* ---------- Nav: "Services" is a dropdown label, not a link ---------- */
.menu-item-has-children > a:not([href]) {
  cursor: pointer;
}
