section.bloque-empresas {
  min-height: 90vh;
  padding: 5rem 0 9rem 0;
  overflow-x: hidden;
}

.grid-mosaico {
  --size: 120px;
  --gap-x: -120px;
  --overlap-y: -25px;

  width: fit-content;
  max-width: none;
  margin: 70px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grid-mosaico__row {
  display: flex;
  justify-content: center;
  align-items: center;
  /* gap: var(--gap-x); */
  gap: 0;
  margin-top: var(--overlap-y);
  position: relative;
}

.grid-mosaico__row:first-child {
  margin-top: 0;
}

.grid-mosaico__row--1 {
  margin-bottom: 20px;
}

.grid-mosaico__row--3 {
  transform: translateX(calc((var(--size) + var(--gap-x)) * 0.5));
}

.grid-mosaico__row--4 {
  transform: translateX(0);
}

.grid-mosaico__cell {
  width: var(--size);
  height: var(--size);
  margin: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.grid-mosaico__cell--big {
  width: calc(var(--size) * 1.72);
  height: calc(var(--size) * 1.72);
}

.grid-mosaico__item {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    filter 0.25s ease;
}

.grid-mosaico__item:hover {
  transform: scale(1.05);
  /* filter: drop-shadow(0 0 6px rgba(var(--su-glow, 0, 255, 42), 0.6))
    drop-shadow(0 0 14px rgba(var(--su-glow, 0, 255, 42), 0.35)); */
  z-index: 5;
}

.grid-mosaico__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-mosaico__icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(45deg);
  transform-origin: center;
  pointer-events: none;
}

.grid-mosaico__cell--big .grid-mosaico__icon {
  width: 100%;
  height: 100%;
}

/* =========================
   FLASH / ENCENDIDO ROMBOS
========================= */

.grid-mosaico__cell {
  will-change: transform, opacity, filter;
}

.grid-mosaico__item {
  will-change: transform, opacity, filter;
}

.grid-mosaico__icon {
  will-change: transform, opacity, filter;
  opacity: 0.18;
  filter: brightness(0.55) drop-shadow(0 0 0 rgba(0, 255, 42, 0));
}

.grid-mosaico.is-ready .grid-mosaico__icon {
  opacity: 1;
}

/* =========================
   MODAL PEQUEÑA
========================= */

.empresas-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.empresas-modal.is-active {
  display: block;
}

.empresas-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.empresas-modal__dialog {
  position: absolute;
  top: 50%;
  right: clamp(24px, 4vw, 64px);
  width: min(92vw, 460px);
  transform: translateY(-50%);
  pointer-events: none;
}

.empresas-modal__content {
  position: relative;
  background: #fafafa;
  color: #737373;
  border-radius: 10px;
  padding: 30px 30px 26px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateX(40px) scale(0.96);
  pointer-events: auto;
  backdrop-filter: blur(2px);
}

.empresas-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.empresas-modal__close svg {
  width: 32px;
  height: 32px;
  display: block;
}

.empresas-modal__logo {
  display: block;
  width: max-content;
  min-height: 70px;
  margin-bottom: 22px;
}

.empresas-modal__logo img {
  display: block;
  max-width: 180px;
  width: 100%;
  height: auto;
}
.empresas-modal__logo-img.somosuno-svg-inline svg {
  width: 150px;
}

.empresas-modal__title {
  margin: 0 0 14px;
  font-size: 2.3rem;
  line-height: 0.95;
  font-weight: 800;
  color: var(--color-black);
}

.empresas-modal__desc {
  display: block;
  width: 100%;
  height: 150px;
  overflow-y: scroll;
  color: var(--color-black);
  font-size: 1.2rem;
  line-height: 1.1;
}

.empresas-modal__desc p {
  margin: 0;
}

.empresas-modal__footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 991px) {
  .empresas-modal__dialog {
    right: 50%;
    width: min(92vw, 460px);
    transform: translate(50%, -50%);
  }
}

/* Modal */
.empresas-modal__footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.empresas-modal__footer .empresas-modal__cta {
  --su-color: #ef8d17;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  text-decoration: none;
  color: var(--su-color);
}

.empresas-modal__footer .empresas-modal__cta .somosuno-arrow-inline__text {
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  color: var(--su-color);
  white-space: nowrap;
}

.empresas-modal__footer .empresas-modal__cta .somosuno-arrow-btn {
  color: var(--su-color);
}

.empresas-modal__footer .empresas-modal__cta .somosuno-arrow-btn--modal-cta {
  --su-size: 58px;
  --su-stroke: 2.1;
  --su-arrow-shift: 12px;
  min-width: var(--su-size);
  min-height: var(--su-size);
  flex: 0 0 auto;
}

.empresas-modal__footer
  .empresas-modal__cta
  .somosuno-arrow-btn:hover
  .somosuno-arrow-btn__circle,
.empresas-modal__footer
  .empresas-modal__cta
  .somosuno-arrow-btn:hover
  .somosuno-arrow-btn__arrow {
  filter: none !important;
}

/* =========================
   MODAL GRANDE
========================= */

.empresas-modal-large {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  background: transparent;
}

.empresas-modal-large.is-active {
  display: block;
}

.empresas-modal-large.modal-empresas__light .empresas-modal-large__panel {
  background-color: var(--color-white);
}

.empresas-modal-large.modal-empresas__dark .empresas-modal-large__panel {
  background-color: var(--color-black);
  color: var(--color-white);

  .empresas-modal-large__bio,
  .empresas-modal-large__back,
  .empresas-modal-large__back-text,
  .empresas-modal-large__puesto {
    color: var(--color-white);
  }
  .agencia_logo--inline-cta
    .empresas-modal-large__logo-img.somosuno-svg-inline
    svg {
    fill: var(--color-white);
  }

  .empresas-modal-large__close {
    color: var(--color-white);
  }
}

h4.empresas-modal-large__puesto {
  font-size: 1.4rem;
}

.empresas-modal-large__panel {
  position: absolute;
  inset: 0;
  background: #efefef;
  overflow: hidden;
}

.empresas-modal-large__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transform-origin: center;
}

.empresas-modal-large__close svg {
  width: 34px;
  height: 34px;
  display: block;
}

.empresas-modal-large__bg-rombo {
  position: absolute;
  left: -9vw;
  top: 50%;
  width: 44%;
  aspect-ratio: 1 / 1;
  transform: translateY(-50%) rotate(45deg);
  opacity: 0;
  filter: blur(6px);
}

.empresas-modal-large__bg-rombo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: translate(9%, -9%);
}

.empresas-modal-large__inner {
  position: relative;
  z-index: 2;
  max-width: 90%;
  margin: 0 auto;
  min-height: 100vh;
  padding: 50px 10px 70px 44%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.empresas-modal-large__head {
  display: flex;
  align-items: flex-start;
  flex-direction: row;
  gap: 25px;
  margin-bottom: 28px;
}

.empresas-modal-large__sidecontent {
  padding-top: 0.5rem;
}

.empresas-modal-large--link-bio {
  padding: 1rem;
  display: flex;
  justify-content: center;
}

.empresas-modal-large__director-image {
  width: 150px;
  min-width: 150px;
  height: 150px;
  border: 3px solid var(--agencia-color);
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 150px;
  opacity: 0;
}

.empresas-modal-large__director-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empresas-modal-large--link-bio__link {
  display: inline-block;
}

.empresas-modal-large--link-bio__link {
  display: inline-block;
  text-decoration: none;
}

.empresas-modal-large--link-bio__link svg {
  width: 30px;
  height: 30px;
  fill: var(--agencia-color) !important;
}

.empresas-modal-large__director-name {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 400;
  color: var(--agencia-color);
  opacity: 0;
  margin-bottom: 1rem;
  position: relative;
}

.empresas-modal-large__director-name:before {
  content: "Líder: ";
  font-weight: 800;
}

.empresas-modal-large__bio {
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.28;
  color: var(--color-black);
  opacity: 0;
}

.empresas-modal-large__bio p {
  margin: 0 0 22px;
}

.empresas-modal-large__logo {
  margin-top: 26px;
  max-width: 220px;
  opacity: 0;
}

.agencia_logo--inline-cta
  .empresas-modal-large__logo-img.somosuno-svg-inline
  svg {
  width: 120px;
}

.somos-single-agencia__contact-action .empresas-modal-large__logo-img {
  width: 120px;
}

.somos-single-agencia__contact-action.botonera-extra a {
  margin-left: -1rem;
}

.empresas-modal-large__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.empresas-modal-large__bullets-box {
}

.empresas-modal-large__bullet-content {
  text-align: center;
  padding-top: 0.8rem;
  font-size: 14px;
  line-height: 1;
  color: var(--agencia-color) !important;
  font-weight: 600;
}

.empresas-modal-large__bullets-box h4 {
  color: var(--agencia-color);
}

.contenedor-info {
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  height: calc(50vh - 30px);

  b,
  strong {
    color: var(--agencia-color) !important;
  }
}

.empresas-modal-large__bullets-grid {
  width: 100%;
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.empresas-modal-large__bullet-icon {
  display: block;
  width: 100%;
  height: 60px;
}

img.empresas-modal-large__bullet-icon-img {
  width: 100%;
  height: 60px;
  object-fit: contain;
}

svg.empresas-modal-large__bullet-icon-img {
  width: 100%;
  height: 60px;
  fill: var(--agencia-color);
}

.empresas-modal-large__footer {
  margin-top: 2rem;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  opacity: 0;
}

.empresas-modal-large__back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
}

.empresas-modal-large__back-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ef3c17;
  flex: 0 0 34px;
}

.empresas-modal-large__bloque-final {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding-top: 1rem;
}

.empresas-modal-large__back-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.empresas-modal-large__back-circle,
.empresas-modal-large__back-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empresas-modal-large__back-text {
  font-size: 1rem;
  line-height: 1;
  color: var(--color-black);
  position: relative;
  top: 1px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .empresas-modal-large__inner {
    padding: 2rem 0 2rem 15%;
  }
}

@media (max-width: 991px) {
  .empresas-modal-large__inner {
    padding: 50px 0 30px 0;
  }
  .extraleft {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .empresas-modal-large__bg-rombo {
    position: absolute;
    left: auto;
    top: auto;
    transform: none;
    width: 300px;
    transform: rotate(45deg) !important;
    margin: 0;
  }

  .empresas-modal-large__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media screen and (max-width:950px){
	    .grid-mosaico.js-grid-mosaico {
        --scale: calc(2.5 / 3);
        transform: scale(var(--scale)) translateX(-2vw);

    }
}

@media screen and (max-width:900px){
	.grid-mosaico.js-grid-mosaico {
        --scale: calc(2 / 3);
        transform: scale(var(--scale)) translateX(0);
		width: auto!important;
    }
}



@media (max-width: 680px) {

  section.bloque-empresas {
    min-height: 50vh;
    padding: 3rem 0 3rem 0;
    overflow-x: hidden;
}

  .empresas-modal-large__panel {
    padding: 70px 0 30px 0 !important;
    height: 100vh;
    overflow-y: scroll;
    justify-content: flex-start;
  }
  .empresas-modal__body {
    text-align: left !important;
  }
  .empresas-modal__desc {
    height: 100%;
    min-height: 70px;
  }

  .contenedor-info {
    height: auto;
    overflow-y: visible;
  }

  .grid-mosaico {
    transform: scale(0.5) !important;
    margin: -13% auto !important;
  }

  .bloque-empresas .inner-container {
    display: flex;
    justify-content: center;
    flex-direction: row;
    align-items: center;
    text-align: center;
    position: relative;
  }

  .empresas-modal-large__bg-rombo {
    position: absolute;
    left: -18%;
    width: 250px;
    top: -2%;
  }
  .empresas-modal-large__bio {
    max-width: 100%;
    text-align: left;
  }
  .empresas-modal-large__bullets-box {
    text-align: left;
  }

  .botonera-extra span {
    font-size: 0.8rem;
  }
  .somos-single-agencia__contact-action .empresas-modal-large__logo-img {
    width: 100px;
  }
  .agencia_logo--inline-cta
    .empresas-modal-large__logo-img.somosuno-svg-inline
    svg {
    width: 100px;
  }
}

@media (max-width: 550px) {
  .grid-mosaico {
    transform: scale(0.4) !important;
  }
}

@media (max-width: 480px) {
  .empresas-modal-large__director-image {
    width: 120px !important;
    min-width: 120px !important;
    height: 120px !important;
    flex: none !important;
  }
  .empresas-modal-large__director-name {
    font-size: 1.8rem;
    text-align: left;
  }
  h4.empresas-modal-large__puesto {
    text-align: left;
    font-size: 1.2rem;
  }

  .empresas-modal-large__back {
    gap: 0;
  }

   .grid-mosaico {
        margin: -40% auto !important;
    }
}

@media (max-width: 414px) {
}

@media (max-width: 375px) {
}

/* Variante especial: modal de líderes en el primer panal */
.empresas-modal-large__leaders-view {
  display: none;
  width: min(760px, 100%);
  margin-left: auto;
}

.empresas-modal-large.empresas-modal-large--leaders
  .empresas-modal-large__inner {
  padding: 120px 70px 70px 44%;
}

.empresas-modal-large.empresas-modal-large--leaders
  .empresas-modal-large__leaders-view {
  display: block;
}

/* Fallback visual para líderes: evita que se quede invisible si GSAP no anima o hay cache parcial */
.empresas-modal-large.empresas-modal-large--leaders
  .empresas-modal-large__leaders-view,
.empresas-modal-large.empresas-modal-large--leaders
  .empresas-modal-large__leaders-title,
.empresas-modal-large.empresas-modal-large--leaders
  .empresas-modal-large__leaders-grid {
  opacity: 1;
  transform: none;
}

.empresas-modal-large__leaders-title {
  margin: 0 0 28px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
  font-weight: 400;
  color: var(--agencia-color, var(--color-orange, #ff8200));
  opacity: 0;
}

.empresas-modal-large__leaders-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 24px;
  opacity: 0;
}

.empresas-modal-large__leader-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 22px;
  min-height: 112px;
  padding: 14px 28px 14px 14px;
  border-radius: 10px;
  background: #292929;
  color: var(--color-white, #fff);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.18);
}

.empresas-modal-large__leader-photo {
  width: 76px;
  height: 76px;
  border: 3px solid var(--agencia-color, var(--color-orange, #ff8200));
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-white, #fff);
}

.empresas-modal-large__leader-photo img,
.empresas-modal-large__leader-photo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.empresas-modal-large__leader-name {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.08;
  font-weight: 400;
  color: var(--color-white);
}



@media (max-width: 991px) {
  .empresas-modal-large.empresas-modal-large--leaders
    .empresas-modal-large__inner {
    padding: 110px 6vw 60px 20vw;
  }
}

@media (max-width: 680px) {
  .empresas-modal-large.empresas-modal-large--leaders
    .empresas-modal-large__inner {
    min-height: auto;
    padding: 20px 6vw 50px;
  }

  .empresas-modal-large__leaders-view {
    width: 100%;
    margin-left: 0;
  }

  .empresas-modal-large__leaders-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .empresas-modal-large__leader-card {
    grid-template-columns: 64px 1fr;
    min-height: 92px;
    gap: 16px;
    padding: 12px 18px 12px 12px;
  }

  .empresas-modal-large__leader-photo {
    width: 64px;
    height: 64px;
  }
}


