/* Light refinements only — the original ITA header remains intact. */
.header.header-sticky {
  transition: box-shadow 0.25s ease;
}

.header .topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header .topbar a {
  transition: opacity 0.2s ease;
}

.header .topbar a:hover {
  opacity: 0.86;
}

.header .topbar a > i {
  color: #d39f06;
}

.header .header-main {
  box-shadow: 0 2px 10px rgba(2, 61, 111, 0.04);
}

.header .navbar .navbar-nav .nav-item .nav-link {
  transition: color 0.2s ease, background-color 0.2s ease;
}

.header.sticky-top {
  box-shadow: 0 6px 20px rgba(2, 61, 111, 0.12);
}

/* The full navigation needs more room than a standard Bootstrap container.
   Switch to the existing mobile menu before links can be cut off. */
@media (min-width: 992px) and (max-width: 1399px) {
  .header .topbar .container {
    max-width: 100%;
    padding-right: 30px;
    padding-left: 30px;
  }

  .header .topbar .d-lg-flex {
    font-size: 13px;
  }

  .header .topbar .btn-examen {
    padding: 11px 13px;
    font-size: 14px;
  }

  .header .navbar-toggler {
    position: absolute;
    top: 50%;
    right: 0;
    display: flex !important;
    width: 48px;
    height: 48px;
    padding: 0;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
  }

  .header .navbar {
    flex: 1 1 auto;
    width: auto;
    min-height: 76px;
  }

  .header .search-icon {
    display: none !important;
  }

  .header .navbar-collapse {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    z-index: 999;
    display: none !important;
    width: 340px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #eeeeee;
    box-shadow: 0 8px 20px rgba(2, 61, 111, 0.14);
  }

  .header .navbar-collapse.show {
    display: block !important;
  }

  .header .navbar .navbar-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .header .navbar .navbar-nav .nav-item .nav-link {
    padding: 12px 20px;
  }

  .header .navbar .navbar-nav .nav-link i {
    position: absolute;
    top: 16px;
    right: 20px;
  }

  .header .navbar .dropdown .dropdown-menu {
    width: 100%;
    margin: 0;
    padding: 10px 24px;
    background: #f4f4f5;
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 575px) {
  .header .navbar-collapse {
    max-height: calc(100vh - 80px);
  }
}
