/* ========================================
   Header Styles
   ======================================== */

:root {
    --header-height: 80px;
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --nav-link-color: #333333;
    --nav-link-hover: #096fc8;
    --mobile-breakpoint: 1024px;
}

/* Header Container */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--header-shadow);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* スクロール時のヘッダー */
.site-header.scrolled {
    height: 70px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.header-logo {
    flex-shrink: 0;
}

.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.header-logo a:hover {
    opacity: 0.8;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: #096fc8;
    letter-spacing: -0.02em;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

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

@media (max-width: 1024px) {
    .nav-list {
        display: none;
    }
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-block;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--nav-link-color);
    text-decoration: none;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--nav-link-hover);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--nav-link-hover);
}

.nav-link:hover::after {
    width: 100%;
}

/* CTA Button */
.nav-link-cta {
    background: #096fc8;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: #065299;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 111, 200, 0.3);
}

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

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

.menu-bar {
    width: 100%;
    height: 3px;
    background: #096fc8;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Mobile Menu Toggle Active State */
.mobile-menu-toggle.is-active .menu-bar:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-toggle.is-active .menu-bar:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 999;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-link {
    display: block;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--nav-link-color);
    text-decoration: none;
    padding: 16px 0;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--nav-link-hover);
    padding-left: 8px;
}

.mobile-nav-link-cta {
    background: #096fc8;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
    margin-top: 16px;
}

.mobile-nav-link-cta:hover {
    background: #065299;
    color: #ffffff;
    padding-left: 24px;
}

/* Body Lock when Menu Open */
body.menu-open {
    overflow: hidden;
}

/* Header Animation on Scroll */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.site-header {
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibility */
.mobile-menu-toggle:focus-visible {
    outline: 2px solid #096fc8;
    outline-offset: 4px;
}

.nav-link:focus-visible,
.mobile-nav-link:focus-visible {
    outline: 2px solid #096fc8;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .site-header {
        background: #ffffff;
        border-bottom: 2px solid #000000;
    }
    
    .nav-link {
        font-weight: 700;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .site-header,
    .nav-link::after,
    .mobile-menu,
    .menu-bar,
    .mobile-menu-toggle {
        transition: none;
        animation: none;
    }
}

/* Desktop Large Screens */
@media (min-width: 1440px) {
    .header-container {
        padding: 0 48px;
    }
    
    .nav-list {
        gap: 40px;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 768px) {
    .logo-text {
        font-size: 22px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    :root {
        --header-height: 70px;
    }
    
    .site-header.scrolled {
        height: 60px;
    }
    
    .header-container {
        padding: 0 16px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .mobile-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .site-header.scrolled + .mobile-menu {
        top: 60px;
        height: calc(100vh - 60px);
    }
}

/* Print Styles */
@media print {
    .site-header {
        position: relative;
        box-shadow: none;
    }
    
    .mobile-menu-toggle,
    .mobile-menu {
        display: none;
    }
}

