/* ========================================
   HEADER
======================================== */

/* 下層ページは背景色を統一 */
.l-headerStudio {
    width: 100%;

    position: sticky;
    top: 0;
    z-index: 1000;

    padding: 20px 0 14px;

    background: #f3f3f3;
    border-bottom: 0;
}

/* トップページだけ写真の上に重ねる */
.home .l-headerStudio {
    position: absolute;
    top: 20px;
    left: 0;

    width: 100%;

    padding: 0;

    background: transparent;

    z-index: 1000;
}

/* ========================================
   INNER
======================================== */

.l-headerStudio__inner {
    width: 94%;
    max-width: none;

    min-height: 96px;

    margin: 0 auto;
    padding: 12px 14px 12px 28px;

    display: grid;

    grid-template-columns:
        minmax(210px, 240px) minmax(360px, 1fr) auto 148px 76px;

    align-items: center;
    gap: 18px;

    background: #fff;

    border: 1px solid rgba(0, 0, 0, .04);
    border-radius: 999px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .09);
}

.l-headerStudio__inner>* {
    min-width: 0;
}

/* ========================================
   LOGO
======================================== */

.l-headerStudio__logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;

    text-decoration: none;
    white-space: nowrap;
}

/* 左のロゴマーク */
.l-headerStudio__logoImage {
    display: block;

    width: 48px;
    height: 48px;

    object-fit: contain;
    flex-shrink: 0;
}

/* 会社名＋奄美引越センター */
.l-headerStudio__logoText {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    line-height: 1.1;
}

.l-headerStudio__logoMain {
    font-size: 21px;
    line-height: 1.15;
    font-weight: 900;

    color: #111;
}

.l-headerStudio__logoSub {
    margin-top: 5px;

    font-size: 14px;
    line-height: 1.2;
    font-weight: 900;

    color: #e60012;
}

/* ========================================
   MAIN NAV
======================================== */

.l-headerStudio__nav {
    position: relative;

    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

#global-menu.l-headerStudio__menu {
    list-style: none;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 24px;

    white-space: nowrap;
}

#global-menu.l-headerStudio__menu li {
    position: relative;

    margin: 0;
    padding: 0;
}

#global-menu.l-headerStudio__menu>li>a {
    position: relative;

    min-width: 76px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 4px 24px;

    color: #111;

    font-size: 14px;
    line-height: 1.2;
    font-weight: 900;

    text-align: center;
    text-decoration: none;

    transition: color .2s ease;
}

#global-menu.l-headerStudio__menu>li>a:hover {
    color: #2aa7ad;
}

/* ========================================
   NAV ICON
======================================== */

#global-menu.l-headerStudio__menu>li>a::before {
    position: static;

    width: auto;
    height: auto;

    margin-right: 7px;

    color: #2aa7ad;

    font-size: 17px;
    line-height: 1;

    background: none;
    transform: none;
}

/* プラン */
#global-menu.l-headerStudio__menu>li:nth-child(1)>a::before {
    content: "🚚";
}

/* お知らせ */
#global-menu.l-headerStudio__menu>li:nth-child(2)>a::before {
    content: "📢";
}

/* Q&A */
#global-menu.l-headerStudio__menu>li:nth-child(3)>a::before {
    content: "💬";
}

/* 法人 */
#global-menu.l-headerStudio__menu>li:nth-child(4)>a::before {
    content: "🏢";
}

/* ========================================
   NAV ENGLISH LABEL
======================================== */

#global-menu.l-headerStudio__menu>li>a::after {
    position: absolute;

    left: 50%;
    bottom: 4px;

    transform: translateX(-50%);

    margin: 0;

    color: #2aa7ad;

    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .04em;

    opacity: 1;
}

/* プラン */
#global-menu.l-headerStudio__menu>li:nth-child(1)>a::after {
    content: "Plan";
}

/* お知らせ */
#global-menu.l-headerStudio__menu>li:nth-child(2)>a::after {
    content: "News";
}

/* Q&A */
#global-menu.l-headerStudio__menu>li:nth-child(3)>a::after {
    content: "Q&A";
}

/* 法人 */
#global-menu.l-headerStudio__menu>li:nth-child(4)>a::after {
    content: "Corporate";
}

/* ========================================
   CONTACT
======================================== */

.l-headerStudio__contact {
    padding-left: 24px;

    border-left: 1px solid rgba(0, 0, 0, .10);

    text-align: left;
    white-space: nowrap;
}

.l-headerStudio__telRow {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 7px;
}

.l-headerStudio__telIcon {
    font-size: 15px;
    line-height: 1;
}

.l-headerStudio__tel {
    color: #111;

    font-size: 22px;
    line-height: 1;
    font-weight: 900;

    letter-spacing: .01em;

    text-decoration: none;
}

.l-headerStudio__meta {
    margin-top: 7px;

    display: flex;
    flex-direction: column;

    gap: 3px;

    color: #555;

    font-size: 11px;
    line-height: 1.35;
}

.l-headerStudio__hours {
    display: block;
}

.l-headerStudio__mail {
    color: #222;

    font-size: 11px;
    font-weight: 800;

    text-decoration: none;
}

.l-headerStudio__mail:hover {
    color: #2aa7ad;
}

/* ========================================
   ESTIMATE CTA
======================================== */

.l-headerStudio__cta {
    width: 148px;
    min-height: 68px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    background: #2aa7ad;

    border-radius: 999px;

    color: #fff;

    text-decoration: none;
    white-space: nowrap;

    box-shadow:
        0 8px 18px rgba(42, 167, 173, .20);

    transition:
        transform .2s ease,
        background-color .2s ease,
        box-shadow .2s ease;
}

.l-headerStudio__cta:hover {
    transform: translateY(-2px);

    background: #218f96;

    box-shadow:
        0 11px 24px rgba(42, 167, 173, .26);
}

.l-headerStudio__ctaIcon {
    font-size: 17px;
    line-height: 1;
}

.l-headerStudio__ctaText {
    font-size: 16px;
    line-height: 1;
    font-weight: 900;
}

/* ========================================
   PC MORE MENU
======================================== */

.l-headerStudio__more {
    position: relative;

    flex-shrink: 0;
}

.l-headerStudio__more summary {
    list-style: none;
}

.l-headerStudio__more summary::-webkit-details-marker {
    display: none;
}

.l-headerStudio__moreButton {
    width: 72px;
    min-height: 66px;

    padding-left: 14px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 6px;

    border-left: 1px solid rgba(0, 0, 0, .10);

    cursor: pointer;
}

.l-headerStudio__moreLines {
    width: 28px;

    display: flex;
    flex-direction: column;

    gap: 5px;
}

.l-headerStudio__moreLines span {
    display: block;

    width: 28px;
    height: 2px;

    background: #111;

    border-radius: 999px;
}

.l-headerStudio__moreLabel {
    color: #111;

    font-size: 10px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .06em;
}

/* 開いたメニュー */
.l-headerStudio__morePanel {
    position: absolute;

    top: calc(100% + 20px);
    right: 0;

    z-index: 100;

    width: 290px;

    padding: 18px;

    display: grid;

    background: #fff;

    border: 1px solid rgba(0, 0, 0, .05);
    border-radius: 20px;

    box-shadow:
        0 16px 40px rgba(0, 0, 0, .14);
}

.l-headerStudio__morePanel .l-headerStudio__moreMenu {
    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.l-headerStudio__morePanel .l-headerStudio__moreMenu li {
    margin: 0;
    padding: 0;
    list-style-position: inside;
}

.l-headerStudio__morePanel .l-headerStudio__moreMenu a {
    display: inline-block;

    padding: 8px 12px;

    border-radius: 11px;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 800;

    color: #222;
    text-decoration: none;
}

.l-headerStudio__morePanel .l-headerStudio__moreMenu a:hover,
.l-headerStudio__morePanel .l-headerStudio__moreMenu .current-menu-item>a {
    background: #eefafa;
    color: #2aa7ad;
}

/* ========================================
   SP NAV TOGGLE
======================================== */

.l-headerStudio__navToggle {
    display: none;

    border: 0;
    background: transparent;

    padding: 7px;

    cursor: pointer;

    align-items: center;
    justify-content: center;
    flex-direction: column;

    gap: 4px;
}

.l-headerStudio__navToggleLine {
    display: block;

    width: 22px;
    height: 2px;

    margin: 0;

    background: #111;

    border-radius: 999px;
}

.l-headerStudio__navToggleLabel {
    margin-top: 2px;

    color: #111;

    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .06em;
}

#global-menu[hidden] {
    display: none !important;
}

/* ========================================
   メガメニュー（PCドロップダウン）
======================================== */

@media (min-width: 1281px) {

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5) {
        position: relative;
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 0;

        width: 100%;
        height: 16px;

        background: transparent;
        z-index: 2999;
    }

    /* 共通パネル */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu {
        display: grid !important;
        position: absolute;
        top: calc(100% + 12px);
        z-index: 3000;

        margin: 0;
        padding: 24px;
        list-style: none;

        background: #fff;
        border-radius: 22px;
        border: 1px solid rgba(0, 0, 0, .08);
        box-shadow: 0 20px 44px rgba(0, 0, 0, .12);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        box-sizing: border-box;
        transition:
            opacity .25s ease,
            visibility .25s ease,
            transform .25s ease;
    }

    /* お引越しプラン */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu {
        left: 0;
        right: auto;
        transform: translateY(8px);

        width: min(960px, calc(100vw - 48px));
        max-width: calc(100vw - 48px);
        min-width: 0;

        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child:hover>.sub-menu,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child:focus-within>.sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* 引越しの流れ */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(8px);

        width: min(900px, calc(100vw - 48px));
        max-width: calc(100vw - 48px);
        min-width: 0;

        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5):hover>.sub-menu,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5):focus-within>.sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    /* li / カード共通 */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li {
        margin: 0;
        padding: 0;
        min-width: 0;
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li>a,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li>a {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;

        min-width: 0;
        overflow: hidden;
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: anywhere;

        padding: 22px 20px;
        border-radius: 18px;
        background: #f7f7f7;

        color: #111;
        text-decoration: none;
        font-size: 18px;
        line-height: 1.5;
        font-weight: 800;

        transition:
            transform .2s ease,
            background .2s ease,
            box-shadow .2s ease;
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li>a:hover,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li>a:hover {
        background: #eef9fb;
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, .06);
    }

    /* 高さ */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li>a {
        min-height: 200px;
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li>a {
        min-height: 220px;
        font-size: 16px;
        line-height: 1.45;
        padding: 24px 22px;
    }

    /* 上ラベル */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li>a::before,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li>a::before {
        display: block;
        margin-bottom: 12px;
        font-size: 12px;
        line-height: 1;
        letter-spacing: .14em;
        color: #1fa9b8;
        font-weight: 700;
    }

    /* 説明文 */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li>a::after,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li>a::after {
        display: block;
        margin-top: 12px;
        font-size: 14px;
        line-height: 1.8;
        color: #667085;
        font-weight: 400;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    /* お引越しプラン 文言 */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li:nth-child(1)>a::before {
        content: "STANDARD PLAN";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li:nth-child(1)>a::after {
        content: "荷造りはご自身で行う基本プランです。";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li:nth-child(2)>a::before {
        content: "HALF PLAN";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li:nth-child(2)>a::after {
        content: "荷造りをサポートするバランス型プランです。";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li:nth-child(3)>a::before {
        content: "RAKURAKU PLAN";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li:nth-child(3)>a::after {
        content: "荷造りから荷解きまでお任せできる安心プランです。";
    }

    /* 引越しの流れ 文言 */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li:nth-child(1)>a::before {
        content: "FLOW 01";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li:nth-child(1)>a::after {
        content: "お見積りからお引越し前までの流れをご案内します。";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li:nth-child(2)>a::before {
        content: "FLOW 02";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li:nth-child(2)>a::after {
        content: "お引越し当日の流れや作業内容をご案内します。";
    }

    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li:nth-child(1)>a {
        font-size: 15px;
        line-height: 1.45;
    }
}

/* ========================================
   レスポンシブ・スマホ・タブレット切替
======================================== */

@media (max-width: 1280px) {

    /* メガメニュー等の英語ラベル・説明文カット */
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li>a::before,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:first-child>.sub-menu>li>a::after,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li>a::before,
    #global-menu.l-headerStudio__menu>li.menu-item-has-children:nth-child(5)>.sub-menu>li>a::after {
        display: none;
    }

    /* ドロップダウン漏れ防止 */
    #global-menu.l-headerStudio__menu .sub-menu {
        display: none !important;
    }

    /* PC用ナビ・連絡先の非表示 ＆ MENUボタン移行 */
    .l-headerStudio__nav {
        display: none !important;
    }

    .l-headerStudio__contact,
    .l-headerStudio__cta {
        display: none !important;
    }

    .l-headerStudio__more {
        display: block !important;
        justify-self: end;
    }

    .l-headerStudio__inner {
        grid-template-columns: 1fr auto !important;
        gap: 12px;
    }
}

@media (max-width: 900px) {

    .l-headerStudio {
        padding: 9px 0;
    }

    .l-headerStudio__inner {
        width: calc(100% - 20px);

        min-height: 70px;

        padding: 9px 14px 9px 18px;

        border-radius: 24px;
    }

    .l-headerStudio__logoMain {
        font-size: 17px;
    }

    .l-headerStudio__logoSub {
        margin-top: 3px;

        font-size: 12px;
    }

    .l-headerStudio__moreButton {
        width: 56px;
        min-height: 56px;
        padding-left: 10px;
    }

    .l-headerStudio__moreLines,
    .l-headerStudio__moreLines span {
        width: 26px;
    }

    .l-headerStudio__more .l-headerStudio__morePanel {
        top: calc(100% + 14px);
        right: 0;

        width: min(360px, calc(100vw - 32px));
        max-height: calc(100vh - 120px);

        padding: 18px;

        overflow-y: auto;
        overscroll-behavior: contain;

        border-radius: 20px;
    }
}

/* メニューを開いている間は追従CTAを非表示 */
body:has(.l-headerStudio__more[open]) .c-floatContact,
body:has(.l-headerStudio__more[open]) .c-bottomCta,
body:has(.l-headerStudio__navToggle[aria-expanded="true"]) .c-floatContact,
body:has(.l-headerStudio__navToggle[aria-expanded="true"]) .c-bottomCta {
    display: none !important;
}

/* スマホ：ヘッダーを画面上部に固定 */
@media (max-width: 900px) {
  .l-headerStudio,
  .home .l-headerStudio {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 8px 0;
    z-index: 1000;
  }

  /* WordPressログイン中は管理バーの下に配置 */
  .admin-bar .l-headerStudio {
    top: 46px;
  }
}

/* 全ページ・全画面幅：ヘッダー外側の背景を透明に */
body .l-headerStudio {
  background: transparent !important;
  box-shadow: none !important;
  border: 0;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* スマホ：メニューを約半分の幅で右寄せ */
@media (max-width: 767px) {
  .l-headerStudio__more .l-headerStudio__morePanel {
    left: auto;
    right: 0;
    width: 55vw;
    max-width: 260px;
    box-sizing: border-box;
    padding: 10px;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 16px;
  }

  .l-headerStudio__morePanel .l-headerStudio__moreMenu li {
    list-style: none;
  }

  .l-headerStudio__morePanel .l-headerStudio__moreMenu a {
    display: block;
    padding: 10px 6px;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
}

/* スマホ：箇条書きの「・」を戻す */
@media (max-width: 767px) {
  .l-headerStudio__morePanel .l-headerStudio__moreMenu li {
    list-style: disc;
    list-style-position: outside;
    margin-left: 16px;
  }

  /* 開いている間は三本線を×にする */
  .l-headerStudio__more[open] .l-headerStudio__moreLines {
    position: relative;
    height: 26px;
  }

  .l-headerStudio__more[open] .l-headerStudio__moreLines span {
    position: absolute;
    top: 50%;
    left: 0;
    margin: 0;
  }

  .l-headerStudio__more[open] .l-headerStudio__moreLines span:nth-child(1) {
    transform: translateY(-50%) rotate(45deg);
  }

  .l-headerStudio__more[open] .l-headerStudio__moreLines span:nth-child(2) {
    opacity: 0;
  }

  .l-headerStudio__more[open] .l-headerStudio__moreLines span:nth-child(3) {
    transform: translateY(-50%) rotate(-45deg);
  }
}

/* ハンバーガーメニュー内をスクロール */
.l-headerStudio__more .l-headerStudio__morePanel {
  display: block;
  max-height: calc(100vh - 200px);
  max-height: calc(100dvh - 200px);

  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

/* メニューを開いている間は背景ページを止める */
html:has(.l-headerStudio__more[open]),
body:has(.l-headerStudio__more[open]) {
  overflow: hidden;
}