/* =========================================================================
   deree.aug.edu — main navigation (accessibility fix #1)
   Add to the site CSS bundle, after app.css. Desktop vs mobile follows the
   site's own breakpoint: deree-nav.js adds .is-mobile to #mainNav whenever
   the hamburger is showing (1280px on ULE pages, 1024px elsewhere).
   The old .flyout / .closeMenu / .mm-* rules can be deleted once this ships.
   ========================================================================= */
    .visually-hidden { 
        position:absolute !important; width:1px !important; height:1px !important; 
        margin:-1px !important; padding:0 !important; overflow:hidden !important; 
        clip:rect(0 0 0 0) !important; white-space:nowrap !important; border:0 !important; 
    }

    .nav-panel .nav-l3.is-open { margin-left: 15px; }
    
    @media (min-width: 1375px) {
        .nav-panel .nav-l3 { margin-left: 100px !important; opacity:0; transition: opacity .2s linear; }
        .nav-panel .nav-l3.is-open { opacity: 1; }
        
    }
    @media (min-width: 1580px) {
        .nav-panel .nav-l3 { margin-left: 40px !important; }
    }    
    @media (min-width: 1660px) {
        .nav-panel .nav-l3 { margin-left: 0px !important; }
    }        

@media (min-width: 1375px) {
  .nav-panel {                                /* the flyout */
    position: fixed; left: 0; right: 0;
    top: var(--header-h, 160px);              /* under the header (100px once scrolled) */
    max-height: calc(100vh - var(--header-h, 160px));
    overflow-y: auto;                         /* every link reachable at zoom */
    /*display: grid; grid-template-columns: repeat(3, 1fr);*/
    background: #252159;
    transform: translateY(-100%);             /* same drop-down as today */
    transition: transform .4s ease;
    z-index: 4;                               /* header bar sits above it, opaque */
    height: 100%;
  }
  .nav-panel.is-open { transform: none; }
  .nav-panel::before {                        /* the dark middle column */
    content: ""; position: absolute; top: 0; bottom: 0; left: 33.333%; width: 33.333%;
    background: #1a173e;
    z-index: -1;
  }
  .nav-panel .nav-l3 { position: absolute; top: 220px; left: 33.333%; width: 30.333%; }  /* level 3 in column 2 */
}

@media (min-width: 1800px) { .nav-panel .nav-l3 { left: 43.333%; width: 33.333%; } }

.mainMenu .menu .nav-panel ul { flex-direction: column; align-items: start; }



/* Closed means removed. This site's CSS has no [hidden] rule, and
   `.mainMenu .menu ul { display:flex }` would otherwise override it. */
#mainNav [hidden] { display: none !important; }

/* Buttons that replace the old <a href="#"> toggles. :where() keeps this reset at zero
   specificity, so every styling rule below wins over it. */
:where(#mainNav, .mainMenu .mobileMenuToggle) button {
  background: none; border: 0; margin: 0; padding: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.mainMenu .mobileMenuToggle button { display: flex; color: #fff; font-size: 0; } /* label stays off-screen, as before */

/* Level-1 buttons look exactly like the header links (.mainMenu .menu a) */
.mainMenu .menu .nav-toggle {
  border-bottom: 2px solid transparent; color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: .11px; line-height: 1.57;
  transition: color .15s, border-color .15s;
}
.mainMenu .menu .nav-toggle .icon { display: inline-flex; font-size: 16px; margin-left: 10px; }
@media (min-width: 1375px) { .mainMenu .menu .nav-toggle .icon { display: none; } }
@media (min-width: 1440px) {
  .mainMenu .menu .nav-toggle { font-size: 14px; letter-spacing: .12px; line-height: 1.5; }
}
.mainMenu .menu .nav-toggle.active,
.mainMenu .menu .nav-toggle:hover,
.mainMenu .menu .nav-toggle:focus,
.mainMenu .menu .nav-toggle[aria-expanded="true"] { border-color: #f57960; color: #f57960; }

/* Visible keyboard focus everywhere in the nav (coral on navy ≈ 5.4:1) */
#mainNav a:focus-visible,
#mainNav button:focus-visible,
.mainMenu .mobileMenuToggle button:focus-visible { outline: 3px solid #f57960; outline-offset: 3px; }

/* Stop the header-row rules (.mainMenu .menu ul / li / a) leaking into the panels */
.mainMenu .menu .nav-panel ul { display: block; font-size: inherit; }
.mainMenu .menu .nav-panel li { margin: 0; }

/* Panel typography — ported from the old .flyout rules */
.mainMenu .menu .nav-panel { color: #fff; }
.mainMenu .menu .nav-panel .heading {
  display: block; color: #a8a6bd; font-size: 12px; font-weight: 700;
  letter-spacing: .09px; line-height: 1.67; margin-bottom: 30px;
}
.mainMenu .menu .nav-panel li {
  font-size: 22px; font-weight: 700; letter-spacing: .17px; line-height: 1.45; margin-top: 16px;
}
.mainMenu .menu .nav-panel a,
.mainMenu .menu .nav-subtoggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  border: 0; border-left: 4px solid transparent; padding: 0 0 0 13px;
  color: #fff; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit;
  transition: color .15s, border-color .15s;
}
.mainMenu .menu .nav-panel a:hover,
.mainMenu .menu .nav-panel a:focus,
.mainMenu .menu .nav-subtoggle:hover,
.mainMenu .menu .nav-subtoggle:focus,
.mainMenu .menu .nav-subtoggle[aria-expanded="true"] { border-color: #f57960; color: #f57960; }
.mainMenu .menu .nav-subtoggle .icon:before { display: flex; color: #ededf3; font-size: 16px; transition: color .15s, transform .15s; }
.mainMenu .menu .nav-subtoggle:hover .icon:before,
.mainMenu .menu .nav-subtoggle:focus .icon:before,
.mainMenu .menu .nav-subtoggle[aria-expanded="true"] .icon:before { color: #f57960; }
.mainMenu .menu .nav-close { width: 20px; height: 20px; font-size: 20px; line-height: 1; color: #fff; }
.mainMenu .menu .nav-close:hover { color: #a8a6bd; }

/* ---- Desktop: today's flyout geometry (full-screen drop-down, two columns) ---- */
.mainMenu .menu:not(.is-mobile) .nav-panel {
  position: fixed; top: 0; left: 0; right: 0; height: 100vh; max-height: 100vh;
  z-index: -1;                        /* under the header row, over the page */
  background: #252159;
  padding: 220px 0 60px 30px;         /* content starts under the header, as before */
  overflow-y: auto;                   /* every link reachable at zoom */
  transform: translateY(-100%);
  /*transform: unset;*/
  transition: transform .6s ease;     /* keep in sync with SLIDE_MS in deree-nav.js */
}
.mainMenu .menu:not(.is-mobile) .nav-panel.is-open { transform: none; }
.mainMenu .menu:not(.is-mobile) .nav-panel::before {   /* the dark second column */
  content: ""; position: absolute; top: 0; bottom: 0; left: 540px; width: 520px; background: #1a173e;
}
.mainMenu .menu:not(.is-mobile) .nav-panel > .heading,
.mainMenu .menu:not(.is-mobile) .nav-l2 { box-sizing: border-box; width: 510px; padding-right: 60px; }
.mainMenu .menu:not(.is-mobile) .nav-sub {             /* level 3 sits in the second column */
  box-sizing: border-box; position: absolute; top: 220px; left: 540px; width: 460px; padding: 0 60px 0 100px;
}
.mainMenu .menu:not(.is-mobile) .nav-close { position: absolute; top: 190px; right: 31%; }
@media (min-width: 1800px) {
  .mainMenu .menu:not(.is-mobile) .nav-panel { padding-left: calc(50vw - 725px); }
  .mainMenu .menu:not(.is-mobile) .nav-panel::before,
  .mainMenu .menu:not(.is-mobile) .nav-sub { left: calc(50vw - 725px + 510px); width: 610px; }
}
@media (min-width: 1024px) {
    /*.mainMenu .searchToggle .icon-search { top: -5px; }*/
}

/* ---- Mobile and 200% zoom: the hamburger opens the whole nav as a layer ---- */
body.js-navOpen .mainMenu .menu.is-mobile {
  display: block !important;          /* beats .mainMenu .menu{display:none} and the search scripts' inline display */
  position: fixed; top: var(--nav-top, 110px); left: 0; right: 0; bottom: 0;
  margin: 0; padding: 24px 24px 60px; overflow-y: auto; background: #252159;
}
.mainMenu .menu.is-mobile .nav-l1 { display: block; }
.mainMenu .menu.is-mobile .nav-l1 > li { margin: 0 0 12px; }
.mainMenu .menu.is-mobile .nav-l1 > li > a:not(.button),
.mainMenu .menu.is-mobile .nav-toggle { display: block; width: 100%; font-size: 22px; padding: 6px 0; border-bottom: 0; }
.mainMenu .menu.is-mobile .nav-panel,
.mainMenu .menu.is-mobile .nav-sub { position: static; transform: none; padding: 4px 0 8px 0px; }
.mainMenu .menu.is-mobile .nav-panel::before,
.mainMenu .menu.is-mobile .nav-panel .heading,
.mainMenu .menu.is-mobile .nav-close { display: none; }   /* headings still name the lists (aria-labelledby) */
.mainMenu .menu.is-mobile .nav-panel li { font-size: 18px; margin-top: 10px; }
.mainMenu .menu.is-mobile .nav-subtoggle[aria-expanded="true"] .icon:before { transform: rotate(90deg); }
.mainMenu .mobileMenuToggle button[aria-expanded="true"] svg.open { display: none; }
.mainMenu .mobileMenuToggle button[aria-expanded="true"] svg.close { display: initial; }

.mainMenu .nav-toggle .icon-chevron-right {
  display: inline-block;
  transition: transform .25s ease;
}

.mainMenu .nav-toggle[aria-expanded="true"] .icon-chevron-right {
  transform: rotate(90deg); /* points down when open */
}

/*@media (prefers-reduced-motion: reduce) {*/
/*  #mainNav .nav-panel, #mainNav .nav-panel * { transition: none !important; }*/
/*}*/

.mainMenu .menu a,
.mainMenu .menu button {
  border-bottom: 2px solid transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .11px;
  line-height: 1.57;
  padding-bottom: 0;
  transition-duration: .15s;
  transition-property: color,border-color;
}

@media (min-width: 1440px) {
  .mainMenu .menu a,
  .mainMenu .menu button  {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .12px;
    line-height: 1.5;
  }
}

/* ≤1375px block: drop the dead div.menu selector, and the js-searchOpen line (now in deree-search.css) */
/*.page-ule .mainMenu nav.menu { display: block !important; }*/

/* ≤1279px block */
/*.page-ule .mainMenu .menu-container { order: 10; flex: 0 0 100%; }*/
/*.mainMenu .menu:not(.is-mobile) .nav-close { top: 24px; right: 96px; }    */
/* clear of the floating "easily" button */

@media (min-width: 1280px) {
    .page-ule.js-searchOpen .mainMenu .logo { z-index: 50; } 
}

/* =========================================================================
   deree.aug.edu — main navigation at 200% zoom (CSS only)
   Add to the same bundle as deree-nav.css, after it.

   Why: below 1376px the site swaps the nav for the mmenu hamburger, and mmenu
   traps keyboard users (every Tab returns to "Open mobile menu", Escape does
   nothing). Desktop browsers zoomed to 200% report 640–960px, so they land in
   that trap. On mouse/trackpad devices this keeps the new nav instead and never
   shows the hamburger. Touch phones and tablets keep mmenu until the mobile
   step ships. deree-nav.js runs in desktop mode whenever no hamburger <button>
   is showing, so no script change is needed.
   ========================================================================= */

@media (max-width: 1280px) and (hover: hover) and (pointer: fine) {
  /*.page-ule .mainMenu .mobileMenuToggle { display: none !important; }*/       /* !important also beats the search scripts' inline display */
  /*.page-ule .mainMenu div.menu,
  .page-ule .mainMenu nav.menu { display: block !important; }*/              /* beats the inline @media (max-width:1375px) rule */
  .page-ule.js-searchOpen .mainMenu div.menu { display: none !important; }  /* the search box takes the row while it is open */
  .page-ule .mainMenu .logo { flex-shrink: 0; }
  .mainMenu .menu li { margin-right: 14px; }
  .mainMenu .menu .button { white-space: nowrap; padding: 14px 20px 12px; }
  .mainMenu .menu:not(.is-mobile) .nav-panel { scroll-padding-top: 120px; } /* focused links never sit under the header */
}

@media (min-width: 1375px) and (hover: hover) and (pointer: fine) {
  .page-ule .mainMenu .mobileMenuToggle { display: none !important; }       /* !important also beats the search scripts' inline display */
  .page-ule .mainMenu div.menu,
  .page-ule .mainMenu nav.menu { display: block !important; }              /* beats the inline @media (max-width:1375px) rule */
}

.page-ule .flyout-search { position: fixed; }                             /* was absolute inside the fixed header; keeps the page from widening */

@media (max-width: 1024px) {
  .page-ule.js-searchOpen .icon-search {
    position: absolute;
    right: 26px; left: unset;
  }
  .page-ule .search-input {
    height: 60px;
  }
  
}
/* Below 1280px one row no longer fits (Greek labels crush the logo by 1024px).
   The header wraps into two rows and scrolls with the page instead of covering
   a third of a zoomed screen; sections drop down beneath it. */
@media (max-width: 1279px) and (hover: hover) and (pointer: fine) {
  .page-ule #menuHandler { height: auto !important; }   /* !important: a site script writes an inline height */
  .page-ule main.innerPage { padding-top: 0; }                              /* the header now takes its own space */
  .page-ule .flyout-search { position: fixed; }                             /* was absolute inside the fixed header; keeps the page from widening */
  .page-ule .mainMenu .inner { flex-wrap: wrap; row-gap: 10px; padding: 12px 0 14px; }
  .page-ule .mainMenu div.menu { order: 10; flex: 0 0 100%; }               /* nav on its own row under logo / language / search */
  #mainNav > ul { flex-wrap: wrap; row-gap: 10px; }
  #mainNav > ul > li > .nav-toggle,
  #mainNav > ul > li > a:not(.button) { white-space: nowrap; }

  .mainMenu .menu:not(.is-mobile) .nav-panel {
    position: absolute; top: 100%; height: auto; max-height: none;
    padding: 28px 15px 40px; overflow: visible;                             /* long sections scroll with the page */
  }
  .mainMenu .menu:not(.is-mobile) .nav-panel::before { display: none; }     /* no second column at this width */
  .mainMenu .menu:not(.is-mobile) .nav-panel > .heading,
  .mainMenu .menu:not(.is-mobile) .nav-l2 { width: auto; max-width: 100%; padding-right: 48px; }
  .mainMenu .menu:not(.is-mobile) .nav-sub,
  .mainMenu .menu:not(.is-mobile) .nav-l2 .nav-l3 { position: static; width: auto; padding: 4px 0 8px 16px; }
  .mainMenu .menu:not(.is-mobile) .nav-close { top: 24px; right: 15px; }
}



