
.top-section-wrapper {
  position: relative;
}

.tm-submenu-wrapper {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  position: relative;
}

/**
 * Menu type 1
 *
 * Menú utilizado para los niveles principales de:
 *   - Conoce IQS
 *   - Investigación
 *   - Campus
 */
.tm-menu-type-1 {
  width: auto;
  margin: -55px 0 0 25px;
  padding: 20px 20px 8px;
  background: #009ee2;
  position: relative;
  z-index: 20;
}

.tm-menu-type-1::before {
  content: "";
  width: auto;
  height: auto;
  background: #f7f5f3;
  position: absolute;
  top: 55px;
  bottom: -1px;
  left: -25px;
  right: 100%;
  z-index: 0
}

.tm-menu-type-1 .menu {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 18px;
  line-height: 22px;
  list-style: none;
  padding-left: 0;
}

.tm-menu-type-1 .menu li {
  list-style: none;
  margin-left: 0;
  padding: 7px 20px 8px;
  position: relative;
}

.tm-menu-type-1 .menu li:not(:last-child)::after {
  content: "";
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, .5);
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
}

.tm-menu-type-1 a {
  color: #fff;
  padding-left: 15px;
  display: block;
  position: relative;
  transition: color .35s;
}

.tm-menu-type-1 a::before {
  content: "›";
  position: absolute;
  left: 0;
  transition: left .35s;
}

.tm-menu-type-1 a:hover,
.tm-menu-type-1 a:focus,
.tm-menu-type-1 a:active {
  color: #ffb434;
}

.tm-menu-type-1 a:hover::before,
.tm-menu-type-1 a:focus::before,
.tm-menu-type-1 a:active::before {
	left: 5px;
}

@media only screen and (min-width: 768px) {
  .tm-menu-type-1 {
    width: calc(41.66666667% - 30px);
    margin: -100px 0 0;
    position: absolute;
    top: 0;
    right: 15px;
  }

  .tm-menu-type-1::before {
    content: none;
  }

  .tm-menu-type-1 .menu {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 22px;
    line-height: 27px;
  }

  .tm-menu-type-1 .menu li {
	padding: 5px 30px 6px;
  }
}

/**
 * Menu type 2
 *
 * Menú utilizado para los niveles secundarios de:
 *   - Conoce IQS
 *   - Investigación
 *   - Campus
 */
.tm-menu-type-2 {
  margin: -140px 25px 40px;
  padding: 15px 15px 30px;
  background: rgba(0, 158, 226, .85);
  position: relative;
  z-index: 20;
}

.tm-menu-type-2 .menu {
  font-size: 16px;
  line-height: 20px;
  list-style: none;
  padding-left: 0;
}

.tm-menu-type-2 h2 {
  font-size: 16px;
  line-height: 20px;
  color: #005275;
  margin-bottom: 15px;
  padding: 2px 15px 15px;
  position: relative;
}

.tm-menu-type-2 h2::after {
  content: "";
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, .5);
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
}

.tm-menu-type-2 .menu li {
  list-style: none;
  margin-left: 0;
  padding: 2px 15px;
}

.tm-menu-type-2 a {
  color: #fff;
  padding-left: 15px;
  display: block;
  position: relative;
  transition: color .35s;
}

.tm-menu-type-2 a::before {
  content: "›";
  position: absolute;
  left: 0;
  transition: left .35s;
}

.tm-menu-type-2 a:hover,
.tm-menu-type-2 a:focus,
.tm-menu-type-2 a:active,
.tm-menu-type-2 a.active {
  color: #ffb434;
}

.tm-menu-type-2 a.active {
  font-weight: bold;
}

.tm-menu-type-2 a:hover::before,
.tm-menu-type-2 a:focus::before,
.tm-menu-type-2 a:active::before {
  left: 5px;
}

@media only screen and (min-width: 768px) {
  .tm-menu-type-2 {
    width: calc(50% - 30px);
    margin: 0;
    position: absolute;
    bottom: -30px;
    right: 15px;
  }
}

@media only screen and (min-width: 992px) {
  .tm-menu-type-2 {
    width: calc(33.33333333% - 30px);
  }
}

/**
 * Menu type 3
 *
 * Menú utilizado para las pestañas Grado
 */
.tm-menu-type-3 {
  margin-bottom: 30px;
  padding: 15px;
  background: #faf7f5;
  z-index: 999;
}

.tm-menu-type-3 .menu {
  margin-bottom: 0;
  padding-left: 0;
}

.tm-menu-type-3 .menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tm-menu-type-3 .menu a {
  font-size: 16px;
  line-height: 20px;
  color: #8d8b8c;
  padding: 7px 30px 5px;
  display: block;
  transition: color .35s;
}

.tm-menu-type-3 .menu a:hover,
.tm-menu-type-3 .menu a:focus,
.tm-menu-type-3 .menu a:active {
  color: #f8b121;
}

.tm-menu-type-3 .menu a.active {
  color: #fff;
  background: #f8b121;
}

@media only screen and (max-width: 767px) {
	.tm-menu-type-3 .menu .menu .menu a {
		padding-left: 45px;
	}
}

@media only screen and (min-width: 768px) {
  .tm-menu-type-3 {
    margin-bottom: 0;
    padding: 25px 15px 0;
    background: none;
  }

  .tm-menu-type-3::before {
    content: "";
    width: 100vw;
    height: 100%;
    background: #faf7f5;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translate(-50%);
  }

  .tm-menu-type-3 .menu {
    display: flex;
    justify-content: flex-start;
  }

  .tm-menu-type-3 .menu .menu {
  	padding-left: 20px;
  }

  .tm-menu-type-3 .menu li {
    display: flex;
  }

  .tm-menu-type-3 .menu li + li {
    padding-left: 20px;
  }

  .tm-menu-type-3 .menu a {
    font-size: 14px;
    padding: 27px 0 25px;
    position: relative;
  }

  .tm-menu-type-3 .menu a::after {
    content: "";
    width: 100%;
    height: 0;
    background: transparent;
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    transition: height .35s;
  }

  .tm-menu-type-3 .menu a:hover::after,
  .tm-menu-type-3 .menu a:focus::after,
  .tm-menu-type-3 .menu a:active::after,
  .tm-menu-type-3 .menu a.active:hover::after,
  .tm-menu-type-3 .menu a.active:focus::after,
  .tm-menu-type-3 .menu a.active:active::after {
    height: 6px;
    background: #f8b121;
  }

  .tm-menu-type-3 .menu a.active,
  .tm-menu-type-3 .menu .menu a.active-trail {
  	font-weight: bold;
    color: #f8b121;
    background: none;
  }

  .tm-menu-type-3 .menu a.active::after,
  .tm-menu-type-3 .menu .menu a.active-trail::after {
    height: 3px;
    background: #f8b121;
  }

  .tm-menu-type-3 .menu-block-wrapper > .menu > .active-depth-3 {
  	padding-bottom: 72px;
  }

  .tm-menu-type-3 .menu .menu .menu {
  	width: 100%;
  	position: absolute;
  	bottom: 0;
  	left: 0;
  }

  .tm-menu-type-3 .menu .menu .menu::before {
  	content: "";
  	width: 100vw;
  	height: 100%;
  	background: #f8b121;
  	position: absolute;
  	top: 0;
  	left: 50%;
  	transform: translateX(-50vw);
  }

  .tm-menu-type-3 .menu .menu .menu a {
  	color: #fff;
  }

  .tm-menu-type-3 .menu .menu .menu a.active::after {
    background: #fff;
  }
}
