/* =========================================================
   VARIABLES
   ========================================================= */

#footer {
  --footer-background: #073792;
  --footer-green: #66b533;
  --footer-white: #ffffff;
  --footer-text: rgba(255, 255, 255, 0.84);
  --footer-muted: rgba(255, 255, 255, 0.68);
  --footer-border: rgba(255, 255, 255, 0.14);
  --footer-bullet: #8a8f98;

  width: 100%;
  margin: 0;
  padding: 0;

  color: var(--footer-white);
  background: var(--footer-background) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}


/* =========================================================
   ESTRUCTURA EXTERIOR
   ========================================================= */

#footer .footer-widget-area,
#footer .elementor-2331,
#footer [data-id="ef02b70"] {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;

  background: var(--footer-background) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#footer [data-id="3390292"] {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 48px 32px 18px !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#footer [data-id="3390292"] > .e-con-inner {
  display: flex !important;
  width: 100% !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 !important;

  flex-direction: column !important;
}


/* =========================================================
   CONTENEDORES INTERNOS
   ========================================================= */

#footer [data-id="531ba9a"] {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;

  flex-direction: column !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Cuatro columnas superiores */
#footer [data-id="42a05a4"] {
  display: grid !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 0 38px !important;

  grid-template-columns:
    minmax(230px, 1.05fr)
    minmax(160px, 0.65fr)
    minmax(260px, 1.1fr)
    minmax(260px, 1fr);

  align-items: start;
  gap: 0;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* =========================================================
   COLUMNAS
   ========================================================= */

#footer [data-id="3ca2726"],
#footer [data-id="838333e"],
#footer [data-id="b7d2d88"],
#footer [data-id="2b4786e"] {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 30px !important;
  flex: none !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#footer [data-id="3ca2726"] {
  padding-left: 0 !important;
}

#footer [data-id="2b4786e"] {
  padding-right: 0 !important;
}

/* Separadores verticales */
#footer [data-id="838333e"],
#footer [data-id="b7d2d88"],
#footer [data-id="2b4786e"] {
  border-left: 1px solid var(--footer-border) !important;
}

/* Alinea toda la columna Nosotros igual que Servicios */
#footer [data-id="838333e"] {
  align-items: flex-start !important;
  justify-content: flex-start !important;

  --align-items: flex-start;
  --justify-content: flex-start;
}

/* El título y el menú ocupan todo el ancho */
#footer [data-id="838333e"] > .elementor-element {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Título Nosotros alineado a la izquierda */
#footer [data-id="838333e"] .tm-text-editor,
#footer [data-id="838333e"] .tm-text-editor p,
#footer [data-id="838333e"] .tm-text-editor strong {
  width: 100%;
  margin-left: 0 !important;
  text-align: left !important;
}

/* Lista Nosotros alineada a la izquierda */
#footer [data-id="838333e"] .tm-sc-simple-nav-menu,
#footer [data-id="838333e"] .tm-sc-simple-nav-menu ul {
  width: 100%;
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-align: left !important;
}


/* =========================================================
   TÍTULOS Y TEXTO
   ========================================================= */

#footer .tm-text-editor,
#footer .tm-text-editor p,
#footer .tm-text-editor strong,
#footer .tm-sc-simple-nav-menu,
#footer .tm-sc-simple-nav-menu a {
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#footer .tm-text-editor p {
  margin-top: 0;

  color: var(--footer-text);
  font-size: 14px;
  line-height: 1.65;
}

#footer .tm-text-editor p strong {
  display: block;
  margin-bottom: 20px;

  color: var(--footer-white);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

#footer [data-id="b1ccc69"] .tm-text-editor p {
  max-width: 340px;
  margin: 0;

  font-size: 14px;
  line-height: 1.7;
}


/* =========================================================
   SOPORTE Y CALL CENTER
   ========================================================= */

#footer .footer-support {
  display: flex;
  width: 100%;
  max-width: 340px;
  margin-top: 24px;

  flex-direction: column;
  align-items: flex-start;
}

#footer .footer-support-title {
  margin: 0 0 16px;

  color: var(--footer-white);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

#footer .footer-support-details {
  display: grid;
  width: 100%;
  margin-bottom: 14px;

  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;

  border-top: 1px solid var(--footer-border);
  padding-top: 14px;
}

#footer .footer-support-details p {
  display: flex;
  margin: 0;

  flex-direction: column;
  gap: 3px;

  color: var(--footer-text);
  font-size: 12px;
  line-height: 1.4;
}

#footer .footer-support-details strong {
  color: var(--footer-white);
  font-size: 12px;
  font-weight: 600;
}

#footer .footer-support-details span {
  color: var(--footer-muted);
}

#footer .footer-support-phone {
  display: inline-flex;
  min-height: 40px;
  padding: 0 15px;

  align-items: center;
  justify-content: center;
  gap: 8px;

  color: var(--footer-white) !important;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;

  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

#footer .footer-support-phone:hover,
#footer .footer-support-phone:focus-visible {
  background: var(--footer-green);
  border-color: var(--footer-green);

  outline: none;
  transform: translateY(-2px);
}

#footer .footer-support-phone svg {
  width: 17px;
  height: 17px;
}

#footer .footer-support-message {
  max-width: 310px;
  margin: 14px 0 12px;

  color: var(--footer-text);
  font-size: 12px;
  line-height: 1.5;
}

#footer .footer-support-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Botón Escríbenos */
#footer .footer-support .elementor-button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 18px;

  align-items: center;
  justify-content: center;

  color: var(--footer-white) !important;
  background: var(--footer-green) !important;
  border: 1px solid var(--footer-green);
  border-radius: 999px;

  font-size: 13px;
  font-weight: 700;
  text-decoration: none;

  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

#footer .footer-support .elementor-button:hover,
#footer .footer-support .elementor-button:focus-visible {
  background: #57a026 !important;
  border-color: var(--footer-white);

  outline: none;
  transform: translateY(-2px);
}

#footer .footer-support .elementor-button-icon svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}


/* =========================================================
   LISTAS NOSOTROS Y SERVICIOS
   ========================================================= */

#footer .tm-sc-simple-nav-menu ul {
  margin: 0;
  padding: 0;

  list-style: none;
}

#footer .tm-sc-simple-nav-menu li {
  margin: 0 0 11px;
  padding: 0;
}

/* Oculta los iconos antiguos rotos */
#footer .tm-nav-arrow-icon {
  display: none !important;
}

#footer .tm-sc-simple-nav-menu a {
  display: grid;
  width: fit-content;

  grid-template-columns: 11px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;

  color: var(--footer-text) !important;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;

  transition:
    color 160ms ease,
    transform 160ms ease;
}

/* Círculo gris para enlaces principales */
#footer .tm-sc-simple-nav-menu a::before {
  width: 9px;
  height: 9px;

  background: var(--footer-bullet);
  border-radius: 50%;

  content: "";
}

/* Movimiento al pasar el mouse */
#footer .tm-sc-simple-nav-menu a:hover,
#footer .tm-sc-simple-nav-menu a:focus-visible {
  color: #9bd667 !important;

  outline: none;
  transform: translateX(3px);
}


/* =========================================================
   SERVICIOS EN UNA COLUMNA
   ========================================================= */

#footer #menu-servicios {
  display: block;
  width: 100%;
}

#footer #menu-servicios > li {
  margin-bottom: 11px;
}

/* Tres servicios de Manejo Respiratorio */
#footer #menu-servicios .sub-menu {
  display: block;
  margin-top: 10px;
  padding-left: 20px;
}

#footer #menu-servicios .sub-menu li {
  margin-bottom: 9px;
}

#footer #menu-servicios .sub-menu a {
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 13px;
}

#footer #menu-servicios .sub-menu a::before {
  width: 8px;
  height: 8px;

  background: transparent;
  border: 2px solid var(--footer-bullet);
  border-radius: 50%;
}


/* =========================================================
   UBICACIÓN Y MAPA
   ========================================================= */

#footer [data-id="4c9330a"],
#footer [data-id="97b5661"] {
  width: 100% !important;
  margin: 0 !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#footer [data-id="4c9330a"] {
  padding: 0 0 18px !important;
  border-bottom: 0 !important;
}

#footer [data-id="97b5661"] {
  padding: 18px 0 0 !important;
}

#footer [data-id="22800ff"] a {
  color: var(--footer-text) !important;
  text-decoration: none;
}

#footer [data-id="22800ff"] a:hover,
#footer [data-id="22800ff"] a:focus-visible {
  color: #9bd667 !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#footer .footer-locations p {
  margin: 0 0 10px;
  color: var(--footer-text);
  font-size: 13px;
  line-height: 1.28;
}

#footer .footer-locations p:last-child {
  margin-bottom: 0;
}

#footer .footer-locations p strong {
  display: inline-block;
  margin: 0 0 6px !important;
  color: var(--footer-white);
  font-size: 16px !important;
  font-weight: 700;
}

#footer .footer-locations span {
  display: inline-block;
  margin-top: 9px;
  color: var(--footer-muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

#footer .footer-locations a + a {
  margin-left: 5px;
}

#footer .footer-locations a.contact-call-button {
  display: inline-flex !important;
  min-height: 0 !important;
  padding: 3px 7px !important;
  align-items: center;
  color: var(--footer-muted) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.34) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
}

#footer .footer-locations a.contact-call-button:hover,
#footer .footer-locations a.contact-call-button:focus-visible {
  color: var(--footer-white) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  transform: none;
}

#footer .footer-locations .contact-call-icon {
  display: none !important;
}

/* Mapa insertado desde footer-runtime.js */
#footer .footer-map {
  position: relative;

  width: 100%;
  height: 125px;
  margin-top: 14px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
}

#footer .footer-map iframe {
  display: block;
  width: 100%;
  height: 100%;

  border: 0;
  filter: saturate(0.8) contrast(0.95);
}

#footer .footer-map-link {
  position: absolute;
  right: 8px;
  bottom: 8px;

  padding: 6px 10px;

  color: #073792 !important;
  background: var(--footer-white);
  border-radius: 999px;

  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
}




/* =========================================================
   LOGO Y REDES SOCIALES
   ========================================================= */

#footer [data-id="fb7b212"] {
  display: flex !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 20px 0 !important;

  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px;

  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--footer-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

#footer [data-id="4cfd5db"],
#footer [data-id="28b95ba"],
#footer [data-id="52746ef"] {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#footer [data-id="590f940"] .site-brand img {
  display: block;
  width: auto;
  max-width: 145px;
  height: auto;
}


/* =========================================================
   SVG DE REDES SOCIALES
   ========================================================= */

#footer .tm-sc-social-links {
  display: flex;
  margin: 0;
  padding: 0;

  align-items: center;
  gap: 10px;

  list-style: none;
}

#footer .tm-sc-social-links li {
  margin: 0;
  padding: 0;
}

#footer .tm-sc-social-links .social-link {
  display: inline-flex;
  width: 40px;
  height: 40px;

  align-items: center;
  justify-content: center;

  background-color: rgba(255, 255, 255, 0.08);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 19px 19px;

  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;

  font-size: 0;
  text-decoration: none;

  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

/* Oculta la fuente antigua */
#footer .tm-sc-social-links .social-link i {
  display: none !important;
}

/* Archivos SVG que tú vas a colocar */
/* El SVG se utiliza como máscara para poder cambiar su color */
#footer .tm-sc-social-links .social-link {
  background-image: none;
}

#footer .tm-sc-social-links .social-link::before {
  width: 19px;
  height: 19px;

  background-color: #ffffff;

  content: "";
  transition: background-color 160ms ease;

  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;

  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

#footer
  .tm-sc-social-links
  .social-link[href*="facebook"]::before {
  -webkit-mask-image: url("/assets/icons/facebook.svg");
  mask-image: url("/assets/icons/facebook.svg");
}

#footer
  .tm-sc-social-links
  .social-link[href*="linkedin"]::before {
  -webkit-mask-image: url("/assets/icons/linkedin.svg");
  mask-image: url("/assets/icons/linkedin.svg");
}

#footer
  .tm-sc-social-links
  .social-link[href*="instagram"]::before {
  -webkit-mask-image: url("/assets/icons/instagram.svg");
  mask-image: url("/assets/icons/instagram.svg");
}

#footer .tm-sc-social-links .social-link:hover::before,
#footer .tm-sc-social-links .social-link:focus-visible::before {
  background-color: #111111;
}


/* =========================================================
   COPYRIGHT
   ========================================================= */

#footer [data-id="48f71e9"] {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 0 0 !important;

  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

#footer [data-id="48f71e9"] p {
  margin: 0;

  color: var(--footer-muted);
  font-size: 12px;
  line-height: 1.5;
}


/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 1100px) {
  #footer [data-id="3390292"] {
    padding: 42px 24px 18px !important;
  }

  #footer [data-id="42a05a4"] {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);

    gap: 36px 26px;
  }

  #footer [data-id="3ca2726"],
  #footer [data-id="838333e"],
  #footer [data-id="b7d2d88"],
  #footer [data-id="2b4786e"] {
    padding: 0 !important;
    border-left: 0 !important;
  }
}

/* =========================================================
   FOOTER RESPONSIVE DEFINITIVO
   ========================================================= */

@media (max-width: 767px) {
  #site-footer,
  #footer,
  #footer *,
  #footer *::before,
  #footer *::after {
    box-sizing: border-box !important;
  }

  #site-footer,
  #footer,
  #footer .footer-widget-area,
  #footer .elementor-2331,
  #footer [data-id="ef02b70"] {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Este es el espacio lateral real del footer */
  #footer [data-id="3390292"] {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 38px 26px 20px !important;

    --padding-top: 38px !important;
    --padding-right: 26px !important;
    --padding-bottom: 20px !important;
    --padding-left: 26px !important;
  }

  #footer [data-id="3390292"] > .e-con-inner,
  #footer [data-id="531ba9a"] {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    flex-direction: column !important;
  }

  #footer [data-id="42a05a4"] {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 28px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
  }

  /* No repetir presentación y Call Center dentro del footer */
  #footer [data-id="3ca2726"] {
    display: none !important;
  }

  #footer [data-id="838333e"],
  #footer [data-id="b7d2d88"],
  #footer [data-id="2b4786e"] {
    display: flex !important;
    visibility: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 26px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    opacity: 1 !important;
    transform: none !important;
  }

  #footer [data-id="2b4786e"] {
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
  }

  /* Este contenedor vacío causaba el espacio azul exagerado */
  #footer [data-id="97b5661"] {
    display: none !important;
  }

  #footer [data-id="4c9330a"] {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #footer .tm-text-editor,
  #footer .tm-text-editor p,
  #footer .tm-sc-simple-nav-menu,
  #footer .tm-sc-simple-nav-menu ul,
  #footer .footer-locations {
    width: 100% !important;
    max-width: 100% !important;
  }

  #footer .tm-text-editor p strong {
    display: block !important;
    margin-bottom: 16px !important;
    font-size: 21px !important;
    line-height: 1.2 !important;
  }

  #footer .tm-sc-simple-nav-menu li {
    margin: 0 0 5px !important;
  }

  #footer .tm-sc-simple-nav-menu a {
    display: inline-flex !important;
    width: auto !important;
    min-height: 36px !important;
    padding: 5px 0 !important;
  }

  #footer #menu-servicios .sub-menu {
    margin: 2px 0 8px !important;
    padding-left: 20px !important;
  }

  #footer .footer-locations p {
    margin: 0 0 22px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  #footer .footer-locations p:last-child {
    margin-bottom: 0 !important;
  }

  #footer .footer-locations span {
    display: flex !important;
    width: 100% !important;
    margin-top: 10px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    white-space: normal !important;
  }

  #footer .footer-locations a + a {
    margin-left: 0 !important;
  }

  #footer [data-id="fb7b212"] {
    display: flex !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 24px 0 8px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  }

  #footer [data-id="fb7b212"] > .elementor-element,
  #footer [data-id="4cfd5db"],
  #footer [data-id="28b95ba"],
  #footer [data-id="52746ef"] {
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #footer [data-id="48f71e9"],
  #footer [data-id="48f71e9"] p {
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #footer a,
  #footer .social-link {
    transition: none !important;
  }
}


.footer-legal {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-legal p {
  margin: 0;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-legal-links a {
  color: inherit;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.footer-legal-links a:hover {
  opacity: 0.75;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .footer-legal {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }
}