.ubicaciones-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--blanco);
  background:
    radial-gradient(
      circle at 42% 24%,
      color-mix(in srgb, var(--azulsurexsl2) 24%, transparent),
      transparent 12rem
    ),
    linear-gradient(135deg, var(--azulsurexsl1), var(--azulsurexs));
}

.ubicaciones-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--aqual1) 12%, transparent) 0 1px,
    transparent 1px
  );
  background-size: 4.8rem 4.8rem;
}

.ubicaciones-hero .container {
  position: relative;
  z-index: 1;
}

.ubicaciones-hero__grid {
  display: grid;
  min-height: 25rem;
  grid-template-columns: minmax(0, 1fr) minmax(23rem, 0.72fr);
  gap: clamp(2.5rem, 3vw, 3.5rem);
  align-items: center;
}

.ubicaciones-hero__content,
.ubicaciones-hero__visual {
  min-width: 0;
}

.ubicaciones-hero__content {
  padding: 6rem 0 5.25rem;
}

.ubicaciones-hero__title {
  max-width: 44rem;
  margin: 0 0 1.6rem;
  color: var(--aqual2);
  font-family: "Urbanist", sans-serif;
  font-size: 2.8rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.075rem;
  text-wrap: balance;
}

.ubicaciones-hero__description {
  max-width: 49rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  color: color-mix(in srgb, var(--blanco) 88%, var(--azulsurexsl4));
  font-family: "Open Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.55;
}

.ubicaciones-hero__description strong {
  color: var(--blanco);
  font-weight: 700;
}

.ubicaciones-hero__visual {
  align-self: end;
}

.ubicaciones-hero__visual img {
  display: block;
  width: min(100%, 25.625rem);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

@media (min-width: 1200px) {
  .ubicaciones-hero__title {
    white-space: nowrap;
  }
}

.index-location {
  --section-office-image: url("../img/vectores/contacto/cdmx.jpg");
  position: relative;
  overflow: hidden;
  padding: 7rem 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.12), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(83, 160, 213, 0.18), transparent 28%),
    linear-gradient(135deg, var(--azulsurexsl1), var(--azulsurexs));
  isolation: isolate;
}

.index-location::before {
  content: "";
  position: absolute;
  top: -320px;
  left: 50%;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.index-location::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(0, 52, 96, 0.92), rgba(0, 82, 144, 0.88) 48%, rgba(0, 119, 188, 0.84)),
    var(--section-office-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 1;
  transform: scale(1.01);
  transition: opacity 0.38s ease, transform 0.65s ease;
  pointer-events: none;
}

.index-location--background-changing::after {
  opacity: 0;
  transform: scale(1.035);
}

.index-location .container {
  position: relative;
  z-index: 2;
}

.index-location__header {
  max-width: 760px;
  margin: 0 auto 4.5rem;
  text-align: center;
}

.index-location__badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.8125rem;
  letter-spacing: 0.8px;
}

.index-location__title {
  margin: 0 0 1.5rem;
  color: #fff;
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
}

.index-location__description {
  max-width: 720px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
}

.index-location__content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.index-location__map {
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.index-location__map:hover {
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.22);
  transform: translateY(-4px);
}

.index-location__map iframe {
  display: block;
  width: 100%;
  height: 500px;
  border: 0;
  transition: opacity 0.35s ease;
}

.index-location__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
}

.index-location__office {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  isolation: isolate;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.45s ease, box-shadow 0.45s ease;
}

.index-location__office::before,
.index-location__office::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.6s ease;
}

.index-location__office::before {
  z-index: 0;
  background-image: var(--office-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.08);
}

.index-location__office::after {
  z-index: 1;
  background: linear-gradient(135deg, rgba(0, 82, 144, 0.88), rgba(0, 119, 188, 0.72));
}

.index-location__office:hover {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
}

.index-location__office-button {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.4rem 0.85rem;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.index-location__office-button:focus-visible,
.index-location__office-link:focus-visible,
.ubicaciones-location__contact a:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.82);
  outline-offset: -4px;
  border-radius: 18px;
}

.index-location__office-icon {
  display: flex;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
}

.index-location__office-icon img {
  width: 22px;
}

.index-location__office-info {
  flex: 1;
}

.index-location__office-name {
  display: block;
  margin-bottom: 0.55rem;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.index-location__office-address {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.6;
}

.index-location__office-link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0 1.4rem 1.15rem 5.8rem;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.index-location__office-link:hover {
  color: #fff;
  text-decoration: underline;
}

.index-location__office-link img {
  width: 1rem;
  filter: brightness(0) invert(1);
}

.index-location__office--active {
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(0, 82, 144, 0.28);
}

.index-location__office--active::before,
.index-location__office--active::after {
  opacity: 1;
}

.index-location__office--active::before {
  transform: scale(1);
}

.index-location__office--active:hover {
  transform: translateY(-5px);
}

.ubicaciones-location__contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 780px;
  margin: 2rem auto 0;
}

.ubicaciones-location__contact a {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(0, 119, 188, 0.38);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(0, 82, 144, 0.12);
  color: var(--azulsurexs);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ubicaciones-location__contact a:hover {
  color: var(--azulsurexs);
  box-shadow: 0 18px 40px rgba(0, 82, 144, 0.16);
  transform: translateY(-3px);
}

.ubicaciones-location__contact-icon {
  display: inline-flex;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: #eaf5ff;
}

.ubicaciones-location__contact-icon img {
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
}

@media (max-width: 1199.98px) {
  .ubicaciones-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.78fr);
    gap: 2.5rem;
  }

  .index-location__content {
    grid-template-columns: 1fr;
  }

  .index-location__map iframe {
    height: 520px;
  }
}

@media (max-width: 991.98px) {
  .ubicaciones-hero__grid {
    min-height: 23rem;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.72fr);
    gap: 1.5rem;
  }

  .ubicaciones-hero__content {
    padding: 5rem 0 4.5rem;
  }

  .ubicaciones-hero__title {
    font-size: 2.55rem;
  }

  .index-location {
    padding: 5rem 0;
  }

  .index-location__header {
    margin-bottom: 3rem;
  }

  .index-location__title {
    font-size: 2.2rem;
  }

  .index-location__map,
  .index-location__sidebar {
    border-radius: 24px;
  }

  .index-location__map iframe {
    height: 460px;
  }

  .index-location__sidebar {
    padding: 1rem;
  }
}

@media (max-width: 767.98px) {
  .ubicaciones-hero__grid {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .ubicaciones-hero__content {
    padding: 4rem 0;
  }

  .ubicaciones-hero__title {
    margin-bottom: 1.35rem;
    font-size: clamp(2.35rem, 12vw, 3.05rem);
  }

  .ubicaciones-hero__description {
    font-size: 0.92rem;
  }

  .ubicaciones-hero__visual {
    display: none;
  }

  .index-location {
    padding: 4rem 0;
  }

  .index-location__header {
    margin-bottom: 2.5rem;
  }

  .index-location__title {
    font-size: 2rem;
  }

  .index-location__description {
    font-size: 0.95rem;
  }

  .index-location__content {
    gap: 1.5rem;
  }

  .index-location__map {
    min-height: 340px;
    border-radius: 20px;
  }

  .index-location__map iframe {
    height: 340px;
  }

  .index-location__sidebar {
    padding: 0.85rem;
  }

  .index-location__office-button {
    padding: 1rem 1rem 0.7rem;
  }

  .index-location__office-icon {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .index-location__office-icon img {
    width: 18px;
  }

  .index-location__office-name {
    font-size: 1rem;
  }

  .index-location__office-address {
    font-size: 0.82rem;
  }

  .index-location__office-link {
    margin: 0 1rem 1rem 4.9rem;
  }

  .ubicaciones-location__contact {
    grid-template-columns: 1fr;
  }

  .ubicaciones-location__contact a {
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-location::after,
  .index-location__map,
  .index-location__map iframe,
  .index-location__office,
  .index-location__office::before,
  .index-location__office::after,
  .ubicaciones-location__contact a {
    transition: none;
  }
}
