/* PageSpeed: Preserve aspect ratio for images with explicit dimensions (CLS) */
img[width][height] {
    max-width: 100%;
    height: auto;
}

/* Skip Link - WCAG 2.4.1 Bypass Blocks */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: 10000;
    background: #1A4B52;
    color: #FFFFFF;
    padding: 12px 24px;
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0 0 4px 0;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #00D084;
    outline-offset: 2px;
}

/* Announcement Bar Styles - Default dark teal */
.announcement-bar {
    width: 100%;
    background: #1D6F6A;
    color: #FFFFFF;
    text-align: center;
    padding: 10px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    min-height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
}

.announcement-bar.dismissed {
    display: none;
}

.announcement-bar-close {
    position: absolute;
    right: 15px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.announcement-bar-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.announcement-bar-close:focus {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.announcement-bar-close:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

/* Navigation Menu Styles */
.site-header-nav {
    width: 100%;
    background: #FFFFFF;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--bloom-side-padding, clamp(16px, 5vw, 60px));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1.2;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.logo-main {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Logo bloom - light teal/turquoise matching demo */
.logo-bloom {
    color: #4ECDC4;
}

.logo-infinity {
    color: #4ECDC4;
    font-size: 1.3rem;
    font-weight: 300;
    margin: 0 -2px;
}

.logo-lab {
    color: #9CA3AF;
    font-weight: 600;
    font-size: 0.85em;
    vertical-align: super;
    margin-left: 2px;
}

/* Japanese subtitle - positioned above lab */
.logo-subtitle {
    font-size: 0.7rem;
    color: #9CA3AF;
    font-weight: 400;
    margin-bottom: 2px;
    margin-left: 2px;
}

.site-logo:hover .logo-bloom,
.site-logo:hover .logo-infinity {
    color: #3AB5AD;
}

.nav-menu {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    margin: 0;
}

    /* Navigation links - dark teal matching site */
    .nav-menu a {
        color: #1A4B52;
        text-decoration: none;
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-weight: 400;
        font-size: 0.85rem;
        padding: 8px 0;
        position: relative;
        transition: color 0.3s ease;
    }

.nav-menu a:hover {
    color: #00D084;
}

/* Focus styles for keyboard navigation - WCAG 2.4.7/2.4.13 */
.nav-menu a:focus-visible {
    outline: 2px solid #00D084;
    outline-offset: 4px;
    border-radius: 2px;
}

.site-logo:focus-visible {
    outline: 2px solid #00D084;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Active link styling - green matching hover */
.nav-menu a.active,
.nav-menu a.current {
    color: #00D084;
    border-bottom: 2px solid #00D084;
    padding-bottom: 6px;
}

/* Hamburger Menu Button - WCAG 2.5.8 Target Size (44x44px minimum) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    z-index: 1002;
    position: relative;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(26, 75, 82, 0.05);
}

.mobile-menu-toggle:focus {
    outline: 2px solid #00D084;
    outline-offset: 2px;
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid #00D084;
    outline-offset: 2px;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #1A4B52;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .announcement-bar {
        font-size: 0.8rem;
        padding: 8px 15px;
        min-height: 36px;
    }
    
    .nav-container {
        padding: 15px var(--bloom-side-padding, 16px);
        position: relative;
        justify-content: space-between;
    }
    
    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
        order: 2;
    }
    
    .site-logo {
        order: 1;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        width: 100%;
        margin-top: 0;
    }
    
    .nav-menu.active {
        max-height: 600px;
        padding: 20px 0;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #F0F0F0;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        display: block;
        padding: 15px 20px;
        font-size: 0.9rem;
        font-weight: 500;
        width: 100%;
        border-bottom: none;
    }
    
    .nav-menu a.active,
    .nav-menu a.current {
        background-color: #F2FAF7;
        color: #00D084;
        border-bottom: none;
        padding-bottom: 15px;
    }
    
    .nav-menu a:hover {
        background-color: #F2FAF7;
    }
    
    .logo-main {
        font-size: 1.3rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
}
