/* CONTACT Section Styles */
#contact {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.contact-container {
    display: flex;
    flex-direction: column; /* 縦並びに変更 */
    gap: 3rem; /* 縦方向のスペース */
    align-items: center; /* 中央揃え */
    width: 100%;
    max-width: 900px; /* コンテナの最大幅を制限 */
    margin: 0 auto; /* 中央配置 */
}

#contact h2 {
    font-family: 'Roboto', sans-serif;
    font-weight: 100; /* Thin weight */
    font-size: 3rem;
    line-height: 1.2;
    margin: 0;
    text-align: center; /* 中央揃え */
}

.contact-form {
    width: 100%; /* 全幅を使用 */
    max-width: 600px; /* 最大幅を制限 */
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

/* contentsラベルのみ上端揃え */
.form-group:has(textarea) {
    align-items: flex-start;
}

.form-group label {
    font-family: 'Roboto', sans-serif;
    font-weight: 100; /* Thin weight */
    font-size: 1.1rem;
    width: 100px; /* ラベル幅を固定 */
    text-align: right; /* 右端揃え */
    color: #333;
    flex-shrink: 0;
}

.form-group input,
.form-group textarea {
    flex: 1;
    font-family: 'Roboto', sans-serif;
    font-weight: 100; /* Thin weight */
    font-size: 1rem;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid #000; /* 黒い1pxの下線 */
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    width: 100%;
}

.form-actions {
    margin-left: 132px; /* ラベル幅(100px) + gap(2rem=32px) */
}

.form-actions button {
    font-family: 'Roboto', sans-serif;
    font-weight: 100; /* Thin weight */
    font-size: 1rem;
    padding: 0.8rem 2rem;
    background: #888; /* グレー背景 */
    color: #fff;
    border: none;
    border-radius: 25px; /* 角丸 */
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.form-actions button:hover {
    background: #eee;
    transform: translateY(2px);
    color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #contact {
        padding: 3rem 3rem; /* 左右パディングを狭める */
    }
    
    .contact-container {
        gap: 2rem; /* 縦並びなのでgapを調整 */
        max-width: 100%; /* モバイルでは幅制限を緩める */
    }
    
    #contact h2 {
        font-size: 2.5rem;
    }
    
    .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-group label {
        width: auto; /* モバイルでは幅を自動調整 */
        text-align: left; /* モバイルでは左揃えに戻す */
    }
    
    .form-actions {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    #contact {
        padding: 6rem 3rem;
    }
    
    #contact h2 {
        font-size: 2rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.9rem;
    }
    
    .form-actions button {
        font-size: 0.9rem;
        padding: 0.7rem 1.5rem;
    }
}
