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

.premium-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-header.scrolled {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.header-wrapper {
    padding: 0.5rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
}

/* Logo */
.header-logo {
    flex-shrink: 0;
    margin-left: -10px !important;
}

.header-logo-img {
    height: 85px !important;
    width: auto;
    transition: transform 0.3s ease;
}

/* PC版でのロゴサイズ（タブレット以上） */
@media (min-width: 1025px) {
    .header-logo {
        margin-left: -15px !important;
    }

    .header-logo-img {
        height: 90px !important;
    }
}

.header-logo a:hover .header-logo-img {
    transform: scale(1.05);
}

/* Navigation */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

/* モバイルメニュークローズボタン - シンプルなデザイン */
.mobile-menu-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: opacity 0.15s ease;
}

.mobile-menu-close:active {
    opacity: 0.5;
}

.mobile-menu-close .close-x {
    display: none !important;
}

.nav-menu {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--color-black);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.02em;
}

/* PC版の英語・日本語テキスト */
.nav-link .nav-en {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: inherit;
}

.nav-link .nav-ja {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.7;
    letter-spacing: 0.3px;
    line-height: 1.2;
    margin-top: 2px;
    color: inherit;
}

.nav-link:hover {
    color: var(--color-primary-dark);
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 2rem);
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0.5rem;
    margin-top: 0.5rem;
    list-style: none;
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 8px;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: var(--color-gray-lighter);
    color: var(--color-black);
    padding-left: 1.25rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Social Links */
.header-social {
    display: flex;
    gap: 0.5rem;
}

.header-social .social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-gray-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--color-gray-dark);
}

.header-social .social-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.header-social .social-link svg {
    width: 16px;
    height: 16px;
}

/* CTA Button */
.header-cta-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(212, 196, 176, 0.3);
}

.header-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 196, 176, 0.4);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    text-decoration: none;
    color: white;
}

/* Mobile Menu Toggle - エレガントなデザイン */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 48px;
    height: 48px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover {
    transform: rotate(90deg);
}

.mobile-menu-toggle:hover .hamburger-line {
    background: #D4A574;
}

.mobile-menu-toggle:active {
    transform: rotate(90deg) scale(0.9);
}

.hamburger-line {
    position: absolute;
    display: block;
    width: 28px;
    height: 2px;
    background: #333;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.hamburger-line:nth-child(1) {
    top: 14px;
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
}

.hamburger-line:nth-child(3) {
    bottom: 14px;
}

.mobile-menu-toggle:hover .hamburger-line:nth-child(1) {
    top: 12px;
    width: 24px;
}

.mobile-menu-toggle:hover .hamburger-line:nth-child(3) {
    bottom: 12px;
    width: 24px;
}

/* Active state - エレガントな×デザイン */
.mobile-menu-toggle.active {
    transform: none;
}

.mobile-menu-toggle.active .hamburger-line {
    background: #D4A574;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    bottom: 50%;
    transform: translateX(-50%) translateY(50%) rotate(-45deg);
}


/* モバイルメニューフッターはデフォルトで非表示 */
.mobile-menu-footer {
    display: none;
}

/* タブレット・モバイル対応 */
@media (max-width: 768px) {
    .premium-header .header-inner {
        gap: 1rem;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 !important;
        height: auto !important;
    }

    .premium-header .header-logo {
        order: 1;
        flex-grow: 0;
        width: auto !important;
        margin: 0 !important;
        display: block !important;
        justify-content: flex-start !important;
    }

    .premium-header .header-actions {
        order: 2;
        display: flex !important;
        align-items: center;
        gap: 1rem;
    }

    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #ffffff;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9998;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .header-nav.active {
        transform: translateY(0);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .mobile-menu-close {
        display: block !important;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .nav-menu {
        display: block !important;
        flex-direction: column !important;
        padding: 0 0 100px 0 !important;
        margin: 0 !important;
        list-style: none !important;
        gap: 0 !important;
        align-items: stretch !important;
    }

    .nav-item {
        width: 100% !important;
        border-bottom: 1px solid #e5e7eb !important;
        position: relative !important;
    }

    .nav-link {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1rem 1.5rem !important;
        color: #111827 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        transition: background 0.2s ease !important;
        position: relative !important;
    }

    .nav-link::before {
        display: none !important;
    }

    .nav-item:not(.has-dropdown) .nav-link::after {
        content: none !important;
        display: none !important;
    }

    .nav-link:hover {
        background: transparent !important;
    }

    .nav-item:not(.has-dropdown) .nav-link:hover::after {
        display: none !important;
    }

    .nav-link:active {
        background: #f9fafb !important;
    }

    .nav-link .nav-text {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        align-items: flex-start !important;
    }

    .nav-link .nav-en {
        font-size: 1rem !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        color: #111827 !important;
        letter-spacing: 0 !important;
    }

    .nav-link .nav-ja {
        font-size: 0.8rem !important;
        opacity: 0.5 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        color: #6b7280 !important;
        font-weight: 400 !important;
        letter-spacing: 0 !important;
    }

    .nav-item.has-dropdown .nav-link::after {
        display: none !important;
    }

    .dropdown-menu {
        display: none !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        background: #f9fafb !important;
        position: static !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .nav-item.has-dropdown.open .dropdown-menu {
        display: block !important;
    }

    .nav-item.has-dropdown.open .nav-link::after {
        content: '−' !important;
    }

    .dropdown-menu a {
        display: block !important;
        padding: 0.9rem 1.5rem 0.9rem 2.5rem !important;
        font-size: 0.95rem !important;
        color: #374151 !important;
        text-decoration: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        transition: background 0.2s ease !important;
        font-weight: 400 !important;
    }

    .dropdown-menu a:active {
        background: #f3f4f6 !important;
    }

    .dropdown-menu li:last-child a {
        border-bottom: none !important;
    }

    .mobile-menu-footer {
        display: block !important;
        padding: 2rem 1.5rem !important;
        border-top: 1px solid #e5e7eb !important;
        background: #ffffff !important;
    }

    .mobile-menu-cta {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-menu-cta .header-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        font-weight: 500;
        text-align: center;
        border-radius: 4px;
        transition: opacity 0.15s ease;
        text-decoration: none;
    }

    .mobile-menu-cta .btn-reserve {
        background: #D4A574;
        color: #fff;
        border: none;
    }

    .mobile-menu-cta .btn-reserve:active {
        opacity: 0.8;
    }

    .mobile-menu-cta .btn-contact {
        background: #f5f5f5;
        color: #333;
        border: none;
    }

    .mobile-menu-cta .btn-contact:active {
        opacity: 0.8;
    }

    .mobile-menu-social {
        display: none;
    }

    .header-social {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* モバイル時の×印アニメーション再定義 */
    #mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        top: 50% !important;
        bottom: auto !important;
        transform: translateX(-50%) translateY(-50%) rotate(45deg) !important;
    }
    
    #mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0 !important;
    }
    
    #mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        top: auto !important;
        bottom: 50% !important;
        transform: translateX(-50%) translateY(50%) rotate(-45deg) !important;
    }
    
    /* CTAボタンの調整 */
    .header-cta-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* スマートフォン対応 */
@media (max-width: 768px) {
    .premium-header .container {
        padding: 0 15px !important;
    }

    .header-wrapper {
        padding: 0 !important;
    }

    .premium-header .header-inner {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem;
        padding: 5px 0 !important;
    }

    .premium-header .header-logo {
        flex: 0 0 auto;
        width: auto !important;
        margin: 0 !important;
        order: 1 !important;
    }

    .header-logo-img {
        height: 55px !important;
    }
    
    .premium-header .header-actions {
        flex: 0 0 auto;
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
        order: 2 !important;
        margin-left: auto;
    }

    .header-cta {
        display: none !important;
    }

    .mobile-menu-toggle {
        flex-shrink: 0;
    }
    
    .header-nav {
        width: 90%;
    }
    
    .nav-menu::before {
        padding: 1.5rem 1rem;
        font-size: 1.1rem;
    }
    
    .nav-link {
        padding: 1rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .dropdown-menu a {
        padding: 0.7rem 0.8rem 0.7rem 2rem;
        font-size: 0.85rem;
    }
}

/* 小型スマートフォン対応 */
@media (max-width: 480px) {
    .premium-header {
        padding: 0 !important;
    }

    .premium-header .container {
        padding: 0 10px !important;
    }

    .header-wrapper {
        padding: 0 !important;
    }

    .premium-header .header-inner {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.3rem;
        padding: 3px 0 !important;
    }
    
    .premium-header .header-logo {
        flex: 0 0 auto;
        width: auto !important;
        margin: 0 !important;
        order: 1 !important;
    }

    .header-logo-img {
        height: 50px !important;
    }
    
    .premium-header .header-actions {
        flex: 0 0 auto;
        display: flex !important;
        align-items: center;
        gap: 0.4rem;
        order: 2 !important;
        margin-left: auto;
    }

    .header-cta {
        display: none !important;
    }

    .mobile-menu-toggle {
        flex-shrink: 0;
    }

    .header-nav {
        width: 100%;
        max-width: none;
    }
    
    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
    }
    
    .hamburger-line {
        width: 20px;
    }
    
    .hamburger-line:nth-child(1) {
        top: 10px;
    }
    
    .hamburger-line:nth-child(3) {
        bottom: 10px;
    }
}

/* 横向き表示対応 */
@media (max-width: 768px) and (orientation: landscape) {
    .header-nav {
        padding-top: 60px;
    }
    
    .nav-menu {
        overflow-y: auto;
        max-height: calc(100vh - 60px);
    }
}

/* Overlay for mobile menu */
.mobile-menu-overlay {
    display: none;
}

.mobile-menu-overlay.active {
    display: none;
}

/* Scroll Effects */
@media (prefers-reduced-motion: no-preference) {
    .premium-header {
        animation: slideDown 0.5s ease-out;
    }

    @keyframes slideDown {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* Accessibility */
.nav-link:focus,
.header-cta-btn:focus,
.social-link:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .premium-header {
        position: relative;
        box-shadow: none;
    }

    .mobile-menu-toggle,
    .header-social,
    .header-cta-btn {
        display: none;
    }
}