
div.gsc-control-cse {
  padding: 0px 0px 0px 0px !important;
  background-color: #48134C;
  border: 0px solid #48134c;
}
input.gsc-input {
  border-color: #fff;
  font-size: 11px;
  padding: 0px 0px;
}
.cse input.gsc-search-button,
input.gsc-search-button {
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  color: #48134C;
  padding: 0 0px;
  height: 20px;
  max-width: 30px;
  background-color: #a183a3;
  border: 0px solid #a183a3;
  border-radius: 2px;
  -moz-border-radius: 2px;
  -webkit-border-radius: 2px;
}
    
    footer {
      background-color: #bb964b;
      padding: 25px;
    }

    body {
      background-image: url("/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/bg.jpg");
      line-height: 1.6;
    }

    .foot_p {
      color: #fff;
      font-size: smaller;
    }

    .foot_p a:link {
      color: #fff;
      text-decoration: none;
    }

    .foot_p a:visited {
      color: #fff;
      text-decoration: none;
    }

    .foot_p a:hover {
      color: #48134c;
      text-decoration: none;
    }

    .foot_title {
      color: #fff;
    }
    
    .foot_title a:visited {
      color: #fff;
      text-decoration: none;
    }

    .foot_title a:link {
      color: #fff;
      text-decoration: none;
    }

    .foot_title a:hover {
      color: #48134c;
      text-decoration: none;
    }

    .foot-mc {
      width: auto;
      position: relative;
      display: inline-block;
    }

    .foot-mc .img-top {
      display: none;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 99;
    }

    .foot-mc:hover .img-top {
      display: inline;
    }
	  
    .carousel-inner img {
      width: 100%; /* Set width to 100% */
      min-height: 200px;
    }

    /* Hide the carousel text when the screen is less than 600 pixels wide */
    @media (max-width: 600px) {
      .carousel-caption {
        display: none; 
      }
    }



  .navbar {
    padding:0rem;
    margin-bottom:0rem;
    background-color: #48134c;
    border-color: #48134c;
    color: #ffffff;
  }

  .nav-item:hover {
    color: #ffe6ff;
  }

  .navbar .dropdown-toggle, .navbar .dropdown-menu a {
    cursor: pointer;
}

.navbar .dropdown-item.active, .navbar .dropdown-item:active {
    color: inherit;
    text-decoration: none;
    background-color: inherit;
}

.navbar .dropdown-item:focus, .navbar .dropdown-item:hover {
    color: #fff;
    text-decoration: none;
    background-color: #a183a3;
}


@media (min-width: 767px) {
    .navbar .dropdown-toggle:not(.nav-link)::after {
        display: inline-block;
        width: 0;
        height: 0;
        margin-left: .5em;
        vertical-align: 0;
        border-bottom: .3em solid transparent;
        border-top: .3em solid transparent;
        border-left: .3em solid;
    }

}

@media (max-width: 767px) {
  .navbar-fixed-top {
  position: static !important;
  top: 0px;
  } 
  }

.side-link[data-toggle].collapsed:after {
    content: "▾";
}
.side-link[data-toggle]:not(.collapsed):after {
    content: "▴";
}

.side-item {
  box-sizing: content-box;
  max-width: 100%;
  padding: 10px;  
  font-weight: 500;
  background-color: #f2f2f2;
  border: 0.5px solid #fff;
}

.side-subitem {
  padding: 5px;
  font-weight: 500;
  font-size: 90%;
}

@media (max-width: 767px) {
  .side-item {
    box-sizing: content-box;
    max-width: 100%;
    padding: 10px;  
    font-weight: 500;
    background-color: #f2f2f2;
    border: 0.5px solid #fff;
  }
}


  
  .row-reverse { display: flex; flex-direction: row-reverse; }




  #inline {
    width:100%;
    height:auto;
    display:flex;
  }
  
  .one, .two {
    width:50%;
    height:auto;
  } 

 



    .bgimage1 {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/2rS.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage1 h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    .bgimage2 {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/2wr.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage2 h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    .bgimage-dept {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/c5C.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage-dept h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    .bgimage_contact {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/4YU.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage_contact h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    .bgimage_en {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/pRV.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage_en h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    .bgimage_out {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/280.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage_out h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    .bgimage_prog {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/d2S.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage_prog h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    .bgimage3 {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/9Gp.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage3 h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    .bgimage-mc {
      width:100%;
      height:250px;
      background-image: url('/20201208123357oe_/http://www.eng.cuhk.edu.hk/img/about/3RA.jpg');
      background-repeat: no-repeat;
      background-position: center;
      background-size:cover;
      background-attachment: fixed;
    }
    .bgimage-mc h1 {
      color:white;
      text-shadow:2px 2px #333;
      position: absolute;
      top: 150px;
    }

    table {
      width :100%;
    }

    th, td {
      text-align: left;
      vertical-align: top;
      padding: 10px;
    }
    
    td a {
      color: #48134c;
    }

    td a:visited {
      color: #48134c;
    }


    td a:hover {
      color: #a183a3;
      text-decoration: none;
    }

    tr:nth-child(even) {
      background-color: rbga(255,255,255,0.0);
    }

    th {
      background-color: #48134c;
      color: white;
    }


    .Staff_table table {
      width :100%;
      border: 0px;
    }

    .Staff_table th {
      border: 0px;
      text-align: left;
      vertical-align: top;
      padding: 5px;
      font-size: small;
    }
    
    .Staff_table td {
      border: 0px;
      text-align: left;
      vertical-align: top;
      padding: 5px;
      font-size: small;
    }

    .Staff_table td a {
      color: #48134c;
    }
    .Staff_table td a:visited {
      color: #48134c;
    }

    .Staff_table td a:hover {
      color: #a183a3;
      text-decoration: none;
    }

    .Staff_table tr:nth-child(even) {
      background-color: #ececec;
    }
    .Staff_table tr:nth-child(odd) {
      background-color: #fff;
    }

    .Staff_table th {
      background-color: #48134c;
      color: white;
    }

    
    @media screen and (max-width: 768px) {

      .Staff_table table { 
        border: 0; 
      }
      
      .Staff_table thead { 
        display: none; 
      }
      
      .Staff_table tr {
        margin-bottom: 10px;
        display: block;
        border-bottom: 2px solid #ddd;
      }
      
      .Staff_table td {
        display: block;
        text-align: left;
        font-size: 13px;
        border-bottom: 1px dotted #ccc;
        position: relative;
		    padding-left: 45%;
      }
       
      .Staff_table td:last-child { border-bottom: 0; }
      
      .Staff_table td:before {
        content: attr(data-label);
        position: absolute;
        font-weight: bold;
        color: #48134c;
        top: 6px;
		    left: 6px;
		    width: 50%; 
		    padding-right: 10px;
      }

    }


    /* Programme Table */
    .Prog_table table {
      width: 100%;
      height: 100%;
      border: 1px;
      border-color: #333;
    }

    .Prog_table th, td {
      border: 1px;
      border-color: #333;
      padding: 5px;
    }

    .Prog_table th {
      border: 1px solid #ccc;
      font-weight: normal;
      background-color: #fff;
      color: #000;
    }
    
    .Prog_table td {
      font-size: normal;
      border: 1px solid #ccc;
    }


    @media screen and (max-width: 768px) {

      .Prog_table table { 
        border: 1px ; 
      }
      
      .Prog_table thead { 
        display: none; 
      }
      
      .Prog_table tr {
        margin-bottom: 0px;
        display: block;

      }
      
      .Prog_table td {
        display: block;
        text-align: left;
        font-size: normal;
	border: 1px solid #ccc; 
        position: relative;
        padding-left: 75%;

      }
       
      .Prog_table td:last-child { border-bottom: 0; }
      
      .Prog_table td:before {
        content: attr(data-label);
        position: absolute;
        font-size: small;
        top: 6px;
	left: 6px;
	width: 75%; 
        padding-right: 10px;
      }

    }

div.pgtable {
  width: 80%;
  overflow-x: scroll;
}
    

    .acalist_table table {
      width :100%;
      border: 0px;
    }

    .acalist_table th {
      border: 0px;
      text-align: left;
      vertical-align: top;
      padding: 5px;
      font-size: small;
      font-weight: bold;
    }

    .acalist_table td {
      border: 0px;
      text-align: left;
      vertical-align: top;
      padding: 5px;
      font-size: small;
    }

    .acalist_table th {
      background-color: #ececec;
      color: #4d4d4d;
    }

    .acalist_table tr:nth-child(even) {
      background-color: rbga(255,255,255,0.0);
    }

    /* for course list */
    .ba_table table {
      width :100%;
      border: 0px;
    }

    .ba_table td {
      border: 0px;
      text-align: left;
      vertical-align: top;
      padding: 5px;
      font-size: 14px;
    }

    .ba_table tr:nth-child(even) {
      background-color: #ececec;
    }

    .drop {
      cursor: pointer;
      display: block;
      color: #4d4d4d;
    }
    
    input[type="checkbox"]  {
     display: none; /* hide the checkboxes */
    }
    
    input +.drop +  div    {
      display:none;
    }
    .drop:after {
      content:'▼';
      }
    .drop:hover {
      color: #48134c;
    }
    :checked  + .drop:after {
      color: #48134c;
      content: '▲';
      }
    input:checked + .drop + div{
      display:block;
    }
    /* for course list */

    .list_link ul {
      list-style-type: none;
      margin: 0px;
      padding: 0px;
    }

    .list_link li {
      list-style-type: none;
      list-style-position: outside;
      margin: 0px;
      padding-bottom: 10px;
    }

    .list_link li a:link{
      color: #48134c;
      text-decoration: none;
      font-size: small;
    }

    .list_link li a:visited {
      color: #48134c;
      text-decoration: none;
      font-size: small;
    }

    .list_link li a:hover {
      color: #9900ff;
      background-color: #ececec;
      text-decoration: none;
      font-size: small;
    }

    .list_link li a.active {
      color: #9900ff;
      text-decoration: none;
    }

    
    .hidden>div {
      display:none;
    }
    
    .visible>div {
      display:block;
    }

    .prog_table table {
      width :100%;
      border: 0px;
    }

    .prog_table th, td {
      border: 0px;
      text-align: left;
      vertical-align: top;
      padding: 5px;
      font-size: 100%;
    }

    .prog_table th {
      background-color: #e6ecff;
      color: #4d4d4d;
    }

    .prog_table tr:nth-child(even) {
      background-color: rgba(255,255,255,0);
    }

    h6.prog_h5   {
      color:#fff;
    }

    h6.prog_h5 a:link {
      color:#fff;
      text-decoration: none;
    }

    h6.prog_h5 a:visited {
      color:#fff;
      text-decoration: none;
    }

    h6.prog_h5  a:hover {
      color:#48134c;
      text-decoration: none;
    }

    h6.prog_h5  a.active {
      color:#48134c;
      text-decoration: none;
    }

/* photo gallery */
#masonry {
  column-count: 2;
  column-gap: 1em;
}

@media(min-width: 30em) {
  #masonry {
    column-count: 3;
    column-gap: 1em;
  }
}

@media(min-width: 40em) {
  #masonry {
    column-count: 4;
    column-gap: 1em;
  }
}

@media(min-width: 60em) {
  #masonry {
    column-count: 5;
    column-gap: 1em;
  }
}

@media(min-width: 75em) {
  #masonry {
    column-count: 6;
    column-gap: 1em;
  }
}

.item {
  background-color: none;
  display: inline-block;
  margin: 0 0 1em 0;
  width: 100%;
  cursor: pointer;
  z-index: 999;
}

.item img {
  max-width: 100%;
  height: auto;
  width: 100%;
  margin-bottom: -4px;
  z-index: 999;
  
  /*idk why but this fix stuff*/
}

.item.active {
  animation-name: active-in;
  animation-duration: 0.7s;
  animation-fill-mode: forwards;
  animation-direction: alternate;
  z-index: 999;
}

.item.active:before {
  content: "+";
  transform: rotate(45deg);
  font-size: 48px;
  color: white;
  position: absolute;
  top: 20px;
  right: 20px;
  background-color:rgba(0,0,0,0.85);
  border-radius: 50%;
  width:48px;
  height:48px;
  text-align:center;
  line-height:48px;
  z-index:12;
}

.item.active img {
  animation-name: active-in-img;
  animation-duration: 0.7s;
  animation-fill-mode: forwards;
  animation-direction: alternate;
  z-index: 999;
}


@keyframes active-in {
  0% {
    opacity:1;
    background-color:white;
    z-index: 999;
  }
  
  50% {
    opacity:0;
    background-color:rgba(0,0,0,0.90);
    z-index: 999;
  }
  
  100% {
    opacity: 1;
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background-color:rgba(0,0,0,0.90);
    z-index: 999;
  }
}

@keyframes active-in-img {
  0% {
    opacity:1;
    transform:translate(0%, 0%);
    top: 0;
    left: 0;
    max-width: 100%;
    z-index: 999;
  }
  49% {
    opacity:0;
    transform: translate(0%, -50%);
    z-index: 999;
  }
  50% {
    position:absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 999;
  }
  100% {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  width: auto;
  max-height: 95vh;
  opacity:1;
  z-index: 999;
  }
}

  
#return-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgb(0, 0, 0);
  background: rgba(0, 0, 0, 0.7);
  width: 50px;
  height: 50px;
  display: block;
  text-decoration: none;
  -webkit-border-radius: 35px;
  -moz-border-radius: 35px;
  border-radius: 35px;
  display: none;
  -webkit-transition: all 0.3s linear;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
  z-index: 2;
}
#return-to-top i {
  color: #fff;
  margin: 0;
  position: relative;
  left: 16px;
  top: 13px;
  font-size: 19px;
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  -ms-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  transition: all 0.3s ease;
}
#return-to-top:hover {
  background: rgba(0, 0, 0, 0.9);
}
#return-to-top:hover i {
  color: #fff;
  top: 5px;
}

/* Staff description in div */
.Staffdes div {
  font-size: small;
  padding: 5px;
}

.res_link a {
  color: #262626;
  background-color: #f5e6ff;
  text-decoration: none;
  font-weight: 600;
}

.res_link a:hover {
  color: #9900ff;
  background-color: transparent;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.res_link li a {
  color: #262626;
  background-color: #f5e6ff;
  text-decoration: none;
  font-weight: 600;
}

.res_link li a:hover {
  color: #9900ff;
  background-color: transparent;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.prog_link a {
  color: #262626;
  background-color: #f5e6ff;
  text-decoration: none;
}

.prog_link a:hover {
  color: #9900ff;
  background-color: transparent;
  text-decoration: none;
}

.h-header {
  color: #888888;
  padding: 5px;
}

.sub-header {
  color: #fff;
  background-image: linear-gradient(#88248f, #48134c);
  padding: 10px;
}