/* Home + Elementor full-width compatibility
 * Scope is limited to Home blocks created by the theme seed.
 */

.home-unified,
.home-unified .elementor {
  width: 100%;
  max-width: 100%;
}

/* Elementor container engine (e-con) */
.home-unified .elementor .elementor-element.home-block.e-con {
  --content-width: 100%;
  --container-max-width: 100%;
  --width: 100%;
  width: 100% !important;
  max-width: 100% !important;
  padding-inline: 0 !important;
}

.home-unified .elementor .elementor-element.home-block.e-con > .e-con-inner {
  width: 100% !important;
  max-width: 100% !important;
  padding-inline: 0 !important;
}

/* Legacy Elementor section engine */
.home-unified .elementor .elementor-top-section.home-block > .elementor-container,
.home-unified .elementor .elementor-section.home-block > .elementor-container {
  width: 100% !important;
  max-width: 100% !important;
}

.home-unified .elementor .home-block .elementor-widget-wrap,
.home-unified .elementor .home-block .elementor-widget-container,
.home-unified .elementor .home-block .elementor-widget-html,
.home-unified .elementor .home-block .elementor-widget-html .elementor-widget-container {
  width: 100%;
  max-width: 100%;
}

/* Keep content readable while section itself stays full width */
.home-unified .elementor .home-block .container,
.home-unified .elementor .home-block .beneficios-grid,
.home-unified .elementor .home-block .grid-servicios,
.home-unified .elementor .home-block .partners-logos,
.home-unified .elementor .home-block .trayectoria-bloques {
  width: min(100%, 1920px) !important;
  max-width: 1920px !important;
  margin-inline: auto;
  padding-inline: clamp(16px, 2.5vw, 48px);
}

.home-unified .elementor .home-block-partners .partners {
  width: 100%;
  margin: 0;
}

/* Contact block should not stay narrow */
.home-unified .elementor .home-block-contact .elementor-widget-heading,
.home-unified .elementor .home-block-contact .elementor-widget-text-editor,
.home-unified .elementor .home-block-contact .elementor-widget-shortcode {
  width: min(100%, 1200px);
  max-width: 1200px;
  margin-inline: auto;
}

.home-unified .elementor .home-block-contact input[type="text"],
.home-unified .elementor .home-block-contact input[type="email"],
.home-unified .elementor .home-block-contact input[type="tel"],
.home-unified .elementor .home-block-contact input[type="number"],
.home-unified .elementor .home-block-contact textarea,
.home-unified .elementor .home-block-contact select,
.home-unified .elementor .home-block-contact .wpcf7-form-control,
.home-unified .elementor .home-block-contact .wpcf7-form-control-wrap {
  width: 100% !important;
  max-width: 100% !important;
  display: block;
}

/* Preserve icon alignment inside cards/widgets */
.home-unified .elementor .home-block .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-unified .elementor .home-block .icon svg,
.home-unified .elementor .home-block .beneficio svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Keep partner logos stable when Elementor base image rules are active. */
body.home .elementor .partners-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 2.4vw, 40px);
}

body.home .elementor .partners-logos img {
  width: auto !important;
  height: clamp(32px, 4vw, 60px) !important;
  max-width: min(150px, 22vw) !important;
  max-height: 60px !important;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
}

/* Partners is rendered inside a boxed Elementor container: make it full width. */
body.home .elementor .partners {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
}

body.home .elementor .partners > .container {
  width: min(100%, 1920px) !important;
  max-width: 1920px !important;
  margin-inline: auto;
  padding-inline: clamp(16px, 2.5vw, 48px);
}

/* Trayectoria was also rendered boxed; keep the section full-width. */
body.home .elementor .trayectoria {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
}

body.home .elementor .trayectoria > .container {
  width: min(100%, 1920px) !important;
  max-width: 1920px !important;
  margin-inline: auto;
  padding-inline: clamp(16px, 2.5vw, 48px);
}

/* Services icons are currently stripped from HTML inside text-editor widgets.
   Use deterministic CSS icons per card instead of a generic "+" fallback. */
body.home .elementor .servicios .servicio-item .icon {
  font-size: 0;
}

body.home .elementor .servicios .servicio-item .icon::after {
  content: "";
  width: 34px;
  height: 34px;
  display: block;
  background: center / contain no-repeat var(--service-icon);
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.45));
}

/* Hide embedded SVGs in this section so we never render duplicated icons. */
body.home .elementor .servicios .servicio-item .icon > svg {
  display: none;
}

/* 1) Inventarios */
body.home .elementor .servicios .servicio-item:nth-child(1) {
  --service-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E");
}

/* 2) Mantenciones preventivas */
body.home .elementor .servicios .servicio-item:nth-child(2) {
  --service-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
}

/* 3) Roll Out de equipos */
body.home .elementor .servicios .servicio-item:nth-child(3) {
  --service-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2' ry='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E");
}

/* 4) Instalaciones Masivas */
body.home .elementor .servicios .servicio-item:nth-child(4) {
  --service-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='m22 21-2-2'/%3E%3Cpath d='M16 16.61A6 6 0 0 0 18 7'/%3E%3C/svg%3E");
}

/* 5) Residencias */
body.home .elementor .servicios .servicio-item:nth-child(5) {
  --service-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

/* 6) Tickets */
body.home .elementor .servicios .servicio-item:nth-child(6) {
  --service-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");
}

/* 7) Seguridad Electronica */
body.home .elementor .servicios .servicio-item:nth-child(7) {
  --service-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10'/%3E%3C/svg%3E");
}

/* 8) Autogestion */
body.home .elementor .servicios .servicio-item:nth-child(8) {
  --service-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2' ry='2'/%3E%3Cline x1='12' y1='18' x2='12.01' y2='18'/%3E%3C/svg%3E");
}

/* Home contact form (Elementor container 2306ffa9) */
body.home .elementor .elementor-element-2306ffa9 .wpcf7 {
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin-inline: auto !important;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form {
  margin: 0 !important;
  padding: clamp(22px, 2.8vw, 34px) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.75rem, 1.4vw, 1rem);
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(0, 238, 255, 0.08) 0%, rgba(0, 238, 255, 0) 55%),
    linear-gradient(180deg, rgba(8, 14, 24, 0.94) 0%, rgba(5, 10, 18, 0.98) 100%) !important;
  border: 1px solid rgba(101, 225, 255, 0.35) !important;
  border-radius: 20px !important;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(167, 242, 255, 0.14) !important;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p {
  margin: 0 !important;
  text-align: left;
  color: #d6e7f7;
  line-height: 1.4;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p br {
  display: none;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):not(:has(.wpcf7-submit)) {
  margin-top: 0.3rem !important;
  margin-bottom: -0.2rem !important;
  font-weight: 650;
  font-size: 1.02rem;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form .wpcf7-form-control-wrap {
  display: block !important;
  width: 100% !important;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form .wpcf7-form-control-wrap[data-name] {
  margin-top: 0.42rem;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form input[type="text"],
body.home .elementor .elementor-element-2306ffa9 .wpcf7-form input[type="email"],
body.home .elementor .elementor-element-2306ffa9 .wpcf7-form input[type="tel"],
body.home .elementor .elementor-element-2306ffa9 .wpcf7-form textarea {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 56px;
  padding: 0.8rem 1rem;
  border: 1.5px solid rgba(0, 231, 255, 0.52) !important;
  border-radius: 12px;
  background: rgba(2, 9, 18, 0.92);
  color: #f4f9ff;
  font-size: 1rem;
  box-sizing: border-box;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form textarea {
  min-height: 190px;
  resize: vertical;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form input::placeholder,
body.home .elementor .elementor-element-2306ffa9 .wpcf7-form textarea::placeholder {
  color: rgba(192, 211, 229, 0.7);
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form input:focus,
body.home .elementor .elementor-element-2306ffa9 .wpcf7-form textarea:focus {
  outline: none;
  border-color: #53ebff !important;
  box-shadow:
    0 0 0 4px rgba(83, 235, 255, 0.18),
    0 10px 24px rgba(0, 10, 24, 0.4);
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form .wpcf7-submit {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(163, 240, 255, 0.34);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #041625;
  background: linear-gradient(135deg, #14ddf2 0%, #239ef0 56%, #3f6df3 100%);
  cursor: pointer;
  box-shadow:
    0 12px 28px rgba(21, 112, 221, 0.35),
    inset 0 1px 0 rgba(236, 255, 255, 0.36);
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7 .wpa-test-msg {
  margin-top: 0.65rem !important;
  border-radius: 12px !important;
  border: 1px solid rgba(117, 223, 255, 0.42) !important;
  background: linear-gradient(180deg, rgba(10, 25, 38, 0.92) 0%, rgba(8, 18, 31, 0.95) 100%) !important;
  color: rgba(196, 224, 241, 0.92) !important;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > .wpa-test-msg,
body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > .wpa-field,
body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > .wpcf7-response-output {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.home .elementor .elementor-element-2306ffa9 .wpcf7 .wpa-test-msg span.wpa-button {
  border-radius: 999px !important;
  background: linear-gradient(135deg, #14ddf2 0%, #239ef0 56%, #3f6df3 100%) !important;
  color: #041625 !important;
  border: 1px solid rgba(157, 239, 255, 0.4) !important;
}

@media (min-width: 820px) {
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 1rem !important;
    row-gap: 0.7rem !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > fieldset,
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p,
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-response-output {
    grid-column: 1 / -1 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(1),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(2),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(4),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(5) {
    grid-column: 1 / 2 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(3),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(6),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(7) {
    grid-column: 2 / 3 !important;
  }

  /* Force stable pairing of labels/inputs generated by CF7 */
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(1) { grid-row: 1 !important; }
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(2) { grid-row: 2 !important; }
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(3) { grid-row: 1 / span 2 !important; }
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(4) { grid-row: 3 !important; }
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(5) { grid-row: 4 !important; }
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(6) { grid-row: 3 !important; }
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(7) { grid-row: 4 !important; }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(8),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(9),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(10) {
    grid-column: 1 / -1 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(8) { grid-row: 5 !important; }
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(9) { grid-row: 6 !important; }
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:nth-of-type(10) { grid-row: 7 !important; }

  /* Stable placement by CF7 field name instead of paragraph index. */
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="text-nombre"]),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="text-nombre"]),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="email-empre"]),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="email-empre"]) {
    grid-column: 1 / 2 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="text-apellido"]),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="text-apellido"]),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="tel-903"]),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="tel-903"]) {
    grid-column: 2 / 3 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="textarea-503"]),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="textarea-503"]),
  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-submit) {
    grid-column: 1 / -1 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="text-nombre"]) {
    grid-row: 1 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="text-nombre"]) {
    grid-row: 2 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="text-apellido"]) {
    grid-row: 1 / span 2 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="text-apellido"]) {
    grid-row: 1 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="text-apellido"]) + p:has(.wpcf7-form-control-wrap[data-name="text-apellido"]) {
    grid-row: 2 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="email-empre"]) {
    grid-row: 3 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="email-empre"]) {
    grid-row: 4 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="tel-903"]) {
    grid-row: 3 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="tel-903"]) {
    grid-row: 4 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:not(:has(.wpcf7-form-control-wrap)):has(+ p .wpcf7-form-control-wrap[data-name="textarea-503"]) {
    grid-row: 5 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-form-control-wrap[data-name="textarea-503"]) {
    grid-row: 6 !important;
  }

  body.home .elementor .elementor-element-2306ffa9 .wpcf7-form > p:has(.wpcf7-submit) {
    grid-row: 7 !important;
  }
}
