@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Yomogi&display=swap');

/* デザインシステム変数 */
:root {
    --voice-color-yellow: #f4d000;
    --voice-color-green: #769147;
    --voice-color-gray-bg: #f5f5f5;
    --voice-color-text: #333333;
    --voice-color-white: #ffffff;
    --voice-color-marker: rgba(244, 208, 0, 0.4);
    --voice-font-main: "DNPShueiGoGinStd-M", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", "sans-serif";
    --voice-font-handwriting: 'Yomogi', cursive;
}

/* ==========================================
   共通レイアウト崩れ対策・他社CSS干渉リセット
   ========================================== */

/* 1. 全体コンテナの親要素（#maincontent）の横幅制約を完全に解除し、1200px幅を維持する */
body.detail #maincontent,
#maincontent {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* 2. common.css の img { margin: auto; } による flex 子要素（チャットバブルアイコンなど）の縮み・レイアウト崩れを防止 */
.voice-container img {
    margin: 0 !important;
}

/* 3. チャットバブルのアイコン画像に対する個別のマージン・表示リセット */
.voice-chat-bubble__icon {
    display: inline-block !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    max-width: none !important;
}

/* 4. common.css / uniq.css の ul / li の余計な padding / margin / border リセット */
.voice-container ul,
.voice-container li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: none !important;
    background: none !important;
}

/* 共通スタイル */
.voice-container {
    font-family: var(--voice-font-main);
    color: var(--voice-color-text);
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    /* スマホでは左右余白を少し詰めてメイン幅を確保 */
}

@media (min-width: 768px) {
    .voice-container {
        padding: 20px;
    }
}

.voice-section {
    margin-bottom: 40px;
    /* スマホではセクション余白を少しコンパクトに */
}

@media (min-width: 768px) {
    .voice-section {
        margin-bottom: 60px;
    }
}

.voice-marker {
    background: linear-gradient(transparent 60%, var(--voice-color-marker) 60%);
    font-weight: bold;
}

.voice-card {
    background: var(--voice-color-white);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

/* 1. ヒーローセクション */
.voice-hero3,
.voice-hero4 {
    position: relative;
    width: 100%;
    height: auto;
    /* スマホでは高さを自動にし、中身に応じて伸びるようにする */
    display: flex;
    flex-direction: column;
    /* 縦並びにする */
    margin-bottom: 30px;
}

/* 疑似要素でスマホ専用の「独立した写真エリア」を作る */
.voice-hero3::before {
    content: '';
    display: block;
    width: 100%;
    height: 250px;
    /* 写真を十分な大きさで見せる */
    background-image: url('../img/ph3_hero-image.jpg');
    background-size: cover;
    background-position: center 30%;
    border-radius: 10px;
    margin-bottom: 15px;
    /* 写真とキャッチコピーカードの間の余白 */
}
.voice-hero4::before {
    content: '';
    display: block;
    width: 100%;
    height: 250px;
    /* 写真を十分な大きさで見せる */
    background-image: url('../img/ph4_hero-image.jpg');
    background-size: cover;
    background-position: center 30%;
    border-radius: 10px;
    margin-bottom: 15px;
    /* 写真とキャッチコピーカードの間の余白 */
}

.voice-hero__card {
    background: var(--voice-color-white);
    /* スマホでは透かさず上品な白背景に */
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px;
    border-radius: 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    margin: 0;
}

.voice-hero__copy {
    font-size: 18px;
    /* 文字サイズをスマホ向けに最適化 */
    font-weight: bold;
    line-height: 1.5;
    margin: 0;
}

@media (min-width: 768px) {
    .voice-hero3 {
        height: 500px;
        background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('../img/ph3_hero-image.jpg');
        background-size: cover;
        background-position: center 30%;
        border-radius: 10px;
        flex-direction: row;
        /* PCでは重ねるために横並びに戻す */
        align-items: center;
        justify-content: flex-start;
        /* PCでは左寄せ */
        margin-bottom: 40px;
    }
    .voice-hero4 {
        height: 500px;
        background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('../img/ph4_hero-image.jpg');
        background-size: cover;
        background-position: center 30%;
        border-radius: 10px;
        flex-direction: row;
        /* PCでは重ねるために横並びに戻す */
        align-items: center;
        justify-content: flex-start;
        /* PCでは左寄せ */
        margin-bottom: 40px;
    }

    /* PCでは疑似要素の写真ブロックは不要なので非表示にする */
    .voice-hero3::before,
    .voice-hero4::before {
        display: none;
    }

    .voice-hero__card {
        padding: 35px 50px;
        max-width: 25%;
        width: 100%;
        margin-left: 5%;
        margin-right: 0;
        border: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.95);
        box-sizing: content-box;
        /* スマホ版の border-box 指定の干渉を排除し、元のサイズ感（content-box）に戻す */
    }

    .voice-hero__copy {
        font-size: 24px;
        line-height: 1.6;
    }
}

/* 2. プロフィール */
.voice-profile {
    background: var(--voice-color-gray-bg);
    border-radius: 15px;
    padding: 20px;
    /* スマホでは余白をスリムに */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* スマホでもコンパクトな2カラムにする */
    gap: 15px 12px;
}

.voice-profile__item {
    display: flex;
    align-items: center;
    gap: 12px; /* アイコン拡大に合わせて隙間を調整 */
}

.voice-profile__icon {
    width: 28px; /* さらにアイコン自体を大きく */
    height: 28px;
    flex-shrink: 0;
    color: var(--voice-color-green);
    background: #eef2e6;
    /* 薄い緑の背景 */
    padding: 8px;
    border-radius: 8px;
}

.voice-profile__label {
    font-weight: bold;
    font-size: 14px; /* 大きすぎず適度な太字で強調 */
    line-height: 1.3;
    margin-bottom: 2px; /* ラベルと値の間に心地よい余白を追加 */
    display: block;
    color: var(--voice-color-text);
}

.voice-profile__value {
    font-size: 12px; /* ラベルとのサイズ比率を最も美しく調整 */
    line-height: 1.3;
    color: #666666; /* サブデータとして可読性の高いグレーに調整 */
}

@media (min-width: 768px) {
    .voice-profile {
        grid-template-columns: 1fr 1fr;
        padding: 40px;
        gap: 20px;
    }

    .voice-profile__item {
        gap: 15px;
    }

    .voice-profile__icon {
        width: 38px; /* PC向けにさらに大きく見栄え良く調整 */
        height: 38px;
        padding: 10px;
        border-radius: 10px;
    }

    .voice-profile__label {
        font-size: 16px; /* 本文テキストと調和する美しいサイズ */
        margin-bottom: 4px; /* PCでの行間バランスを確保 */
    }

    .voice-profile__value {
        font-size: 14px; /* 項目名と完璧なバランスの取れるサイズ */
    }
}

/* 3. インタビューセクション */
.voice-interview__item {
    margin-bottom: 40px;
    /* スマホでは少しコンパクトに */
    display: grid;
    grid-template-columns: 1fr;
    /* スマホではシンプルな縦並び（1カラム）に戻す */
    gap: 15px;
}

.voice-interview__image-main {
    /* grid-areaなし（スマホでの要素重なりを防ぐため） */
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
}

.voice-interview__chat {
    /* grid-areaなし（スマホでの要素重なりを防ぐため） */
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 10px;
}

/* サブ画像はスマホでは完全に非表示にする */
.voice-interview__image-sub1,
.voice-interview__image-sub2 {
    display: none;
}

@media (min-width: 768px) {
    .voice-interview__item {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "main main chat chat"
            "main main sub1 sub2";
        gap: 20px;
        margin-bottom: 60px;
    }

    .voice-interview__item--reverse {
        grid-template-areas:
            "chat chat main main"
            "sub1 sub2 main main";
    }

    /* PCでのみgrid-areaを適用し、グリッドの特定セルに配置 */
    .voice-interview__image-main {
        grid-area: main;
    }

    .voice-interview__chat {
        grid-area: chat;
        margin-bottom: 0;
    }

    /* PCでのみ表示してgrid-areaを適用 */
    .voice-interview__image-sub1 {
        display: block;
        grid-area: sub1;
    }

    .voice-interview__image-sub2 {
        display: block;
        grid-area: sub2;
    }
}

.voice-chat-bubble {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    max-width: 100%;
}

.voice-chat-bubble--q {
    flex-direction: row;
}

.voice-chat-bubble--a {
    flex-direction: row;
}

.voice-chat-bubble__icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.voice-chat-bubble__content {
    position: relative;
    padding: 15px 20px;
    border-radius: 15px;
    font-weight: 500;
}

.voice-chat-bubble--q .voice-chat-bubble__content {
    background: var(--voice-color-gray-bg);
}

.voice-chat-bubble--a .voice-chat-bubble__content {
    background: #fff9d6;
}

.voice-chat-bubble__content::before {
    content: '';
    position: absolute;
    top: 15px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.voice-chat-bubble--q .voice-chat-bubble__content::before {
    left: -18px;
    border-right-color: var(--voice-color-gray-bg);
}

.voice-chat-bubble--a .voice-chat-bubble__content::before {
    left: -18px;
    border-right-color: #fff9d6;
}

/* スマホ表示（767px以下）でのみチャットバブルをLINE風に左右交互にする */
@media (max-width: 767px) {
    .voice-chat-bubble {
        gap: 10px;
    }

    .voice-chat-bubble__icon {
        width: 42px;
        /* スマホ向けにアイコンを少しコンパクトに */
        height: 42px;
    }

    .voice-chat-bubble__content {
        padding: 12px 16px;
        font-size: 15px;
        /* スマホ向けにフォントサイズ微調整 */
    }

    /* A（お客様・回答）を右寄せ＋右アイコン＋右ひげにする */
    .voice-chat-bubble--a {
        flex-direction: row-reverse;
        align-self: flex-end;
        width: auto;
        max-width: 90%;
        /* 右寄せ時の画面端とのバランスをとる */
    }

    .voice-chat-bubble--a .voice-chat-bubble__content::before {
        left: auto;
        right: -18px;
        border-right-color: transparent;
        border-left-color: #fff9d6;
        /* 吹き出しのひげを右端から左向きに */
    }

    /* Q（質問）もスマホ向けに少し引き締める */
    .voice-chat-bubble--q {
        max-width: 90%;
    }
}

.voice-interview__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    min-height: 200px;
    /* スマホでも写真が大きくはっきり見えるように元の200pxに復元 */
}

@media (min-width: 768px) {
    .voice-interview__image {
        min-height: auto;
    }
}

/* 4. スタッフメッセージ */
.voice-staff {
    background: var(--voice-color-gray-bg);
    border-radius: 15px;
    padding: 20px;
    /* スマホ向けに少しスリムに */
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.voice-staff__photo {
    width: 100%;
    max-width: 250px;
    /* スマホ向けに少しコンパクトにして写真の存在感を整える */
    border-radius: 10px;
}

.voice-staff__content {
    flex: 1;
    width: 100%;
}

.voice-staff__title {
    font-size: 18px;
    /* スマホ向けに最適化 */
    font-weight: bold;
    margin-bottom: 12px;
    text-align: center;
    /* スマホでは中央寄せで落ち着きを出す */
}

.voice-staff__message {
    font-family: var(--voice-font-main);
    font-size: 14px;
    /* スマホ向けに最適化 */
    line-height: 1.7;
}

@media (min-width: 768px) {
    .voice-staff {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 40px;
        padding: 30px;
    }

    .voice-staff__photo {
        width: 100%;
        max-width: none;
    }

    .voice-staff__title {
        font-size: 19px;
        margin-bottom: 15px;
        text-align: left;
    }

    .voice-staff__message {
        font-size: 16px;
        line-height: 1.8;
    }
}

/* 5. CTAボタンエリア */
.voice-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.voice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    /* スマホ向けにスリム化して押しやすく */
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none;
    color: var(--voice-color-text);
    transition: transform 0.2s, opacity 0.2s;
    text-align: center;
    font-size: 16px;
    /* スマホでの不要な文字改行を防ぐためスリムに */
    border: none;
    cursor: pointer;
}

.voice-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.voice-btn--yellow {
    background-color: var(--voice-color-yellow);
}

.voice-btn--green {
    background-color: var(--voice-color-green);
    color: white;
}

.voice-btn--gray {
    background-color: #e0e0e0;
}

@media (min-width: 768px) {
    .voice-cta {
        flex-direction: row;
        gap: 15px;
        margin-top: 40px;
    }

    .voice-btn {
        flex: 1;
        padding: 20px;
        font-size: 18px;
    }
}