/* Upper Header Styles */
.upper-header__section {
	display: flex;
    flex-direction: column;
    align-items: center;
	
	max-width: 100%;
	width: 100%;
	
	background-color: #103362;
}

.upper-header__container {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	
	max-width: 82rem;
	width: 100%;
	
	margin: 0.5rem 0;
    padding: 0 1.25rem;
}

.upper-header__usa-banner {
	display: flex;
	flex-direction: row;
	column-gap: 0.5rem;
	align-items: center;
}

.upper-header__usa-banner__label {
	font-family: "Barlow", sans-serif;
	font-size: 0.75rem;
	line-height: 1.5;
	color: white;
	font-weight: 700;
}

/* Header Styles */
.header {
	display: flex;
	flex-direction: column;
	
    background-color: #FFFFFF;
	
    position: fixed;
    top: 0;
    left: 0;
	
    width: 100%;
	
    z-index: 9999;
	
    transition: all 0.3s ease;
	
	border-bottom: 1px solid #00040926;
}

.header-container {
    max-width: 82rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
}

/* Logo Styles */
.header__logo {
    flex-shrink: 0;
}

.header__logo__link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Desktop Navigation */
.header__menu {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

.header__menu__items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.header__menu__item {
    position: relative;
}

.header__menu__item > a {
    color: #021F46;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 700;
	font-family: "Barlow", sans-serif;
    padding: 10px 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
	transition: all 0.3s ease-out;
}

.header__menu__item.has-dropdown:hover > a {
    color: #CA1212;
}

.header__menu__item > a:hover {
    color: #CA1212;
	transition: all 0.3s ease-out;
}

.header__menu__item > a:hover::after {
    width: 100%;
}

/* Dropdown Styles */
.dropdown-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.header__menu__item.has-dropdown:hover .dropdown-caret {
    transform: rotate(-180deg);
}

.header__menu__item.has-dropdown:hover .dropdown-caret path {
    fill: #CA1212;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.header__menu__item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;

    color: #021F46;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
	font-family: "Barlow", sans-serif;

    transition: background-color 0.3s ease;

    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
}

.dropdown-menu a::after {
    display: none;
}

/* Mini Cart Styles */
.header__mini-cart {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.mini-cart-link {
    display: flex;
    align-items: center;
    position: relative;
    text-decoration: none;
    color: #021F46;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.mini-cart-link:hover {
    color: #3D8CF8;
}

.mini-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.mini-cart-count {
    color: #021F46;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: "Barlow", sans-serif;
    margin-left: 0.5rem;
}

.mini-cart-count:empty {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    row-gap: 2px;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
	display: block;
    height: 2px;
    background-color: #021F46;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 70px; /* Adjust based on header height with upper section */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 998;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-content {
    padding: 20px;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-dropdown-caret {
    transition: all 0.3s ease-out;
}

.mobile-dropdown-caret path {
    transition: all 0.3s ease-out;
}

.mobile-nav-item.has-submenu .mobile-dropdown-caret {
    transform: rotate(0deg);
}

.mobile-nav-item.has-submenu:hover .mobile-dropdown-caret {
    transform: rotate(-180deg);
}

.mobile-nav-item.has-submenu.active .mobile-dropdown-caret {
    transform: rotate(-180deg);
}

.mobile-nav-item.has-submenu:hover .mobile-dropdown-caret path {
    fill: #CA1212;
}

.mobile-nav-item.has-submenu.active .mobile-dropdown-caret path {
    fill: #CA1212;
}

.mobile-nav-link {
    display: block;
    color: #021F46;
    text-decoration: none;
    padding: 15px 0;
    font-size: 1rem;
    font-weight: 700;
    transition: color 0.3s ease;
    font-family: "Barlow", sans-serif;
}

.mobile-nav-link:hover {
    color: #CA1212;
}

.mobile-nav-sublink {
    padding-left: 20px;

    font-family: "Barlow", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #021F46;
}

.mobile-submenu {
    list-style: none;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin: 0;
    padding: 0;
    display: none;
}

.mobile-nav-item.has-submenu a {
    display: flex;
    flex-direction: row;
    column-gap: 0.25rem;
    align-items: center;
}

.mobile-nav-item.has-submenu.active .mobile-submenu {
    display: block;
}

.mobile-dropdown-caret {
    display: flex;
}

/* Mobile Cart Section */
.mobile-cart-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.mobile-cart-link {
    display: flex;
    align-items: center;
    color: #021F46;
    text-decoration: none;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    font-family: "Barlow", sans-serif;
}

.mobile-cart-link:hover {
    color: #3D8CF8;
}

.mobile-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.mobile-cart-text {
    flex-grow: 1;
}

.mobile-cart-count {
    color: #021F46;
    font-size: 16px;
    font-weight: 500;
    font-family: "Barlow", sans-serif;
}

.mobile-cart-count:empty {
    display: none;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .header-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .header__menu {
        display: none;
    }
	
	.header__mini-cart {
		margin: 0 1.25rem 0 auto;
	}
    
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .mobile-nav {
        top: 5.9375rem;
        max-height: calc(100vh - 60px);
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 18px;
    }
}

/* Body padding to account for fixed header - only on page ID 2 */
body.page-id-2 {
    padding-top: 4.5rem;
}

@media (max-width: 1100px) {
    body.page-id-2 {
        padding-top: 4.875rem;
    }
}

/* Accessibility improvements */
.mobile-menu-toggle:focus,
.header__menu__item a:focus,
.mobile-nav-menu a:focus,
.mini-cart-link:focus {
    outline: 2px solid #021F46;
    outline-offset: 2px;
}

/* Animation for dropdown appearance */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu {
    animation: fadeInDown 0.3s ease;
}