/* Header styles */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 64, 128, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    color: white;
    padding: 0.55rem 2rem;
}

header.scrolled {
    background: rgba(0, 64, 128, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

main {
    padding-top: 70px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding-x);
    padding-right: var(--container-padding-x);
    position: relative;
    z-index: 70;
}

.logo img {
    height: 48px;
    width: auto;
    display: block;
}

/* New logo layout: icon + text */
.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
}
.logo-icon {
    height: 44px;
    width: 44px;
    display: block;
}
.logo-icon { margin: 0; }
.logo-text {
    font-weight: 700;
    color: #fff;
    font-size: 1.25rem; /* increased to better match icon height */
    line-height: 1;
}

/* badge (icon) links to external official site */
.logo-badge {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

@media (max-width: 600px) {
    .logo-text {
        font-size: 1.05rem; /* slightly smaller on small screens */
    }
}

/* Navigation menu */
nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 1.4rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #cce7ff;
}

/* Hamburger menu for mobile */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

.nav-toggle .hamburger {
    display: inline-block;
    width: 26px;
    height: 18px;
    position: relative;
}

.nav-toggle .hamburger span {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle .hamburger span:nth-child(1) { top: 0; }
.nav-toggle .hamburger span:nth-child(2) { top: 7.5px; }
.nav-toggle .hamburger span:nth-child(3) { bottom: 0; }

/* Hamburger animation when menu is open */
nav.open .nav-toggle .hamburger span:nth-child(1) { 
    transform: translateY(7.5px) rotate(45deg); 
}

nav.open .nav-toggle .hamburger span:nth-child(2) { 
    opacity: 0; 
}

nav.open .nav-toggle .hamburger span:nth-child(3) { 
    transform: translateY(-7.5px) rotate(-45deg); 
}

/* Mobile navigation */
@media (max-width: 1024px) {
    .nav-toggle {
        display: inline-flex;
    }
    
    nav ul#primary-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 64, 128, 0.98);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    nav.open ul#primary-navigation {
        display: flex !important;
    }
    
    nav ul li {
        margin-left: 0;
    }
    
    .logo img {
        height: 44px;
    }
}

/* Submenu styles */
.has-sub {
    position: relative;
}

.header-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 64, 128, 0.95);
    min-width: 180px;
    padding: 0.5rem 0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.has-sub:hover .header-submenu {
    display: block;
}

.header-submenu li {
    margin: 0;
}

.header-submenu li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.header-submenu li a:hover {
    background: rgba(255,255,255,0.1);
}

/* Topbar (site-wide small tagline) */
.topbar {
    background: #f1f6ff;
    border-bottom: 1px solid #e6eef9;
}

.topbar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding-x);
    padding-right: var(--container-padding-x);
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.topbar-inner p {
    margin: 0;
    font-size: 0.95rem;
    color: #00345a;
    font-weight: 600;
}

@media (max-width: 768px) {
    .topbar-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .topbar-inner p {
        font-size: 0.9rem;
    }
}

/* Partner link next to logo (separator and partner name) */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.logo-sep {
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
    line-height: 1;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.logo-partner {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0.95;
}

.logo-partner:hover {
    color: #e8f6ff;
}

@media (max-width: 600px) {
    .logo-sep { font-size: 0.95rem; }
    .logo-partner { font-size: 0.9rem; }
}
