/*
Theme Name: YAMAMURA-CORP
Description: Rebuilt base stylesheet (header/footer/home first)
*/

/* ===== 1. Base ===== */
:root {
    /* theme.json の custom / settings を参照しつつ、共通レイアウトの基準値をまとめる */
    --yj-container-width: var(--wp--custom--container-width, 1440px);
    --yj-content-width: var(--wp--style--global--content-size, var(--wp--custom--content-width, 1200px));
    --yj-wide-width: var(--wp--style--global--wide-size, var(--wp--custom--wide-width, 1600px));
    --yj-reading-width: 760px;
    --yj-side-padding: var(--wp--custom--side-padding, clamp(20px, 4vw, 64px));
    --yj-section-padding: clamp(2rem, 1rem + 2vw, 4rem);
    --yj-card-grid-gap: clamp(20px, 3vw, 40px);
    --yj-scrollbar-w: calc(100vw - 100%);
    --yj-vw: calc(100vw - var(--yj-scrollbar-w));
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--wp--preset--color--text, #333333);
    background-color: var(--wp--preset--color--base, #ffffff);
}

/* ブラウザデフォルトの余白・装飾を軽くリセット */
h2,
h3,
h4,
h5,
h6,
p,
figure {
    margin: 0;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* a の初期スタイルは theme.json に寄せている前提。ここでは :focus-visible だけ */
a:focus-visible {
    outline: 2px solid var(--wp--preset--color--line-01, #ab2c2c);
    outline-offset: 2px;
}

/* ===== 2. Layout utilities ===== */

/* max-width に padding を含めて、実幅が theme.json の上限を超えないようにする */
.l-container,
.l-container--wide,
.l-container--xl,
.l-container--full,
.l-container--content,
.l-reading-width {
    box-sizing: border-box;
}

/* Debug: body に debug-layout を付けた時だけコンテナ境界を可視化 */
body.debug-layout .l-container,
body.debug-layout .l-container--content,
body.debug-layout .l-reading-width {
    outline: 1px dashed rgba(17, 99, 204, 0.8);
    outline-offset: -1px;
}

body.debug-layout .l-container--wide {
    outline: 1px dashed rgba(214, 85, 0, 0.85);
    outline-offset: -1px;
}

body.debug-layout .l-container--xl,
body.debug-layout .l-container--full {
    outline: 1px dashed rgba(15, 138, 74, 0.85);
    outline-offset: -1px;
}

/* 共通コンテナ：新規は .l-container 系を使う */
.l-container {
    max-width: var(--yj-content-width);
    margin-inline: auto;
    width: 100%;
    padding-inline: var(--yj-side-padding);
}

/* 大きめの共通コンテナ：必要な箇所だけ段階的に使う */
.l-container--wide {
    max-width: var(--yj-container-width);
    margin-inline: auto;
    width: 100%;
    padding-inline: var(--yj-side-padding);
}

/* ワイド上限：theme.json の wideSize に合わせた最上位の幅 */
.l-container--xl,
.l-container--full {
    max-width: var(--yj-wide-width);
    margin-inline: auto;
    width: 100%;
    padding-inline: var(--yj-side-padding);
}

/* 読み物向けの本文幅 */
.l-container--content,
.l-reading-width {
    max-width: var(--yj-reading-width);
    margin-inline: auto;
    width: 100%;
    padding-inline: var(--yj-side-padding);
}

/* 旧ブロック構成互換: max-width-setting を共通コンテナとして扱う */
.max-width-setting {
    max-width: var(--yj-content-width);
    margin-inline: auto;
    width: 100%;
    padding-inline: var(--yj-side-padding);
    box-sizing: border-box;
}

/* ページ本文直下の has-global-padding に共通の左右余白を付与 */
/*
.entry-content > .wp-block-group.has-global-padding,
.entry-content > .wp-block-columns.has-global-padding {
    padding-inline: var(--yj-side-padding);
    box-sizing: border-box;
}
*/

/* セクション共通の上下余白 */
.l-section,
.section {
    padding-block: var(--yj-section-padding);
    overflow: hidden;
}

/* セクションの密度を変えたいとき用の最小限の派生 */
.l-section--tight {
    padding-block: clamp(1.5rem, 0.75rem + 1.5vw, 3rem);
}

.l-section--loose {
    padding-block: clamp(3rem, 1.5rem + 3vw, 5rem);
}

/* カード／一覧系の基本グリッド */
.l-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--yj-card-grid-gap);
    align-items: stretch;
    width: 100%;
}

/* 2〜4列の補助クラス。必要な箇所だけ指定して使う */
.l-card-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.l-card-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.l-card-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 共通：英文用段落スタイル */
.is-style-en-paragraph {
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    /* 日本語より一回り小さめ */
    line-height: 1.8;
    /* 日本語の line-height より少しタイトに */
    letter-spacing: 0.03em;
    /* 英文なので気持ち詰め気味 */
}

/* ===== 3. Header ===== */

/* ===== 固定ヘッダー基礎 ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background-color: var(--wp--preset--color--base, #ffffff);
    box-shadow: var(--wp--preset--shadow--natural, 0 4px 8px rgba(0, 0, 0, 0.05));
    transform: translateY(0);
    opacity: 1;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease;
}

/* HOME 以外：常に表示 */
body:not(.home):not(.front-page) .site-header {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* HOME 初期状態：ヘッダーを上に隠す */
body.home:not(.header-visible) .site-header,
body.front-page:not(.header-visible) .site-header {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* HOME で .header-visible が付いたら表示（ふわっと） */
body.home.header-visible .site-header,
body.front-page.header-visible .site-header {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* すでに書いてある想定のものはそのまま／なければ追加 */
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* gap: 24px; */
    min-height: 80px;
    padding-block: 16px;
}

/* ロゴはそのまま */
.site-header__logo img {
    display: block;
    height: auto;
}

.site-header__nav,
.site-header .max-mega-menu,
.site-header .max-mega-menu li>a {
    font-family: var(--wp--preset--font-family--nanum-myeongjo, serif);
    font-weight: 700;
}

/* スマホ表示：ロゴを24pxに縮小 */
@media (max-width: 767px) {
    .site-header__inner {
        min-height: auto;
        color: white !important;
    }

    .site-header__logo img {
        height: 24px;
        width: auto;
    }
}

/* モバイル優先 */
/* モバイル優先：PC ナビを非表示 */
.site-header__nav--pc {
    display: none;
}

.site-header__nav--sp {
    display: flex;
}

/* Max Mega Menu を右寄せ */
/* PC ナビを右寄せ */
.site-header__nav--pc {
    margin-left: auto;
}

/* PC表示用の切り替え＋ナビオーバーレイの強制非表示 */
@media (min-width: 768px) {

    /* PC ナビ表示（wp:navigation ブロック） */
    .site-header__nav--pc {
        display: flex !important;
        align-items: center;
        margin-block-start: 0;
    }

    /* wp:navigation ブロック内のリンク色 */
    .site-header__nav--pc .wp-block-navigation-item__content,
    .site-header__nav--pc .wp-block-navigation-item__content:visited {
        color: var(--wp--preset--color--text, #333333) !important;
        text-decoration: none;
    }

    /* Max Mega Menu がある場合の追加スタイル */
    .site-header__nav--pc .mega-menu-wrap,
    .site-header__nav--pc .max-mega-menu {
        display: flex !important;
        align-items: center;
    }

    .site-header__nav--pc .mega-menu-wrap {
        width: auto;
    }

    .site-header__nav--pc .max-mega-menu {
        justify-content: flex-end;
    }
/*
    .site-header__nav--pc .max-mega-menu > li.mega-menu-item > a.mega-menu-link,
    .site-header__nav--pc .max-mega-menu > li.mega-menu-item > span.mega-menu-link {
        color: var(--wp--preset--color--text, #333333) !important;
    }
*/
    .site-header__nav--sp {
        display: none;
    }

    /* ナビゲーションブロックのオーバーレイコンテナを完全に隠す */
    .site-header .wp-block-navigation__responsive-container,
    .site-header .wp-block-navigation__responsive-container.is-menu-open,
    .site-header .wp-block-navigation__responsive-container.has-text-background-color,
    .site-header .wp-block-navigation__responsive-container-open {
        display: none !important;
    }
}

/* ===== メガメニュー ===== */
/* メガメニュー用ヘッダー */
.mega-menu-header {
    margin-top: 0;
	
	/* 各メニューの高さを低く調整（共通） */
	li.menu-label-line {
		a.mega-menu-link {
			height: auto !important;
			line-height: normal !important;
		}
	}
	
	/* 各メニューの下に下線を入れる（共通） */
	.menu-label-line::after {
		content: '' !important;
		display: block !important;
		height: 10px !important;
		width: 1px !important;
		border-width: 0 !important;
		background-color: var(--wp--preset--color--text);
		margin-block-start: 8px !important;
		margin-left: auto;
		margin-right: auto;
	}
	.menu-label-line:hover::after {
		background-color: var(--wp--preset--color--line-01);
	}
	.mega-toggle-on::after {
		background-color: var(--wp--preset--color--line-01);
		color: var(--wp--preset--color--line-01);
	}
}

.mega-sub-menu {
    box-shadow: 0px 8px 8px 0px rgba(51, 51, 51, 0.2) !important;

    .mega-menu-title {
        font-family: var(--wp--preset--font-family--nanum-myeongjo, serif) !important;
        font-weight: 700;
        display: flex !important;
        justify-content: center !important;

        .mega-menu-title-column li {
            display: flex !important;
            align-items: center;

            img {
                margin: 0 20px;
            }
        }
    }

    .ymmr-mega-menu {
        font-family: var(--wp--preset--font-family--noto-sans-jp) !important;
    }

    ul.mega-sub-menu {
        display: flex !important;
        justify-content: space-between !important;
        box-shadow: none !important;
        column-gap: 20px;

        /* サブメニューの見え方を設定（共通） */
        li.mega-menu-column {

            li.mega-menu-item {
                margin-bottom: var(--wp--preset--spacing--50) !important;

                a {
                    background-repeat: no-repeat !important;
                    /* 繰り返しを無効化 */
                    background-size: cover !important;
                    /* 画像を画面全体に拡大縮小 */
                    background-position: center !important;
                    /* 画像を中央に配置 */
                    aspect-ratio: 3 / 2;

                    /* メニューのテキストを中央に配置（共通） */
                    display: flex !important;
                    justify-content: center !important;
                    align-items: center !important;
                    flex-direction: row-reverse;

                    /* テキストに影を付ける（共通） */
                    text-shadow: var(--text-shadow-light) !important;
                }
            }
        }
    }

    .business-menu-01 {
        a {
            background-image: url('assets/images/mega-menu-business/craft-strengths-02.jpg') !important;
        }
    }

    .business-menu-02 {
        a {
            background-image: url('assets/images/mega-menu-business/build-strengths-04.jpg') !important;
        }
    }

    .business-menu-03 {
        a {
            background-image: url('assets/images/mega-menu-business/plan-strengths-02.jpg') !important;
        }
    }

    .business-menu-04 {
        a {
            background-image: url('assets/images/mega-menu-business/real-estate-mv-img-03.jpg') !important;
        }
    }

    .business-menu-05 {
        a {
            background-image: url('assets/images/mega-menu-business/menu-nurture.jpg') !important;
        }
    }

    .business-menu-06 {
        a {
            background-image: url('assets/images/mega-menu-business/menu-saisei.jpg') !important;
        }
    }

    .works-menu-01 {
        a {
            background-image: url('assets/images/mega-menu-works/menu-live.jpg') !important;
        }
    }

    .works-menu-02 {
        a {
            background-image: url('assets/images/mega-menu-works/menu-study.jpg') !important;
        }
    }

    .works-menu-03 {
        a {
            background-image: url('assets/images/mega-menu-works/menu-nurture-02.jpg') !important;
        }
    }

    .works-menu-04 {
        a {
            background-image: url('assets/images/mega-menu-works/menu-work-02.jpg') !important;
        }
    }

    .works-menu-05 {
        a {
            background-image: url('assets/images/mega-menu-works/menu-care-02.jpg') !important;
        }
    }

    .works-menu-06 {
        a {
            background-image: url('assets/images/mega-menu-works/menu-saisei-02.jpg') !important;
        }
    } 
}

/* ===== メガメニュー微調整（PC） ===== */
@media (min-width: 768px) {
    /* ヘッダーメニューと重ならないよう、パネル開始位置を下にずらす */
    .site-header__nav--pc .max-mega-menu > li.mega-menu-item-has-children > ul.mega-sub-menu {
        margin-top: 24px !important;
    }

    /* タイトル行（アイコン + Business/Works）の横幅崩れを防ぎ、下端で揃える */
    .site-header__nav--pc .max-mega-menu .mega-menu-row.mega-menu-title > ul.mega-sub-menu {
        display: flex !important;
        align-items: flex-end !important;
        justify-content: center !important;
        gap: 14px;
    }

    .site-header__nav--pc .max-mega-menu .mega-menu-row.mega-menu-title > ul.mega-sub-menu > li {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    .site-header__nav--pc .max-mega-menu .mega-menu-row.mega-menu-title img {
        width: 32px !important;
        height: auto !important;
        display: block;
    }

    .site-header__nav--pc .max-mega-menu .mega-menu-row.mega-menu-title .mega-menu-item.widget_text,
    .site-header__nav--pc .max-mega-menu .mega-menu-row.mega-menu-title .mega-menu-item.widget_text .textwidget {
        width: auto !important;
    }

    .site-header__nav--pc .max-mega-menu .mega-menu-row.mega-menu-title .mega-block-title {
        margin: 0 !important;
        white-space: nowrap;
        line-height: 1;
        font-family: var(--wp--preset--font-family--nanum-myeongjo, serif) !important;
        font-size: clamp(2rem, 1.6rem + 0.9vw, 2.6rem) !important;
    }
}

/* ===== 4. Home hero ===== */

/* ヒーロー全体をフルブリードに */
.home-mv {
    position: relative;
    width: var(--yj-vw);
    margin-left: calc(50% - (var(--yj-vw) / 2));
    margin-right: calc(50% - (var(--yj-vw) / 2));
    overflow: hidden;
}

/* 動画コンテナはその中で 100% 幅 */
.home-mv-img {
    position: relative;
    width: 100%;
    aspect-ratio: var(--aspect-ratio-video, 16 / 9);
    min-height: clamp(520px, 72vh, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 背景動画をセクション全体にフィットさせる */
.home-mv-img .wp-block-video {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.home-mv-img .wp-block-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* MV上の手書きメッセージ画像（home_mv_word）の位置とサイズ */
.home-mv-word {
    position: absolute;
    inset: auto 5% 8% auto;
    /* 上はauto、右5%、下8%、左auto */
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
}

@media (max-width: 599px) {
    .home-mv-img {
        min-height: clamp(360px, 62vh, 520px);
    }

    .home-mv-word {
        inset: auto 6% 10% 6%;
    }

    .home-mv-word img {
        max-width: 70%;
    }
}

.home-mv-word img {
    max-width: min(60%, 550px);
    height: auto;
}

.home-mv-overlay,
.home-mv-overay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.home-mv-logo {
    margin-left: max(40px, calc((100vw - var(--wp--custom--content-width)) / 2)) !important;

    img {
        height: 36px;
        width: auto;
    }

    @media (max-width: 768px) {
        padding: 0 20px;
        margin: 0 !important;
        img {
            height: 24px;
            width: auto;
        }
    }
}

/* more movie ボタン（動画上にオーバーレイ） */
.home-mv .more-movie {
    position: relative;
    top: 0;
    right: 0;
    z-index: 30;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);

    /* 余白は元の値を踏襲（必要なら調整） */
    background-color:#ffffffa3;
    padding-top:var(--wp--preset--spacing--30);
    padding-right:var(--wp--preset--spacing--50);
    padding-bottom:var(--wp--preset--spacing--30);
    padding-left:var(--wp--preset--spacing--50);

    @media (max-width: 768px) {
        padding-top:var(--wp--preset--spacing--20);
        padding-right:var(--wp--preset--spacing--40);
        padding-bottom:var(--wp--preset--spacing--20);
        padding-left:var(--wp--preset--spacing--40);
        gap: var(--wp--preset--spacing--20) !important;

        figure img {
            width: 20px !important;
        }
    }
}

.home-mv .more-movie.has-link {
    position: relative;
}

.home-mv .more-movie.has-link > .wp-block-group-vk-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
}

/* 「more / movie」の文字まわり */
.more-movie p {
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.home-hero-nav {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.home-hero-nav__menu {
    font-family: var(--wp--preset--font-family--nanum-myeongjo, serif);
    font-weight: 700;
    justify-content: space-evenly;
    width: 100%;
    gap: 2rem;
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
}

.home-hero-nav__menu .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.home-hero-nav__menu p {
    margin: 0;
    line-height: 1.2;
    font-size: 0.95rem;
}

.home-hero-nav__menu a {
    color: var(--wp--preset--color--text, #333333);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.home-hero-nav__menu a:hover {
    opacity: 0.7;
}

/* セクション見出し（アイコン + タイトル）共通 */
.heading-mobile {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    column-gap: 0.8rem;
    margin-bottom: 1rem;
}

.heading-mobile .wp-block-image,
.heading-mobile figure {
    margin-bottom: 0;
}

#about-us,
#history,
#business,
#works,
#news,
#recruit {
    scroll-margin-top: 110px;
}

@media (max-width: 1280px) {
    .home-hero-nav__menu {
        flex-wrap: wrap !important;
        justify-content: center !important;
        column-gap: 1.5rem;
        row-gap: 0.75rem;
    }

    .home-hero-nav__menu .nav-item {
        flex: 0 0 calc((100% - 3rem) / 3);
        max-width: calc((100% - 3rem) / 3);
    }
}

@media (max-width: 768px) {
    h2.wp-block-heading {
        font-size: 2rem !important;
    }

    .heading-mobile {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        align-self: center;
        width: 100%;
        column-gap: 0;
    }

    .heading-mobile h1,
    .heading-mobile h2,
    .heading-mobile h3,
    .heading-mobile h4,
    .heading-mobile h5,
    .heading-mobile h6 {
        text-align: center !important;
    }


    .home-hero-nav {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .home-hero-nav__menu {
        font-size: 0.875rem;
        gap: 2rem 1rem;
    }

    .home-hero-nav__menu .nav-item {
        gap: 0.125rem;
    }
}

.about-more {
    display: flex;
}

.about-more--center {
    justify-content: center;
}

.about-more__link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--wp--preset--color--text, #333333);
    color: var(--wp--preset--color--text, #333333);
    text-decoration: none;
}

.about-more__text {
    font-family: var(--wp--preset--font-family--nanum-myeongjo, serif);
    font-size: clamp(1.125rem, 0.95rem + 0.35vw, 1.375rem);
    line-height: 1;
}

.about-more__arrow {
    width: 32px;
    height: auto;
    display: block;
}

.home-regeneration-banner {
    margin-top: var(--wp--preset--spacing--80);
    margin-bottom: var(--wp--preset--spacing--60);
}

.home-regeneration-banner__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--wp--preset--spacing--30);
    color: var(--wp--preset--color--text, #333333);
    text-decoration: none;
}

.home-regeneration-banner__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    animation: regeneration-label-loop 5.2s ease-out infinite;
    will-change: clip-path, opacity, transform;
}

.home-regeneration-banner__title {
    width: min(280px, 62vw);
    height: auto;
}

.home-regeneration-banner__arrow {
    width: 32px;
    height: auto;
    display: block;
}

.home-regeneration-banner__illustration {
    width: 100%;
    max-width: 760px;
    height: auto;
}

@keyframes regeneration-label-loop {
    0%,
    12% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
        transform: translateX(-10px);
    }
    36%,
    82% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        clip-path: inset(0 0 0 100%);
        transform: translateX(6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-regeneration-banner__label {
        animation: none;
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: none;
    }
}

@media (max-width: 768px) {
    .about-more {
        justify-content: center;
    }

    .more-mobile {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .about-more__link {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .home-regeneration-banner {
        margin-top: var(--wp--preset--spacing--60);
        margin-bottom: var(--wp--preset--spacing--70);
    }

    .home-regeneration-banner__link {
        gap: var(--wp--preset--spacing--20);
    }

    .home-regeneration-banner__label {
        width: min(50vw, 220px);
        gap: 0.5rem;
    }

    .home-regeneration-banner__title {
        width: 100%;
        max-width: calc(100% - 28px);
    }

    .home-regeneration-banner__arrow {
        width: 20px;
        flex: 0 0 auto;
    }
}

/* ===== Recruit セクション装飾 ===== */
.home-entry-links {
    position: relative;
    overflow: hidden;
}

#recruit {
    position: relative;
}

#recruit .recruit-outside-right {
    display: flex;
    align-items: flex-start;
}

#recruit .home-entry-links__recruit-image {
    min-width: min(55vw, 800px);
    margin-left: auto;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

#recruit .home-entry-links__recruit-image img {
    width: 100%;
    height: auto;
    display: block;
}

.recruit-link-box {
    width: min(58%, 620px);
    margin-top: clamp(-40px, -2vw, -20px) !important;
    margin-left: 0;
    margin-right: auto;
    background: url('./assets/images/home/back-wood-grain.jpg') center/cover no-repeat;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 2;
    padding: var(--wp--preset--spacing--80);
}

.recruit-link-box .wp-block-group.has-link {
    width: 100%;
    justify-content: space-between;
    display: flex;
}

.recruit-link-box p {
    margin: 0;
    line-height: 1.4;
    font-size: clamp(0.95rem, 0.85rem + 0.3vw, 1.05rem);
}

.home-entry-links__contact {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    padding-bottom: var(--wp--preset--spacing--70);
}

.home-entry-links__diagonal {
    position: absolute;
    left: 50%;
    top: -8%;
    transform: translateX(-50%);
    width: min(1450px, calc(var(--yj-vw) * 1.22));
    height: auto;
    z-index: 0;
    pointer-events: none;
}

.home-entry-links__contact-panel {
    width: 100%;
    border: 1px solid rgba(51, 51, 51, 0.8);
    background: transparent;
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
    position: relative;
    z-index: 1;
    gap: 0;
}

.home-entry-links__contact-panel .wp-block-heading {
    margin-bottom: 0;
    line-height: 1.2;
}

.home-entry-links__contact-panel p {
    margin-top: 0;
    line-height: 1.2;
}

@media (max-width: 768px) {
    #recruit .wp-block-columns {
        flex-direction: column !important;
        gap: var(--wp--preset--spacing--40) !important;
    }

    #recruit .wp-block-column {
        flex-basis: 100% !important;
        width: 100%;
    }

    #recruit .home-entry-links__recruit-image {
        width: 100%;
    }

    .recruit-link-box {
        width: 100%;
        margin-top: var(--wp--preset--spacing--40);
        padding: var(--wp--preset--spacing--60) !important;
    }

    .home-entry-links__contact {
        min-height: 220px;
        padding-bottom: var(--wp--preset--spacing--40);
    }

    .home-entry-links__diagonal {
        width: min(980px, calc(var(--yj-vw) * 1.8));
        top: -4%;
    }
}

/* ===== Footer ===== */
.footer-top-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.footer-top-grid > .wp-block-column {
    margin: 0 !important;
}

.footer-brand-area {
    margin-top: var(--wp--preset--spacing--70);
}

.footer-brand-column {
    width: 100%;
}

.footer-logo img {
    width: 240px;
    max-width: 100%;
    height: auto;
}

.footer-company-info {
    margin-top: var(--wp--preset--spacing--50);
}

.footer-top-grid .wp-block-social-links {
    width: 100%;
    justify-content: space-between;
    gap: 0;
}

.footer-top-grid .wp-block-social-links.has-huge-icon-size {
    font-size: 1.75rem;
}

.footer-top-grid .wp-social-link {
    flex: 1 1 0;
    display: flex;
    justify-content: center;
}

.footer-office-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--40);
}

.footer-office-grid > .wp-block-group {
    margin: 0;
}

.footer-bottom-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: var(--wp--preset--spacing--40);
    margin-top: var(--wp--preset--spacing--70);
}

.footer-logo--bottom {
    justify-self: start;
}

.footer-bottom-bar__copy {
    margin: 0;
    justify-self: center;
}

.footer-bottom-bar__privacy {
    margin: 0;
    justify-self: end;
}

@media (max-width: 767px) {
    .footer-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-office-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-bar {
        grid-template-columns: 1fr;
        row-gap: var(--wp--preset--spacing--20);
        justify-items: center;
    }

    .footer-logo--bottom,
    .footer-bottom-bar__copy,
    .footer-bottom-bar__privacy {
        justify-self: center;
    }
}

