/* ★ 追加：.flow-text-groupはFLOWセクションの横並びレイアウト用に
   flex-basis(420px)が設定されているが、このセクション(button-list-label)は
   flex-direction:columnの縦並びのため、その420pxが「高さ」の基準として
   使われてしまい、文章とボタンの間に大きな余白ができる原因になっていました */
.button-list-label .flow-text-group {
    flex: none;
    width: 100%;
    max-width: 900px;
    min-width: 0;
}


/* ★ 追加：CONTACTタイトル */
.contact-title {
    position: relative;
    text-align: center;
    letter-spacing: clamp(2px, 0.4vw, 3px);
    font-size: clamp(44px, 6vw, 80px);
    font-weight: 500;
    line-height: 1.2;
    color: rgb(11, 40, 74);
    font-family: 'Impact';
    margin: clamp(60px, 10vw, 190px) 0 0;
    /* ★ 旧来.contact-themeが持っていた上余白をこちらに移動 */

    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1.4s ease-out, transform 1.4s ease-out;
}

.contact-title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ★ 追加：タイトル下線 */
.section-line-contact-under {
    position: relative;
    width: 15%;
    max-width: 400px;
    min-width: 100px;
    border: none;
    border-top: 4px solid #000000bb;
    margin: 20px auto 0;

    transform: scaleX(0);
    transform-origin: center;
    transition: transform 1.2s ease-out;
}

.section-line-contact-under.is-visible {
    transform: scaleX(1);
}


.contact-theme {
    position: relative;
    text-align: center;
    letter-spacing: 8px;
    font-size: clamp(28px, 4vw, 45px);
    line-height: 1.3;
    font-weight: 700;

    margin-top: 30px;
    /* ★ clamp(60px, 10vw, 190px) → 30pxに縮小。
       上部の大きな余白はタイトル(.contact-title)側に移動したため、
       ここは下線とのすき間だけを確保 */

    font-family: "BIZ UDPMincho", serif;

    opacity: 0;
    transform: translateY(15px);
    transition:
        opacity 1.2s ease-out 0.4s,
        transform 1.2s ease-out 0.4s;
}

.contact-theme.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-theme.is-visible .line1 {
    transition-delay: 0s;
}

.contact-theme.is-visible p {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================
問い合わせ画像
========================================== */

.contact-phot {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.contact-phot img {
    display: block;
    width: min(80%, 800px);
    max-height: 500px;
    /* ★ 追加：画像が読み込めない場合に、
                             HTML側のwidth/height属性の数値分だけ
                             大きな空白ができてしまう事故を防ぐ上限 */
    height: auto;
    margin: 0 auto;
    object-fit: cover;
    /* ★ 追加 */
}

/* ==========================================
問い合わせボタン
========================================== */

.contact-buttons {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 150px;

    width: 100%;
}

/* ==========================================
問い合わせ説明文
========================================== */

.contact-ex {
    position: relative;

    text-align: center;

    letter-spacing: clamp(2px, 0.5vw, 8px);

    font-size: clamp(14px, 2vw, 22px);

    line-height: 1.6;

    font-family: "Shippori Mincho", serif;

    color: #000000;

    font-weight: 900;

    margin: 25px auto 0;

    opacity: 0;

    transform: translateY(15px);

    transition:
        opacity 1.2s ease-out 0.4s,
        transform 1.2s ease-out 0.4s;
}


/* 表示時 */
.contact-ex.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================
説明文のpタグ
========================================== */

.contact-ex p {
    margin: 0;

    opacity: 0;

    transform: translateY(15px);

    transition:
        opacity 1s ease-out,
        transform 1s ease-out;
}


/* 表示時 */
.contact-ex.is-visible p {
    opacity: 1;

    transform: translateY(0);
}

/* ==========================================
スマホ対応
========================================== */

@media (max-width: 768px) {

    .contact-title {
        font-size: clamp(38px, 14vw, 56px);
        margin-top: 60px;
    }

    .section-line-contact-under {
        margin-top: 14px;
    }

    .contact-theme {
        letter-spacing: 4px;
        margin-top: 20px;
    }

    .contact-ex {
        letter-spacing: 2px;
        margin-top: 15px;
    }

    .contact-phot {
        margin-top: 25px;
    }

    .contact-phot img {
        width: 90%;
        max-width: 500px;
    }

    .contact-buttons {
        gap: 30px;
        flex-direction: column;
    }
}