/* ========== COMPANY (共通) ========== */
.company-sub .header {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.container-m {
    max-width: 1072px;
    margin: 0 auto;
}

.company-section {
    padding: clamp(80px, 10vw, 160px) 0;
}

.section-hedding .h2-title-jp {
    margin-bottom: clamp(48px, 10vw, 80px);
}

.section-hedding .company-section-title {
    margin: 0 0 clamp(40px, 5vw, 64px);
}

/* ========== COMPANY (sub) minimal ========== */
.company-header {
    position: relative;
    overflow: hidden;
    top: -64px;
    margin-bottom: -64px;
}

/* ヒーロー（company-header） TOP*/
.company-header--top .company-header__inner {
    position: relative;
    padding: clamp(120px, 20vw, 220px) 24px clamp(16px, 5vw, 40px);
}

.company-header__label {
    margin-bottom: 8px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.company-header__heading {
    margin-bottom: clamp(48px, 10vw, 80px);
    font-size: clamp(40px, 7vw, 96px);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.company-header--company.company-header--top .company-header__heading {
    margin-bottom: clamp(48px, 10vw, 80px);
    font-size: clamp(40px, 7vw, 96px);
    position: relative;
    z-index: 1;
}

/* 背景レイヤ */
.company-header__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    text-align: right;
}

.company-header__bg-img img {
    width: auto;
    height: 100%;
    object-fit: contain;
}

@media screen and (max-width: 768px) {

    .company-header__bg-img img,
    .company-header__bg-img source {
        object-fit: cover;
        position: relative;
        top: 100px;
    }

    .company-sub .company-header__bg-img img {
        top: 0;
    }
}

/* バリエーション */
.company-header--company.company-header--top {
    background: var(--color-light-gray);
}

.hero-sidebar--company {
    background: transparent;
    border-bottom: 1px solid rgb(0 0 0 / 10%);
}

.hero-sidebar--company .hero-sidebar__inner {
    padding: clamp(120px, 20vw, 220px) 24px clamp(40px, 10vw, 96px);
}

@media screen and (max-width: 767px) {
    .hero-sidebar--company .hero-sidebar__inner {
        padding-bottom: clamp(56px, 15vw, 96px);
    }
}


/*==============================================================
/ 　company-sub コンテンツ
/==============================================================*/

/* =====共通Layout ===== */
.company-sub__grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(40px, 5vw, 72px);
    align-items: stretch;
    overflow: visible;
}

.company-sub__grid.sidebar-pc-false {
    grid-template-columns: 1fr;
}

.company-sub__grid.sidebar-false {
    grid-template-columns: 1fr;
}

@media screen and (max-width: 1024px) {
    .company-sub__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.company-sub.no-sidebar .company-sub__grid {
    grid-template-columns: 1fr;
}

/* ===== Sidebar ===== */
.company-sidebar {
    --sidebar-arrow-bg: url(../images/company/simple-arrow.svg);
}

.company-sidebar__list li.is-sub a {
    padding-left: 1.25rem;
    font-size: 0.95em;
    opacity: .9;
}

@media screen and (max-width: 1024px) {
    .company-sidebar {
        position: relative;
        top: -45px;
        margin-bottom: -45px;
    }
}


.company-cards {
    padding: clamp(80px, 10vw, 160px) clamp(20px, 5vw, 80px);
}

/* カードグリッド（会社トップでも共用できる軽量版） */
.company-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(40px, 10vw, 48px) clamp(24px, 5vw, 32px);
}

.company-card-grid .thumb {
    overflow: hidden;
    display: block;
    margin: 0;
}

.company-card-grid .thumb img {
    transition: var(--transition);
    display: block;
    width: 100%;
    margin: 0;
}

@media (hover: hover) and (pointer: fine) {
    .company-card-grid .thumb:hover img {
        transform: scale(1.05);
    }
}

.company-card__label {
    font-size: clamp(18px, 2vw, 20px);
    font-weight: 500;
    transition: var(--transition);
    margin-top: 32px;
}

.company-card .btn-arrow {
    color: var(--color-text);
    margin-top: 20px;
    margin-inline: auto 0;
}

@media (hover: hover) and (pointer: fine) {
    .company-card__link:hover .company-card__label {
        color: var(--color-red) !important;
    }
}

@media screen and (max-width: 767px) {
    .company-card-grid {
        grid-template-columns: 1fr;
    }

    .company-card .btn-arrow {
        display: flex;
        align-content: unset;
        justify-content: unset;
    }
}

/*==============================================================
/ company-about
/==============================================================*/
.company-about {
    display: flex;
    flex-direction: column;
    gap: clamp(80px, 10vw, 120px);
}

/* ----- 企業情報テーブル（DL） ----- */
.company-about__table {
    border-top: 1px solid #e6e6e6;
}

.company-about__table .row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
}


.company-about__table .row.row--licenses {
    border-bottom: none;
}

.company-about__table dt {
    font-weight: 700;
    font-size: clamp(15px, 2vw, 16px);
}

.company-about__table dd {
    margin: 0;
    font-weight: 400;
    line-height: 1.8;
}

/* 経営陣の複数行 */
.company-execs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.company-execs .role {
    display: inline-block;
    min-width: 6.5em;
    margin-right: 32px;
}

/* 所在地：住所 + 地図 */
.row--address dd {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px 24px;
    align-items: start;
}

.address-block .addr-heading {
    margin: 0 0 6px;
}

.address-block address {
    font-style: normal;
    margin-bottom: 24px;
}

.map-link {
}

.map-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 14px;
    text-decoration: none;
}

.map-link .icon-square {
    width: 24px;
    height: 24px;
    display: inline-block;
    background: url("../images/icon-arrow-ex.svg") no-repeat center/contain;
}

.biz-content span {
    display: inline-block;
    margin-right: 16px;
}

.biz-content .arrow-s {
    margin-left: 8px;
}

/* 登録認定（リスト） */
.row--licenses .licenses-list {
    display: grid;
    gap: 18px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.row--licenses .licenses-list li {
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    padding-bottom: 24px;
}

.row--licenses .licenses-list li:last-of-type {
    border-bottom: none;
}

.license-title {
    font-weight: 400;
    margin-bottom: 32px;
}

.pair-left .license-title {
    margin-bottom: 0;
}

.license-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 16px;
}

.license-grid div {
    display: flex;
    gap: clamp(4px, 1vw, 24px);
}

.license-grid .pref {
    display: inline-block;
    min-width: 67px;
}

.license-grid .license-num {
    display: inline-block;
    min-width: 192px;
}


.pair-left {
    display: flex;
    gap: 24px;
    flex-wrap: nowrap;
    align-items: center;
}

.pair-left .license-title {
    min-width: 187px;
}

.license-pair .license-detail {
    flex-grow: 1;
}

.license-pair .pair-right img {
    width: 100%;
    max-width: 296px;
    height: auto;
    display: block;
}

/* ----- 経営陣（カード） ----- */
.company-team {
    border-top: 1px solid rgba(0, 0, 0, .3);
    padding-top: clamp(24px, 3vw, 40px);
}

.company-team__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: clamp(32px, 5vw, 48px) clamp(12px, 2vw, 32px);
    margin-top: 20px;
}

.company-team__card {
    background: #fff;
}

/* PC環境で監査役の前で改行 */
.company-team__card.break-before {
    grid-column: 1;
}

.company-team__thumb {
    aspect-ratio: 4/3;
    background: #f2f5f7;
    overflow: hidden;
    border-radius: 4px;
}

.company-team__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.company-team__role {
    margin: 10px 0 4px;
    color: #7a7a7a;
    font-size: clamp(11px, 1vw, 12px);
}

.company-team__name {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 500;
    font-size: clamp(16px, 2vw, 18px);
}

.company-team__card .btn-arrow {
    margin-inline: auto 0;
}

.company-team__card .btn-arrow span {
    color: var(--color-text);
}

/* ========== Responsive ========== */
@media (max-width: 1120px) {
    .company-about__table .row {
        grid-template-columns: 160px 1fr;
    }

    .row--address dd {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .company-team__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .company-about__table .row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .company-execs {
        grid-template-columns: 1fr;
    }

    .license-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .license-grid div {
        flex-direction: column;
    }

    .license-pair {
        grid-template-columns: 1fr 120px;
    }

    .pair-left {
        flex-direction: column;
        gap: 0;
        align-items: start;
    }

    .license-pair .pair-right img {
        max-width: 257px;
    }

    .license-pair .license-detail,
    .pair-left .license-title {
        margin-bottom: 16px;
    }

    .company-team__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* ========== 登録認定番号　アコーディオン（SPのみ） ========== */

/* スマホだけ開閉（PCは常に開） */
@media (max-width: 767px) {
    .js-acc-btn {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .js-acc-btn .acc-icon {
        width: 16px;
        height: 16px;
        transition: transform 0.3s ease;
    }

    .js-acc-btn[aria-expanded="true"] .acc-icon {
        transform: rotate(180deg);
        /* 開いたときに上向き */
    }

    .js-acc-panel {
        overflow: hidden;
        max-height: 0;
        /* 閉じた状態 */
        opacity: 0;
        transition: max-height .45s ease, opacity .45s ease;
        will-change: max-height, opacity;
    }

    .js-acc-panel.is-open {
        /* 開くときは JS が max-height を動的に設定します */
        opacity: 1;
    }
}

/* PCは常に開 */
@media (min-width: 768px) {
    .js-acc-panel {
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible;
    }

    .acc-icon {
        display: none;
    }
}


/* ========== 経営陣紹介モーダル ==========*/
.member-modal[hidden] {
    display: none;
}

.member-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
}

.member-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.3);
}

.member-modal__dialog {
    position: relative;
    background: #fff;
    width: min(92vw, 800px);
    max-height: 90vh;
    overflow: auto;
    border-radius: var(--radius-md);
    padding: clamp(48px, 10vw, 64px) clamp(20px, 5vw, 80px);
}

.member-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
}

.member-modal__close img {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}

.member-modal__close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.member-modal__close:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
    background: rgba(0, 0, 0, 0.05);
}


.member-modal__thumb img {
    width: 180px;
    height: 180px;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    margin-inline: auto;
    margin-bottom: 32px;
}

.member-modal__role {
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    color: rgba(20, 20, 20, .5);
    margin-bottom: 4px;
}

.member-modal__name {
    color: var(--color-text);
    margin-bottom: 32px;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

.member-modal__bio {
    color: var(--color-text);
    font-weight: 400;
    font-size: 14px;
    line-height: 180%;
    text-align: justify;
}



/*==============================================================
/ company-philosophy
/==============================================================*/

.company-philosophy__section {
    margin-bottom: 80px;
}

.company-philosophy__grid {
    display: flex;
    align-items: flex-start;
    gap: 40px;

    @media (max-width: 768px) {
        flex-direction: column;
        gap: 20px;
    }
}

.philo-2col {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: clamp(40px, 10vw, 100px);
    align-items: start
}


/* 固定svg */
.philo-visual {
    position: sticky;
    top: 168px
}

@media screen and (max-width: 1024px) {
    .philo-2col {
        grid-template-columns: 1fr;
    }

    .philo-visual {
        position: static;
    }
}

.philo-visual svg {
    width: 100%;
    height: auto;
    display: block;
    shape-rendering: geometricPrecision;
    text-rendering: geometricPrecision;
    image-rendering: optimizeQuality;
}

.philo-visual svg-ttl {
    font-family: var(--font-latin);
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    line-height: 100%;
    text-align: center;
    letter-spacing: -0.03em;
    color: #FFFFFF;
}

svg #mission,
svg #vision,
svg #value {
    shape-rendering: geometricPrecision;
    vector-effect: non-scaling-stroke;
}

/* テキスト */
.company-philosophy__body {
    flex: 1;
}

.company-philosophy .company-section-title {
    margin-bottom: 12px;
}

.company-philosophy__text {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 5vw, 32px);
}

.company-philosophy__text p {
    margin: 0;
    line-height: 1.8;
    text-align: justify;
}

.company-philosophy__values {
    margin: 16px 0;
    padding-left: 1em;
    list-style: disc;
}

/*==============================================================
/  company-message
/==============================================================*/
.company-message-image {
    margin-bottom: clamp(48px, 10vw, 120px);
}

.company-message-image img {
    width: 100%;
    height: auto;
}

.single-message .company-section {
    padding-bottom: clamp(80px, 10vw, 120px);
}

.company-message .company-section-title--sub {
    margin-bottom: clamp(32px, 5vw, 48px);
    font-size: clamp(24px, 5vw, 32px);
}

.company-message p {
    margin-bottom: clamp(20px, 5vw, 24px);
}

.company-message__author {
    width: fit-content;
    margin-inline: auto 0;
    margin-top: clamp(28px, 5vw, 40px);
}

.company-message__author .role {
    font-weight: 400;
    font-size: 14px;
    margin-right: 8px;
}

.company-message__author .name {
    font-weight: 500;
    font-size: 18px;
}

.company-philosophy-wrap {
    border-top: 1px solid rgba(0, 0, 0, .3);
    padding: clamp(24px, 3vw, 40px) 0 clamp(40px, 5vw, 60px);
}

/*==============================================================
/  company-history
/==============================================================*/
/* ===============================
   COMPANY — HISTORY (article only)
   =============================== */
.company-history {
    --c-black: #111;
    --c-gray-900: #1d1d1f;
    --c-gray-700: #4b4b4f;
    --c-gray-400: #b9bdc6;
    --c-gray-200: #e9ebef;
    --c-accent: #C50018;
    --fz-h2: clamp(28px, 2.6vw, 56px);
    --fz-lead: clamp(15px, 1.4vw, 16px);
    color: var(--c-black);
}

.company-history .company-section-title {
    font-size: clamp(32px, 4vw, 80px);
    margin-bottom: 40px;
    font-weight: 600;
    line-height: 1;
    font-family: var(--font-latin);
}

/* ========== STORY ========== */

.company-history .company-story__grid {
    display: grid;
    grid-template-columns: 1fr minmax(400px, 1fr);
    gap: clamp(80px, 10vw, 120px);
    align-items: start;
}

.company-history .company-story__images {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.company-history .company-story__images figure {
    margin: 0;
    overflow: hidden;
}

.company-history .company-story__images img {
    display: block;
    width: 100%;
    height: auto;
}

.company-story__text-body p {
    margin-bottom: 24px;
}

/* ========= Responsive ========= */

@media (max-width: 900px) {
    .company-history .company-story__images {
        grid-area: images;
    }

    .company-history .company-story__text {
        grid-area: text;
    }

    .company-history .company-story__grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "images";
        gap: 28px;
    }
}

@media (max-width: 560px) {
    .company-history .company-story__images {
        gap: 18px;
    }

}

/* ========== HISTORY ========== */
.company-history__history {
    margin-top: clamp(56px, 7vw, 96px);
}

.company-history__history .history-timeline {
    --line-x: 32px;
    --line-color: rgba(0, 0, 0, .1);
    --dot-outer: #F7EDEE;
    --dot-inner: var(--color-red);
    position: relative;
    padding-left: calc(var(--line-x) + 32px);
}

/* 縦ライン */
.company-history__history .history-timeline::before {
    content: "";
    position: absolute;
    left: var(--line-x);
    top: 48px;
    bottom: 0;
    width: 1px;
    background: var(--line-color);
}

.company-history__history .history-year {
    display: grid;
    grid-template-columns: 130px 70px 1fr;
    column-gap: clamp(16px, 3vw, 28px);
    row-gap: clamp(16px, 2vw, 20px);
    padding: 40px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    position: relative;
}

/* 年ラベル */
.company-history__history .history-year__head {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    line-height: 1;
}

/* 年マーク */
.company-history__history .history-year__head::before,
.company-history__history .history-year__head::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    left: calc(var(--line-x) * -1 + -12px);
    /* → 左余白 = -(ライン位置) - (外円半径)  */
}

.company-history__history .history-year__head::before {
    /* 外円 */
    width: 24px;
    height: 24px;
    background: var(--dot-outer);
    box-shadow: 0 0 0 2px #FFE7EB inset;
}

.company-history__history .history-year__head::after {
    /* 内円*/
    width: 8px;
    height: 8px;
    top: calc(var(--line-x) / 4);
    left: calc(var(--line-x) * -1 + -4px);
    background: var(--dot-inner);
}

/* 月＋項目 */
.company-history__history .history-row {
    grid-column: 1 / -1;
    display: contents;


}

@media (max-width: 768px) {

    .company-history__history .history-year__head {
        margin-bottom: 24px;
    }
    .company-history__history .history-year {
        display: block;
    }

    .company-history__history .history-row {
        grid-column: unset;
        display: grid;
        justify-self: left;
        gap: 1rem;
        grid-template-columns: auto 1fr;
        margin-bottom: 16px;
    }

    .company-history__history .history-timeline {
        padding-left: calc(var(--line-x) + 14px);
    }
    .company-history__history .history-timeline::before {
        left: 14px;
    }
}
/*PCのみ */
@media (min-width: 767px) {

    /* 月 */
    .company-history__history .history-row__month {
        grid-column: 2;
        color: var(--color-text);
        line-height: 1.8;
        white-space: nowrap;
    }

    /* 項目 */
    .company-history__history .history-row__text {
        grid-column: 3;
        color: var(--color-text);
        line-height: 1.8;
        text-align: justify;
    }
}
/* レスポンシブ：1024px以下も3カラムを維持（画像に忠実） */
/*@media (max-width: 1024px) {*/
/*    .company-history__history .history-timeline {*/
/*        --line-x: 6px;*/
/*        padding-left: 24px;*/
/*    }*/

/*    .company-history__history .history-timeline::before {*/
/*        top: 40px;*/
/*    }*/

/*    !* 年マーク *!*/
/*    .company-history__history .history-year__head::before,*/
/*    .company-history__history .history-year__head::after {*/
/*        top: calc(var(--line-x) * -1 + 6px);*/
/*        left: calc(var(--line-x) * -1 + -24px);*/
/*        !* → 左余白 = -(ライン位置) - (外円径)  *!*/
/*    }*/

/*    .company-history__history .history-year__head::after {*/
/*        top: calc(var(--line-x) * -1 + 14px);*/
/*        left: calc(var(--line-x) * -1 + -16px);*/
/*    }*/

/*    .company-history__history .history-year {*/
/*        grid-template-columns: 1fr;*/
/*        row-gap: 16px;*/
/*        column-gap: 0;*/
/*        padding: 20px 0;*/
/*    }*/

/*    .company-history__history .history-row__month {*/
/*        grid-column: 1;*/
/*    }*/

/*    .company-history__history .history-year__head {*/
/*        width: max-content;*/
/*        padding-left: 10px;*/
/*    }*/

/*    .company-history__history .history-row {*/
/*        padding-left: 10px;*/
/*    }*/

/*    .company-history__history .history-row__month,*/
/*    .company-history__history .history-row__text {*/
/*        font-size: 13px;*/
/*        line-height: 1.8;*/
/*        padding-bottom: 10px;*/
/*    }*/

/*}*/

/* SP環境では改行を解除 */
@media (max-width: 768px) {
    .company-team__card.break-before {
        grid-column: auto;
    }
}
