/* About Section Styles */

body {
    background-color: #fff;
    color: #4A4E69;
    padding: 0;
    margin: 0;
}

.color-section{
    background-color: #d7e3e6;
    color: #4A4E69;
    margin: 0;
    padding: 20px;
    margin-top: -20px;
}

/* アクティブボタン（選択中のページ） */

.common-buttons a.active {
    background-color: #d7e3e6;
    border-bottom: none; /* 下辺をなくす */
    color: #4A4E69;
    margin-bottom: -3px; /* ボタンが浮かないように調整 */
}
.about-section {
    padding: 40px 20px;
    margin: 20px auto;
    max-width: 1000px;
}

/* ABOUTセクション */
.about-box {
    display: flex;
    gap: 40px;
    padding: 40px;
    border: 3px solid #4A4E69;
    border-radius: 30px;
    background-color: #fff;
    margin-bottom: 40px;
}

/* 左側のh2 */
.about-box h2 {
    flex-shrink: 0;
    width: 150px; /* タイトルの固定幅 */
    font-size: 3em;
    margin: 0 30px 0 100px;
    display: flex;
    align-items: center;
    text-align: center;
    /* 縦書きを解除 */
    writing-mode: horizontal-tb; /* 横書きに戻す */
    white-space: nowrap; /* 1行で表示 */
}

/* 右側のコンテンツ */
.about-box-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 60px 0 60px;
}

.about-box-content h2 {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 3px solid #4A4E69;
    padding-bottom: 10px;
    margin: 0 0 40px 0;
}

.section-content {
  max-width: 800px;         /* 中央配置のために最大幅を設定 */
  margin: 0 auto;           /* 横方向の中央揃え */
  text-align: left;         /* 左揃え */
  padding: 0 20px;          /* 余白を追加して左右にスペース */
  box-sizing: border-box;
}

.section-content p {
  border-bottom: 1px solid #CDCEDD;
  padding-bottom: 20px;
  line-height: 1.8;
  font-size: 1.2em;
}


/* h3とpのスタイル */
.about-box-content h3 {
    font-size: 2em;
    margin: 0 0 10px;
    white-space: nowrap; /* できるだけ2行以内に */
}

.about-box-content p {
    font-size: 1.2em;
    margin: 0 0 20px;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: break-word; /* 改行を有効に */
    word-break: break-word; /* 長い単語も折り返す */
}

.highlight {
  background-color: #d7e3e6;
  font-weight: bold;
}


/* 会社概要のスタイル */
.company-details {
    flex: 1;
    min-width: 300px;
    padding: 0 20px;
    border: 5px solid #4A4E69;
    font-size: 1.2em;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    align-items: center; /* ボックス内で中央揃え */
}

/* タイトル調整 */
.company-details h2 {
    font-size: 2em; /* より小さくしてabout-box h2に近づける */
    margin: 0 0 40px 0;
    font-weight: bold;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 5px solid #4A4E69; /* 下線追加 */
    padding-bottom: 10px;
}

/* テキストのスタイル */
.company-details p {
    margin: 0 0 15px;
    line-height: 1.8;
    font-size: 1.2em;
    position: relative;
    text-align: left;
    width: 100%;
}

/* 区切り線 */
.company-details p:not(.address)::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #4A4E69;
    margin: 15px 0;
}

/* 特定の行にのみ区切り線を適用 */
.company-details .border {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.company-details .border::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #4A4E69;
    margin-top: 15px;
}

/* 本社所在地の区切り線のみ長く */
.company-details .address::after {
    width: 100%;
}

/* 住所部分 */
.company-details p.address {
    text-align: left;
    padding-left: 5px;
    white-space: nowrap;
}

/* 本社所在地の区切り線 */
.company-details p::after,
.company-details p::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #4A4E69;
    margin: 15px 0;
}

.address-group {
    border-top: 3px solid #4A4E69;
    border-bottom: 3px solid #4A4E69;
    padding: 20px 0;
    margin-bottom: 30px;
}

.company-info {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.company-details {
  width: 90%;
  margin: 40px auto 20px;
  padding: 0;
  border: none;           /* ← 枠線削除 */
  /* background: none;       念のため背景も除去 */
  font-size: 1.2em;
  line-height: 1.8;
}

.company-details h2 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 30px;
  border-bottom: 3px solid #4A4E69;
  padding-bottom: 10px;
}

.company-details dl {
  margin: 0;
  padding: 0;
}

.company-item {
  display: flex;
  border-bottom: 1px solid #CDCEDD;
  padding: 10px 0;
}

.company-item dt {
  width: 140px;
  font-weight: bold;
  flex-shrink: 0;
}

.company-item dd {
  margin: 0;
  padding-left: 1em;
  line-height: 1.8;
  flex: 1;
}


.detail-row {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #4A4E69;
  padding-bottom: 10px;
}

.detail-row .label {
  width: 140px;
  font-weight: bold;
  white-space: nowrap;
}

.detail-row .value {
  flex: 1;
  line-height: 1.6;
}


.company-item {
  margin-bottom: 25px;
}

.company-item .label {
  font-weight: bold;
  font-size: 1.2em;
  /* border-bottom: 2px solid #4A4E69; */
  /* margin-bottom: 8px; */
}

.company-item .value {
  font-size: 1.1em;
  line-height: 1.8;
  margin-left: 1em;
}


/* マップエリアのサイズ調整 */
.map-area {
    flex: 1;
    min-width: 300px;
    border: 1px solid #4A4E69;
    height: 400px; /* ボックスの大きさに合わせて調整 */
    width: 100%;
}

.map-area iframe {
    width: 100%;
    height: 300px; /* ボックスの高さに合わせる */
    border: 0;
}

/* モバイル版だけ改行を表示 */
.mobile-only {
  display: none;
}



/* 狭い画面対応 */
@media (max-width: 768px) {
    .company-details p strong {
        width: auto;
        margin-right: 0;
    }

    .company-details p.address {
        margin-left: 0;
    }
}

/* ==============================
   Responsive Styles (スマホ対応)
============================== */
@media (max-width: 768px) {

    .about-box {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .about-box h2 {
        width: 100%;
        font-size: 2.5em;
        margin: 0 0 20px 0;
        text-align: center;
    }

    .about-box-content {
        width: 100%;
        margin-left: 0;
        padding: 0;
    }

    .about-box-content h3 {
        font-size: 1.8em;
        margin: 0 0 10px 0;
        white-space: normal;
    }

    .about-box-content p {
        font-size: 1.2em;
        margin: 0 0 20px 0;
        line-height: 1.8;
        word-wrap: break-word;
        word-break: break-word;
    }

    .company-info {
        flex-direction: column;
    }

    .company-details {
        width: 100%;
        padding: 0;
        margin-bottom: 20px;
        margin: 0 40px 0 -10px;
        box-sizing: border-box;
        border: none; /* ボーダーを削除 */
    }

    .company-details h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
        border-bottom: 2px solid #4A4E69;
        padding-bottom: 10px;
        text-align: center;
        font-weight: 900; /* タイトルをさらに濃く */
    }

    .company-details p {
        font-size: 1em;
        margin: 0;
        line-height: 1.8;
        width: 100%;
        padding-left: 0;
        padding-bottom: 10px;
        border-bottom: 2px solid #4A4E69;
    }

    .company-details p:last-child {
        border-bottom: none;
    }

    .company-details .address {
        white-space: normal;
    }

    .company-details .border {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .company-details .border::after {
        width: 40%;
        height: 2px;
        background-color: #4A4E69;
        margin-top: 15px;
        content: "";
        display: block;
    }

    .company-details .title {
        font-weight: bold;
        margin-bottom: 5px;
        border-bottom: 2px solid #4A4E69;
        padding-bottom: 5px;
        width: 100%;
    }

    .company-details .content {
        padding-bottom: 15px;
        border-bottom: 2px solid #4A4E69;
        margin-bottom: 15px;
    }

    .company-details .address-title {
        margin-top: 10px;
    }

    .company-details .address-content {
        margin-bottom: 15px;
        border-bottom: 2px solid #4A4E69;
        padding-bottom: 15px;
    }

    .section-content {
        padding: 0 15px;
        max-width: 100%;
    }

    .section-content p {
        font-size: 1em;
        line-height: 1.6;
        padding-bottom: 15px;
    }

    .company-item {
        padding: 5px 10px;
        display: flex;
        flex-wrap: wrap; /* 行が長いと折り返せるように */
        gap: 5px; /* ラベルと値の間の余白を調整 */
    }

    .company-item dt {
        width: auto;
        min-width: 90px; /* 最小限の横幅確保 */
        font-size: 1em;
    }

    .company-item dd {
        margin: 0;
        padding-left: 0;
        font-size: 1em;
    }

    .mobile-only {
        display: inline;
    }

}
