/* DESKTOP-ONLY HEADER STYLES */
.header2025 {
  width:100%; max-width:2000px;
  display:grid; grid-template-columns:20% 80%;
  grid-template-areas:"headLogo headNav";
  margin:0 auto; z-index:100;
}
.headNav {
  text-align:right;
  padding: 30px;
}
.headLogo {
  padding: 30px;
}

.nav-2025 {
  list-style:none; margin:0; padding:0;
  display:flex; gap:1.2rem; position:relative;
  margin-left:auto;              /* push list to the right */
  justify-content:flex-end;      /* ensure items align right */
}
/* Change position to relative so dropdown stays under parent */
.nav-2025 > li {
  position: relative;
  list-style: none !important;
  list-style-type: none !important;
  display: flex;
  align-items: center;
}

.nav-2025 > li.has-mega:hover > .mega-panel,
.nav-2025 > li.has-mega:focus-within > .mega-panel,
.nav-2025 > li.has-mega.open > .mega-panel {
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}

.nav-2025 a.nav-parent-link {
  background:none; border:0; padding: 20px 0 5px 5px;
  font:600 15px/1.2 "Montserrat", Arial, sans-serif;
  color:hsl(var(--DarkBlue)); text-decoration:none; display:inline-flex; align-items:center; gap:.4rem;
  position:relative;
}
.nav-2025 a.nav-parent-link:hover,
.nav-2025 a.nav-parent-link:focus { color:hsl(var(--PrimaryColor)); }

.caret-toggle {
  display:inline-flex; align-items:center; justify-content:center;
  width:1.1em; height:1.1em; line-height:1; font-size:.7em;
  border:1px solid transparent; border-radius:3px;
  cursor:pointer; user-select:none;
}
.caret-toggle:focus { outline:2px solid hsl(var(--PrimaryColor)); }
.caret-toggle:hover { color:hsl(var(--PrimaryColor)); }

.caret-toggle.material-symbols-rounded{
  font-variation-settings:'FILL' 0,'wght' 500,'GRAD' 0,'opsz' 24;
  font-size:22px;
  width:auto; height:auto;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  transition:transform .25s ease;
}

.nav-2025 > li.has-mega.open > a .caret-toggle,
.nav-2025 > li.has-mega:hover > a .caret-toggle { transform:rotate(180deg); }

/* Dropdown panel using CSS variables */
.mega-panel {
  position:absolute;
  right:auto;
  left:50%;
  top:100%;
  transform:translateX(-50%) translateY(10px);
  /* White base with LightBlue overlay gradient */
  background: 
    linear-gradient(
      to bottom, 
      hsla(var(--LightBlue), 0.12), 
      hsla(var(--LightBlue), 0.03)
    ),
    hsl(var(--White)); /* Solid white background beneath */
  width:260px;
  border-radius:10px;
  border:1px solid hsla(var(--LightBlue), 0.3);
  box-shadow:0 10px 30px rgba(0,0,0,.15);
  padding:0.5rem 0;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .28s ease, transform .32s cubic-bezier(.4,.2,.1,1), visibility 0s linear .28s;
  will-change:opacity, transform;
  z-index:400;
  text-align:left;
  overflow:hidden;
}

/* When visible remove visibility delay and update transform */
.nav-2025 > li.has-mega:hover > .mega-panel,
.nav-2025 > li.has-mega:focus-within > .mega-panel,
.nav-2025 > li.has-mega.open > .mega-panel {
  transform:translateX(-50%) translateY(0);
  transition:opacity .28s ease, transform .32s cubic-bezier(.4,.2,.1,1), visibility 0s;
}

/* Updated for vertical layout */
.mega-row {
  display:flex;
  flex-direction:column;
  gap:0;
  padding:0;
  margin:0;
  width:100%;
}

.mega-col {
  width:100%;
  min-width:0;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:0;
}

/* Level 2 styling */
.mega-col .mega-l2 {
  font:600 14px/1.3 "Montserrat", sans-serif;
  text-decoration:none;
  color:hsl(var(--DarkBlue));
  padding:.7rem 1.5rem;
  display:block;
  width:100%;
  border-bottom:1px solid hsla(var(--LightBlue), 0.15);
  position:relative;
  box-sizing:border-box;
}

.mega-col .mega-l2:hover,
.mega-col .mega-l2:focus {
  color:hsl(var(--PrimaryColor));
  background:hsla(var(--LightBlue), 0.08);
}

/* Level 3 styling - nested list */
.mega-l3 {
  list-style:none;
  margin:0;
  padding:.4rem 0;
  display:flex;
  flex-direction:column;
  gap:0;
  background:hsla(var(--LightBlue), 0.04);
  border-bottom:1px solid hsla(var(--LightBlue), 0.15);
  width:100%;
  box-sizing:border-box;
}

.mega-l3 li {
  width:100%;
  margin:0;
  padding:0;
}

.mega-l3 a {
  font:400 13px/1.3 "Montserrat", sans-serif;
  color:hsl(var(--DarkBlue), 0.85);
  text-decoration:none;
  padding:.5rem 0 .5rem 2.5rem;
  display:block;
  box-sizing:border-box; 
}

.mega-l3 a:hover,
.mega-l3 a:focus {
  color:hsl(var(--PrimaryColor));
  background:hsla(var(--LightBlue), 0.08);
}

/* Dropdown pointer arrow */
.mega-panel::before {
  content:'';
  position:absolute;
  top:-8px;
  left:50%;
  transform:translateX(-50%) rotate(45deg);
  width:14px;
  height:14px;
  background:hsl(var(--White)); /* Match white background */
  border-left:1px solid hsla(var(--LightBlue), 0.3);
  border-top:1px solid hsla(var(--LightBlue), 0.3);
  z-index:1;
}

.mega-col:last-child .mega-l2:last-child,
.mega-col:last-child .mega-l3:last-child {
  border-bottom: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .mega-panel { transition:none; transform:none; }
  .caret-toggle { transition:none; }
}

.headerIcons { display:inline-flex; gap:.5rem; align-items:center; }
.icon-link img { height:30px; width:auto; display:block; }

/* Icon hover effects (using variables) */
.headerIcons .icon-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px;
  border-radius:50%;
  transition:transform .35s cubic-bezier(.4,.18,.2,1),
             box-shadow .35s ease,
             background-color .35s ease,
             filter .35s ease;
  background:transparent;
}
.headerIcons .icon-link img{
  height:30px;width:auto;display:block;
  transition:transform .45s cubic-bezier(.4,.18,.2,1),filter .35s ease;
  will-change:transform;
}
.headerIcons .icon-link:hover,
.headerIcons .icon-link:focus{
  background:hsla(var(--LightBlue), 0.1);
  transform:translateY(-3px);
  box-shadow:0 6px 16px -4px rgba(0,0,0,.25);
}
.headerIcons .icon-link:hover img,
.headerIcons .icon-link:focus img{
  transform:scale(1.07);
  filter:brightness(1.05) saturate(1.15);
}
.headerIcons .icon-link:active{
  transform:translateY(-1px) scale(.96);
  box-shadow:0 3px 10px -2px rgba(0,0,0,.28);
  transition:transform .15s ease,box-shadow .15s ease;
}
.headerIcons .icon-link:focus-visible{
  outline:2px solid hsl(var(--PrimaryColor));
  outline-offset:3px;
}

/* Social Icons Row */
.socialIcons {
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: transform .35s cubic-bezier(.4,.18,.2,1),
             box-shadow .35s ease,
             background-color .35s ease,
             filter .35s ease;
  background: transparent;
}

.social-link img {
  height: 24px; /* Slightly smaller than the site icons */
  width: auto;
  display: block;
  transition: transform .45s cubic-bezier(.4,.18,.2,1), filter .35s ease;
  will-change: transform;
}

.social-link:hover,
.social-link:focus {
  background: hsla(var(--LightBlue), 0.1);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px -4px rgba(0,0,0,.25);
}

.social-link:hover img,
.social-link:focus img {
  transform: scale(1.07);
  filter: brightness(1.05) saturate(1.15);
}

.social-link:active {
  transform: translateY(-1px) scale(.96);
  box-shadow: 0 3px 10px -2px rgba(0,0,0,.28);
  transition: transform .15s ease, box-shadow .15s ease;
}

.social-link:focus-visible {
  outline: 2px solid hsl(var(--PrimaryColor));
  outline-offset: 3px;
}

/* Adjust layout of headNav to accommodate two rows */
.headNav {
  text-align: right;
  padding: 20px 30px 20px; /* Adjusted padding */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}