@charset "UTF-8";

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

:root {
    --nav-font-scale: clamp(1.54275rem, 1.683vw, 1.82325rem);
}

/* -----------------------------------------------------------------
   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-color: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
    border-bottom: 1px solid transparent;
}
.h.is-scrolled {
    background-color: rgba(26, 26, 26, 0.5); 
    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: 180px;
}
.h-logo img {
    height: 38px;
    width: auto;
    transition: height 0.3s ease;
}
.h.is-scrolled .h-logo img { height: 32px; }

/* -----------------------------------------------------------------
   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;
    
    /* ★要件対応: ここを変数で制御 */
    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;
}

.h-nav.only-pc .h-nav_item::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 8px;
    left: 15px; background-color: var(--primary-color); transition: width 0.3s ease;
}
.h-nav.only-pc .h-nav_item:hover::after { width: calc(100% - 30px); }

/* 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(26, 26, 26, 0.95);
    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(26, 26, 26, 0.95) 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);
}

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

.h-spnav, .h-search-icon { 
    display: none; 
    background: none; 
    border: none; 
    cursor: pointer; 
    padding: 10px; 
    z-index: 1001; 
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.h-search-icon { font-size: 1.2rem; }

.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: var(--text-color); 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: 0; width: 100%; height: 100vh;
    background-color: var(--secondary-color);
    padding: calc(var(--header-height) + 20px) 30px 30px;
    overflow-y: auto;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 999;
    visibility: hidden;
}
.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: var(--text-color); 
    text-shadow: none;
    padding: 18px 10px;
    border-bottom: 1px solid #e9e9e9;
    transition: background-color 0.2s ease;
}
.h-wrapsp .h-nav_item:hover { background-color: var(--light-grey); }
.h-wrapsp .h-nav_item:first-child { border-top: 1px solid #e9e9e9; }

/* SP Sublinks */
.h-navcontents .h-sublinks {
    display: flex; flex-direction: column; gap: 12px;
    margin-top: 30px; padding-top: 25px;
    border-top: 1px solid var(--light-grey);
}
.h-navcontents .h-sublinks a { color: var(--medium-grey); 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: 1200px) {
    .h-nav.only-pc { display: none; }
    .only-sp { display: flex !important; }
}

@media (max-width: 992px) {
    .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: auto;
        right: 0;
        width: calc(100% / 9 * 8);
        transform: translateX(100%);
    }
    .h-wrapsp.is-open {
        transform: translateX(0);
        visibility: visible;
    }
}