/* ham.css - script.js競合回避版（確実表示） */

/* ベース変数 */
:root {
    --main-color: #C5E1F0;
    --accent-color: #00677E;
    --sub-color: #E8D6C0;
    --text-color: #333333;
    --light-text: #666666;
    --white: #FFFFFF;
    --black: #000000;
    --heading-jp: 'Noto Serif JP', serif;
    --heading-en: 'Cormorant Garamond', serif;
    --body-jp: 'Noto Sans JP', sans-serif;
    --body-en: 'Lato', sans-serif;
}

/* ヘッダー */
header#header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999 !important;
    transition: background-color 0.3s ease;
    padding: 15px 0 !important;
    background: transparent;
    display: block !important;
    visibility: visible !important;
}

header#header.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 20px !important;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    visibility: visible !important;
}

/* ロゴ */
.logo {
    display: flex !important;
    align-items: center;
    z-index: 10001 !important;
    visibility: visible !important;
}

.logo a {
    display: block;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
    display: block !important;
}

/* PCナビゲーション */
.nav-pc {
    display: flex !important;
    align-items: center;
    z-index: 10000 !important;
    visibility: visible !important;
}

.nav-pc ul {
    display: flex !important;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-pc li {
    margin: 0 15px;
    display: block !important;
}

.nav-pc a {
    color: var(--white) !important;
    font-family: var(--body-jp);
    font-size: 15px;
    font-weight: 400;
    position: relative;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block !important;
    padding: 5px 0;
    white-space: nowrap;
    visibility: visible !important;
}

header.scrolled .nav-pc a {
    color: var(--text-color) !important;
}

.nav-pc a:hover {
    transform: translateY(-1px);
    color: var(--main-color) !important;
}

.nav-pc a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--main-color));
    transition: width 0.3s ease;
}

.nav-pc a:hover::after,
.nav-pc a:focus::after {
    width: 100%;
}

/* ヘッダー右側 */
.header-right {
    display: flex !important;
    align-items: center;
    gap: 15px;
    z-index: 10001 !important;
    visibility: visible !important;
}

/* 予約ボタン */
.reservation-btn {
    background-color: var(--white);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 1px;
    font-family: var(--body-jp);
    font-size: 11px;
    font-weight: 400;
    transition: all 0.3s ease;
    border: 1px solid #999;
    text-decoration: none;
    white-space: nowrap;
    z-index: 10001 !important;
    display: inline-block !important;
    visibility: visible !important;
}

.reservation-btn:hover {
    background-color: var(--main-color);
    color: var(--white);
    border-color: var(--main-color);
}

header.scrolled .reservation-btn {
    background-color: var(--white);
    color: var(--text-color);
    border-color: #999;
}

header.scrolled .reservation-btn:hover {
    background-color: var(--main-color);
    color: var(--white);
    border-color: var(--main-color);
}

/* ハンバーガーメニューボタン - 通常状態 */
.hamburger {
    display: none !important; /* PC版では非表示 */
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 10001 !important;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger span {
    display: block;
    position: absolute;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header.scrolled .hamburger span {
    background: var(--text-color);
}

.hamburger span:nth-child(1) {
    top: 0;
}

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

.hamburger span:nth-child(3) {
    bottom: 0;
}

/* 🔥 超重要！script.js競合を完全に回避する閉じるボタン！ */
.hamburger.active,
#hamburger.active,
.hamburger[class*="active"],
.hamburger.active:not(.disabled),
.hamburger.active:focus,
.hamburger.active:hover,
.hamburger.active:active {
    /* 最前面に配置（どんな競合にも負けない） */
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 999999 !important; /* 超超高いz-index */

    /* 超目立つスタイル（script.jsの影響を受けない） */
    width: 80px !important;
    height: 80px !important;
    background: #FF0000 !important; /* 赤い背景で超目立つ */
    border: 6px solid #FFFFFF !important; /* 白い太い枠線 */
    border-radius: 50% !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6) !important;

    /* 強制スタイルを確実に適用 */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: scale(1) !important;

    /* アニメーション */
    animation: superPulse 1.5s infinite !important;
}

/* 超目立つ点滅アニメーション */
@keyframes superPulse {
    0% {
        transform: scale(1) !important;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6) !important;
    }
    50% {
        transform: scale(1.2) !important;
        box-shadow: 0 12px 60px rgba(255, 0, 0, 0.8) !important;
    }
    100% {
        transform: scale(1) !important;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6) !important;
    }
}

/* script.jsの影響を受けない×マーク */
.hamburger.active span,
#hamburger.active span,
.hamburger[class*="active"] span {
    background: #FFFFFF !important; /* 白い×マーク */
    height: 6px !important;
    width: 40px !important;
    left: 50% !important;
    transform-origin: center !important;
    border-radius: 3px !important;
    box-shadow: none !important;
}

.hamburger.active span:nth-child(1),
#hamburger.active span:nth-child(1) {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.hamburger.active span:nth-child(2),
#hamburger.active span:nth-child(2) {
    opacity: 0 !important;
    transform: translateX(-50px) !important;
}

.hamburger.active span:nth-child(3),
#hamburger.active span:nth-child(3) {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}

/* 超目立つ閉じるテキスト（script.jsの影響を受けない） */
.hamburger.active::before,
#hamburger.active::before {
    content: "✕" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    color: #FFFFFF !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.hamburger.active::after,
#hamburger.active::after {
    content: "タップして閉じる" !important;
    position: absolute !important;
    top: -60px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #FF0000 !important;
    color: #FFFFFF !important;
    padding: 10px 15px !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    font-family: var(--body-jp) !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    border: 3px solid #FFFFFF !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    animation: textBlink 2s infinite !important;
}

/* テキストの点滅アニメーション */
@keyframes textBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

/* スマホナビゲーション */
.nav-sp {
    display: none !important;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 350px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98) !important;
    padding: 100px 30px 30px;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10003 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25) !important;
    overflow-y: auto;
    border-left: 2px solid var(--accent-color);
}

.nav-sp.active {
    right: 0;
}

.nav-sp ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-sp li {
    margin: 0 0 8px 0;
    text-align: left;
}

.nav-sp a {
    color: var(--text-color);
    font-family: var(--body-jp);
    font-size: 16px;
    font-weight: 400;
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    border-bottom: 1px solid #eee;
}

.nav-sp a:hover,
.nav-sp a:focus {
    color: var(--accent-color);
    background-color: #f9f9f9;
    transform: translateX(5px);
}

/* スマホメニュー予約ボタン */
.nav-sp-reserve {
    display: inline-block !important;
    margin-top: 20px !important;
    padding: 12px 25px !important;
    background: var(--accent-color) !important;
    color: var(--white) !important;
    border-radius: 25px !important;
    text-align: center !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 103, 126, 0.3) !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.nav-sp-reserve:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 103, 126, 0.4) !important;
    color: var(--white) !important;
}

/* アクセス情報 */
.access-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(245, 245, 245, 0.5);
    border-radius: 10px;
}

.access-info h3 {
    color: var(--accent-color);
    font-family: var(--heading-jp);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
    text-align: center;
}

.access-info p {
    color: var(--text-color);
    margin-bottom: 8px;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
}

.access-method {
    margin-bottom: 8px;
    text-align: center;
}

.access-method h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 500;
}

.access-method h4 a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.access-method h4 a:hover {
    color: var(--main-color);
    text-decoration: underline;
}

.access-method i {
    color: var(--accent-color);
    font-size: 14px;
}

/* オーバーレイ */
.nav-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6) !important;
    z-index: 10002 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* レスポンシブ対応 */

/* デスクトップ（769px以上） */
@media (min-width: 769px) {
    .nav-pc {
        display: flex !important;
        visibility: visible !important;
    }

    .hamburger {
        display: none !important;
    }

    .nav-sp {
        display: none !important;
    }

    .nav-overlay {
        display: none !important;
    }
}

/* タブレット・スマホ（768px以下） */
@media (max-width: 768px) {
    .nav-pc {
        display: none !important;
    }

    .hamburger {
        display: block !important;
    }

    .nav-sp {
        display: block !important;
    }

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

    .reservation-btn {
        font-size: 10px;
        padding: 6px 12px;
    }

    .logo img {
        height: 35px;
    }

    /* モバイル版でハンバーガーボタンの視認性を向上 */
    .hamburger span {
        background: var(--white) !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) !important;
    }

    header.scrolled .hamburger span {
        background: var(--text-color) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }
}

@media (max-width: 480px) {
    .nav-sp {
        width: 90%;
        max-width: 300px;
        padding: 90px 20px 20px;
    }

    .access-info {
        padding: 15px;
        margin-top: 20px;
    }

    .nav-sp a {
        font-size: 15px;
        padding: 8px 15px;
    }

    /* 小さいスマホでも確実に見える */
    .hamburger.active,
    #hamburger.active {
        top: 15px !important;
        right: 15px !important;
        width: 70px !important;
        height: 70px !important;
    }

    .hamburger.active::after,
    #hamburger.active::after {
        top: -55px !important;
        font-size: 14px !important;
        padding: 8px 12px !important;
    }
}

/* アニメーション改善 */
@media (prefers-reduced-motion: reduce) {
    .hamburger span,
    .nav-sp,
    .nav-sp li,
    .nav-sp a,
    .reservation-btn {
        transition: none;
    }

    .hamburger.active,
    #hamburger.active {
        animation: none !important;
    }

    .hamburger.active::after,
    #hamburger.active::after {
        animation: none !important;
    }
}

/* 欠けていたスタイルを追加 */
.nav-sp.active {
    right: 0 !important;
}

.nav-overlay.active {
    display: block !important;
    opacity: 1 !important;
}
