/* Xu Laboratory - navigation visibility enhancement (2026-10-24)
   Load AFTER css/common.css and css/top.css in the shared template.
   No changes to the CMS GlobalNavigation plugin or page links.
*/

/* Desktop: separate institutional identification and navigation into two clear rows. */
@media screen and (min-width: 1025px) {
  #header { height: 128px; }
  #header .header_fixed {
    height: 128px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(18, 54, 73, .12);
  }
  #header .header_fixed .top_head {
    height: 78px;
    min-height: 78px;
    box-sizing: border-box;
    padding-right: 105px; /* space for JP / EN toggle, if installed */
  }
  #header .header_fixed .logo_tohoku,
  #header .header_fixed .logo_img {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
  }
  #header .header_fixed .top_head__text h2 { color: #173c50; }
  #header .header_fixed nav.nav {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: 50px;
    margin: 0;
    padding: 0 18px;
    background: #173c50;
  }
  #header .header_fixed .nav > .depth1 {
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 1240px;
    height: 50px;
    margin: 0 auto;
    padding: 0;
    flex-wrap: nowrap;
    animation: none;
  }
  #header .header_fixed .nav > .depth1 > li {
    position: relative;
    display: flex;
    align-items: stretch;
    margin: 0;
    min-width: 0;
  }
  #header .header_fixed .nav > .depth1 > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 50px;
    padding: 0 clamp(10px, 1.25vw, 19px);
    color: #fff;
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
    font-size: clamp(13px, 1vw, 15px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .01em;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
  }
  #header .header_fixed .nav > .depth1 > li > a:hover,
  #header .header_fixed .nav > .depth1 > li > a:focus-visible {
    background-color: #206c79;
    color: #fff;
  }
  #header .header_fixed .nav > .depth1 > li > a.active,
  #header .header_fixed .nav > .depth1 > li.active > a,
  #header .header_fixed .nav > .depth1 > li > a[aria-current="page"] {
    color: #fff;
    background: #206c79;
    box-shadow: inset 0 -4px 0 #a3f0db;
  }
  #header .header_fixed .nav > .depth1 > li > a:focus-visible {
    outline: 2px solid #a3f0db;
    outline-offset: -3px;
  }
  /* In case the previously supplied JP/EN switch is in use. */
  #header .header_fixed .lab-language-switch { top: 20px; }
}

/* Tablet/mobile: retain the site's existing slide-out menu behavior. */
@media screen and (max-width: 1024px) {
  #header .header_fixed .nav > .depth1 > li > a {
    color: #173c50;
    font-weight: 600;
    letter-spacing: .01em;
  }
  #header .header_fixed .nav > .depth1 > li > a.active,
  #header .header_fixed .nav > .depth1 > li.active > a,
  #header .header_fixed .nav > .depth1 > li > a[aria-current="page"] {
    color: #168b91;
    background-color: #edf8f8;
    box-shadow: inset 4px 0 0 #168b91;
  }
  #header .header_fixed .nav > .depth1 > li > a:focus-visible {
    outline: 2px solid #168b91;
    outline-offset: -3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #header .header_fixed .nav > .depth1 > li > a { transition: none; }
}
