/* Cards */

/* Custom style for partners page cards: https://trans4num.eu/en/about-the-project/partners/ */
body#page-26 .crx-grid .row .col {
  flex-basis: 27%;
  min-width: 300px;  
}

body#page-26 .crx-grid .row .col .card {
  min-height: 420px;
  width: 350px;
}

.card-img-top {
  width: 100%;
  height: 150px;
  object-fit: contain;
}

/* Content */
/* Remove vertical space between navbar and curved page header */
#content section.page-header.page-header-lg {
  padding-top: 0px;
}

/* Navbar */
#header {
  background-color: #eff1f3;
  height: auto;
}

#header.shrink {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
}

#header.shrink .header-content {
  min-height: 50px;
}

#header.shrink .logo img {
  position: absolute;
  height: 50px;
}

#header.shrink .top-bar {
  display: none;
}

#header .search.header-nav-features {
  padding-left: 0px;
}

#header #headerTopSearchDropdown {
  margin-top: 0px;
  top: 50px;
}

.header-container {
  background-color: inherit;
  height: inherit;
  padding-block: 5px;
  border-bottom: 1px solid lightgrey;
}

.header-content {
  display: flex;
  flex-wrap: wrap;
  min-height: 92px;
}

.top-bar {
  display: flex;
  justify-content: end;
  align-self: flex-start;
}

.search {
  display: flex;
  align-items: center;
}

.responsive-menu-toggle {
  display: none;
}

.logo {
  position: absolute;
}

.logo-indent {
  width: calc(100% - 130px);
  margin-left: 130px;
}

/* Add a black background color to the top navigation */
.topnav {
  /* overflow: hidden;  */
  display: flex;
  justify-content: end;
  align-items: center;
}

.menu-item {
  color: #3d66a7;
  text-align: center;
  padding: 10px 10px;
  text-decoration: none;
  font-size: 17px;
  /* text-transform: uppercase; */
  letter-spacing: -0.5px;
  font-weight: 600;
  flex-basis: 15%;
}

.menu-item.active {
  background-color: #3d66a7;
  color: white;
  border-radius: 5px;
}

/* Hide the link that should open and close the topnav on small screens */
.topnav .icon {
  display: none;
}

/* Dropdown container - needed to position the dropdown content */
.dropdown {
  float: right;
  overflow: hidden;
  flex-basis: 15%;
}

/* Style the dropdown button to fit inside the topnav */
.dropdown .dropbtn {
  /* font-size: 13px; */
  border: none;
  outline: none;
  /* color: black; */
  /* padding: 10px 10px; */
  background-color: inherit;
  font-family: inherit;
  margin: 0;
  width: 100%;
}

.dropdown .dropbtn i {
  display: none;
}

/* Style the dropdown content (hidden by default) */
.dropdown-content {
  /* display: none; */
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* Style the links inside the dropdown */
.dropdown-content a {
  float: none;
  color: rgb(49, 49, 49);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

@media (hover: hover) {
  a.menu-item:hover {
    background-color: #3d66a7;
    color: white;
    border-radius: 5px;
    text-decoration: none;
  }

  /* Show the dropdown menu when the user moves the mouse over the dropdown button */
  .dropdown:hover .dropdown-content {
    display: block;
    position: fixed;
    border-top: rgb(0, 199, 0) 2px solid;
    margin-top: -2px;
  }

  .dropdown:hover button.dropbtn.menu-item {
    background-color: #3d66a7;
    color: white;
    border-radius: 5px;
    text-decoration: none;
  }

  /* Add a grey background to dropdown links on hover */
  .dropdown-content a:hover {
    background-color: #ddd;
    color: black;
  }
}

/* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
@media screen and (max-width: 992px) {

  .responsive-menu-toggle {
    display: block;
    order: 3;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: end;
    align-content: center;
    padding-block: 8px;
  }

  #header.shrink .responsive-menu-toggle {
    padding-block: 0px;
  }

  .responsive-menu-toggle a {
    padding: 10px 16px;
    flex-basis: 8%;
  }

  .topnav {
    order: 4;
    margin-left: 0px;
    width: 100%;
  }

  .topnav a,
  .dropdown .dropbtn {
    display: none;
  }

  .topnav a.icon {
    float: right;
    display: block;
  }

  .dropdown-content.collapse.show {
    border-top: rgb(0, 199, 0) 2px solid;
  }

  .dropdown .dropbtn i {
    display: initial;
  }
}

/* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */
@media screen and (max-width: 992px) {
  .topnav.responsive {
    position: relative;
    background-color: white;
    padding: 20px;
    flex-direction: column;
    margin-top: 5px;
  }

  #header.shrink .topnav.responsive {
    margin-top: 12px;
  }

  .topnav.responsive a.icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  .topnav.responsive .menu-item {
    float: none;
    display: block;
    /* text-align: left; */
    /* color: black; */
    border-bottom: 1px solid rgb(209, 209, 209);
    width: 100%;
    flex-basis: unset;
  }

  .topnav.responsive .dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-basis: unset;
  }

  .topnav.responsive .dropdown-content {
    position: relative;
    padding: 10px;
    flex-direction: column;
    align-items: center;
  }

  @media (hover: hover) {
    .topnav.responsive .dropdown:hover {
      border-bottom: none;
    }

    .topnav.responsive .dropdown:hover .dropdown-content {
      display: flex;
    }
  }
}