/* UX / responsive overrides — loaded after style.css and responsive.css */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

#page {
  overflow: visible;
  overflow-x: hidden;
  max-width: 100%;
}

.wow {
  visibility: visible !important;
  opacity: 1 !important;
  animation: none !important;
}

#contacto,
#contacts-1 {
  scroll-margin-top: 90px;
}

.hero-1-img {
  margin-left: 0;
}

.hero-1-img img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: inline-block;
}

/* Higiene and plomo use the same promo.png hero as home (graphic on the right).
   Hide leftover doctor photos so they cannot cover the left text. */
.page-higiene #hero-1,
.page-plomo #hero-1 {
  background-image: url(../images/promo.png) !important;
}

.page-plomo .info-6-img {
  display: none !important;
  background: none !important;
}

.page-plomo #services-7 .section-title p {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.section-title.section-title-full p {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.page-plomo #services-7 {
  padding-bottom: 110px;
}

.page-plomo #services-7 .risk-intro {
  text-align: left;
  margin-bottom: 30px;
}

.page-plomo #services-7 .risk-intro h2 {
  margin-bottom: 18px;
}

.page-plomo #services-7 .risk-intro p {
  color: #888;
  margin-bottom: 0;
  padding: 0 !important;
}

@media (min-width: 992px) {
  .page-plomo #services-7 .risk-intro {
    margin-bottom: 0;
    padding-right: 20px;
  }

  .page-plomo #services-7 .sbox-7 {
    margin-bottom: 20px;
  }
}

#abox-4 .abox-1 > h5,
.services-7-table.blue-table > h5.h5-md {
  margin-bottom: 0;
}

.services-7-table .table td.text-right,
.abox-1 .table td.text-right {
  white-space: nowrap;
}

#abox-1 .box-list,
#abox-2 .box-list {
  display: flex;
  align-items: flex-start;
  margin: 0 0 16px;
}

#abox-1 .box-list:last-child,
#abox-2 .box-list:last-child {
  margin-bottom: 0;
}

#abox-1 .box-list-icon,
#abox-2 .box-list-icon {
  float: none;
  flex: 0 0 16px;
  margin: 5px 8px 0 0;
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0.85;
  font-weight: 400;
}

#abox-1 .box-list h5,
#abox-2 .box-list h5 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
}

.page-plomo #about-1 #abox-1 .abox-1 > h5.h5-md,
.page-plomo #about-1 #abox-2 .abox-1 > h5.h5-md {
  margin-bottom: 18px;
}

#hero-1 .hero-txt {
  max-width: 100%;
}

#hero-1 .hero-txt p {
  padding-right: 0 !important;
}

.hero-chips {
  display: none;
}

@media (max-width: 991.98px) {
  #wsnavtoggle,
  .wsmenu {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .headtoppart {
    height: 36px;
  }

  .headtoppart .headerwp {
    max-width: 1140px;
    height: 36px;
    padding: 0 15px;
    display: flex;
    align-items: center;
  }

  .headertopleft {
    width: 100%;
    float: none;
    padding-left: 0;
  }

  .headtoppart .address {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 16px;
  }

  /* clearfix::after becomes a flex item and breaks space-between */
  .headtoppart .address::after {
    display: none;
    content: none;
  }

  .headtoppart .address span,
  .headtoppart .address a.callusbtn {
    line-height: 36px;
    margin-right: 0;
  }

  .headtoppart .address a.callusbtn {
    margin-left: auto;
    white-space: nowrap;
    font-weight: 600;
  }

  .wsmainfull {
    height: 64px;
  }

  .desktoplogo {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0;
  }

  .desktoplogo img {
    width: auto !important;
    height: 56px !important;
  }

  .wsmenu > .wsmenu-list > li > a {
    padding-top: 7px;
    padding-bottom: 7px;
    line-height: 40px;
  }

  .wsmenu > .wsmenu-list > li.header-btn a {
    margin-top: 12px;
  }
}

#lead-form .form-group {
  margin-bottom: 18px;
}

#lead-form label {
  display: block;
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 6px;
  padding: 0;
  overflow: visible;
  clip: auto;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #1e4f7a;
  line-height: 1.35;
}

#lead-form .form-control,
#lead-form .custom-select {
  margin-bottom: 4px;
}

#lead-form textarea.form-control {
  min-height: 110px;
  height: 110px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.maps-cta {
  display: inline-block;
  margin-top: 10px;
  color: #00a3c8;
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
}

.maps-cta i {
  margin-right: 6px;
}

.maps-cta:hover,
.maps-cta:focus {
  color: #1e4f7a;
}

#banner-7 {
  background-position: 20% center;
  background-size: cover;
}

#banner-7 .banner-txt {
  padding-right: 0 !important;
}

#banner-7 .banner-txt h2 {
  font-size: 2.35rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

#banner-7 .banner-title-2line {
  white-space: nowrap;
}

#info-6 .title-2line,
#info-7 .title-2line {
  white-space: nowrap;
  line-height: 1.25;
}

.sbox-7 {
  display: flex;
  align-items: center;
  padding: 22px 20px;
  min-height: 0;
}

.sbox-7 > a {
  display: flex;
  align-items: center;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.sbox-7 span,
.sbox-7 > a span {
  float: none;
  flex: 0 0 56px;
  margin-top: 0;
}

.sbox-7 span img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.sbox-7-txt {
  padding-left: 12px;
  overflow: visible;
}

.sbox-7 h5 {
  margin: 0 !important;
}

.sbox-7 h5 br {
  display: none;
}

.sbox-7 .p-sm {
  display: none;
}

#gallery-1 .gallery-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 10px !important;
  margin-bottom: 10px !important;
}

#gallery-1 .img-fluid {
  max-width: 80% !important;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.form-microcopy {
  margin: 10px 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #6b7c93;
}

.form-consent {
  margin: 0 0 8px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #6b7c93;
}

.form-consent a {
  color: inherit;
  text-decoration: underline;
}

#gallery-1 .hover-overlay img,
#gallery-1 .gallery-item:hover img {
  transform: none !important;
  transition: none !important;
}

#gallery-1 .item-overlay,
#gallery-1 .image-zoom {
  display: none !important;
}

.wide-60 img[src*="cofepris"],
.wide-60 img[src*="Imagen2"] {
  max-width: 220px;
  width: 100%;
  height: auto !important;
}

@media (min-width: 992px) {
  #about-1 {
    margin-top: -40px;
  }
}

@media (max-width: 1199.98px) {
  .hero-1-img {
    margin-left: 0 !important;
  }

  .hero-1-img img {
    width: 100% !important;
  }
}

@media (max-width: 991.98px) {
  #about-1,
  #about-2,
  #about-3 {
    margin-top: 24px !important;
  }

  #about-1 .row {
    margin-left: -10px;
    margin-right: -10px;
  }

  #about-1 [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  #about-1 .abox-1 {
    height: auto !important;
    overflow: visible;
    padding: 28px 24px !important;
    margin-bottom: 12px;
  }

  #abox-1,
  #abox-2,
  #abox-4 {
    border-radius: 6px !important;
  }

  #about-1 .table td,
  #about-1 .table th {
    white-space: nowrap;
    font-size: 15px;
    padding: 8px 0;
  }

  #info-6,
  #info-7 {
    display: flex;
    flex-direction: column;
    padding-top: 0 !important;
    padding-bottom: 40px !important;
  }

  #info-6 .info-6-img,
  #info-7 .info-7-img {
    order: -1;
    position: relative !important;
    left: 0 !important;
    width: 100% !important;
    height: 220px !important;
    margin-top: 0 !important;
    background-position: center top;
  }

  #info-6 .col-lg-6.offset-lg-6,
  #info-7 .col-lg-6.offset-lg-6 {
    margin-left: 0;
    max-width: 100%;
    flex: 0 0 100%;
  }

  #info-6 .txt-block,
  #info-7 .txt-block {
    padding: 36px 24px 20px !important;
  }

  .sbox-7 {
    padding: 18px 16px;
    margin-bottom: 16px;
  }
}

@media (max-width: 767.98px) {
  #hero-1,
  .page-higiene #hero-1,
  .page-plomo #hero-1 {
    background-color: #fff !important;
    background-image: none !important;
    background-attachment: scroll !important;
    text-align: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 24px !important;
    padding-bottom: 28px !important;
  }

  #hero-1 > .container {
    width: 100%;
  }

  #hero-1 .hero-txt {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    text-align: center;
    padding: 0 8px;
  }

  #hero-1 h1 {
    font-size: 2.05rem !important;
    line-height: 1.28;
    font-weight: 800;
    margin-bottom: 16px !important;
    overflow-wrap: break-word;
  }

  #hero-1 h5 {
    font-size: 0.9rem !important;
    margin-bottom: 12px !important;
  }

  #hero-1 .hero-txt p {
    font-size: 1.12rem !important;
    line-height: 1.55;
    margin-bottom: 22px !important;
    padding-right: 0 !important;
  }

  #hero-1 .btn {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
  }

  #hero-1 .hero-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
  }

  #hero-1 .hero-chips li {
    background: #fff;
    border: 1px solid rgba(0, 72, 97, 0.16);
    border-radius: 999px;
    color: #004861;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    padding: 8px 14px;
  }

  #hero-1 .hero-1-img,
  #hero-1 .col-md-4 {
    display: none !important;
  }

  #gallery-1 .gallery-item {
    flex: 0 0 50%;
    max-width: 50%;
    width: 50%;
    min-height: 88px;
  }

  #contacts-1 .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  #lead-form label {
    line-height: 1.45;
    font-size: 15px;
  }

  #lead-form input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.15);
    vertical-align: middle;
  }

  .wide-60 .row {
    margin-left: 0;
    margin-right: 0;
  }

  .section-title p {
    padding: 0 4% !important;
  }

  #banner-7 {
    background-position: 15% center;
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }

  #banner-7 .banner-txt {
    padding-right: 0 !important;
  }

  #banner-7 .banner-txt h2 {
    font-size: 1.55rem !important;
    line-height: 1.28;
  }
}

@media (max-width: 575.98px) {
  #hero-1 h1 {
    font-size: 1.6rem !important;
  }

  #info-6 .txt-block,
  #info-7 .txt-block {
    padding: 28px 18px 16px !important;
  }
}

.page-gracias {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-gracias .gracias-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: 80px 24px 96px;
}

.page-gracias .gracias-card {
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.page-gracias .gracias-card h1 {
  margin: 0 0 2rem;
  line-height: 1.25;
}

.page-gracias .gracias-lead {
  color: #555;
  font-size: 1.125rem;
  line-height: 1.75;
  margin: 0 0 2.75rem;
  padding: 0;
}

.page-gracias .gracias-steps {
  list-style: none;
  counter-reset: gracias-step;
  text-align: left;
  margin: 0 auto 3rem;
  padding: 0;
  width: max-content;
  max-width: 100%;
}

.page-gracias .gracias-steps li {
  counter-increment: gracias-step;
  position: relative;
  padding: 1rem 0 1rem 2.75rem;
  color: #555;
  line-height: 1.55;
}

.page-gracias .gracias-steps li::before {
  content: counter(gracias-step);
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #00a3c8;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.75rem;
  text-align: center;
}

.page-gracias .gracias-home {
  margin: 0.75rem 0 0;
  padding: 14px 28px;
}

.page-gracias .gracias-urgent {
  margin: 2.5rem 0 0;
  color: #888;
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (min-width: 992px) {
  .page-gracias .gracias-card h1,
  .page-gracias .gracias-lead,
  .page-gracias .gracias-steps li,
  .page-gracias .gracias-urgent {
    white-space: nowrap;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1320px;
  }

  .headerwp,
  .headtoppart .headerwp,
  .wsmainwp {
    max-width: 1320px;
  }
}

/* Heading tags changed for SEO keep previous visual styles */
#hero-1 .hero-kicker,
#hero-1 h5 {
  display: block;
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 25px;
}

h3.h5-sm { font-size: 1.1875rem; }
h3.h5-md,
p.h5-md { font-size: 1.25rem; }
h2.h5-md { font-size: 1.25rem; font-weight: 700; }
h3.h4-xs { font-size: 1.625rem; }

.sbox-7 h3 {
  line-height: 1;
  margin-bottom: 10px;
}

.abox-1 h3 {
  line-height: 1;
  margin-bottom: 25px;
}

#abox-4 .abox-1 > h5,
#abox-4 .abox-1 > p.h5-md,
.services-7-table.blue-table > h5.h5-md,
.services-7-table.blue-table > p.h5-md {
  margin-bottom: 0;
}

#abox-1 .box-list h5,
#abox-1 .box-list p,
#abox-2 .box-list h5,
#abox-2 .box-list p {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
}

.page-plomo #about-1 #abox-1 .abox-1 > h5.h5-md,
.page-plomo #about-1 #abox-1 .abox-1 > h3.h5-md,
.page-plomo #about-1 #abox-2 .abox-1 > h5.h5-md,
.page-plomo #about-1 #abox-2 .abox-1 > h3.h5-md {
  margin-bottom: 18px;
}

.services-7-table h3 {
  margin-bottom: 15px;
}

.contact-box h3 {
  line-height: 1;
  font-weight: 700;
  margin-bottom: 15px;
}

.txt-block h3.h5-md {
  margin-top: 15px;
  margin-bottom: 15px;
}

@media (max-width: 991.98px) {
  #hero-1 .hero-kicker {
    font-size: 0.9rem !important;
    margin-bottom: 12px !important;
  }
}

.page-aviso .aviso-legal {
  color: #555;
  line-height: 1.7;
}

.page-aviso .aviso-legal h1 {
  margin-bottom: 8px;
}

.page-aviso .aviso-brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #00a3c8;
  margin-bottom: 24px;
}

.page-aviso .aviso-legal h2 {
  margin: 32px 0 12px;
  line-height: 1.35;
}

.page-aviso .aviso-legal p {
  margin-bottom: 14px;
}

.page-aviso .aviso-legal ul {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}

.page-aviso .aviso-legal li {
  margin-bottom: 8px;
}

.page-aviso .aviso-pdf {
  margin: 8px 0 28px;
}

.page-aviso .aviso-pdf a {
  font-weight: 700;
  color: #00a3c8;
}

.wsmobileheader .smllogo img,
.desktoplogo img {
  width: auto;
  height: auto;
  object-fit: contain;
}

.wsmobileheader .smllogo img {
  height: 48px;
  max-width: min(200px, calc(100vw - 120px));
}

/* Sticky CTA móvil */
.ml-sticky-cta {
  display: none;
}

@media (max-width: 767px) {
  .ml-sticky-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #d9e2ea;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }

  .ml-sticky-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 100%;
    border-radius: 4px;
    background: #00a3c8;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
  }

  body {
    padding-bottom: 72px;
  }
}

#examenes-ingreso,
#periodicos,
#unidad-movil,
#estudios,
#higiene-industrial,
#ruido,
#iluminacion,
#agentes-quimicos,
#ergonomia,
#plomo,
#metales-pesados,
#industrias,
#antidoping,
#proceso,
#empresas,
#seleccion-personal,
#que-evaluamos,
#resultados-rh,
#aplicacion,
#clientes {
  scroll-margin-top: 90px;
}

.ml-service-cards .sbox-7 {
  min-height: 180px;
}

.ml-service-cards a.sbox-7-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ml-service-cards a.sbox-7-link:hover .h5-sm {
  color: #00a3c8;
}

