

.haikei_max2  {
    width: 100%;
    min-height: 950px; 
    height: auto;
    overflow: hidden; /* 画像がはみ出さないように隠す */
    background-image: url(./img/campany.png); /* 背景画像 */
    background-size: 100% auto; /* 横幅100%、縦は自動調整 */
    background-position: center; /* 画像の中心を親要素の中心に合わせる */
    background-repeat: no-repeat; /* 画像が繰り返し表示されないように */
    position: relative; /* 内容を画像の上に配置するため */
    background-color: #f5f5f5;
}

.haikei_max2 > img {
    width: 100%;
    height: auto;
    display: block;
}

.company-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column; /* 縦並びに */
    align-items: center; /* 水平方向の中央 */
    text-align: center;
    padding: 30px;
    max-width: 90%;
    width: 90%;
}

.company-title {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

/* 会社概要のスタイル */
.company-title h2 {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    display: inline-block;
    padding-bottom: 10px;
    position: relative;
}

/* 会社概要の下に黒線を引く */
.company-title h2::after {
    content: "";
    display: block;
    width: 100%; /* h2の幅に合わせる */
    height: 3px; /* 線の太さ */
    background-color: black; /* 黒色の線 */
    position: absolute;
    bottom: 0;
    left: 0;
}

/* 会社概要の説明と画像のレイアウト */
.company-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px; /* テキストと画像の間隔 */
    width: 100%;
}

.company-role {
    width: 55%;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 縦方向で中央揃え */
    margin-top: -100px;
    }

.company-role h2 {
    text-align: center;
}
.company-image2 {
    width: 40%;
    height: auto; /* 画像の縦横比を維持 */
    object-fit: contain; /* 画像の内容が収まるように */
}

/* Moreリンクのスタイル */
.more-link2 {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.more-link2 a {
    text-decoration: none;
    font-size: 18px;
    color: #333;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    background-image: linear-gradient(to right, #b69917, #050505);
    background-clip: text;
    -webkit-background-clip: text;
    transition: color 0.3s ease;
}

.more-link2 a:hover {
    color: transparent;
    background-image: linear-gradient(to right, #665013, #d8a90d);
}


@media screen and (max-width: 768px) {
    .haikei_max2 > img {
        height: 160px;
        object-fit: cover;
    }

    .company-content {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        padding: 10px;
        max-width: 100%;
        width: 100%;
    }

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

    .company-title h2 {
        font-size: 22px;
        padding-bottom: 6px;
    }

    .company-main {
        flex-direction: column;
        gap: 18px;
        align-items: stretch;
    }

    .company-role {
        width: 100%;
        margin-top: 0;
        text-align: left;
    }

    .company-role h2 {
        text-align: left;
        font-size: 18px;
    }

    .company-image2 {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        display: block;
    }

    .more-link2 {
        position: static;
        transform: none;
        margin-top: 18px;
        margin-bottom: 10px;
        text-align: center;
    }

    .more-link2 a {
        font-size: 15px;
    }
}

/* ...既存のコード... */

@media screen and (max-width: 768px) {
    .haikei_max3 > img {
        height: 160px;
        object-fit: cover;
    }

    .message-content3 {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        padding: 10px;
        max-width: 100%;
        width: 100%;
        gap: 12px;
    }

    .message-title h2 {
        font-size: 22px;
        padding-bottom: 6px;
    }

    .role-title h3 {
        font-size: 18px;
        margin-top: 10px;
        margin-bottom: 6px;
    }

    .message-image3 {
        width: 100%;
        max-width: 320px;
        height: 160px;
        margin: 0 auto;
    }

    .message-line {
        flex-direction: column;
        gap: 8px;
        margin: 12px 0;
    }

    .message-line p {
        font-size: 15px;
        padding: 8px 10px;
        max-width: 100%;
    }

    .line,
    .left,
    .right {
        display: none;
    }

    .more-link3 {
        position: static;
        transform: none;
        margin-top: 18px;
        margin-bottom: 10px;
        text-align: center;
    }

    .more-link3 a {
        font-size: 15px;
    }

    .message-role p {
        font-size: 15px;
        padding: 8px 10px;
        max-width: 100%;
    }
}

@media screen and (max-width: 600px) {
    .company-main h2 {
        text-align: center;
    }
}