:root{
  --t2-blue: #003366;
  --t2-gold: #C8B185;
  --t2-white: #ffffff;
  --tap: 44px;
  --drawer-top: 0px;              /* computed in mobile block */
  --header-h: 74px;               /* banner height */
  --underline: 3px;               /* header bottom border */
}

/* =================
   Header / utility
   ================= */
#block-emergencyblock-3{
  background:#dc3545 !important; color:#fff; margin-top:2.5em;
}

div#header{
  background:#fff; display:block; position:sticky; top:-95px;
  z-index:999999; border-bottom:3px solid var(--t2-gold);
}

/* Search (kept) */
div#block-searchform-3{ max-width:250px; max-height:30px; right:0; position:absolute; margin:3em 0 0; }
div#block-searchform-3 #search-block-form #edit-keys{ max-width:120px; min-height:20px; }
div#block-searchform-3 #search-block-form #edit-actions input{ max-width:50px; min-width:100px; min-height:20px; font-size:.8em; margin-top:.5em; }
div#block-searchform-3 .js-form-item.form-no-label{ padding:0; margin:.5em 0; }

/* =================
   Branding (kept)
   ================= */
.t2-site-branding{ max-width:500px; display:grid; grid-template-columns:1fr 2fr; margin:2em auto 0; }
.t2-uis-logo img{ width:200px; }
.t2-dept-logo{ border-left:1px solid #c8b186; padding:0 0 .5em .5em; max-height:50px; margin:auto; line-height:1em; }
.t2-dept-logo .theme-logos{ font-size:1.5em; margin:.3em 0 1em; }
.t2-branding{ margin:3em 0 0; }

/* =================
   Primary nav base
   ================= */
#primary_nav_wrap{ margin:0 auto 1em; padding:0; text-align:center; max-width:1400px; position:relative; }
#primary_nav_wrap ul{ margin:0 0 1em; padding:0; list-style:none; float:none; }
#primary_nav_wrap ul.menu{ margin:0; font-size:1.1rem; }
#primary_nav_wrap ul li{ display:inline-block; padding:0; }
#primary_nav_wrap ul a{ text-decoration:none; font-weight:400; }
#primary_nav_wrap ul ul li{ width:210px; min-width:210px; }
#primary_nav_wrap li.menu-item span{ font-size:1.1em; }

.region.region-primary-menu{ position:relative; z-index:11; height:auto; max-height:unset; }

/* =========================
   DESKTOP (≥1025px)
   ========================= */
@media (min-width:1025px){

  /* Center the top-level row */
  #primary_nav_wrap > ul{ display:flex; justify-content:center; gap:.25rem; align-items:stretch; }
  #primary_nav_wrap > ul > li{ display:flex; position:relative; }

  /* Top-level tabs (frame on hover) */
  #primary_nav_wrap > ul > li > a,
  #primary_nav_wrap > ul > li > span{
    color:#333; border:2px solid transparent; box-sizing:border-box; padding:8px 12px; font-weight: 400 !important; 
    display:inline-flex; align-items:center; gap:6px; line-height:1.2;
  }
  #primary_nav_wrap > ul > li:hover > a,
  #primary_nav_wrap > ul > li:hover > span,
  #primary_nav_wrap > ul > li.active > a,
  #primary_nav_wrap > ul > li.active > span{
    border-color:var(--t2-blue); background:transparent; color:#333; font-weight: 400 !important;
  }

  /* First dropdown panel (white) with tiny top gap that doesn't move panel */
  #primary_nav_wrap > ul > li > ul{
    position:absolute; left:0; top:100% !important; margin-top:0 !important;
    background:#fff; border-top:2px solid transparent !important; background-clip:padding-box;
    min-width:calc(100% + 2px) !important; width:max-content !important; max-width:none !important;
    padding:0; z-index:3;
  }

  /* L2 items (white → blue on hover) */
  #primary_nav_wrap > ul > li > ul > li{ float:none; width:100% !important; min-width:100% !important; }
  #primary_nav_wrap > ul > li > ul > li > :is(a,span){
    position:relative; display:block; padding:10px 28px 10px 14px !important; margin:0 !important;
    background:#fff; color:#333; font-weight:400;
  }
  #primary_nav_wrap > ul > li > ul > li:hover > :is(a,span),
  #primary_nav_wrap > ul > li > ul > li.active > :is(a,span){
    background:var(--t2-blue); color:#fff;
  }

  /* Carets in L2 */
  #primary_nav_wrap > ul > li > ul > li > :is(a,span) i.fa-caret-right{
    position:absolute; right:10px; top:50%; transform:translateY(-50%); color:#333 !important;
  }
  #primary_nav_wrap > ul > li > ul > li:hover > :is(a,span) i.fa-caret-right{ color:#fff !important; }
  #primary_nav_wrap > ul > li > ul > li.expanding-item::before{ content:none !important; }
  #primary_nav_wrap > ul > li > ul > li > ul{ position:absolute; left:100% !important; top:0 !important; }

  /* L3+ flyouts (gold → white on hover) */
  #primary_nav_wrap ul ul ul{ background:var(--t2-gold) !important; white-space:normal !important; min-width:0 !important; width:auto !important; }
  #primary_nav_wrap ul ul ul > li > :is(a,span){ background:var(--t2-gold) !important; color:#333 !important; font-weight:400; padding:12px 16px; display:block; }
  #primary_nav_wrap ul ul ul > li:hover > :is(a,span){ background:#fff !important; color:#333 !important; }

  /* Remove legacy left borders/shadows in flyouts */
  #primary_nav_wrap ul li ul li ul li,
  #primary_nav_wrap ul ul ul,
  #primary_nav_wrap ul ul ul > li{ border-left:0 !important; box-shadow:none !important; }


  /* Padding tweak on very wide */
  @media (min-width:1201px){
    #primary_nav_wrap ul a{ padding:0; }
  }
}

/* ===========================================
   MOBILE & TABLET (≤1024px) — Theme-2 colors
   Drawer sits under gold underline; toggle black→blue
   =========================================== */
/* ===== THEME 2 — MOBILE & TABLET COMBINED (≤1000px) ===== */
@media (max-width:1024px){
  :root{
    --t2-header-h:74px;             /* banner height */
    --t2-underline:3px;             /* gold line */
    --drawer-fudge:8px;             /* slight offset */
    --t2-blue:#003366;
    --t2-gold:#C8B185;
    --t2-white:#fff;
  }

  /* --------------------------
     HEADER + BRANDING
  --------------------------- */
  .layout-container,
  header[role="banner"]{ overflow:visible !important; }

header[role="banner"],
header[role="banner"] div#header {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 10000 !important;
  background: #fff;
  border-bottom: 3px solid var(--t2-gold) !important; /* KEEP gold underline visible always */
}


  body{
    padding-top:calc(var(--t2-header-h) + var(--t2-underline)) !important;
  }

  .region.region-primary-menu{
    height:var(--t2-header-h) !important;
    min-height:var(--t2-header-h) !important;
    max-height:var(--t2-header-h) !important;
    position:relative !important;
    overflow:visible !important;
    z-index:110 !important;
  }

.t2-site-branding{ 
	margin:.5rem auto 0 !important; 
	display:grid; 
	grid-template-columns:132px 1fr; 
	column-gap:6px; 
	align-items:center; }

  .t2-uis-logo img{
    width:132px; height:auto;
    border-right:0 !important;
    display:block;
  }

  .t2-dept-logo{
    border-left:1px solid var(--t2-gold) !important;
    padding-left:1em;
    display:flex; align-items:center;
    line-height:1;
  }

  .t2-dept-logo .theme-logos{
    width:72%;
    margin:0;
    font-size:19px;
    line-height:1.08;
    transform:translateY(1px);
  }




  /* --------------------------
     TOGGLE BUTTON (hamburger)
  --------------------------- */
#primary_nav_wrap {
  position: relative;
}
#primary_nav_wrap label {
  position: fixed;                 /* fixes vertical drift caused by grid */
  top: calc(var(--t2-header-h) / 2 + var(--t2-underline)); /* middle of header */
  right: 24px;                     /* same as Theme 1 spacing */
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #000 !important;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;                   /* above branding/logo */
  transition: background .25s ease;
}

/* Hover + Active */
#primary_nav_wrap label:hover,
#primary_nav_wrap input[type="checkbox"]:checked ~ label {
  background: #003366 !important;
}

/* Ensure icon stays visible and centered */
#primary_nav_wrap label::before {
  color: #fff !important;
  font-size: 26px;
  line-height: 1;
}

/* Portrait correction */
@media (orientation: portrait) {
  #primary_nav_wrap label {
    right: 22px;
    top: calc(var(--t2-header-h) / 2 + 4px);
  }
}

/* Landscape correction */
@media (orientation: landscape) {
  #primary_nav_wrap label {
    right: 24px;
    top: calc(var(--t2-header-h) / 2 + var(--t2-underline) - 2px);
  }
  
}




  /* --------------------------
     DRAWER MENU
  --------------------------- */
#primary_nav_wrap .menu {
  position: fixed !important;
  top: calc(var(--t2-header-h) + var(--t2-underline)) !important; /* sit just under header + line */
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--t2-white) !important;
  transform: translate3d(100%, 0, 0);
  transition: transform .3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1000;
  border-top: none !important; /* no duplicate line */
}

  #primary_nav_wrap input[type="checkbox"]:checked + label + .menu{
    transform:translate3d(0,0,0);
  }

  #primary_nav_wrap ul{ margin:0 !important; padding:0 !important; }

  /* --------------------------
     LEVEL 1 LINKS
  --------------------------- */
  #primary_nav_wrap .menu > li > :is(a,span){
    display:flex; align-items:center;
    width:100%;
    min-height:62px;
    line-height:42px;
    padding:0 20px;
    background:var(--t2-white) !important;
    color:var(--t2-blue) !important;
    border-bottom:1px solid var(--t2-blue);
    text-decoration:none;
  }

  /* --------------------------
     LEVEL 2 LINKS
  --------------------------- */
  #primary_nav_wrap .menu > li > ul{
    background:var(--t2-blue) !important;
    border-top:1px solid var(--t2-blue);
    border-bottom:1px solid var(--t2-gold);
  }

  #primary_nav_wrap .menu > li > ul > li > :is(a,span){
    background:var(--t2-blue) !important;
    color:var(--t2-white) !important;
    border-bottom:1px solid var(--t2-white);
    display:block;
    padding:12px 20px;
    text-decoration:none;
  }

  /* --------------------------
     LEVEL 3 LINKS
  --------------------------- */
  #primary_nav_wrap .menu > li > ul > li > ul{
    background:var(--t2-gold) !important;
  }

  #primary_nav_wrap .menu > li > ul > li > ul > li > :is(a,span){
    background:var(--t2-gold) !important;
    color:var(--t2-blue) !important;
    display:block;
    padding:12px 20px 12px 52px;
    border-bottom:1px solid var(--t2-blue);
    text-decoration:none;
  }

  /* --------------------------
     FONTS & ICONS
  --------------------------- */
  #primary_nav_wrap .menu > li > :is(a,span),
  #primary_nav_wrap .menu > li > ul > li > :is(a,span){
    font-size:16px !important;
  }
  #primary_nav_wrap .menu > li > ul > li > ul > li > :is(a,span){
    font-size:15px !important;
  }

  #primary_nav_wrap .menu li i[class*="fa-caret"],
  #primary_nav_wrap .menu li.expanding-item::before{
    color:currentColor !important;
  }

  /* --------------------------
     FOOTER GRID (mobile)
  --------------------------- */
  .footer-t2-grid{ grid-template-columns:1fr; }
}


  /* Tablet portrait branding alignment */
  @media (orientation:portrait) and (min-width:600px){
    #primary_nav_wrap label{ right:24px !important; --menu-btn-nudge:-1px; }
    .t2-site-branding{
      max-width:none; width:auto; margin:0; display:grid; grid-template-columns:170px 1fr; column-gap:12px;
      align-items:center; justify-content:start; position:relative; top:-4px;
    }
    .t2-uis-logo img{ width:170px; height:auto; display:block; }
    .t2-dept-logo{ border-left:1px solid #c8b186; padding-left:.5em; margin:0; max-height:50px; display:flex; align-items:center; line-height:1; }
    .t2-dept-logo .theme-logos{ width:80%; margin:0; }
  }

  /* Small phones */
  @media (max-width:599px){
    .t2-site-branding{ grid-template-columns:132px 1fr; column-gap:6px; align-items:center; }
    .t2-uis-logo img{ width:132px; height:auto; border-right:0 !important; display:block; }
    .t2-dept-logo{ border-left:1px solid #c8b186 !important; padding-left:1em; display:flex; align-items:center; line-height:1; }
    .t2-dept-logo .theme-logos{ width:72%; margin:0; font-size:19px; line-height:1.08; transform:translateY(1px); }
  }
}

/* =================
   Footer (kept)
   ================= */
.footer-t2{ background:url(/sites/default/files/2021-07/footer2-linen-bg.jpg); padding:3em 0 1em; color:#fff; }
.footer-t2-grid{ display:grid; grid-template-columns:1fr 2fr; }
.library-footer.footer-t2-grid{ display:grid; grid-template-columns:2fr 1fr; padding:2em; }
.footer-t2-ctas a{ color:#fff; }
.footer-t2-links a, .footer-t2-address a{ color:#fff; font-weight:100; text-decoration:none; }
.footer-t2-address a:hover, .footer-t2-links a:hover{ text-decoration:underline; }
a.footer-t2-btn{ padding:.5em 1em; max-width:250px; border:2px solid #fff; display:block; margin:1.3em auto; text-align:center; text-transform:uppercase; color:#fff; font-weight:100; text-decoration:none; }
a.footer-t2-btn:hover{ background:#fff; color:#036; }
.footer-t2 ul.comp-links{ max-width:1000px; margin:0; padding:0; }
.footer-t2 ul.comp-links li{ display:inline; padding:0 .5em; }
.footer-t2 ul.comp-links a{ color:#fff; text-decoration:none; background:none; font-weight:100; font-size:.8em; }
.footer-t2 ul.comp-links a:hover{ text-decoration:underline; }
.footer-t2-social-links .fa-ext{ display:none; }
.footer-t2-social-links .social-links{ max-width:900px; margin:2em auto 0; display:block; text-align:center; }
.footer-t2-social-links .social-links a{ margin:1em; }
.footer-t2-address{ margin:1em; font-size:.8em; font-weight:100; }
.footer-t2-address a{ margin:1em; }
.footer-t2-logo{ display:grid; grid-template-columns:.5fr 3fr; max-width:600px; }
.footer-t2-logo .footer1-dept-logo{ max-width:280px; padding:.2em 1em; border-left:1px solid #fff; margin:1em 0; }
.footer-t2-logo .uis-footer1-logo{ max-width:200px; }
@media (max-width:599px){ .footer-t2-logo .uis-footer1-logo{ max-width:150px; } }

/* Misc content keeps */
.view-id-title_caption img{ width:100%; height:auto; }
.wp-block-cover__inner-container .mis-card-wrapper .mis-cards .mis-card .mis-content .ca-card-btn a{ color:#fff; text-decoration:none; }
a.footer-dept-logo{ text-decoration:none; color:#fff; font-family:'myriad-pro'; font-size:1.4em; line-height:1em; font-weight:900; }
.footer-t2-uislogo{ margin:0 0 1em; }
.footer-dept{ max-width:500px; display:inline-block; margin:1em; }
#highlighted{ clear:both; }
.ql-link a{ font-size:unset; }



/* === THEME 2 HEADER LOGOS — CENTERED LIKE THEME 1 (Landscape & Tablet) === */
@media (max-width:1024px) and (orientation: landscape) {
  /* Keep only one underline, thinner and balanced */
  header[role="banner"] div#header {
    border-bottom: 3px solid var(--t2-gold) !important;
  }

  .region.region-primary-menu {
    display: grid !important;
    grid-template-columns: 2fr 5fr !important;
    align-items: center !important;      /* <-- Center vertically, not bottom */
    height: var(--t2-header-h) !important;
    border-bottom: none !important;
  }

  .t2-site-branding {
    display: grid !important;
    grid-template-columns: 132px auto !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 8px !important;
    margin: 0 auto !important;
    height: var(--t2-header-h) !important;
    transform: none !important;
  }

  .t2-uis-logo img {
    width: 132px !important;
    height: auto !important;
    display: block !important;
  }

  .t2-dept-logo {
    display: flex !important;
    align-items: center !important;      /* <-- centers the dept text vertically */
    border-left: 1px solid var(--t2-gold) !important; /* gold divider */
    padding-left: .7em !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  .t2-dept-logo .theme-logos {
    font-size: 1.1em !important;
    transform: translateY(1px);          /* small optical lift to center text */
  }
}

/* === Portrait tablet & phone: ensure drawer sits fully BELOW gold line === */
@media (max-width:1024px) and (orientation: portrait) {
  #primary_nav_wrap .menu {
    top: calc(var(--t2-header-h) + var(--t2-underline) + 8px) !important;
  }
}



/* ✅ Mobile vertical (≤599px): Dept logo was too high */
@media (max-width: 599px) and (orientation: portrait) {
  .t2-site-branding {
    align-items: center !important;
    transform: translateY(3px); /* push both logos slightly down */
  }

  .t2-uis-logo img {
    transform: translateY(2px); /* even out UIS logo */
  }

  .t2-dept-logo {
    align-items: center !important;
    transform: translateY(2px); /* lower dept text slightly */
  }
}

