/* Fix problema immagini */
[data-once="contextual-render"] {
  height: auto !important;
}

/* Navbar top */
#navbar-top {
  background-color: #fff;
  border-bottom: 1px solid #e3e3e3;
}

#navbar-top .social-icon {
  filter: unset;
}

/* Logo sito */
.navbar .navbar-brand {
  grid-row: 1 / span 2;
  grid-column: 1 / span 6;
  display: flex;
  max-width: 33rem;
  white-space: normal;
  align-items: center;
  color: rgb(var(--clr-scuola));
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5rem;
}

.navbar-brand img {
  max-width: 50px;
  margin-right: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.site-name {
  white-space: normal;
  font-size: 12px;
  line-height: 16px;
  color: rgb(var(--clr-scuola));
  font-weight: 700;
}

@media (min-width: 48em) {
  .navbar-brand {
    align-items: center;
  }

  .navbar-brand img {
    margin-right: 1rem;
  }

  .site-name {
    font-size: 1rem;
  }
}

@media (min-width: 75em) {
  .navbar-brand img {
    max-width: 6.875rem;
  }

  .site-name {
    font-size: 1.25rem;
    line-height: 1.5rem;
  }
}

/* Menu selezione lingua */
#navbar-top .block-dropdown-language {
  display: none;
}

.block.block-dropdown-language {
  margin: 0 1rem 0 auto;
}

.block.block-dropdown-language fieldset {
  margin-bottom: 0 !important;
}

.block.block-dropdown-language legend {
  display: none;
}

.block.block-dropdown-language .dropbutton-wrapper {
  width: max-content;
}

.block.block-dropdown-language .dropbutton-widget {
  overflow: visible;
  border: none;
  margin: 0;
  background: unset;
}

.block.block-dropdown-language .menu--lingue {
  width: 62px;
  height: 38px;
  position: relative;
}

.block.block-dropdown-language .menu--lingue button {
  padding-left: 1.7rem;
  background: url("/themes/custom/unito_portale/media/icons/icon--world--grey.svg")
    left center / 1.3rem no-repeat;
}

#CollapsingNavbar .menu--lingue button {
  background-image: url("/themes/custom/unito_portale/media/icons/icon--world.svg");
}

.block.block-dropdown-language .lang-wrapper {
  inset: 0;
  z-index: 2;
}

.block.block-dropdown-language * {
  cursor: auto;
}

.block.block-dropdown-language :is(.btn, .btn span, .dropdown-menu a) {
  cursor: pointer;
  font-size: 1.125rem;
}

.block.block-dropdown-language .btn {
  color: var(--text-light);
  border: unset;
  font-weight: 600;
}

#CollapsingNavbar .block-dropdown-language .btn {
  color: #fff;
}

.block.block-dropdown-language .btn::after {
  margin-left: 6px;
  /* font-size: 13px; */
}

.block.block-dropdown-language .dropdown ul {
  min-width: 100%;
  /* border: unset; */
  /* border-radius: 0; */
  padding: 0.375rem 0.75rem 0.375rem;
  left: -1px !important;
}

.block.block-dropdown-language .dropdown li:not(:last-child) {
  margin: 0 0 0.4rem;
}

.block.block-dropdown-language .dropdown a {
  color: var(--text-light);
}

@media (min-width: 75em) {
  #navbar-top .block-dropdown-language {
    display: block;
  }
}

/* MOBILE */
@media (min-width: 48em) {
  #CollapsingNavbar .d-grid {
    padding-top: 5rem;
  }

  .user-logged-in #CollapsingNavbar .d-grid {
    padding-top: 7.2rem;
  }
}

#CollapsingNavbar .btn.show svg {
  transform: rotate(180deg);
}

/* My unito */
#block-unito-fed-myunito {
  margin-left: auto;
}

@media (min-width: 75em) {
  #block-unito-fed-myunito {
    margin-left: unset;
    position: relative;
    bottom: -0.09rem;
  }

  @media (min-width: 75em) {
    .my-unito > a {
      display: flex;
      padding: 0 0 0 1.65rem;
      background: url("/themes/custom/unito_federati/media/icons/icon--user-circle.svg")
        left center / 1.4rem no-repeat;
    }
  }
}

/* MOBILE HEADER */
#CollapsingNavbar {
  background-color: rgb(var(--clr-scuola));
}

@media (max-width: 74.99em) {
  #block-unito-fed-myunito .my-unito a {
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    background-color: rgb(var(--clr-scuola));
    color: #fff;
  }
}

#CollapsingNavbar .menu--accesso-rapido {
  margin-bottom: 1rem;
}

#CollapsingNavbar .menu--accesso-rapido .dropdown-toggle {
  color: #fff;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#CollapsingNavbar .menu--accesso-rapido .dropdown-toggle::after {
  background: url(/themes/custom/unito_federati/media/icons/icon--chevron-down.svg)
    center / 1rem no-repeat;
  border: 0;
  padding-left: 1rem;
  height: 14px;
  vertical-align: middle;
}

#CollapsingNavbar .menu--accesso-rapido .dropdown-menu {
  position: static !important;
  border: 0;
  border-radius: 0;
}

/* HEADER MID */
.header--middle {
  display: grid !important;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: minmax(50px, auto);
  width: 100%;
  align-items: center;
  row-gap: 12px;
  margin-bottom: 0.7rem;
}

.menu--accesso-rapido {
  margin-left: auto;
  grid-column: 11;
}

header p {
  margin: 0;
}

.header--middle .loga-unita {
  text-align: right;
}

/* Cerca */
.search {
  grid-row: 2;
  grid-column: 9 / -1;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  position: relative;
}

.search input {
  border: 1px solid rgb(222, 226, 230);
  padding: 0.4rem 2.8rem 0.4rem 0.6rem;
  border-radius: 10px;
  border-color: #1c1c1c;
}

.search__action {
  width: 2.5rem;
  height: 2.8rem;
  position: absolute;
  top: 50%;
  right: -2px;
  transform: translateY(-50%);
  z-index: 1;
  background-color: #fff;
}

.search__btn {
  background: url(/themes/custom/unito_base/images/icons/icon--search.svg)
    center / 1.25rem no-repeat;
  background-color: rgb(var(--clr-scuola));
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

/* NAVIGAZIONE PRINCIPALE */
#navbar-main {
  background-color: rgb(var(--clr-scuola));
}

#navbar-main .menu--main {
  text-align: center;
}

#navbar-main .menu--main .nav > li > a {
  text-transform: none;
}

#navbar-main .menu--main .lvl0.nav-item:hover > .nav-link,
.menu--main .lvl0 > .nav-link:hover {
  background-color: #fff;
  color: rgb(var(--clr-scuola));
}

/* se :hover su altra voce di 1 livello, resetto quella attiva */
#navbar-main .menu--main:has(.lvl0:hover) .lvl0 > .nav-link.active {
  background: rgb(var(--clr-scuola));
  color: #fff;
}

/* segno con un background bianco la voce attiva o con :hover */
#navbar-main .menu--main .lvl0.nav-item:hover > .nav-link.active,
.menu--main .lvl0 > .nav-link.active {
  background-color: #fff;
  color: rgb(var(--clr-scuola));
}

.menu--main .lvl1 .nav-link.active {
  border-bottom: 2px solid rgb(var(--clr-scuola));
  width: fit-content;
}

/* Fix per switch mobile / desktop  */
@media (min-width: 64em) {
  .mobile-header {
    display: block;
  }
}

@media (min-width: 64em) {
  #header-middle,
  #navbar-main {
    display: none;
  }
}

@media (max-width: 74.99em) {
  #navbar-top
    > .custom-container
    > :is(.menu--social, .menu--lingue, .stato-servizi) {
    display: none;
  }

  #navbar-top {
    border-top: 3px solid var(--main-color);
    border-bottom: 1px solid #d9d9d9;
    background-color: #fff;
  }
}

@media (min-width: 75em) {
  .mobile-header {
    display: none;
  }
}

@media (min-width: 75em) {
  #navbar-top,
  #header-middle,
  #navbar-main {
    display: flex;
  }
}

#block-unito-federati-logounita {
  display: grid;
  justify-content: end;
  grid-column: -2 / -1;
}

/* Altro */
.decoro-pagina::before {
  content: none;
}

/* BRICIOLE DI PANE */
.breadcrumb a,
.breadcrumb span,
.breadcrumb-item + .breadcrumb-item::before {
  color: rgb(var(--clr-scuola));
  font-weight: 600;
}

.block-system-breadcrumb-block {
  padding-top: 2rem;
}

body:is(.path-frontpage) .block-system-breadcrumb-block {
  display: none;
}

/* Slider HP */
.paragraph--type--sliders-hp .contextual-region > div {
  height: auto !important;
}

/* Eventi HP */
@media (min-width: 75em) {
  .eventi-elenco--hp ul.row {
    display: flex;
    justify-content: center;
  }
}

/* FOOTER */
.site-footer .site-footer__top .region:not(.region-footer-first) {
  margin: 0;
}

.site-footer .content,
.site-footer .content :is(a, a:hover) {
  color: var(--main-dark-gray);
}

.site-footer__top .views-field-field-contatti-footer p {
  text-align: left;
  font-weight: initial;
}

.site-footer .site-footer__top .region.region-footer-third {
  margin-top: 2rem;
}

.uni-footer {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: center;
}

.uni-footer__logo img {
  height: auto;
}

.uni-footer__info p {
  margin: 0;
  font-weight: initial;
  color: var(--main-dark-gray);
  text-align: center;
}

@media (min-width: 48em) {
  .site-footer .site-footer__top .region.region-footer-third {
    margin-top: 0;
  }

  .region-footer-third {
    grid-column: 3 / span 2;
    justify-self: end;
  }

  .uni-footer {
    gap: 1.5rem;
    flex-direction: row;
    align-items: flex-start;
  }

  .uni-footer__info p {
    text-align: left;
  }
}

@media (min-width: 64em) {
  .site-footer__top {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer .region-footer-first > div {
    padding-left: 0.75rem;
  }
}

/* RISULTATI RICERCA */
.gs-web-image-box {
  padding: 2px 10px 2px 0 !important;
}

/* SHARE EVERYWHERE */
.se-block .block-content .se-container .se-links-container,
.se-block .block-content .se-container .se-links-container .se-links {
  position: static;
  height: auto;
}

.se-block .block-content .se-container .se-links-container {
  display: inline-flex;
  align-items: center;
}

.se-label {
  display: inline-block;
}

.se-block .se-link {
  min-width: auto;
}

.se-link.linkedin svg {
  top: -2px;
  scale: 1.4;
  margin-left: 3px;
}
