/* ===== Modal base (contacto) ===== */
.tmh-modal {
  position: fixed;
  inset: 0;
  display: none;                 /* <- único display aquí */
  z-index: 9999;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  place-items: center;           /* OK incluso sin display grid */
}

.tmh-modal.open {
  display: grid;
  place-items: center;
}

.tmh-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 24, 33, .6);
  backdrop-filter: saturate(120%) blur(2px);
  z-index: 0;
}

.tmh-dialog {
  position: relative;
  display: flex;
  gap: 0;
  max-width: 920px;
  max-height: 90dvh;
  margin: 0;
  background: #0c2a36;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .35);
  z-index: 1;
}

.tmh-close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 2;
  pointer-events: auto;
}

.tmh-close:hover {
  background: rgba(255, 255, 255, .1)
}

@media (max-width:860px) {
  .tmh-dialog {
    margin: 16px;
    flex-direction: column;
    border-radius: 20px
  }
}

/* Aside (izq) */
.tmh-aside {
  color: #fff;
  flex: 1 1 48%;
  padding: 40px 32px;
  background: #08222d;
  position: relative;
  overflow: hidden;
}

.tmh-aside h2 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 700
}

.tmh-aside p {
  opacity: .9;
  margin: 0 0 16px
}

/* Marca de agua */
.tmh-aside::before {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -12%;
  width: 520px;
  height: 520px;
  pointer-events: none;
  background: url("../img/logonegro.svg") center/contain no-repeat;
  filter: brightness(.6) contrast(1.2);
  opacity: .2;
}

/* Form (der) */
.tmh-form-wrap {
  flex: 1 1 52%;
  background: #fff;
  padding: 28px
}

.tmh-field {
  margin-bottom: 14px
}

.tmh-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #162a32;
}

.tmh-field input,
.tmh-field select,
.tmh-field textarea {
  width: 100%;
  border: 1.5px solid #d7e0e4;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  outline: none;
}

.tmh-field input:focus,
.tmh-field select:focus,
.tmh-field textarea:focus {
  border-color: #0f3a4a;
  box-shadow: 0 0 0 3px rgba(15, 58, 74, .12);
}

.tmh-phone {
  display: flex;
  gap: 8px
}

.tmh-phone select {
  max-width: 120px
}

.tmh-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: #0f3a4a;
  color: #fff;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tmh-btn .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tmh-spin .8s linear infinite;
}

.tmh-btn.loading .label {
  opacity: .6
}

.tmh-btn.loading .spinner {
  display: inline-block
}

@keyframes tmh-spin {
  to {
    transform: rotate(360deg)
  }
}

.tmh-error {
  display: block;
  color: #c73636;
  font-size: 12px;
  height: 14px;
  margin-top: 4px
}

.tmh-note {
  font-size: 13px;
  margin-top: 10px;
  color: #0f3a4a;
}

.tmh-dialog {
  margin-left: 24px !important;
  margin-right: 24px !important;
}

/* ===== THEME V2 (tu modal de contacto ‘bonito’) ===== */
.tmh-modal.v2 .tmh-dialog {
  max-width: 1040px;
  margin: 32px auto;
  background: #0d2a33;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  display: flex;
}

.tmh-modal.v2 .tmh-aside {
  background: #0d2a33;
  color: #fff;
  padding: 44px 36px 52px;
  border-radius: 28px 0 0 28px;
  min-height: 520px;
  position: relative;
  flex: 0 0 50%;
}

.tmh-modal.v2 .tmh-aside h2 {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 12px
}

.tmh-modal.v2 .tmh-aside p {
  opacity: .92;
  font-size: 18px;
  line-height: 1.5;
  margin: 0
}

.tmh-modal.v2 .tmh-close {
  right: 16px;
  top: 12px;
  z-index: 3;
}

.tmh-modal.v2 .tmh-close:hover {
  background: rgba(255, 255, 255, .12)
}

.tmh-modal.v2 .tmh-form-wrap {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 22px;
  background: #0d2a33;
  border-radius: 0 28px 28px 0;
  position: relative;
  z-index: 1;
  padding-right: 48px;
}

.tmh-modal.v2 #tmhContactForm {
  width: 100%;
  max-width: 520px;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: 49px;
  padding: 24px 26px 20px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .35);
  border: 1px solid rgba(0, 0, 0, .06);
  position: relative;
  z-index: 1;
}

.tmh-modal.v2 .tmh-field {
  margin-bottom: 18px
}

.tmh-modal.v2 .tmh-field label {
  font-size: 14px;
  font-weight: 800;
  color: #0e2a34;
  margin-bottom: 6px;
  letter-spacing: .2px;
}

.tmh-modal.v2 .tmh-field input,
.tmh-modal.v2 .tmh-field select,
.tmh-modal.v2 .tmh-field textarea {
  background: #fff;
  border: 2px solid #d9e6eb;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  height: 48px;
  transition: border-color .15s, box-shadow .15s;
}

.tmh-modal.v2 .tmh-field textarea {
  height: auto;
  min-height: 112px;
  padding: 12px 14px;
  resize: vertical;
}

.tmh-modal.v2 .tmh-field input:focus,
.tmh-modal.v2 .tmh-field select:focus,
.tmh-modal.v2 .tmh-field textarea:focus {
  outline: none;
  border-color: #d9e6eb;
  box-shadow: 0 0 0 6px rgba(12, 92, 114, .08);
}

.tmh-modal.v2 .tmh-field input::placeholder,
.tmh-modal.v2 .tmh-field textarea::placeholder {
  color: #a7b6bd
}

.tmh-modal.v2 .tmh-phone {
  display: flex;
  gap: 12px
}

.tmh-modal.v2 .tmh-phone select {
  height: 48px;
  border: 2px solid #d9e6eb;
  border-radius: 12px;
  padding: 10px 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.tmh-modal.v2 #tmhContactForm .tmh-input-icon input {
  padding-left: 44px !important;
  background: #fff url("../img/correo.svg") no-repeat 14px 50% / 20px 20px !important;
}

.tmh-modal.v2 .tmh-btn {
  width: 168px;
  height: 52px;
  background: #0f2f39;
  color: #fff;
  border: 1px solid #0f2f39;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 800;
  font-size: 16px;
  display: block;
  margin: 12px auto 4px;
  transition: background .2s, color .2s, border-color .2s;
}

.tmh-modal.v2 .tmh-btn:hover {
  background: white;
  color: #0f2f39;
  border-color: #0f2f39;
}

.tmh-modal.v2 .tmh-btn:active {
  transform: translateY(0)
}

.tmh-modal.v2 .tmh-error {
  min-height: 14px;
  font-size: 12px;
  color: #c23535;
  margin-top: 4px
}

.tmh-modal.v2 .tmh-note {
  text-align: center;
  color: #0f3441;
  margin-top: 8px
}

@media (max-width:900px) {
  .tmh-modal.v2 .tmh-dialog {
    flex-direction: column;
    max-width: 94vw
  }

  .tmh-modal.v2 .tmh-aside {
    flex: 1 1 auto;
    border-radius: 28px 28px 0 0;
    min-height: auto;
    padding: 28px 22px 32px;
  }

  .tmh-modal.v2 .tmh-form-wrap {
    flex: 1 1 auto;
    padding: 18px 18px 22px;
    border-radius: 0 0 28px 28px;
    padding-right: 32px;
  }

  .tmh-modal.v2 #tmhContactForm {
    border-radius: 30px;
    padding: 20px;
  }

  .tmh-field {
    margin-bottom: 0 !important;
  }

  .tmh-aside {
    padding: 15px 20px 0 20px !important;
  }

  .tmh-aside h2 {
    margin-bottom: 0 !important;
  }

  .tmh-aside p {
    font-size: 16px !important;
  }

  .tmh-field label {
    margin: 0 !important;
  }

  .tmh-field input {
    margin: 0 !important;
    height: 40px !important;
  }
}

/* =========================================================
   MODAL “¡GRACIAS!”
   ========================================================= */
:root {
  --azul-oscuro: #0d2b38;
  --overlay: rgba(0, 0, 0, .45);
  --radius-xl: 24px;
}

.mg-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: none;
  z-index: 9999;
}

.mg-overlay.is-open {
  display: grid;
  place-items: center;
}

/* Tarjeta blanca y contenido centrado */
.mg-card {
  width: min(880px, 92vw);
  background: #ffffff !important;
  /* <-- fuerza blanco (tenías rojo) */
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .18);
  padding: clamp(24px, 4vw, 48px);
  position: relative;
  overflow: hidden;
}

.mg-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
  pointer-events: none;
}

.mg-content {
  position: relative;
  z-index: 2;
  /* por encima de las flechas */
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mg-logo {
  width: clamp(140px, 22vw, 230px);
  height: auto;
  display: block;
  margin: 0 auto 18px;
}

.mg-title {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  font-weight: 800;
  letter-spacing: .3px;
  color: #0d2b38;
  font-size: 80px;
  margin: 6px 0 12px;
  text-align: center;
}

.mg-p {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  /* importante */
  font-style: normal;

  line-height: 1.55;
  max-width: 720px;
  margin: 0 auto 28px;
  color: #163544;
  text-align: center;
}

.mg-actions {
  display: flex;
  justify-content: center;
}

.mg-btn {
  width: 168px;
  height: 52px;
  appearance: none;
  border: 0;
  background: var(--azul-oscuro);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  transition: transform .05s ease, filter .15s ease;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;


}

.mg-btn:active {
  transform: translateY(1px)
}

.mg-close-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #6c7a83;
  font-size: 22px;
}

.mg-close-x:hover {
  color: #20313a
}








/* ===== Flechas (derecha) posicionadas al milímetro ===== */
/* Contenedor pegado al borde derecho del card */
.mg-deco {
  position: absolute;
  right: 8px;
  /* margen contra el borde redondeado del card */
  top: 120px;
  /* arranque alto (como en el mock) */
  bottom: -10px;
  /* que “cuelguen” un poco */
  width: 280px;
  /* ancho de la “zona de flechas” (controla separación total) */
  pointer-events: none;
  z-index: 1;
  /* por debajo del contenido */
  opacity: .50;
  /* tenue; cámbialo si quieres */
}

/* Todas las flechas se posicionan de forma absoluta dentro de esa “zona” */
.mg-deco img {
  position: absolute;
  display: block;
  object-fit: contain;
  filter: brightness(88.6%);

}

/* --- Ajustes individuales (izq ➜ der) --- */

/* 1) Rombo (izquierda) */
.mg-deco img:nth-child(1) {

  right: 188px;
  /* mueve ↔ esta flecha (más grande = más a la izquierda) */
  top: -140px;
  /* mueve ↕ esta flecha (más grande = más abajo) */
  height: 78%;
  /* tamaño relativo al alto del contenedor .mg-deco */
}

/* 2) Círculo (centro) */
.mg-deco img:nth-child(2) {
  right: 100px;
  /* separación intermedia */
  top: -140px;
  /* cuelga más que la primera */
  height: 90%;
  /* la más larga */
}

/* 3) Punta (derecha) */
.mg-deco img:nth-child(3) {
  right: 10px;
  /* casi pegada al borde derecho del card */
  top: -146px;
  /* la que más cuelga */
  height: 74%;
  /* un poco más corta */
}


.mg-deco img:nth-child(1) {
  height: 320px;
}

/* rombo */
.mg-deco img:nth-child(2) {
  height: 380px;
}

/* círculo */
.mg-deco img:nth-child(3) {
  height: 300px;
}

/* punta */


/* Asegura que el contenido quede por encima */
.mg-content {
  position: relative;
  z-index: 2;
}