/* Verde Horizonte · capa de interfaz del sitio legacy (rediseño 2026-11-24).
   Se carga DESPUÉS de los CSS del tema (Ecoland/Elementor) y solo toca la barra
   superior, el panel móvil y el formulario de leads (#vh-lead-form en /contacto/ y
   /cotizar/). Marca intacta: verde bosque #465249, salvia #95A572, CTA #0ea478,
   texto #56534E, Inter. Mobile first; AA (texto >= 4.5:1, bordes y foco >= 3:1). */

:root {
  --vh-forest: #465249;
  --vh-forest-deep: #36413a;
  --vh-sage: #95a572;
  --vh-cta: #0ea478;
  --vh-text: #56534e;
  --vh-ink: #2f3a32;
  --vh-muted: #5f6b61;      /* 5.6:1 sobre blanco: placeholders y ayudas */
  --vh-line: #e3e6e0;       /* divisores decorativos */
  --vh-field-line: #7d887c; /* borde de controles: 3.7:1 sobre blanco */
  --vh-tint: #f4f6f1;
  --vh-error: #a4262c;
  --vh-focus: #0ea478;
}

/* ───────────── Control de idioma ES | EN ───────────── */
.vh-lang {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--vh-field-line);
  border-radius: 999px;
  background: #fff;
}
.vh-lang-opt {
  min-width: 40px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--vh-forest);
  font: 600 12.5px/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.18s ease-out, color 0.18s ease-out;
}
.vh-lang-opt:hover { background: var(--vh-tint); }
.vh-lang-opt[aria-pressed="true"] { background: var(--vh-forest); color: #fff; cursor: default; }
.vh-lang-opt:focus-visible { outline: 2px solid var(--vh-focus); outline-offset: 2px; }

/* ───────────── Barra superior: base (móvil primero) ───────────── */
.header-style-three { position: relative; background: #fff; }
.header-style-three .header-lower .outer-box { border-bottom: 1px solid var(--vh-line); }
.header-style-three .nav-column {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  float: none;
  width: 100%;
  min-height: 76px;
  position: relative;
}
.header-style-three .nav-column .logo-box { float: none; margin: 0 !important; padding: 10px 0; flex: 0 0 auto; }
.header-style-three .nav-column .logo-box .logo { max-width: 136px !important; margin: 0; }
.header-style-three .nav-column .menu-area { float: none; flex: 0 0 auto; margin-left: auto; position: relative; display: flex; align-items: center; }

/* Hamburguesa: control de 48 px con foco visible. El tema la muestra solo <= 1200 px. */
@media (max-width: 1200px) {
  .header-style-three .menu-area .mobile-nav-toggler {
    float: none;
    display: grid;
    place-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--vh-field-line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
  }
  .header-style-three .menu-area .mobile-nav-toggler .icon-bar {
    width: 22px;
    height: 2px;
    margin: 0;
    background-color: var(--vh-forest);
  }
}
.mobile-nav-toggler:focus-visible,
.mobile-menu .close-btn:focus-visible,
.search_icon:focus-visible { outline: 2px solid var(--vh-focus); outline-offset: 2px; }

/* ───────────── Panel móvil: marca clara, no negro de plantilla ───────────── */
.mobile-menu .menu-box { background: #fff; }
.mobile-menu .menu-backdrop { background-color: var(--vh-forest-deep); }
.mobile-menu .nav-logo { padding: 22px 20px 14px; border-bottom: 1px solid var(--vh-line); }
.mobile-menu .nav-logo img { display: block; width: 150px; height: auto; }
.mobile-menu .close-btn {
  display: grid;
  place-content: center;
  right: 12px;
  top: 14px;
  width: 44px;
  height: 44px;
  line-height: 1;
  font-size: 18px;
  color: var(--vh-forest);
  border: 1px solid var(--vh-field-line);
  border-radius: 10px;
}
.mobile-menu .close-btn:hover { transform: none; background: var(--vh-tint); }
.mobile-menu-visible .mobile-menu .close-btn { transform: none; }
.mobile-menu .navigation li { border-bottom: 1px solid var(--vh-line); }
.mobile-menu .navigation li > a {
  min-height: 48px;
  padding: 14px 20px;
  color: var(--vh-forest);
  font: 600 15px/1.3 "Inter", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
}
.mobile-menu .navigation li.current-menu-item > a { background: var(--vh-tint); color: var(--vh-ink); font-weight: 700; }
.mobile-menu .navigation li > a:before { display: none; }
.mobile-menu .navigation li ul li > a { text-transform: none; letter-spacing: 0; font-weight: 500; padding-left: 34px; }
.mobile-menu .navigation li.menu-item-has-children .dropdown-btn {
  top: 2px;
  right: 12px;
  width: 44px;
  height: 44px;
  line-height: 44px;
  background: var(--vh-tint);
  color: var(--vh-forest);
  border-radius: 10px;
}
.mobile-menu .vh-lang-item { padding: 14px 20px; border-bottom: 1px solid var(--vh-line); }
.mobile-menu .vh-lang-opt { height: 40px; min-width: 56px; font-size: 14px; }
.mobile-menu .search-bar { padding: 14px 20px 24px; border-bottom: 0; }
.mobile-menu .search-bar .search_icon { display: none; }
.mobile-menu .spicewpsearchform { display: block !important; }
.mobile-menu .search-bar .form-group { display: flex; gap: 8px; margin: 0; }
.mobile-menu .search-bar input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--vh-field-line);
  border-radius: 8px;
  background: #fff;
  color: var(--vh-ink);
  font: 400 16px "Inter", system-ui, sans-serif;
}
.mobile-menu .search-bar button[type="submit"] {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--vh-forest);
  color: #fff;
}

/* ───────────── Barra superior: escritorio (>= 1201 px, donde el tema muestra el menú) ───────────── */
@media (min-width: 1201px) {
  .header-style-three .nav-column { min-height: 92px; gap: 32px; }
  .header-style-three .nav-column .logo-box { padding: 12px 0; }
  .header-style-three .nav-column .logo-box .logo { max-width: 156px !important; }
  .header-style-three .nav-column .menu-area { flex: 1 1 auto; min-width: 0; margin-left: 0; }
  .header-style-three .main-menu { float: none; width: 100%; }
  .header-style-three .main-menu .navbar-collapse { display: flex !important; justify-content: center; }

  /* Menú centrado con separación pareja; idioma y búsqueda a la derecha, fuera del flujo,
     así el centro del menú no depende de cuántos controles haya. */
  .header-style-three .main-menu .navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 0 148px;
    position: static;
  }
  .header-style-three .main-menu .navigation > li { float: none; margin: 0 !important; position: relative; }
  .header-style-three .main-menu .navigation > li > a {
    padding: 0 14px;
    color: var(--vh-forest);
    font: 600 13.5px/92px "Inter", system-ui, sans-serif;
    letter-spacing: 0.05em;
  }
  .header-style-three .main-menu .navigation > li > a:before {
    left: 14px;
    width: calc(100% - 28px);
    height: 3px;
    background: var(--vh-cta);
    border-radius: 3px 3px 0 0;
  }
  .header-style-three .main-menu .navigation > li.current-menu-item > a { color: var(--vh-ink); }
  .header-style-three .main-menu .navigation > li > ul {
    top: 100%;
    margin-top: 0;
    background-color: #fff;
    border: 1px solid var(--vh-line);
    box-shadow: 0 12px 28px rgba(47, 58, 50, 0.12);
  }
  .header-style-three .main-menu .navigation > li > ul > li > a { color: var(--vh-forest); border-bottom-color: var(--vh-line); }

  .header-style-three .main-menu .navigation > li.vh-lang-item,
  .header-style-three .main-menu .navigation > li.search-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  .header-style-three .main-menu .navigation > li.search-bar { right: 0; }
  .header-style-three .main-menu .navigation > li.vh-lang-item { right: 56px; }
}

/* Búsqueda: icono de 44 px con panel propio en escritorio */
.search-bar .search_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  width: 44px;
  height: 44px;
  border: 1px solid var(--vh-field-line);
  border-radius: 50%;
  color: var(--vh-forest);
  cursor: pointer;
}
.header-style-three .main-menu .navigation > li.search-bar > a.search_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: 400 15px/1 "Inter", system-ui, sans-serif;
  line-height: 1;
}
.header-style-three .main-menu .navigation > li.search-bar > a.search_icon:before { display: none; }
.search-bar .search_icon i { display: block; margin: 0; line-height: 1; font-size: 15px; }
.search-bar .search_icon:hover { background: var(--vh-tint); }
@media (min-width: 1201px) {
  .main-menu .search-bar .spicewpsearchform {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 320px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--vh-line);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(47, 58, 50, 0.14);
    z-index: 101;
  }
  .main-menu .search-bar .form-group { display: flex; gap: 8px; margin: 0; }
  .main-menu .search-bar input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--vh-field-line);
    border-radius: 8px;
    color: var(--vh-ink);
    font: 400 16px "Inter", system-ui, sans-serif;
  }
  .main-menu .search-bar button[type="submit"] { width: 44px; height: 44px; border: 0; border-radius: 8px; background: var(--vh-forest); color: #fff; }
}

/* ───────────── Formulario de leads ───────────── */
#vh-lead-form {
  --vh-field-h: 52px;
  margin: 0;
}
#vh-lead-form .pcf7-form-contact.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0;
}
#vh-lead-form .pcf7-form-contact > [class*="col-"] {
  float: none;
  width: auto;
  max-width: none;
  flex: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 576px) {
  #vh-lead-form .pcf7-form-contact.row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #vh-lead-form .pcf7-form-contact > .col-md-12 { grid-column: 1 / -1; }
}
#vh-lead-form p { margin: 0 !important; }
#vh-lead-form .wpcf7-form-control-wrap { display: block; position: relative; }

/* Inputs, selects y textarea: mismo alto, borde, fondo, radio y tipografía.
   El plugin de formularios del sitio fija fondo, color, ancho y margen con !important
   en una hoja en línea: acá se gana con más especificidad (#id) y !important. */
#vh-lead-form .form-control,
#vh-lead-form input.form-control,
#vh-lead-form select.form-control,
#vh-lead-form textarea.form-control {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  height: var(--vh-field-h);
  margin: 0 !important;
  padding: 0 16px;
  border: 1px solid var(--vh-field-line);
  border-radius: 8px;
  background-color: #fff !important;
  box-shadow: none;
  color: var(--vh-ink) !important;
  font: 400 16px/1.25 "Inter", system-ui, sans-serif;
  font-size: 16px; /* 16 px: iOS no hace zoom al enfocar */
}
#vh-lead-form .form-control::placeholder { color: var(--vh-muted) !important; opacity: 1; }
#vh-lead-form textarea.form-control { height: auto; min-height: 156px; padding: 14px 16px; resize: vertical; line-height: 1.5; }

/* El tema reemplaza cada <select> por un div «nice-select» (flecha negra, sin foco ni
   teclado nativo). Se usa el select nativo: accesible y con selector del sistema en móvil. */
#vh-lead-form .nice-select { display: none !important; }
#vh-lead-form select.form-control { display: block !important; }

/* Select: flecha propia con su espacio reservado (el texto nunca pasa por debajo) */
#vh-lead-form select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: calc(var(--vh-field-h) - 4px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%23465249' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 5 7 9.5 11.5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px 14px;
}
/* Sin elegir nada, el select se lee como placeholder */
#vh-lead-form select.form-control:has(option:checked[value=""]) { color: var(--vh-muted) !important; }
#vh-lead-form select.form-control option { color: var(--vh-ink); }

#vh-lead-form .form-control:hover { border-color: var(--vh-forest); }
#vh-lead-form .form-control:focus-visible,
#vh-lead-form input[type="submit"]:focus-visible {
  outline: 2px solid var(--vh-focus);
  outline-offset: 2px;
  border-color: var(--vh-forest);
}

/* Aviso de privacidad: legible, con el enlace subrayado en verde bosque (AA) */
#vh-lead-form .pcf7-form-contact > div:not(.vh-ts-wrap) > p:not(:has(input)) {
  color: var(--vh-text);
  font: 400 14px/1.55 "Inter", system-ui, sans-serif;
}
#vh-lead-form p a { color: var(--vh-forest); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Turnstile: visible, dentro de la grilla, alineado con los campos */
#vh-lead-form .vh-ts-wrap { min-height: 65px; }
#vh-lead-form .cf-turnstile { display: block; max-width: 100%; }

/* Botón Enviar: verde bosque con texto blanco (8:1); deshabilitado se ve y se explica */
#vh-lead-form [type="submit"] {
  display: inline-block;
  box-sizing: border-box;
  height: var(--vh-field-h);
  min-width: 180px;
  padding: 0 32px !important;
  width: auto;
  border: 2px solid var(--vh-forest);
  border-radius: 8px;
  background: var(--vh-forest) !important;
  color: #fff !important;
  font: 600 16px/1 "Inter", system-ui, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.18s ease-out, border-color 0.18s ease-out;
}
#vh-lead-form [type="submit"]:hover:not(:disabled) { background: var(--vh-forest-deep) !important; border-color: var(--vh-forest-deep); }
#vh-lead-form [type="submit"]:disabled {
  background: #e9ece6 !important;
  border-color: #c4cac0;
  color: var(--vh-muted) !important;
  cursor: not-allowed;
}
#vh-lead-form [data-lead-status] {
  display: block;
  margin-top: 12px;
  color: var(--vh-text);
  font: 400 14px/1.5 "Inter", system-ui, sans-serif;
}
#vh-lead-form [data-lead-status][data-kind="error"] { color: var(--vh-error); font-weight: 600; }
#vh-lead-form [data-lead-status][data-kind="pending"] { color: var(--vh-forest); }
@media (max-width: 575px) {
  #vh-lead-form [type="submit"] { width: 100% !important; }
}

/* ───────────── /contacto/: «Ubicación» alineada con el formulario ───────────── */
.elementor-element-ecacd9f > .e-con-inner { align-items: stretch; }
.elementor-element-a09e69c { padding-block: 40px; justify-content: flex-start; }
.elementor-element-ce9c730 { padding-block: 40px; justify-content: flex-start; }
@media (max-width: 767px) {
  .elementor-element-a09e69c,
  .elementor-element-ce9c730 { padding-block: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .vh-lang-opt, #vh-lead-form [type="submit"] { transition: none; }
}
