@charset "UTF-8";

/* =================================================================
   Navigation Styles (nav.css)
   ナビゲーションバー、ヘッダー、SPメニューのスタイルを一元管理
================================================================= */

:root {
    --nav-font-scale: clamp(1.388rem, 1.515vw, 1.641rem);
    --nav-dark-grey-1: #1F2124;
    --nav-dark-grey-2: #1F2124;
    --nav-dark-grey-glass: rgba(31, 33, 36, 0.9);
}

/* -----------------------------------------------------------------
   Header Container
----------------------------------------------------------------- */
.h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding: 0 30px;
    height: var(--header-height);
    position: fixed; top: 0; left: 0; width: 100%;
    background: #1F2124;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 1000;
    transition: box-shadow 0.3s ease, height 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.h.is-scrolled {
    background: rgba(31, 33, 36, 0.95);
    box-shadow: var(--shadow-md);
    height: calc(var(--header-height) - 10px);
    border-bottom: 1px solid rgba(244, 247, 249, 0.2);
}

.h-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 135px;
}
.h-logo img {
    height: 29px;
    width: auto;
    transition: height 0.3s ease;
    filter: none;
}
.h.is-scrolled .h-logo img { height: 24px; }

/* -----------------------------------------------------------------
   PC Navigation (Desktop)
----------------------------------------------------------------- */
.h-nav.only-pc { display: flex; gap: 30px; align-items: center; }

.h-nav.only-pc .h-nav_item {
    color: #fff;
    font-family: var(--heading-font);
    font-weight: 700;
    position: relative;
    display: inline-flex;
    align-items: center;
    
    /* ★要件対応: ここを変数で制御 */
    font-size: var(--nav-font-scale);
    
    padding: 8px 14px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    cursor: pointer;
    white-space: nowrap;
}

.h-nav.only-pc .h-nav_item::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 8px;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}
.h-nav.only-pc .h-nav_item:hover::after,
.h-nav_dropdown-wrapper:hover > .h-nav_item::after {
    transform: scaleX(1);
}

/* PC Button Style override within Nav */
.h-nav .h-nav_button {
    padding: 8px 22px;
    font-size: 1.15rem; /* ← 少し強調。必要なら 1.2rem */
    margin-left: 15px;
    background-color: var(--contact-button-color);
    color: var(--text-color);
    border: 2px solid var(--contact-button-color);
}
.h-nav .h-nav_button:hover {
    background-color: var(--primary-darker);
    border-color: var(--primary-darker);
    color: var(--text-color);
}

/* -----------------------------------------------------------------
   PC Dropdown Menu
----------------------------------------------------------------- */
.h-nav_dropdown-wrapper { position: relative; display: inline-block; }

.h-nav_dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(31, 33, 36, 0.96);
    min-width: 180px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: var(--border-radius-md);
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-top: 10px;
}
.h-nav_dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent rgba(31, 33, 36, 0.96) transparent;
}
.h-nav_dropdown-wrapper:hover .h-nav_dropdown-menu {
    visibility: visible;
    opacity: 1;
    margin-top: 0;
}
.h-nav_dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}
.h-nav_dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}
.h-nav_dropdown-sub-menu {
    position: absolute;
    top: 0;
    left: 100%;
    background: rgba(31, 33, 36, 0.96);
    min-width: 220px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: var(--border-radius-md);
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.h-nav_dropdown-menu-item:hover .h-nav_dropdown-sub-menu {
    visibility: visible;
    opacity: 1;
}


/* -----------------------------------------------------------------
   SP Navigation UI (Hamburger & Mobile Menu)
   ★要件: 変更なし
----------------------------------------------------------------- */
.h-sp-icons { display: flex; align-items: center; }

/* Remove mobile tap flash across header/menu controls */
.h, .h *, .h-wrapsp, .h-wrapsp * {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    tap-highlight-color: transparent;
}

.h-spnav, .h-search-icon { 
    display: none; 
    background: none; 
    border: none; 
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer; 
    padding: 10px; 
    z-index: 1001; 
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}
.h-search-icon { font-size: 1.2rem; }
.h-spnav:active { background: transparent; }
.h-spnav,
.h-spnav *,
.h-spnav.is-open,
.h-spnav.is-open *,
.h-search-icon {
    -webkit-tap-highlight-color: transparent !important;
    tap-highlight-color: transparent !important;
}
.h-spnav,
.h-spnav:hover,
.h-spnav:active,
.h-spnav:focus,
.h-spnav:focus-visible,
.h-spnav.is-open,
.h-spnav.is-open:hover,
.h-spnav.is-open:active,
.h-spnav.is-open:focus,
.h-spnav.is-open:focus-visible {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}
.h-spnav:focus,
.h-spnav:focus-visible,
.h-search-icon:focus,
.h-search-icon:focus-visible {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.h-spnav span {
    display: block; width: 28px; height: 3px; background-color: #fff;
    margin: 6px 0; border-radius: 3px;
    transition: all 0.3s ease-in-out; transform-origin: center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.h-spnav.is-open span { background-color: #fff; filter: none; }
.h-spnav.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.h-spnav.is-open span:nth-child(2) { opacity: 0; transform: translateX(-10px);}
.h-spnav.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* SP Slide Menu Container */
.h-wrapsp {
    display: block; position: fixed; top: calc(var(--header-height) + 8px); right: 10px;
    width: min(460px, 92vw); height: auto; max-height: calc(100vh - var(--header-height) - 16px);
    background: #1F2124;
    padding: 16px 18px 18px;
    box-sizing: border-box;
    overflow-y: auto;
    transform: translateX(18px);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.22s ease;
    z-index: 1002;
    visibility: hidden;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}
.h-wrapsp.is-open { transform: translateX(0); opacity: 1; visibility: visible; pointer-events: auto; }

/* Hover bridge so pointer movement from button to panel won't close menu */
.h-wrapsp::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
    background: transparent;
}
.h-navcontents { display: flex; flex-direction: column; height: 100%; }

.h-wrapsp .h-nav { 
    flex-direction: column; 
    align-items: flex-start; 
    width: 100%;
    margin-bottom: auto;
}
.h-wrapsp .h-nav_item { 
    display: block;
    width: 100%;
    font-size: 1.2rem; /* ★SPは固定値を維持 */
    font-weight: 700; 
    color: #fff; 
    text-shadow: none;
    padding: 18px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}
.h-wrapsp .h-nav_item:hover { background-color: rgba(255, 255, 255, 0.08); }
.h-wrapsp .h-nav_item:active { background-color: rgba(255, 255, 255, 0.08); }
.h-wrapsp .h-nav_item:focus,
.h-wrapsp .h-nav_item:focus-visible,
.h-wrapsp .h-nav_subitem:focus,
.h-wrapsp .h-nav_subitem:focus-visible {
    outline: none;
    box-shadow: none;
}
.h-wrapsp .h-nav_item:first-child { border-top: 1px solid rgba(255, 255, 255, 0.14); }

/* Product submenu inside SP menu */
.h-wrapsp .h-nav_group {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.h-wrapsp .h-nav_group .h-nav_item {
    border-bottom: none;
    margin-bottom: 0;
}
.h-wrapsp .h-nav_group-subitems {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 0 14px 18px;
}
.h-wrapsp .h-nav_subitem {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.96rem;
    font-weight: 500;
    padding: 8px 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.25);
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}
.h-wrapsp .h-nav_subitem:hover {
    color: #fff;
    border-left-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}
.h-wrapsp .h-nav_subitem:active {
    color: #fff;
    border-left-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

/* SP Sublinks */
.h-navcontents .h-sublinks {
    display: flex; flex-direction: column; gap: 12px;
    margin-top: 30px; padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.h-navcontents .h-sublinks a { color: rgba(255, 255, 255, 0.78); font-size: 0.95em; }

/* -----------------------------------------------------------------
   Search Overlay
----------------------------------------------------------------- */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-overlay.is-active { opacity: 1; visibility: visible; }

.close-search-btn {
    position: absolute; top: 20px; right: 25px;
    background: none; border: none; color: white;
    font-size: 3rem; cursor: pointer; line-height: 1;
    padding: 10px;
    transition: transform 0.2s ease;
}
.close-search-btn:hover { transform: rotate(90deg); }

.search-overlay-content { width: 90%; max-width: 700px; }
.search-form { position: relative; }
.search-field {
    width: 100%;
    padding: 15px 60px 15px 25px;
    font-size: clamp(1rem, 4vw, 1.5rem);
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 50px;
    -webkit-appearance: none;
}
.search-field::placeholder { color: rgba(255, 255, 255, 0.7); }
.search-field:focus { outline: none; border-color: var(--primary-color); }

.search-submit {
    position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; color: white;
    font-size: 1.5rem; cursor: pointer; padding: 10px;
}

/* -----------------------------------------------------------------
   Media Queries for Header
----------------------------------------------------------------- */
@media (max-width: 1300px) {
    .h-nav.only-pc {
        gap: 15px;
    }
}
@media (max-width: 1200px) {
    .h-nav.only-pc { display: none; }
    .only-sp { display: flex !important; }
    .h-spnav { display: block; }
}

@media (max-width: 992px) {
    html,
    body,
    .h,
    .h * {
        -webkit-tap-highlight-color: transparent !important;
        tap-highlight-color: transparent !important;
    }

    .h-spnav,
    .h-spnav:hover,
    .h-spnav:active,
    .h-spnav:focus,
    .h-spnav:focus-visible {
        background: transparent !important;
        outline: none !important;
        box-shadow: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
        tap-highlight-color: transparent !important;
    }

    .h-spnav::-moz-focus-inner {
        border: 0;
    }

    .h-spnav,
    .h-spnav span {
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }

    .only-pc { display: none !important; }
    .only-sp { display: flex !important; }
    
    .h {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
    }
    .h-logo {
        order: 1;
        margin-right: auto;
        padding: 0;
    }
    .h-sp-icons {
        order: 2;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    .h-search-icon {
        display: block;
        padding: 5px;
    }
    .h-spnav {
        display: block;
        margin-left: 0;
        padding: 5px;
    }
    .h-wrapsp {
        left: 6px;
        right: 6px;
        width: auto;
        top: calc(var(--header-height) + 6px);
        max-height: calc(100vh - var(--header-height) - 12px);
    }
    .h-wrapsp.is-open {
        transform: translateX(0);
        visibility: visible;
    }
}
