/* ========================================
   お問い合わせページ専用スタイル
   ======================================== */

/* PC表示でのヘッダと見出しの間に余白を追加 */
#contact-form {
    padding-top: 100px;
}

/* お問い合わせページの基本設定 */
.page-contact {
    background-color: var(--white);
}

/* 見出しスタイル */
.page-contact .section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 120px;
    position: relative;
    padding: 10px 20px;
    z-index: 10;
    overflow: visible;
}

.page-contact .contact-title {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-contact .contact-title__main {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.page-contact .contact-title__sub {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 0.2em;
}

/* お問い合わせ見出しのイラスト（PC表示：標準サイズ） */
#contact-form .section-title::before {
    content: '';
    position: absolute;
    left: 0; /* 波状イラストの左端に配置 */
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    width: 80px;
    height: 80px;
    background-image: url('../images/star.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
    opacity: 0.7;
}

#contact-form .section-title::after {
    content: '';
    position: absolute;
    right: 0; /* 波状イラストの右端に配置 */
    top: 50%;
    transform: translateY(-50%) rotate(15deg);
    width: 80px;
    height: 80px;
    background-image: url('../images/sun.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
    opacity: 0.7;
}

/* 説明文 */
.page-contact #contact-form p {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
    line-height: 1.8;
}

/* フォームのスタイル */
.page-contact .contact-form-container {
    max-width: 600px !important;
    margin: 0 auto !important;
    background-color: var(--white) !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

.page-contact .form-group {
    margin-bottom: 25px;
}

.page-contact .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.page-contact .form-group input,
.page-contact .form-group textarea {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
}

.page-contact .form-group input:focus,
.page-contact .form-group textarea:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.page-contact .form-group input:invalid,
.page-contact .form-group textarea:invalid {
    border-color: #ff6b6b;
}

/* ボタンのスタイル */
.page-contact .btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--main-color);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.page-contact .btn:hover {
    background-color: var(--main-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.page-contact .btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-contact .btn-secondary {
    background-color: #6c757d;
    margin-right: 15px;
}

.page-contact .btn-secondary:hover {
    background-color: #5a6268;
}

/* モーダルのスタイル */
.page-contact .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center; /* 画面中央に配置 */
    z-index: 2005;
    /* iOS/Safariでも内部スクロールを生かす */
    -webkit-overflow-scrolling: touch;
}

.page-contact .modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh; /* カード内でスクロール */
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    overflow-anchor: none; /* 初期表示の下端固定を防止 */
    scroll-behavior: auto; /* スムーススクロールを無効化 */
}

/* 内側の内容もアンカー無効化 */
.page-contact #confirmation-data {
    overflow-anchor: none;
}

.page-contact .modal-content h3 {
    margin-bottom: 20px;
    color: var(--main-color);
    text-align: center;
}

.page-contact .modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

/* 確認データのスタイル */
/* 確認データの個別装飾は不要のため削除（元の表示に戻す） */

/* ========================================
   レスポンシブ対応（モバイル）
   ======================================== */

@media (max-width: 879px) {
    /* モバイル表示でのヘッダと見出しの間に余白を追加 */
    #contact-form {
        padding-top: 160px;
    }
    
    .section-title {
        margin-bottom: 48px; /* 標準的な見出し下余白 */
    }
    
    /* モバイル表示でのイラスト調整（縮小表示） */
    #contact-form .section-title::before {
        left: -15px;
        width: 60px;
        height: 60px;
        transform: translateY(-50%) rotate(-15deg);
    }

    #contact-form .section-title::after {
        right: -15px;
        width: 60px;
        height: 60px;
        transform: translateY(-50%) rotate(15deg);
    }
    
    /* 見出しテキストサイズ調整 */
    .page-contact .contact-title__main,
    .page-contact .contact-title__sub {
        font-size: 1.8rem;
    }
    
    .page-contact .section-title {
        overflow: visible;
        z-index: 3;
    }
    
    /* フォーム調整 */
    .page-contact .contact-form-container {
        padding: 20px;
        margin: 0 15px;
    }
    
    /* モバイル表示でのボタン幅調整 */
    .page-contact .btn {
        width: 100% !important;
        text-align: center !important;
        display: block !important;
        box-sizing: border-box !important;
        max-width: 360px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* モーダル調整 */
    .page-contact .modal-content {
        padding: 20px;
        margin: 20px;
        /* 元の高さに戻す（上方向オフセットを撤廃） */
    }
    
    .page-contact .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
}
