/* ==================================================
    Global CSS Variables
    主要な色を変数化して管理しやすく
================================================== */
:root {
    --gnav-bg: #3db134;
    --brand-white: #ffffff;
    --cta-btn-primary: #3db134;
    --cta-btn-primary-hover: #2d8f26;
    --cta-btn-ghost: #f39800;
    --cta-btn-ghost-hover: #e08900;
    --search-accent: #3db134;
    --search-accent-hover: #2d8f26;
    --search-bg: #eaf7ea;
    --border-muted: #e0e0e0;
    --text-muted: #999999;
    --text-default: #333333;
    --link-color: #3db134;
}

/* ==================================================
    基本スタイル
================================================== */
/* ホームページのエントリータイトルを非表示（Swell用） */
.home .c-entry__title,
.home .entry-title {
	display: none;
}

svg {
	fill: #2b2b2b00;
	will-change: transform;
}

/* ヘッダーWPメニューバーの固定 */
@media (max-width: 600px) {
	#wpadminbar {
		position: fixed;
	}
}

/* ==================================================
    ヘッダーメニューの色
    - PC/SP共通。`--gnav-bg` を変更すると全体のナビ背景が変わります
================================================== */
header nav#gnav,
.l-header nav#gnav {
    background-color: var(--gnav-bg);
    color: var(--brand-white);
}

/* ==================================================
    ヘッダー内の要素を横一列に配置（PCのみ）
================================================== */
@media screen and (min-width: 1200px) {
    .l-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    /* ロゴエリアの調整（PCのみ） */
    .l-header__logo,
    .l-header .c-logo {
        flex-shrink: 0;
        order: 1;
    }
}

/* ==================================================
    ヘッダーロゴ（右にサブ画像）
    - `.c-headLogo` 自体はフレックス横並び
    - サブ画像は擬似要素で右側に常時表示
================================================== */
@media (min-width: 960px) and (min-width: 600px) {
    .-series .c-headLogo {
        max-width: 500px;
    }
}

.c-headLogo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    pointer-events: auto;
}

/* サブ画像を疑似要素で追加（右側に配置） */
.c-headLogo::after {
    content: '';
    position: relative;
    width: 130px;
    height: 100px;
    background-image: url('https://resemom.jp/mitsukaru-eikaiwa/wp-content/themes/swell_child/img/mitsukaru-logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    flex-shrink: 0;
    order: 1;
    pointer-events: auto;
    z-index: 10;
    display: block;
}

/* メイン画像のリンク */
.c-headLogo__link {
    flex: 1;
    display: flex;
    align-items: center;
}

/* レスポンシブ対応（ロゴ間の余白/サブ画像のサイズ縮小） */
@media screen and (max-width: 1023px) {
    .c-headLogo::after {
        width: 140px;
        height: 70px;
    }
    .c-headLogo {
        gap: 5px;
    }
}
@media screen and (max-width: 767px) {
    .c-headLogo::after {
        width: 100px;
        height: 50px;
    }
    .c-headLogo {
        gap: 5px;
    }
}

/* ==================================================
    固定ヘッダー時の検索まわり
    - アイコンボタンのサイズ/位置、ドロップダウンの位置調整
    - ボタンを検索欄の上に配置
================================================== */
@media (min-width: 961px) {
    /* 固定ヘッダー時のw-header__innerをblockに変更（flexを無効化） */
    #fix_header .w-header__inner {
        display: block;
        text-align: right;
        padding: 10px 0;
    }
    /* ボタンを横並びにグループ化し、上に配置 */
    #fix_header .w-header__item.widget_block:not(.widget_search) {
        display: inline-block;
        margin: 0 2px;
        vertical-align: top;
    }
    #fix_header .c-searchForm.-alt .c-searchForm__toggle,
    #fix_header .c-searchForm.-alt .c-searchForm__submit {
        height: 100% !important;
    }
    #fix_header .w-header__item.widget_search {
        position: relative;
        display: block;
        text-align: right;
        margin-top: 6px; /* ボタンとの間隔 */
        margin-bottom: 12px; /* 検索欄とボタンの余白 */
    }
    /* WordPressブロック検索の固定ヘッダー対応 */
    #fix_header .wp-block-search {
        position: relative;
        display: inline-flex;
        align-items: center;
        padding-bottom: 3px;
    }
    #fix_header .c-searchForm.-alt {
        position: relative;
        display: inline-flex;
        align-items: center;
        padding-bottom: 3px;
    }
    /* アイコン：中央揃え・下線/ボーダー消し */
    #fix_header .c-searchForm.-alt .c-searchForm__toggle,
    #fix_header .c-searchForm.-alt .c-searchForm__submit {
        width: 30px; height: 30px;
        display: inline-flex; align-items: center; justify-content: center;
        padding: 0;
        background: transparent;
        border: none;            /* 下のボーダーを消す */
        box-shadow: none;
        text-decoration: none;
        line-height: 1;
    }
    #fix_header .c-searchForm.-alt .c-searchForm__toggle .c-iconBtn__icon,
    #fix_header .c-searchForm.-alt .c-searchForm__submit .c-iconBtn__icon {
        font-size: 16px; line-height: 1; margin: 0;
    }
    /* 入力欄は左寄せでボタン直下 */
    #fix_header .c-searchForm.-alt .c-searchForm__dropdown {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        width: 180px;
        background: #fff; border: 1px solid #ddd; border-radius: 2px;
        padding: 8px 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12);
        z-index: 1001;
    }
    #fix_header .c-searchForm.-alt .c-searchForm__dropdown[hidden] { display: none;}
    /* 固定ヘッダー時の検索入力欄の最小幅を狭く */
    #fix_header .c-searchForm__s,
    #fix_header .wp-block-search__input {
        min-width: 120px;
        padding: 8px 10px 8px 8px;
        font-size: 13px;
    }
    /* 固定ヘッダー時の検索フォームの幅調整 */
    #fix_header .wp-block-search {
        width: 100%;
        max-width: 200px;
    }
}

/* ==================================================
    お問い合わせボタン・診断ボタン
    - お問い合わせ: #f39800、診断: #3db134
    - ホバー時は背景と文字色が反転
================================================== */
.header-btn-form,
.header-btn-english {
    white-space: nowrap;
    padding: 0;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
}
.header-btn-form a,
.header-btn-english a {
    display: block;
    padding: 14px 30px;
    color: white;
    text-decoration: none;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}
/* お問い合わせボタン */
.header-btn-form {
    background-color: #f39800;
    border: 2px solid #f39800;
}
.header-btn-form:hover,
.header-btn-form:focus-visible {
    background-color: white;
    outline: none;
}
.header-btn-form:hover a,
.header-btn-form:focus-visible a {
    color: #f39800 !important;
}
/* 診断ボタン */
.header-btn-english {
    background-color: #3db134;
    border: 2px solid #3db134;
}
.header-btn-english:hover,
.header-btn-english:focus-visible {
    background-color: white;
    outline: none;
}
.header-btn-english:hover a,
.header-btn-english:focus-visible a {
    color: #3db134 !important;
}

/* タブレットとスマホではメニューを非表示（ハンバーガーメニューを使用） */
@media (max-width: 1199px) {
    .l-header__gnav,
    .l-header .p-gNav,
    .l-header__spNav {
        display: none !important;
    }
}

/* パソコンではハンバーガーメニューを非表示 */
@media (min-width: 960px) {
    .l-header__spNav {
        display: none;
    }
}

/* fix時のお問い合わせボタンを小さめ＆中央揃え */
@media (min-width: 961px) {
    #fix_header .w-header__item.widget_custom_html { display: flex; align-items: center; }
    #fix_header .w-header .header-btn-form,
    #fix_header .w-header .header-btn-english {
        font-size: 12px;
        height: 32px;
        padding: 0;
        line-height: 1;
        border-radius: 2px;
        display: inline-block;
        margin: 0 2px; /* ボタン間の間隔 */
    }
    /* ボタン内のaの余白・下線などをリセット */
    #fix_header .w-header .header-btn-form a,
    #fix_header .w-header .header-btn-english a {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 10px;
        line-height: 1;
        text-decoration: none;
        height: 100%;
        box-sizing: border-box;
    }
}

/* ==================================================
    グローバルナビの配置と背景
    - 下段に配置。背景広げは ::before でビューポート幅に合わせる
================================================== */
.l-header__gnav,
.l-header .p-gNav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    padding: 1px 0;
    display: flex;
    justify-content: center; /* ナビゲーションを中央に配置 */
    position: relative;
}

/* ナビゲーションのリストを中央に配置 */
.l-header__gnav .c-gnav,
.l-header .p-gNav .p-gNav__list,
.l-header .p-gNav nav .p-gNav__list,
.l-header .p-gNav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.l-header__gnav .c-gnav a,
.l-header .p-gNav .p-gNav__list > li > a,
.l-header .p-gNav ul > li > a {
    font-size: 18px; /* リンクの文字サイズも大きく */
    padding: 15px 20px; /* リンクのパディングを増加して高さを確保 */
    line-height: 1.4; /* 行間を調整 */
}

.l-header__gnav .c-gnav .ttl,
.l-header .p-gNav .p-gNav__list .ttl,
.l-header .p-gNav ul .ttl {
    font-size: 18px !important; /* タイトル文字も大きく */
    font-weight: bold; /* フォントの太さを調整 */
}

/* ヘッダーナビの背景（全幅化） */
.l-header__gnav::before,
.l-header .p-gNav::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(-50vw + 50%);
    right: calc(-50vw + 50%);
    bottom: 0;
    background-color: var(--gnav-bg); /* gnavの背景色と同じ色を設定 */
    z-index: -1;
}

/* ==================================================
    アイコンサイズ調整
================================================== */
header i.icon-search,
header i.icon-light-bulb,
header i.icon-book {
    font-size: 20px;
}

main i.icon-light-bulb,
main i.icon-book {
    font-size: xx-large;
}

/* ==================================================
    検索フォーム（下線スタイル、アクセント色）
================================================== */
.w-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    order: 2;
}
.w-header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
}
/* 検索フォームの調整 - 下線のみ */
.c-searchForm,
.wp-block-search {
    display: flex;
    align-items: center;
    background-color: white;
    border: none;
    border-bottom: 2px solid var(--border-muted);
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: border-bottom-color 0.3s ease;
}
.c-searchForm:focus-within,
.wp-block-search:focus-within {
    border-bottom-color: var(--search-accent);
}
.c-searchForm__s,
.wp-block-search__input {
    border: none;
    outline: none;
    padding: 10px 15px 10px 10px;
    font-size: 14px;
    background: transparent;
    flex: 1;
    min-width: 200px;
}
.c-searchForm__s::placeholder,
.wp-block-search__input::placeholder {
    color: var(--text-muted);
}
.c-searchForm__submit,
.wp-block-search__button {
    background-color: transparent;
    color: var(--search-accent);
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s ease;
}
.c-searchForm__submit:hover,
.wp-block-search__button:hover {
    color: var(--search-accent-hover);
}
/* WordPressブロック検索の内部ラッパー */
.wp-block-search__inside-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
}
.u-bg-main {
    background-color: hsla(0, 0%, 100%, .2) !important;
}
.c-searchForm__submit:before {
    color: var(--text-default);
}

.top #content {
    padding-top: 0em !important;
    margin: 0 auto;
}

/* ==================================================
    ロゴサイズ調整
================================================== */
@media (max-width: 959px) {
    .-img .c-headLogo__link {
        padding: 0px;
    }
}
@media (min-width: 1200px) {
    .l-header .c-logo,
    .l-header__logo {
        max-width: 350px !important;
    }
    .l-header .c-logo img,
    .l-header__logo img {
        max-width: 100%;
        height: auto;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .l-header .c-logo,
    .l-header__logo,
    .l-header .c-headLogo {
        max-width: none;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .l-header .c-logo img,
    .l-header__logo img,
    .l-header .c-headLogo img,
    .l-header .c-headLogo__img {
        max-width: 100%;
        height: auto;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    /* タブレット時のサブ画像（疑似要素）も表示 */
    .l-header .c-headLogo::after {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ==================================================
    固定ヘッダー時のロゴ表示と幅調整
================================================== */
@media (min-width: 961px) {
    /* 固定ヘッダーのコンテナ幅を広げる */
    #fix_header .l-fixHeader__inner,
    #fix_header .l-fixHeader__inner.l-container {
        max-width: 1600px !important;
        margin-left: auto;
        margin-right: auto;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
    /* 固定ヘッダー内の要素間の余白を調整 */
    #fix_header .w-header__inner {
        gap: 8px;
    }
    /* 固定ヘッダー時のロゴ */
    #fix_header .l-fixHeader__logo {
        flex-shrink: 0;
        order: 1;
    }
    #fix_header .c-logo,
    #fix_header .l-header__logo,
    #fix_header .c-headLogo,
    #fix_header .l-fixHeader__logo .c-headLogo {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-width: 280px;
        align-items: center;
    }
    #fix_header .c-logo img,
    #fix_header .l-header__logo img,
    #fix_header .c-headLogo img,
    #fix_header .c-headLogo__link img,
    #fix_header .c-headLogo__img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-width: 100%;
        height: auto;
    }
    /* 固定ヘッダー時のメニュー */
    #fix_header .l-fixHeader__gnav {
        flex: 1;
        order: 2;
        display: flex;
        justify-content: center;
    }
    /* 固定ヘッダー時の検索とボタン */
    #fix_header .w-header {
        flex-shrink: 0;
        order: 3;
    }
    /* 固定ヘッダー時のサブ画像（疑似要素）も表示 */
    #fix_header .c-headLogo::after {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ==================================================
    タブレットとスマホ時の固定ヘッダー対応（統一）
================================================== */
@media (max-width: 1199px) {
    /* タブレットとスマホ時の固定ヘッダーのコンテナ幅 */
    #fix_header .l-fixHeader__inner,
    #fix_header .l-fixHeader__inner.l-container {
        max-width: 100% !important;
        padding-left: 16px;
        padding-right: 16px;
        gap: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* タブレットとスマホ時の固定ヘッダーのロゴ */
    #fix_header .l-fixHeader__logo {
        order: 1;
        flex-shrink: 0;
    }
    #fix_header .c-headLogo,
    #fix_header .l-fixHeader__logo .c-headLogo {
        max-width: none;
    }

    /* タブレットとスマホ時の固定ヘッダーのメニューを非表示 */
    #fix_header .l-fixHeader__gnav {
        display: none !important;
    }

    /* タブレットとスマホ時の固定ヘッダーの検索とボタンを右に配置 */
    #fix_header .w-header {
        order: 2;
        flex-shrink: 0;
    }

    /* タブレットとスマホ時の固定ヘッダーの検索とボタン */
    #fix_header .w-header__inner {
        gap: 8px;
    }

    /* タブレットとスマホ時の固定ヘッダーのボタン */
    #fix_header .header-btn-form,
    #fix_header .header-btn-english {
        font-size: 12px;
        height: 32px;
        padding: 0;
    }
    #fix_header .header-btn-form a,
    #fix_header .header-btn-english a {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ==================================================
    スマートフォン対応
================================================== */
@media (max-width: 959px) {
    /* スマホ: ハンバーガーメニュー内CTA（Swell用） */
    .p-spMenu__body .header-cta--spmenu {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
        padding: 0 16px;
    }

    .p-spMenu__body .header-cta--spmenu .header-btn-form,
    .p-spMenu__body .header-cta--spmenu .header-btn-english {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 14px 20px;
        border-radius: 2px;
        font-weight: 700;
        font-size: 16px;
        line-height: 1;
        text-decoration: none;
        transition: background-color .2s ease, color .2s ease, opacity .2s ease;
    }

    .p-spMenu__body .header-cta--spmenu .header-btn-form {
        background: #f39800;
        border: 2px solid #f39800;
        color: white;
    }
    .p-spMenu__body .header-cta--spmenu .header-btn-form:hover {
        background: white;
        border: 2px solid #f39800;
        color: #f39800;
    }

    .p-spMenu__body .header-cta--spmenu .header-btn-english {
        background: #3db134;
        border: 2px solid #3db134;
        color: white;
    }
    .p-spMenu__body .header-cta--spmenu .header-btn-english:hover {
        background: white;
        border: 2px solid #3db134;
        color: #3db134;
    }
}

/* ==================================================
    その他のスタイル調整
================================================== */
/* 広告エリアの非表示（Swell用） */
.home .awac-wrapper,
.home .w-frontTop,
.front-page .awac-wrapper,
.front-page .w-frontTop {
	display: none;
}