/* Header nav link hover animations */
.nav-main > a,
.nav-main > .group > a {
    position: relative;
    padding-bottom: 4px; /* Consistent padding for all nav links */
}
.nav-main > a::after,
.nav-main > .group > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #dc2626;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.nav-main > a:hover::after,
.nav-main > .group:hover > a::after {
    width: 100%;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}
/* Active nav link styling */
.nav-main > a.nav-active::after,
.nav-main > .group.nav-active > a::after {
    width: 100%;
    background: #003366;
    box-shadow: none;
}
/* Dropdown sub-links: left accent bar on hover */
.nav-main .group div a {
    position: relative;
    transition: all 0.2s ease;
}
.nav-main .group div a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: #dc2626;
    border-radius: 0 2px 2px 0;
    transition: width 0.2s ease;
}
.nav-main .group div a:hover::before {
    width: 3px;
}

/* Mobile menu & hamburger animations */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 8px;
}
.hamburger:hover {
    background: rgba(0, 51, 102, 0.06);
}
.hamburger:active {
    transform: scale(0.95);
}
.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #475569;
    border-radius: 1px;
    transition: transform 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease, background 0.2s ease;
}
.hamburger:hover .hamburger-line {
    background: #003366;
}
.hamburger--open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger--open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger--open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu slide & fade */
.mobile-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, visibility 0.4s;
}
.mobile-menu--open {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
}
.mobile-menu nav a {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
.mobile-menu--open nav a {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu--open nav a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu--open nav a:nth-child(2) { transition-delay: 0.08s; }
.mobile-menu--open nav a:nth-child(3) { transition-delay: 0.11s; }
.mobile-menu--open nav a:nth-child(4) { transition-delay: 0.14s; }
.mobile-menu--open nav a:nth-child(5) { transition-delay: 0.17s; }
.mobile-menu--open nav a:nth-child(6) { transition-delay: 0.2s; }
.mobile-menu--open nav a:nth-child(7) { transition-delay: 0.23s; }
.mobile-menu--open nav a:nth-child(8) { transition-delay: 0.26s; }
.mobile-menu--open nav a:nth-child(9) { transition-delay: 0.29s; }
