/* ===== 全体レイアウト ===== */
.company-profile {
    text-align: center;
    font-family: "Zen Kaku Gothic New", sans-serif;
}

/* ===== 上部画像スペース ===== */
.company-hero {
    width: 100%;
    height: 600px;
    background-color: #f0f0f0;
}

/* ===== コンテンツ内側エリア ===== */
.company-inner {
    padding: 0 180px;
    box-sizing: border-box;
}

/* ===== タイトルカード ===== */
.company-title-card {
    position: relative;
    width: 640px;
    height: 200px;
    background-color: white;
    border-radius: 20px;
    margin: -100px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.title-jp {
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-size: 40px;
    font-weight: bold;
    margin-bottom: 18px;
    color: #222;
}

.title-en {
    font-family: "Ubuntu", sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #2B9B7D;
}

/* ===== 会社概要セクション ===== */
.company-section {
    margin: 0 auto 80px;
    max-width: 100%;
}

.company-section h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 40px;
    line-height: 1.8;
}

/* ===== テーブルデザイン ===== */
.company-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    text-align: center;
    overflow-x: auto;      /* 狭い画面でスクロール */
    white-space: nowrap;   /* 改行しない */
}

.company-table th,
.company-table td {
    font-size: 16px;
    padding: 16px 12px;
    text-align: left;
    border-left: none;
    border-right: none;
}

.company-table th {
    background-color: #F4F4F4;
    width: 20%;
    font-weight: 500;
    padding-left: 80px;
    border-top: 1px solid #FFFFFF;
    border-bottom: 1px solid #FFFFFF;
}

.company-table td {
    width: 80%;
    font-weight: 500;
    padding-left: 60px;
    border-top: 1px solid #DBDADA;
    border-bottom: 1px solid #DBDADA;
}

/* フリーダイヤルだけ特別デザイン */
.company-table tr:nth-child(5) td {
    font-family: 'Ubuntu', sans-serif;
    font-weight: bold;
    font-size: 20px;
    color: #2B9B7D;
}

/* ===== 会社概要テーブル下の画像スペース ===== */
.company-images {
    margin-top: 60px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
    box-sizing: border-box;
}

.company-image-block {
    width: 280px;
    text-align: left;
}

.company-image {
    width: 100%;
    aspect-ratio: 280 / 200; /* 横280 : 縦200 */
    background-color: #f4f4f4;
    background-size: cover;
    background-position: center;
}

/* 担当事務所タイトル */
.office-name {
    font-size: 18px;
    font-weight: 500;
    margin-top: 18px;
    margin-bottom: 6px;
    color: #222222;
}

/* 住所（アイコン付き） */
.office-address {
    font-size: 16px;
    font-weight: 500;
    color: #222222;
    display: flex;
    align-items: center;
    gap: 6px;
}

.office-address i {
    color: #2B9B7D;
}

/* ===== 代表メッセージ全体ブロック ===== */
.company-message {
    width: 100vw;
    background-color: #F4F4F4;
    padding: 80px 180px;
    position: relative;
    left: 50%;
    right: 50%;
    margin-top: 250px; /* 上部余白を確保 */
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
    text-align: left;
}

/* ===== 代表メッセージ 吹き出しタイトル ===== */
.message-title-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 50px;
    position: relative;
    border: 2px solid #000000;
    border-radius: 40px;
    padding: 16px 40px;
}

.message-title {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    margin: 0;
}

/* ===== Message（大見出し） ===== */
.message-subtitle {
    font-family: 'Ubuntu', sans-serif;
    font-weight: bold;
    font-size: 80px;
    color: #000000;
    margin: 10px 0 70px;
    line-height: 1;
}

/* --- 画像＋本文を横並び（2等分） --- */
.message-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
}

.message-photo {
    flex: 0 0 50%;
    text-align: left;
}

.message-image {
    width: 100%;
    aspect-ratio: 586 / 390;
    background-color: #f4f4f4;
    background-size: cover;
    background-position: center;
}

.message-name {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.message-text {
    flex: 0 0 50%;
    text-align: left;
    padding-left: 60px;
    box-sizing: border-box;
}

.message-text p {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.9;
    color: #222222;
    margin-bottom: 24px;
}

/* ===== レスポンシブ対応 ===== */

/* タブレット（520px〜959px） */
@media (min-width: 520px) and (max-width: 959px) {

    .company-inner {
        padding: 0 60px;
    }

    .company-images {
        gap: 24px;
        justify-content: center;
    }

    .company-image-block {
        width: 260px;
    }

    .company-image {
        width: 100%;
        aspect-ratio: 280 / 200;
    }

    .office-name {
        font-size: 16px;
    }

    .office-address {
        font-size: 14px;
    }

    .company-title-card {
        width: 80%;
        height: 180px;
        margin-top: -80px;
    }

    .title-jp {
        font-size: 32px;
    }

    .title-en {
        font-size: 16px;
    }

    .company-section h2 {
        font-size: 20px;
    }

    .company-table th,
    .company-table td {
        font-size: 14px;
        padding: 10px 8px;
    }

    .company-table th {
        padding-left: 20px;
    }

    .company-table td {
        padding-left: 12px;
    }

    .company-message {
        padding: 60px 40px;
        margin-top: 200px;
    }

    .message-content {
        flex-direction: row;
        gap: 24px;
    }

    .message-text {
        padding-left: 40px;
    }
}

/* スマートフォン（〜519px） */
@media (max-width: 519px) {

    .company-inner {
        padding: 0 20px;
    }

    .company-hero {
        height: 240px;
    }

    .company-title-card {
        width: 90%;
        height: 150px;
        margin: -60px auto 40px;
    }

    .title-jp {
        font-size: 26px;
    }

    .title-en {
        font-size: 14px;
    }

    .company-section h2 {
        font-size: 16px;
        margin-bottom: 24px;
    }

    /* テーブル縦型化＋左右30px余白 */
    .company-table {
        display: block;
        width: calc(100% - 60px);
        margin: 0 auto;
        overflow-x: hidden;
        white-space: normal;
        padding: 0;
        box-sizing: border-box;
    }

    .company-table tr {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
        padding: 8px 16px;   /* 上下8px、左右16pxの余白 */
        text-align: left;
        border: none;
        box-sizing: border-box;
    }

    .company-table th {
        font-size: 16px;
    }

    .company-table td {
        font-size: 16px;
    }

    .company-table tr:nth-child(5) td {
        font-size: 16px;
        line-height: 1.4;
    }

    .company-images {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .company-image-block {
        width: 90%;
        text-align: center;
    }

    .company-image {
        width: 100%;
        aspect-ratio: 280 / 200;
    }

    .office-address {
        justify-content: center;
        font-size: 13px;
    }

    .company-message {
        padding: 50px 20px;
        margin-top: 180px;
    }

    .message-content {
        flex-direction: column;
        gap: 40px;
    }

    .message-photo,
    .message-image {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .message-title {
        text-align: left;
        margin-bottom: 0;
    }

    .message-subtitle {
        font-size: 42px;
        margin-bottom: 30px;
    }

    .message-text {
        padding-left: 0;
    }

    .message-name {
        text-align: center;
    }
}
