/* Header */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 1rem 0;
    position: relative;
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Logo */
.logo-container .logo {
    height: 50px;
    transition: transform 0.3s ease;
}

.logo-container .logo:hover {
    transform: scale(1.05);
}

/* Navigation */
.main-nav {
    flex: 1;
    margin: 0 20px;
}

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

.nav-item {
    margin-left: 1.5rem;
    position: relative;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link:focus {
    color: #00aaff;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: #00aaff;
    transition: width 0.3s ease;
}

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

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    position: relative;
    /* 矢印分の余白を削除 */
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a2e;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 200px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-link {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

.dropdown-link:hover {
    background: #00aaff;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle-icon {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    position: relative;
    transition: all 0.3s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 3px;
    background: #fff;
    left: 0;
    transition: all 0.3s ease;
}

.nav-toggle-icon::before {
    top: -8px;
}

.nav-toggle-icon::after {
    bottom: -8px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Utility Navigation */
.header-utils {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.icon {
    width: 24px;
    height: 24px;
    fill: #fff;
    transition: fill 0.3s ease;
}

.search-toggle:hover .icon {
    fill: #00aaff;
}

.language-switcher select {
    background: #fff;
    border: none;
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Noto Sans JP', sans-serif;
}

.cta-button {
    background: #00aaff;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
    font-family: 'Noto Sans JP', sans-serif;
}

.cta-button:hover {
    background: #0088cc;
}

/* Search Overlay */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.search-overlay.active {
    display: flex;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    font-family: 'Noto Sans JP', sans-serif;
}

.search-form button {
    background: #00aaff;
    border: none;
    padding: 10px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a1a2e;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .dropdown-menu {
        display: none;
        position: static;
        background: #2a2a3e;
        padding: 0.5rem 1rem;
        box-shadow: none;
    }

    .dropdown-menu.active {
        display: block;
    }

    .dropdown-link {
        padding: 0.5rem 1rem;
    }

    .nav-toggle {
        display: block;
    }
}

@media (max-width: 576px) {
    .header-utils {
        gap: 0.5rem;
    }

    .cta-button {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .logo-container .logo {
        height: 40px;
    }
}